/*
* SWEAT MINISTRY - RESPONSIVE.CSS
*--------------------------------------------------
* 1. MOBILE-FIRST STYLES (Base in style.css)
* 2. TABLET STYLES (640px and up)
* 3. SMALL DESKTOP STYLES (768px and up)
* 4. STANDARD DESKTOP STYLES (1024px and up)
*--------------------------------------------------
*/

/* Mobile Base Styles (in style.css) */
/* Initially hide desktop nav, show hamburger */
.nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--light-color);
    box-shadow: var(--box-shadow);
}
.nav-links.active {
    display: block;
}
.nav-links ul {
    flex-direction: column;
    padding: 1rem;
}
.nav-links li {
    text-align: center;
    margin: 1rem 0;
}
.dropdown-menu {
    display: none; /* Hide on mobile by default */
    position: static;
    box-shadow: none;
    padding: 0;
    min-width: unset;
}
.dropdown-menu li a {
    padding: 0.8rem 1rem;
    background-color: var(--gray-color);
}

#main-header .nav-links a {
    color: var(--dark-color);
}
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
}
.hamburger .bar {
    height: 3px;
    width: 100%;
    background-color: var(--light-color);
    border-radius: 10px;
    transition: all var(--transition-speed);
}
#main-header.scrolled .hamburger .bar {
    background-color: var(--dark-color);
}

.hero h1 { font-size: 2.5rem; }
.impact-stats .container { flex-direction: column; }
.mission-vision .grid { grid-template-columns: 1fr; }
.program-cards-grid { grid-template-columns: 1fr; }
.involvement-grid { grid-template-columns: 1fr; }
.footer-grid { grid-template-columns: 1fr; }
.newsletter-form { flex-direction: column; align-items: center; }
.newsletter-form input { width: 100%; max-width: 400px; }

.timeline::after { left: 30px; }
.timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
.timeline-item:nth-child(even) { left: 0; }
.timeline-item::after { left: 20px; }


/* TABLET STYLES (640px and up)
-------------------------------------------------- */
@media (min-width: 640px) {
    .program-cards-grid { grid-template-columns: 1fr 1fr; }
    .involvement-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* SMALL DESKTOP STYLES (768px and up)
-------------------------------------------------- */
@media (min-width: 768px) {
    #main-header .btn { display: inline-block; }
    .nav-links {
        display: block;
        position: static;
        width: auto;
        background-color: transparent;
        box-shadow: none;
    }
    .nav-links.active { display: block; }
    .nav-links ul { flex-direction: row; padding: 0; }
    .nav-links li { margin: 0; }
    #main-header .nav-links a { color: var(--dark-color) !important; }
    #main-header.scrolled .nav-links a { color: var(--dark-color) !important; }
    .hamburger { display: none; }
    .mission-vision .grid { grid-template-columns: 1fr 1fr; }
    .impact-stats .container { flex-direction: row; }
    .newsletter-form { flex-direction: row; }

    /* Desktop Mega Menu Dropdown Styles (PayPal-style) */
    .dropdown-menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 600px;
        padding: 2rem;
        background-color: var(--light-color); /* White Background */
        border-radius: 8px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border: 1px solid #e0e0e0;
        
        /* Transition effect */
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Multi-column layout for mega menu */
    .dropdown-menu ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 2rem;
        padding: 0;
    }

    .dropdown-menu li {
        display: block;
        width: 100%;
        margin: 0;
    }

    .dropdown-menu li a {
        display: block;
        width: 100%;
        background-color: transparent;
        padding: 0.75rem 1rem;
        color: var(--dark-color) !important; /* Dark Text */
        transition: all 0.2s ease;
        text-align: left;
        border-radius: 6px;
        font-weight: 500;
        font-size: 0.95rem;
    }

    .dropdown-menu li a:hover {
        background-color: #f5f5f5; /* Light gray hover */
        color: var(--primary-color) !important;
        transform: translateX(5px);
    }
    
    /* Arrow indicator for dropdown items */
    .dropdown-menu li a::after {
        content: '→';
        opacity: 0;
        margin-left: 0.5rem;
        transition: opacity 0.2s ease;
    }
    
    .dropdown-menu li a:hover::after {
        opacity: 1;
    }
}

/* STANDARD DESKTOP STYLES (1024px and up)
-------------------------------------------------- */
@media (min-width: 1024px) {
    .program-cards-grid { grid-template-columns: repeat(4, 1fr); }
    .involvement-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(4, 1fr); }
    .timeline::after { left: 50%; }
    .timeline-item { width: 50%; }
    .timeline-item:nth-child(odd) { left: 0; padding: 1rem 2.5rem 1rem 0; }
    .timeline-item:nth-child(even) { left: 50%; padding: 1rem 0 1rem 2.5rem; }
    .timeline-item::after { left: auto; right: -10px; }
    .timeline-item:nth-child(even)::after { left: -10px; }
}
