/*
Theme Name: Shelter Mi Refugio
Description: Responsive Styles
Version: 1.0.0
*/

/* ==========================================================================
   Tablet Styles (768px - 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    
    /* Hero Section */
    .hero-container,
    .hero-container-home {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero-image {
        order: -1;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content p {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .floating-card {
        display: none;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    /* Mission Grid */
    .mission-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    /* Impact Stats */
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }

    /* Sections Padding */
    .mission,
    .impact-stats,
    .cta-section,
    .latest-projects {
        padding: 80px 30px;
    }

    .hero {
        min-height: auto;
    }

    .hero-container {
        padding: 60px 30px;
    }
}

/* ==========================================================================
   Mobile Styles (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    
    /* CSS Variables for Mobile */
    :root {
        --container-padding: 20px;
    }

    /* Header */
    .header-container {
        padding: 0 20px;
        height: 70px;
    }

    .logo-circle {
        width: 50px;
        height: 50px;
    }

    .logo-circle::before {
        font-size: 24px;
    }

    .logo-text {
        font-size: 12px;
    }

    .logo-text .site-description {
        font-size: 10px;
    }

    /* Hide desktop menu, show mobile toggle */
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.menu-open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 15px 0;
        display: block;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        background: transparent;
    }

    .btn-donate {
        width: 100%;
        text-align: center;
        justify-content: center;
        margin-top: 10px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    body.admin-bar .site-header {
        top: 46px;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Hero Section */
    .hero {
        margin-top: 70px;
        min-height: auto;
    }

    .hero-container {
        padding: 50px 20px;
        gap: 30px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-image-main {
        height: 350px;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 50px;
    }

    .section-title {
        font-size: 32px;
    }

    .section-label {
        font-size: 12px;
    }

    /* Mission Section */
    .mission {
        padding: 60px 20px;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .mission-card {
        padding: 35px 25px;
    }

    .mission-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 20px;
    }

    .mission-card h3 {
        font-size: 20px;
    }

    /* Impact Stats */
    .impact-stats {
        padding: 60px 20px;
    }

    .impact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stat-number {
        font-size: 48px;
    }

    .stat-label {
        font-size: 16px;
    }

    /* CTA Section */
    .cta-section {
        padding: 60px 20px;
    }

    .cta-container h2 {
        font-size: 32px;
    }

    .cta-container p {
        font-size: 16px;
    }

    /* Projects Section */
    .latest-projects {
        padding: 60px 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-image {
        height: 220px;
    }

    .project-content {
        padding: 25px 20px;
    }

    /* Footer */
    .site-footer {
        padding: 50px 20px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom-grid {
        flex-direction: column;
        text-align: center;
    }

    .footer-dev {
        text-align: center;
    }

    .footer-column h3,
    .footer-column h4 {
        font-size: 20px;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        font-size: 12px;
        padding-top: 20px;
    }

    /* Typography */
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 22px;
    }

    h4 {
        font-size: 18px;
    }

    p {
        font-size: 15px;
    }
}

/* ==========================================================================
   Small Mobile Styles (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    
    .header-container {
        height: 70px;
    }

    .logo-circle {
        width: 45px;
        height: 45px;
    }

    .logo-circle::before {
        font-size: 20px;
    }

    .logo-text {
        font-size: 11px;
    }

    .hero-container {
        padding: 40px 15px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-image-main {
        height: 280px;
    }

    .btn {
        padding: 14px 30px;
        font-size: 15px;
    }

    .mission-card {
        padding: 30px 20px;
    }

    .stat-number {
        font-size: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-container h2 {
        font-size: 28px;
    }
}

/* ==========================================================================
   Landscape Mobile (max-height: 500px)
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    
    .hero {
        min-height: auto;
    }

    .hero-container {
        padding: 40px 20px;
    }

    .hero-image-main {
        height: 300px;
    }

    .mission,
    .impact-stats,
    .cta-section,
    .latest-projects {
        padding: 50px 20px;
    }
}

/* ==========================================================================
   Large Desktop (min-width: 1440px)
   ========================================================================== */

@media (min-width: 1440px) {
    
    .hero-container {
        gap: 100px;
    }

    .section-header {
        margin-bottom: 100px;
    }

    .mission-grid,
    .projects-grid {
        gap: 50px;
    }

    .footer-grid {
        gap: 80px;
    }
}

/* ==========================================================================
   Extra Large Desktop (min-width: 1920px)
   ========================================================================== */

@media (min-width: 1920px) {
    
    :root {
        --container-max: 1600px;
    }

    .hero-image-main {
        height: 650px;
    }

    .mission,
    .impact-stats,
    .cta-section,
    .latest-projects {
        padding: 140px var(--container-padding);
    }
}

/* ==========================================================================
   Print Optimization
   ========================================================================== */

@media print {
    
    /* Hide interactive elements */
    .mobile-menu-toggle,
    .btn-donate,
    .hero-actions,
    .social-links,
    .nav-menu {
        display: none !important;
    }

    /* Adjust spacing for print */
    .hero,
    .mission,
    .impact-stats,
    .cta-section,
    .latest-projects {
        padding: 20px 0;
        page-break-inside: avoid;
    }

    /* Ensure proper text color */
    body,
    h1, h2, h3, h4, h5, h6,
    p, a {
        color: #000 !important;
    }

    /* Remove backgrounds for print */
    .hero,
    .mission-card,
    .impact-stats {
        background: transparent !important;
    }

    /* Simplify layout */
    .hero-container,
    .footer-grid,
    .mission-grid,
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ==========================================================================
   Reduced Motion (Accessibility)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }

    .floating-card {
        animation: none !important;
    }

    .hero::before {
        animation: none !important;
    }
}

/* ==========================================================================
   High Contrast Mode (Accessibility)
   ========================================================================== */

@media (prefers-contrast: high) {
    
    :root {
        --primary: #A00070;
        --primary-dark: #600040;
        --dark: #000000;
        --white: #FFFFFF;
    }

    .btn {
        border: 2px solid currentColor;
    }

    a {
        text-decoration: underline;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    
    /* Optional: Uncomment to enable dark mode */
    /*
    :root {
        --dark: #FFFFFF;
        --gray: #CCCCCC;
        --light-gray: #2A2A2A;
        --white: #1A1A1A;
    }

    body {
        background: var(--white);
        color: var(--dark);
    }

    .site-header {
        background: #2A2A2A;
    }

    .mission-card {
        background: #2A2A2A;
    }

    .hero {
        background: linear-gradient(135deg, #1A1A1A 0%, #2A2A2A 100%);
    }
    */
}
