/* Responsive Design for Silent Café Website */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    /* Menu improvements for large screens */
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .menu-category {
        padding: 2.5rem;
    }
    
    .menu-item {
        padding: 2rem;
        min-height: 280px;
    }
    
    .item-info h4 {
        font-size: 1.3rem;
    }
    
    .item-info p {
        font-size: 1.1rem;
    }
    
    .item-price {
        font-size: 1.5rem;
        padding: 1rem 1.5rem;
    }
}

/* Large Desktop */
@media (max-width: 1399px) {
    .values-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .value-card {
        padding: 1.5rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    /* Menu adjustments for standard desktop */
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .menu-item {
        padding: 1.75rem;
        min-height: 260px;
    }
    
    .item-info h4 {
        font-size: 1.2rem;
    }
    
    .item-price {
        font-size: 1.4rem;
    }
}

/* Large Tablet - Why Learn Images Optimization */
@media (max-width: 1200px) {
    .why-learn-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 2.5rem;
    }
    
    .why-learn-images {
        min-height: 450px;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section */
    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }

    .hero-content {
        width: 100%;
        padding: 0;
        margin-bottom: 3rem;
    }

    .hero-images {
        position: relative;
        width: 100%;
        height: 400px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* Welcome Section */
    .welcome-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    /* Values - handled above */
    
    /* Our Story */
    .our-story .story-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .our-story .story-text {
        padding-right: 0;
    }
    
    .our-story .story-text h2 {
        text-align: center;
    }
    
    .our-story .story-images {
        gap: 1rem;
    }
    
    .our-story .story-image img {
        height: 220px;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Menu page */
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-category.full-width {
        grid-column: 1;
    }
    
    /* Menu item adjustments for tablet */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .menu-item {
        padding: 1.5rem;
        min-height: 240px;
    }
    
    .item-info h4 {
        font-size: 1.1rem;
    }
    
    .item-price {
        font-size: 1.2rem;
        padding: 0.6rem 1rem;
    }
    
    /* Contact page */
    .forms-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        grid-template-columns: 1fr;
    }
    
    /* Learning page */
    .dine-sign-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .why-learn-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .why-learn-images {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        min-height: auto;
        height: auto;
    }
    
    .learn-image {
        flex: 1;
        height: auto;
    }
    
    .learn-image img {
        height: 200px;
        min-height: 200px;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    /* Category Filter */
    .category-filter {
        gap: 0.6rem;
        padding: 1.2rem;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .culture-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Blog Section */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Farmers page */
    .network-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .network-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    /* Success Stories Carousel */
    .stories-carousel {
        max-width: 600px;
    }
    
    .story-content {
        padding: 2rem;
    }
    
    .story-content p::before,
    .story-content p::after {
        font-size: 3rem;
    }
    
    .story-stats {
        gap: 2rem;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
    }
    
    .prev-btn {
        left: -22px;
    }
    
    .next-btn {
        right: -22px;
    }
    
    .requirements-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .contact-options {
        grid-template-columns: 1fr;
    }
    
    /* Timeline adjustments */
    .journey-timeline::before,
    .programs-timeline::before {
        left: 30px;
    }
    
    .timeline-item,
    .program-item {
        flex-direction: row !important;
        padding-left: 80px;
    }
    
    .timeline-icon,
    .program-icon {
        position: absolute;
        left: 0;
        margin: 0;
    }
    
    .timeline-content,
    .program-content {
        max-width: none;
    }
    
    /* Founder Section */
    .founder-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .founder-image img {
        height: 400px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .medal-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .medal-image img {
        width: 100px;
        height: 100px;
    }
    
    /* CTA */
    .cta-content {
        gap: 3rem;
    }
    
    .cta-info {
        padding-left: 1rem;
    }
    
    .cta h2 {
        font-size: 2.2rem;
    }
    
    .cta-image img {
        height: 350px;
    }
}

/* Medium Screens */
@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    /* Spacing */
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 15px;
    }

    /* Navigation */
    .nav-container {
        padding: 0 15px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .nav-logo img {
        height: 35px;
    }

    /* Hero */
    .hero {
        padding: 80px 0 30px;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-images {
        height: 300px;
    }

    /* Welcome */
    .welcome-text h2 {
        font-size: 1.8rem;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-grid img {
        height: 200px;
    }

    /* Values */
    .value-card {
        padding: 1.5rem;
    }

    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .value-image {
        height: 150px;
    }
    
    /* Our Story */
    .our-story .story-text h2 {
        font-size: 2rem;
        text-align: center;
    }
    
    .our-story .story-text p {
        text-align: center;
    }
    
    .our-story .story-images {
        gap: 1rem;
    }
    
    .our-story .story-image img {
        height: 200px;
    }
    
    /* Farm to Cup */
    .image-collage {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 200px);
        height: auto;
        gap: 1rem;
    }
    
    .main-image {
        grid-row: 1;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }

    /* CTA */
    .cta-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .cta-info {
        padding-left: 0;
    }
    
    .cta h2 {
        text-align: center;
        font-size: 2rem;
    }
    
    .cta p {
        text-align: center;
    }
    
    .cta-image img {
        height: 300px;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .contact-item i {
        align-self: center;
    }
    
    .cta-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }

    /* Spacing */
    :root {
        --section-padding: 50px 0;
        --container-padding: 0 10px;
    }

    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-logo img {
        height: 30px;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-images {
        height: 250px;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Values */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-card {
        padding: 1rem;
    }

    .value-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 1rem;
    }

    /* Success Stories Carousel */
    .stories-carousel {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    /* Medal Recognition Mobile */
    .medal-recognition {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .medal-image img {
        width: 80px;
        height: 80px;
    }
    
    .medal-text p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .story-content {
        padding: 1.5rem;
    }
    
    .story-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .story-content p {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }
    
    .story-content p::before,
    .story-content p::after {
        font-size: 2.5rem;
    }
    
    .story-content p::before {
        top: -0.3rem;
        left: -0.5rem;
    }
    
    .story-content p::after {
        bottom: -1rem;
        right: -0.5rem;
    }
    
    .story-stats {
        gap: 1.5rem;
        flex-direction: row;
    }
    
    .story-stat .stat-number {
        font-size: 1.6rem;
    }
    
    .story-stat .stat-label {
        font-size: 0.8rem;
    }
    
    .silhouette-container {
        width: 120px;
        height: 120px;
    }
    
    .silhouette-container i {
        font-size: 3rem;
    }
    
    .story-image {
        height: 200px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn i {
        font-size: 1rem;
    }
    
    .prev-btn {
        left: -20px;
    }
    
    .next-btn {
        right: -20px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    /* Our Story */
    .our-story .story-text h2 {
        font-size: 1.8rem;
    }
    
    .our-story .story-text p {
        font-size: 1rem;
    }
    
    .our-story .story-images {
        gap: 0.8rem;
    }
    
    .our-story .story-image img {
        height: 160px;
    }
    
    /* Farm to Cup */
    .image-collage {
        grid-template-rows: repeat(4, 150px);
        gap: 0.8rem;
    }

    /* CTA */
    .cta h2 {
        font-size: 1.8rem;
    }

    .cta p {
        font-size: 1rem;
    }

    .cta-image img {
        height: 250px;
    }
    
    .contact-item {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .contact-item strong {
        font-size: 0.9rem;
    }
    
    .contact-item span {
        font-size: 0.8rem;
    }
    
    /* Why Learn Sign Language */
    .why-learn-images {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .learn-image img {
        height: 150px;
        min-height: 150px;
    }
    
    /* Category Filter */
    .category-filter {
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}

/* Mobile Extra Small */
@media (max-width: 375px) {
    /* Typography */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }

    /* Hero */
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    /* Navigation */
    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-logo img {
        height: 28px;
    }

    /* Values */
    .value-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    /* CTA */
    .cta h2 {
        font-size: 1.6rem;
    }
    
    .cta-image img {
        height: 200px;
    }
    
    .contact-item {
        padding: 0.6rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-item i {
        align-self: center;
    }
    
    /* Menu tabs */
    .menu-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-tab {
        width: 100%;
        max-width: 250px;
    }
    
    /* Menu items mobile fixes */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-category {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .menu-item {
        padding: 1.5rem;
        min-height: 200px;
        margin-bottom: 1rem;
    }
    
    .menu-item .item-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 1rem;
    }
    
    .menu-item .item-icon i {
        font-size: 1.2rem;
    }
    
    .menu-item .item-info h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .menu-item .item-info p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .menu-item .item-price {
        font-size: 1.2rem;
        padding: 0.6rem 1rem;
        margin-top: 1rem;
    }
    
    /* Contact cards */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Blog Section */
    .blog-section .section-title {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-post.featured img {
        height: 250px;
    }
    
    .blog-post img {
        height: 180px;
    }
    
    .sidebar-widget {
        padding: 1.2rem;
    }
    
    .post-content {
        padding: 1.2rem;
    }
    
    .social-post {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .blog-section .section-title {
        font-size: 1.5rem;
    }
    
    .blog-post.featured img {
        height: 200px;
    }
    
    .blog-post img {
        height: 150px;
    }
    
    .sidebar-widget {
        padding: 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-meta {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.3rem;
    }
    
    /* Sign cards */
    .signs-grid {
        grid-template-columns: 1fr;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }

    .hero-images {
        height: 300px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for retina displays */
    .nav-logo img,
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-images,
    .cta,
    .footer {
        display: none;
    }

    .hero-content {
        width: 100%;
        padding: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .section-title {
        page-break-after: avoid;
    }

    .value-card,
    .testimonial-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image-slider .slide {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --text-dark: #000;
        --text-light: #333;
        --border-color: #000;
    }

    .btn {
        border-width: 2px;
    }

    .value-card,
    .testimonial-card {
        border: 2px solid var(--border-color);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2a2a2a;
        --cream: #2a2a2a;
        --warm-beige: #3a3a3a;
        --text-dark: #ffffff;
        --text-light: #cccccc;
        --border-color: #444444;
    }

    .navbar {
        background-color: rgba(26, 26, 26, 0.95);
    }

    .hero {
        background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    }

    .value-card,
    .testimonial-card {
        background-color: #2a2a2a;
        color: #ffffff;
    }

    .newsletter-form input {
        background-color: #3a3a3a;
        color: #ffffff;
        border: 1px solid #555;
    }
}