/* ============================================
   Enhanced Styles for Almothalat Website
   Additional features and improvements
   ============================================ */

/* ============================================
   WhatsApp Floating Button
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 995;
    transition: all 0.3s ease;
}

body[dir="rtl"] .whatsapp-float {
    left: auto;
    right: 30px;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Admin Panel Float Button */
.admin-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 995;
    transition: all 0.3s ease;
}

body[dir="rtl"] .admin-float {
    right: auto;
    left: 30px;
}

.admin-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.admin-float:hover .admin-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-10px);
}

body[dir="rtl"] .admin-float:hover .admin-tooltip {
    transform: translateX(10px);
}

.admin-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

body[dir="rtl"] .admin-tooltip {
    right: auto;
    left: 70px;
}

@media (max-width: 768px) {
    .admin-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 80px;
        right: 20px;
    }
    
    body[dir="rtl"] .admin-float {
        right: auto;
        left: 20px;
    }
    
    .admin-tooltip {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ============================================
   Hero Background
   ============================================ */
.hero {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    position: relative;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 193, 7, 0.1) 0%, transparent 50%);
    z-index: 0;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.stat-item {
    background: rgba(26, 31, 58, 0.7);
    backdrop-filter: blur(10px);
    padding: 25px 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
    display: block;
}

.light-mode .stat-item {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Certificates Carousel
   ============================================ */
.certificates {
    background: var(--dark-card);
    padding: 100px 0;
}

.light-mode .certificates {
    background: #f0f2f5;
}

.certificatesSwiper {
    padding: 40px 0 80px;
}

.certificate-card {
    background: var(--dark-bg);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.light-mode .certificate-card {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.certificate-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.2);
}

.certificate-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.certificate-img {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: contain;
    margin: 20px 0;
    border-radius: 10px;
}

.certificate-placeholder {
    width: 300px;
    height: 200px;
    background: rgba(255, 193, 7, 0.1);
    border: 2px dashed var(--accent-gold);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.certificate-placeholder i {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.certificate-placeholder h4 {
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.certificate-card h3 {
    font-size: 1.5rem;
    margin: 20px 0 10px;
    color: var(--accent-blue);
}

.certificate-card p {
    color: var(--dark-text-secondary);
    line-height: 1.6;
}

.light-mode .certificate-card p {
    color: var(--light-text-secondary);
}

.certificate-info {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid var(--accent-gold);
}

.certificate-info span {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* Swiper Custom Styles */
.certificatesSwiper .swiper-button-next,
.certificatesSwiper .swiper-button-prev {
    color: var(--accent-gold);
    width: 50px;
    height: 50px;
    background: var(--dark-card);
    border-radius: 50%;
}

.light-mode .certificatesSwiper .swiper-button-next,
.light-mode .certificatesSwiper .swiper-button-prev {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.certificatesSwiper .swiper-button-next:after,
.certificatesSwiper .swiper-button-prev:after {
    font-size: 20px;
}

.certificatesSwiper .swiper-pagination-bullet {
    background: var(--accent-gold);
    width: 12px;
    height: 12px;
}

.certificatesSwiper .swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 6px;
}

/* ============================================
   Before/After Slider
   ============================================ */
.before-after {
    padding: 100px 0;
    background: var(--dark-bg);
}

.light-mode .before-after {
    background: white;
}

.compare-slider {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.compare-slider img-comparison-slider {
    --divider-width: 4px;
    --divider-color: var(--accent-gold);
    --default-handle-width: 60px;
}

.compare-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 40px;
}

.label-before,
.label-after {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 30px;
    border-radius: 50px;
    background: rgba(255, 193, 7, 0.1);
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

/* ============================================
   Team Section
   ============================================ */
.team {
    padding: 100px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.team-member {
    background: var(--dark-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
}

.light-mode .team-member {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.team-member:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.2);
}

.member-img-wrapper {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.2), rgba(255, 193, 7, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-placeholder {
    width: 150px;
    height: 150px;
    background: rgba(255, 193, 7, 0.1);
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-placeholder i {
    font-size: 4rem;
    color: var(--accent-gold);
}

.member-info {
    padding: 30px;
    text-align: center;
}

.member-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.light-mode .member-info h3 {
    color: var(--light-text);
}

.member-role {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
}

.member-desc {
    color: var(--dark-text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.light-mode .member-desc {
    color: var(--light-text-secondary);
}

/* ============================================
   Cost Calculator
   ============================================ */
.calculator {
    background: var(--dark-card);
    padding: 100px 0;
}

.light-mode .calculator {
    background: #f0f2f5;
}

.calculator-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-form {
    background: var(--dark-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.light-mode .calculator-form {
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.calculator-form .form-group {
    margin-bottom: 0;
}

.calculator-form label {
    position: static;
    display: block;
    margin-bottom: 10px;
    color: var(--dark-text);
    font-weight: 600;
}

.light-mode .calculator-form label {
    color: var(--light-text);
}

.calculator-form input,
.calculator-form select {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark-text);
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

.light-mode .calculator-form input,
.light-mode .calculator-form select {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: var(--light-text);
}

.calculator-form input:focus,
.calculator-form select:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 193, 7, 0.05);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.calculator-result {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-gold));
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    margin-top: 30px;
    color: white;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.calculator-result h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.result-amount {
    font-size: 3rem;
    font-weight: 900;
    margin: 20px 0;
}

.result-note {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 20px 0;
}

.calculator-result .btn {
    margin-top: 20px;
}

/* ============================================
   Blog/News Section
   ============================================ */
.blog {
    padding: 100px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--dark-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
}

.light-mode .blog-card {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.2);
}

.blog-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-img-wrapper img {
    transform: scale(1.1);
}

.blog-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-gold);
    color: var(--dark-bg);
    width: 70px;
    height: 70px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

body[dir="rtl"] .blog-date {
    left: auto;
    right: 20px;
}

.blog-date .day {
    font-size: 2rem;
    line-height: 1;
}

.blog-date .month {
    font-size: 0.85rem;
    text-transform: uppercase;
}

.blog-content {
    padding: 30px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--dark-text-secondary);
}

.light-mode .blog-meta {
    color: var(--light-text-secondary);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-meta i {
    color: var(--accent-gold);
}

.blog-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-text);
    line-height: 1.4;
}

.light-mode .blog-content h3 {
    color: var(--light-text);
}

.blog-content p {
    color: var(--dark-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.light-mode .blog-content p {
    color: var(--light-text-secondary);
}

.blog-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.blog-link:hover {
    color: var(--accent-gold);
    gap: 12px;
}

.blog-link i {
    transition: var(--transition);
}

body[dir="rtl"] .blog-link i {
    transform: rotate(180deg);
}

/* ============================================
   Enhanced Buttons
   ============================================ */
.btn i {
    margin-right: 8px;
}

body[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 8px;
}

/* ============================================
   Responsive Design - Enhanced
   ============================================ */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 80px;
        left: 15px;
    }
    
    body[dir="rtl"] .whatsapp-float {
        left: auto;
        right: 15px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
    
    .stat-item {
        padding: 22px 12px;
        min-height: 150px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
    }
    
    .stat-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .stat-number {
        font-size: 2.2rem;
        margin: 8px 0;
    }
    
    .stat-label {
        font-size: 0.88rem;
        text-align: center;
        line-height: 1.3;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .compare-labels {
        padding: 0 20px;
    }
    
    .label-before,
    .label-after {
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .calculator-form {
        padding: 25px;
    }
    
    .calculator-result {
        padding: 30px 20px;
    }
    
    .result-amount {
        font-size: 2rem;
    }
    
    .controls-bar {
        top: 10px;
        left: 10px;
        gap: 8px;
    }
    
    body[dir="rtl"] .controls-bar {
        left: auto;
        right: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .certificate-card {
        padding: 25px;
        min-height: auto;
    }
    
    .certificate-placeholder,
    .certificate-img {
        width: 100%;
        max-width: 250px;
        height: 150px;
    }
    
    .member-img-wrapper {
        height: 220px;
    }
    
    .member-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .member-placeholder i {
        font-size: 3rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .whatsapp-float,
    .controls-bar,
    .navbar,
    .back-to-top,
    .notification {
        display: none !important;
    }
}