/* EcoToys 3D - Responsive CSS */

/* Mobile First Approach */

/* Base Mobile Styles (320px and up) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }
    
    /* Hero section mobile */
    #hero {
        padding-top: 2rem;
        padding-bottom: 2rem;
        min-height: 70vh;
    }
    
    /* Disable animations on mobile for performance */
    #hero::before {
        animation: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    /* Section spacing mobile */
    section {
        padding: 2rem 0;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 150px;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Form adjustments */
    .form-control {
        padding: 0.625rem 0.875rem;
    }
    
    /* Icon adjustments */
    .fa-3x {
        font-size: 2.5em;
    }
    
    .fa-2x {
        font-size: 1.75em;
    }
    
    /* Footer adjustments */
    #footer {
        text-align: center;
    }
    
    #footer .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Gallery mobile spacing */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    h1, .h1 {
        font-size: 1.875rem;
    }
    
    h2, .h2 {
        font-size: 1.625rem;
    }
    
    #hero {
        min-height: 75vh;
    }
    
    .card-img-top {
        height: 175px;
    }
    
    /* Disable hover animations on touch devices */
    @media (hover: none) {
        .card:hover {
            transform: none;
        }
        
        #gallery img:hover {
            transform: none;
        }
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Restore full typography */
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
    
    #hero {
        min-height: 80vh;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Section spacing tablet */
    section {
        padding: 3rem 0;
    }
    
    .py-5 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full desktop styles */
    #hero {
        min-height: 85vh;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    /* Enable hover effects on desktop */
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    #gallery img:hover {
        transform: scale(1.05);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    #hero {
        min-height: 90vh;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding: 5rem 0;
    }
    
    .py-5 {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: 100vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    section {
        padding: 1.5rem 0;
    }
    
    .py-5 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        margin: 0;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        font-weight: bold;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    .container {
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-4,
    .col-md-6,
    .col-lg-4,
    .col-lg-6 {
        width: 100%;
        float: none;
    }
    
    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .btn {
        display: none;
    }
    
    .navbar,
    #footer {
        display: none;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-primary:hover {
        background-color: #333;
        border-color: #333;
    }
    
    .text-muted {
        color: #666 !important;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    #hero::before {
        animation: none;
    }
    
    .card {
        transition: none;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    #gallery img {
        transition: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Dark mode support (if preferred by user) */

/* Container max-widths for better readability */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Focus indicators for keyboard navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading states for better UX */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 