/* Mobile First Responsive Design */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1024px) {
    :root {
        --section-padding: 50px 0;
        --container-padding: 0 15px;
    }

    .nav-logo h2{
        font-size: 1.5rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .gallery-page-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 300px));
        grid-auto-rows: 300px;
        justify-content: center;
    }

    .review-summary {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .review-form-section {
        padding: 2rem;
    }

    .review-form .form-row {
        flex-direction: column;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    :root {
        --section-padding: 50px 0;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: rgba(91, 67, 30, 0.9);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--box-shadow);
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .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);
    }

    /* Typography */
    h1 { font-size: clamp(2rem, 4vw, 3rem); }
    h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
    h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

    /* Hero Section */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 200px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .gallery-page-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 300px));
        grid-auto-rows: 300px;
        justify-content: center;
    }

    .gallery-card {
        border-radius: 18px;
    }

    .lightbox-content {
        padding: 1rem;
    }

    .review-form-section {
        padding: 1.75rem;
    }

    .review-list {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

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

    /* Tablet Contact Information Adjustments */
    .contact-details {
        gap: 1.3rem;
    }
    
    .contact-item {
        gap: 1.3rem;
    }
    
    .contact-label {
        font-size: 1.3rem;
    }
    
    .contact-value {
        font-size: 0.87rem;
    }
    
    .hours-row {
        font-size: 0.87rem;
    }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 40px 0;
        --container-padding: 0 10px;
    }

    /* Typography */
    h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
    h3 { font-size: clamp(1.2rem, 4vw, 1.5rem); }
    h4 { font-size: clamp(1.1rem, 3.5vw, 1.3rem); }

    body {
        font-size: 14px;
    }

    /* Navigation */
    .nav-logo h2 {
        font-size: 1.3rem;
    }

    .navbar {
        padding: 0.8rem 0;
    }

    .nav-container {
        padding: 0 15px;
    }

    /* Main Content */
    main {
        margin-top: 70px;
    }

    /* Buttons */
    .btn {
        padding: 15px 25px;
        font-size: 0.9rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Hero Section */
    .hero-content p {
        font-size: 1rem;
    }

    /* Services */
    .service-card {
        padding: 1.25rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .gallery-page {
        padding: 40px 0;
    }

    .gallery-page-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 300px));
        gap: 1.5rem;
        grid-auto-rows: 300px;
        justify-content: center;
    }

    .gallery-card figcaption {
        font-size: 0.85rem;
    }

    .lightbox {
        padding: 1rem;
    }

    .lightbox-content {
        padding: 0.75rem;
        border-radius: 14px;
    }

    .reviews-page {
        padding: 40px 0;
    }

    .review-form-section {
        padding: 1.5rem;
    }

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

    .review-card {
        padding: 1.5rem;
    }

    /* Contact Form */
    .contact-form {
        gap: 0.8rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

    /* Contact Information Responsive Adjustments */
    .contact-details {
        gap: 1.2rem;
    }
    
    .contact-item {
        gap: 0.8rem;
    }
    
    .contact-item i {
        font-size: 1.1rem;
        width: 22px;
        height: 22px;
    }
    
    .contact-label {
        font-size: 1.1rem;
    }
    
    .contact-value {
        font-size: 0.85rem;
    }
    
    .hours-row {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }
    
    .times {
        margin-left: 0;
        text-align: left;
    }

    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-section ul li {
        margin-bottom: 0;
    }

    .social-links {
        justify-content: center;
        gap: 0.8rem;
    }

    .social-links a {
        width: 35px;
        height: 35px;
    }
}

/* Extra Small Phones */
@media screen and (max-width: 320px) {
    :root {
        --container-padding: 0 8px;
    }

    .nav-container {
        padding: 0 10px;
    }

    .hero-buttons .btn {
        font-size: 0.85rem;
        padding: 8px 20px;
    }

    .service-card {
        padding: 1rem;
    }

    .service-icon {
        font-size: 2rem;
    }

    .gallery-card figcaption {
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    .lightbox-content {
        padding: 0.6rem;
    }

    .review-form-section {
        padding: 1.25rem;
    }

    .review-card {
        padding: 1.25rem;
    }

    .contact-info {
        padding: 1rem;
    }

    /* Extra Small Screen Contact Adjustments */
    .contact-details {
        gap: 1rem;
    }
    
    .contact-item {
        gap: 0.6rem;
        padding: 0.3rem 0;
    }
    
    .contact-item i {
        font-size: 1rem;
        width: 20px;
        height: 20px;
    }
    
    .contact-label {
        font-size: 0.85rem;
        font-weight: 500;
    }
    
    .contact-value {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .hours-info {
        gap: 0.1rem;
    }
    
    .hours-row {
        font-size: 0.8rem;
        min-height: 1rem;
    }
    
    .social-section h4,
    .gift-section h4 {
        font-size: 1rem;
    }
    
    .gift-section p {
        font-size: 0.8rem;
    }
}

/* Landscape Orientation for Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    :root {
        --section-padding: 30px 0;
    }

    .hero {
        padding: 40px 0;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    main {
        margin-top: 60px;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion for Accessibility */
@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;
    }

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

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .navbar,
    .nav-toggle,
    .footer,
    .btn {
        display: none !important;
    }

    main {
        margin-top: 0 !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}