/**
 * Responsive CSS
 * Embassy of Liberia WordPress Theme
 */

/* Tablet and smaller */
@media (max-width: 992px) {
    /* Navigation */
    .menu-toggle {
        display: block;
    }
    .main-nav .container {
        justify-content: flex-end;
        padding: 0 16px;
        min-height: 44px;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 280px;
        max-width: 80vw;
        background: white;
        padding: 6px 0;
        position: absolute;
        top: 100%;
        right: 0;
        box-shadow: var(--shadow-md);
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1000;
        border-radius: 0 0 12px 12px;
        border: 1px solid var(--border-light);
        border-top: none;
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-menu > li > a {
        padding: 10px 20px;
        border-bottom: none;
        border-left: 3px solid transparent;
        font-size: 0.85rem;
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
    }
    .nav-menu > li > a:hover {
        background: var(--bg-light);
        border-left-color: var(--primary-red);
    }
    .nav-menu .btn-nav {
        margin-left: 0;
        border-radius: 0;
    }
    .submenu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        background: var(--bg-light);
        border-radius: 0;
        display: none;
        width: 100%;
    }
    .has-submenu:focus-within .submenu {
        display: block;
    }
    .has-submenu:focus-within > .dropdown-toggle i {
        transform: rotate(180deg);
    }
    .submenu a {
        padding: 8px 20px 8px 36px;
        border-left: none;
    }
    .submenu a:hover {
        background: white;
        border-left: none;
    }

    /* President Grid */
    .president-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Service Grid */
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* On mobile: center all columns */
    @media (max-width: 600px) {
        .footer .footer-main {
            grid-template-columns: 1fr;
            gap: 20px;
            text-align: center;
        }
        .footer .brand-column .footer-logo {
            justify-content: center;
        }
        .footer .brand-column .footer-address {
            text-align: center;
        }
        .footer .brand-column .footer-mission {
            text-align: center;
        }
        .footer .footer-links a {
            text-align: center;
        }
        .footer .footer-links h4 {
            text-align: center;
            justify-content: center;
        }
        .footer .footer-bottom .legal-links {
            justify-content: center;
        }
    }
}

/* Tablet */
@media (max-width: 992px) and (min-width: 601px) {
    .footer .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    /* Hero Slider */
    .hero-slider {
        min-height: 400px;
    }
    .hero-slide .container {
        min-height: 400px;
    }
    .hero-slide-text h1 {
        font-size: 1.8rem;
    }
    .hero-slide-text p {
        font-size: 0.9rem;
    }
    .hero-slider-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .hero-slider-btn.prev-hero {
        left: 8px;
    }
    .hero-slider-btn.next-hero {
        right: 8px;
    }

    /* Ambassador Widget */
    .ambassador-widget {
        grid-template-columns: 1fr;
    }
    .ambassador-widget-image {
        min-height: 200px;
        aspect-ratio: auto;
    }
    .ambassador-widget-content {
        padding: 20px 22px;
    }
    .ambassador-widget-content h2 {
        font-size: 1.1rem;
    }

    /* News Room */
    .news-slide-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .news-slider-btn.prev-news {
        left: 4px;
    }
    .news-slider-btn.next-news {
        right: 4px;
    }
    .news-slider-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    /* Diaspora */
    .diaspora-grid {
        grid-template-columns: 1fr;
    }
}

/* Phones */
@media (max-width: 480px) {
    /* Header */
    .header-brand .logo-img {
        height: 44px;
    }
    .header-brand .brand-text {
        font-size: 0.9rem;
    }

    /* Navigation */
    .nav-menu {
        width: 240px;
        max-width: 75vw;
    }

    /* Hero Slider */
    .hero-slider {
        min-height: 340px;
    }
    .hero-slide .container {
        min-height: 340px;
    }
    .hero-slide-text h1 {
        font-size: 1.4rem;
    }
    .hero-slide-text .btn-hero {
        padding: 8px 20px;
        font-size: 0.75rem;
    }

    /* President Grid */
    .president-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .president-item .info .name {
        font-size: 0.95rem;
    }

    /* Service Grid */
    .service-grid {
        grid-template-columns: 1fr;
    }

    /* Service Tools */
    .service-tools {
        grid-template-columns: 1fr;
    }

    /* Back to Top */
    .back-to-top {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        bottom: 16px;
        right: 16px;
    }

    /* Top Bar - hide some text on very small screens */
    .top-bar .contact-info span:last-child {
        display: none;
    }
}