/* Responsive Styles for Anaktana Website */

/* Tablet */
@media (max-width: 1024px) {
    :root { --text-5xl: 2.5rem; --text-4xl: 2rem; --text-3xl: 1.5rem; }
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-content { order: 1; }
    .hero-image { order: 0; max-width: 500px; margin: 0 auto; }
    .hero-text { margin: 0 auto var(--space-xl); }
    .programs-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
    .testimonial .container { grid-template-columns: 1fr; }
    .testimonial-header { text-align: center; margin-bottom: var(--space-xl); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --text-5xl: 2rem; --text-4xl: 1.75rem; --text-3xl: 1.375rem; --space-4xl: 4rem; }
    .nav-menu { display: none; position: fixed; top: 70px; left: 0; right: 0; background: var(--color-white); flex-direction: column; padding: var(--space-lg); box-shadow: var(--shadow-lg); }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: var(--space-md); width: 100%; text-align: center; border-bottom: 1px solid var(--color-gray); }
    .mobile-menu-btn { display: flex; }
    .hero { padding-top: 80px; min-height: auto; padding-bottom: var(--space-3xl); }
    .hero-bg-top { height: 80%; }
    .hero-decoration.flower { width: 60px; top: -15px; right: -15px; }
    .programs-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-number { font-size: var(--text-4xl); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
    .whatsapp-float { bottom: 20px; right: 20px; }
    .whatsapp-float a { width: 55px; height: 55px; }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root { --text-5xl: 1.75rem; --text-4xl: 1.5rem; }
    .container { padding: 0 1rem; }
    .btn { padding: 0.75rem 1.25rem; font-size: var(--text-sm); }
    .testimonial-nav { flex-wrap: wrap; justify-content: center; }
    .testimonial-progress { width: 100%; order: -1; margin-bottom: var(--space-md); }
}

/* Mobile Dropdown */
@media (max-width: 768px) {
    .nav-menu li.has-dropdown > a svg {
        margin-left: auto;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        background: var(--color-gray);
        border-radius: 0;
        padding: 0;
        transition: all 0.3s ease;
    }
    
    .nav-menu li.has-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 200px;
        padding: var(--space-sm) 0;
    }
    
    .dropdown-menu li a {
        padding: var(--space-sm) var(--space-lg);
    }
}

/* Mobile Hero Section Fix */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 0;
    }
    
    .hero-bg-top {
        height: 100%;
        clip-path: ellipse(120% 85% at 50% 0%);
    }
    
    .hero-bg-bottom {
        height: 30%;
        bottom: -5%;
        clip-path: ellipse(100% 100% at 50% 100%);
    }
    
    .hero .container {
        padding-top: var(--space-md);
        padding-bottom: var(--space-xl);
    }
    
    .hero-content {
        padding-bottom: var(--space-md);
    }
    
    .hero-title {
        margin-top: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .hero-text {
        margin-bottom: var(--space-lg);
    }
    
    .hero-image {
        margin-bottom: var(--space-lg);
    }
    
    .hero-image-wrapper {
        max-width: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 60px;
    }
    
    .hero-bg-top {
        height: 100%;
        clip-path: ellipse(150% 80% at 50% 0%);
    }
    
    .hero-bg-bottom {
        height: 35%;
        bottom: -10%;
    }
    
    .hero .container {
        padding-top: var(--space-sm);
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-top: var(--space-sm);
    }
    
    .hero-text {
        font-size: var(--text-sm);
    }
    
    .hero-image-wrapper {
        max-width: 280px;
    }
}

/* Additional Mobile Hero Fix - Remove white areas */
@media (max-width: 768px) {
    /* Header takes less space */
    .header {
        padding: var(--space-sm) 0;
    }
    
    .logo img {
        height: 35px;
    }
    
    /* Hero starts right after header */
    .hero {
        padding-top: 55px;
        background: var(--color-tosca);
    }
    
    .hero-bg-top {
        display: none;
    }
    
    /* Let hero have solid background */
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 30%;
        background: var(--color-tosca);
        z-index: -1;
    }
    
    .hero::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 40%;
        background: var(--color-yellow);
        clip-path: ellipse(100% 80% at 50% 100%);
        z-index: -1;
    }
}

@media (max-width: 480px) {
    .header {
        padding: var(--space-xs) 0;
    }
    
    .logo img {
        height: 30px;
    }
    
    .hero {
        padding-top: 50px;
    }
}

/* Mobile Footer Fix */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: left;
    }
    
    .footer-brand {
        text-align: left;
    }
    
    .footer-brand .logo {
        margin-bottom: var(--space-md);
    }
    
    .footer-contact {
        text-align: left;
    }
    
    .footer-contact p,
    .footer-contact a {
        text-align: left;
        justify-content: flex-start;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    /* Menu Links in 2 columns */
    .footer .container .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }
    
    /* Wrapper for menu columns */
    .footer-links-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    .footer-links {
        text-align: left;
    }
    
    .footer-links h4 {
        font-size: var(--text-sm);
        margin-bottom: var(--space-md);
    }
    
    .footer-links ul li a {
        font-size: var(--text-xs);
    }
}

/* Mobile Footer Fix - Revised */
@media (max-width: 768px) {
    /* Footer Grid on Mobile */
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    /* Footer Brand - Left Aligned */
    .footer-brand {
        text-align: left !important;
    }
    
    .footer-brand .logo {
        display: flex;
        justify-content: flex-start;
    }
    
    .footer-contact {
        text-align: left !important;
    }
    
    .footer-contact p {
        text-align: left !important;
    }
    
    .footer-contact a {
        justify-content: flex-start !important;
    }
    
    .footer-social {
        justify-content: flex-start !important;
    }
    
    /* Footer Links - 2 Column Grid */
    .footer-grid > .footer-links:nth-child(2),
    .footer-grid > .footer-links:nth-child(3),
    .footer-grid > .footer-links:nth-child(4) {
        display: inline-block;
        width: calc(50% - var(--space-sm));
        vertical-align: top;
        text-align: left;
    }
    
    .footer-grid > .footer-links:nth-child(3) {
        margin-left: 0;
    }
    
    .footer-links {
        text-align: left !important;
    }
    
    .footer-links h4 {
        text-align: left;
    }
    
    .footer-links ul li {
        text-align: left;
    }
}

/* Mobile Footer - 2 Column Menu Fix */
@media (max-width: 768px) {
    .footer-grid {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-lg);
    }
    
    .footer-brand {
        width: 100%;
        flex: 0 0 100%;
    }
    
    /* Make menu links display in 2 columns */
    .footer-links {
        flex: 0 0 calc(50% - var(--space-md));
        width: calc(50% - var(--space-md));
    }
    
    .footer-links:last-child {
        /* Lainnya section - can be full width or stay in grid */
        flex: 0 0 calc(50% - var(--space-md));
    }
}

/* Mobile Footer - Force 2 Column Menu with !important */
@media (max-width: 768px) {
    .footer .container .footer-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: var(--space-lg) !important;
    }
    
    .footer .container .footer-grid > .footer-brand {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
    
    .footer .container .footer-grid > .footer-links {
        flex: 0 0 47% !important;
        width: 47% !important;
    }
}
