/* ===== RESPONSIVE STYLES ===== */

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Medium devices (tablets, 768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu {
        gap: 1.5rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Team page adjustments */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Projects page adjustments */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .menu.active {
        left: 0;
    }
    
    .menu-item {
        width: 100%;
        text-align: center;
    }
    
    .menu-item a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #ecf0f1;
    }
    
    /* Mobile dropdown fixes */
    .dropdown .dropdown-toggle::after {
        content: ' ▾';
        display: inline-block;
        margin-left: 5px;
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: ' ▴';
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        display: none;
        width: 100%;
        border-left: 3px solid #3498db;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    .dropdown-menu .menu-item a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e9ecef;
        color: #555;
        font-weight: 400;
    }
    
    .dropdown-menu .menu-item:last-child a {
        border-bottom: none;
    }
    
    .dropdown-menu .menu-item.current a {
        color: #e74c3c;
        background: #fff;
    }
    
    .page-banner {
        padding: 100px 0 40px;
        margin-top: 60px;
    }
    
    .page-banner h1 {
        font-size: 2rem;
    }
    
    .page-banner p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .feature-grid,
    .about-grid,
    .donation-options {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .gallery-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.75rem 1.5rem;
    }
    
    /* Team page adjustments */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    /* Projects page adjustments */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .impact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Project card link adjustments */
    .project-card-link {
        display: block;
    }
    
    .project-card-link .project-card:hover {
        transform: translateY(-5px);
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    .branding {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .logo-text .site-title {
        font-size: 1rem;
    }
    
    .page-banner h1 {
        font-size: 1.8rem;
    }
    
    .welcome-section h2,
    .about-section h2,
    .donation-intro h2 {
        font-size: 1.8rem;
    }
    
    .feature-card,
    .about-card,
    .donation-option {
        padding: 1.5rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .donation-form {
        padding: 1.5rem;
    }
    
    .gallery-items {
        grid-template-columns: 1fr;
    }
    
    .gallery-filter {
        gap: 0.5rem;
    }
    
    .filter-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Team page adjustments */
    .team-grid {
        gap: 1rem;
    }
    
    .member-image-container {
        height: 250px;
    }
    
    .member-content {
        padding: 1.5rem 1rem;
    }
    
    /* Projects page adjustments */
    .projects-grid {
        gap: 1.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    /* Project card link adjustments */
    .project-card-link .project-card:hover {
        transform: translateY(-3px);
    }
}

/* Mobile menu toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Dropdown arrow styles */
.dropdown-arrow {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .dropdown-arrow {
        display: none;
    }
}

/* Form error styles for mobile */
@media (max-width: 767px) {
    .error-message {
        font-size: 0.75rem !important;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Improve touch targets for mobile */
@media (max-width: 767px) {
    button, 
    .submit-btn, 
    .donate-btn, 
    .join-btn,
    .tab-button,
    .filter-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .menu-item a {
        padding: 1rem 1.5rem;
    }
}

/* Dropdown animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle {
        display: none;
    }
    
    .page-banner {
        margin-top: 0;
        padding: 2rem 0;
    }
    
    .main-content {
        padding: 1rem 0;
    }
}