/* ===================================
   MOBILE SECTIONS IMPROVEMENTS
   Enhanced mobile design for homepage sections
   =================================== */

/* ===================================
   ABOUT SECTION - MOBILE ENHANCEMENTS
   =================================== */

/* Mobile improvements only - no desktop changes */
@media (max-width: 992px) {
    /* About Section Mobile Layout */
    .about-section {
        padding: 60px 20px !important;
        background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    }
    
    .about-header {
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 28px !important;
        color: #2d5f2e;
        font-weight: 800;
        letter-spacing: 1.5px;
        margin-bottom: 12px;
    }
    
    .title-underline {
        width: 60px;
        height: 4px;
        background: linear-gradient(90deg, #159611, #396a11);
        margin: 0 auto 15px auto;
        border-radius: 2px;
    }
    
    /* About Content Mobile */
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .about-text {
        padding: 0;
        text-align: center;
    }
    
    .about-heading {
        font-size: 22px !important;
        color: #2d2d2d;
        font-weight: 700;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .about-description {
        font-size: 14px !important;
        line-height: 1.8;
        color: #555;
        margin-bottom: 15px;
        text-align: justify;
    }
    
    /* Stats Grid Mobile - Horizontal Layout */
    .stats-grid {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 30px;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
    }
    
    .stat-card {
        flex: 1 1 0;
        min-width: 0;
        max-width: 110px;
        aspect-ratio: 1 / 1;
        background: linear-gradient(135deg, #159611 0%, #396a11 100%);
        border-radius: 16px;
        padding: 12px 8px;
        box-shadow: 0 8px 20px rgba(21, 150, 17, 0.25);
        transition: all 0.3s ease;
    }
    
    .stat-card:active {
        transform: scale(0.95);
        box-shadow: 0 4px 12px rgba(21, 150, 17, 0.3);
    }
    
    .stat-number {
        font-size: 24px !important;
        font-weight: 800;
        color: white;
        margin-bottom: 6px;
        line-height: 1;
    }
    
    .stat-label {
        font-size: 10px !important;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.95);
        letter-spacing: 0.5px;
        line-height: 1.2;
    }
    
    /* Video Mobile */
    .about-video {
        width: 100%;
        margin-top: 10px;
    }
    
    .video-wrapper {
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        padding-bottom: 56.25%;
    }
    
    .video-wrapper iframe {
        border-radius: 16px;
    }
}

/* Tablet specific adjustments */
@media (max-width: 768px) {
    .about-section {
        padding: 50px 18px !important;
    }
    
    .about-header {
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 24px !important;
        letter-spacing: 1px;
    }
    
    .title-underline {
        width: 50px;
        height: 3px;
        margin-bottom: 12px;
    }
    
    .about-heading {
        font-size: 20px !important;
        margin-bottom: 12px;
    }
    
    .about-description {
        font-size: 13px !important;
        margin-bottom: 12px;
        text-align: justify;
    }
    
    .stats-grid {
        gap: 8px;
        margin-top: 25px;
    }
    
    .stat-card {
        max-width: 100px;
        border-radius: 14px;
        padding: 10px 6px;
    }
    
    .stat-number {
        font-size: 22px !important;
        margin-bottom: 5px;
    }
    
    .stat-label {
        font-size: 9px !important;
    }
    
    .video-wrapper {
        border-radius: 14px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .about-section {
        padding: 40px 15px !important;
    }
    
    .about-header {
        margin-bottom: 18px;
    }
    
    .section-title {
        font-size: 20px !important;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
    }
    
    .title-underline {
        width: 40px;
        height: 3px;
        margin-bottom: 10px;
    }
    
    .about-heading {
        font-size: 18px !important;
        margin-bottom: 10px;
    }
    
    .about-description {
        font-size: 12px !important;
        line-height: 1.7;
        margin-bottom: 10px;
        text-align: justify;
    }
    
    /* Stats Grid - Keep Horizontal on small screens */
    .stats-grid {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 6px;
        margin-top: 20px;
        width: 100%;
    }
    
    .stat-card {
        flex: 1 1 0;
        min-width: 0;
        max-width: 90px;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
        padding: 8px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
    }
    
    .stat-number {
        font-size: 20px !important;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 9px !important;
        text-align: center;
        line-height: 1.2;
    }
    
    .video-wrapper {
        border-radius: 12px;
        padding-bottom: 60%;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .about-section {
        padding: 35px 12px !important;
    }
    
    .about-header {
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 18px !important;
    }
    
    .title-underline {
        margin-bottom: 8px;
    }
    
    .about-heading {
        font-size: 16px !important;
        margin-bottom: 8px;
    }
    
    .about-description {
        font-size: 11px !important;
        text-align: justify;
    }
    
    /* Stats Grid - Keep Horizontal even on extra small screens */
    .stats-grid {
        gap: 5px;
        margin-top: 18px;
    }
    
    .stat-card {
        max-width: 80px;
        padding: 6px 3px;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 18px !important;
        margin-bottom: 3px;
    }
    
    .stat-label {
        font-size: 8px !important;
        line-height: 1.1;
    }
}

/* ===================================
   ANIMATION IMPROVEMENTS FOR MOBILE
   =================================== */

@media (max-width: 992px) {
    /* Smooth fade-in animations */
    .about-header,
    .about-text,
    .about-video {
        animation: mobileFadeInUp 0.6s ease forwards;
    }
    
    .stat-card:nth-child(1) {
        animation: mobileFadeInUp 0.6s ease 0.1s forwards;
        opacity: 0;
    }
    
    .stat-card:nth-child(2) {
        animation: mobileFadeInUp 0.6s ease 0.2s forwards;
        opacity: 0;
    }
    
    .stat-card:nth-child(3) {
        animation: mobileFadeInUp 0.6s ease 0.3s forwards;
        opacity: 0;
    }
    
    @keyframes mobileFadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ===================================
   TOUCH FEEDBACK IMPROVEMENTS
   =================================== */

@media (max-width: 992px) {
    /* Better touch feedback for interactive elements */
    .stat-card {
        -webkit-tap-highlight-color: rgba(21, 150, 17, 0.2);
        user-select: none;
    }
    
    .stat-card:active {
        transition: transform 0.1s ease;
    }
    
    /* Smooth scrolling for mobile */
    .about-section {
        scroll-margin-top: 80px;
    }
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

@media (max-width: 992px) {
    /* Ensure text is readable */
    .about-description {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Better contrast for stats */
    .stat-card {
        position: relative;
        overflow: hidden;
    }
    
    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
        pointer-events: none;
    }
}

/* ===================================
   WATER TREATMENT SECTION - MOBILE
   =================================== */

@media (max-width: 992px) {
    /* Show text overlay always on mobile, no hover needed */
    .treatment-back {
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.35);
        pointer-events: none;
    }
    
    .treatment-card {
        cursor: default;
    }
    
    /* Disable image zoom on mobile */
    .treatment-card:hover .treatment-front img,
    .treatment-card:active .treatment-front img {
        transform: none;
    }
    
    /* Better text visibility */
    .treatment-title {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
        font-weight: 700;
    }
}

@media (max-width: 768px) {
    .treatment-back {
        background: rgba(0, 0, 0, 0.4);
        padding: 15px;
    }
    
    .treatment-title {
        font-size: 15px !important;
        line-height: 1.3;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    }
}

@media (max-width: 480px) {
    .treatment-back {
        background: rgba(0, 0, 0, 0.45);
        padding: 20px;
    }
    
    .treatment-title {
        font-size: 16px !important;
        line-height: 1.4;
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 1);
    }
}

