/* JTverga SEA VIEW HOMES - Responsive Stylesheet */
/* Mobile-first approach */

/* ============================================
   Large Desktop (1400px and up)
   ============================================ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 4rem;
    }
}

/* ============================================
   Desktop (992px - 1199px)
   ============================================ */
@media (max-width: 1199px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .footer-grid > div:last-child {
        grid-column: 1 / -1;
    }
}

/* ============================================
   Tablet (768px - 991px)
   ============================================ */
@media (max-width: 991px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }

    /* Hero */
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px var(--spacing-md) var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transition: right var(--transition-normal);
        gap: var(--spacing-xs);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--gray-light);
    }

    .lang-switcher {
        margin-left: 0;
        margin-top: var(--spacing-sm);
        width: 100%;
    }

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

    .lang-dropdown {
        position: static;
        width: 100%;
        margin-top: var(--spacing-xs);
        box-shadow: none;
        border: 1px solid var(--gray-light);
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Mobile menu overlay */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: 998;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: var(--spacing-md);
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Lightbox nav */
    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* ============================================
   Mobile Large (576px - 767px)
   ============================================ */
@media (max-width: 767px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    /* Spacing */
    .section {
        padding: var(--spacing-lg) 0;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Hero */
    .hero {
        min-height: 90vh;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: 0.95rem;
    }

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

    /* Accommodations */
    .accommodations-grid {
        grid-template-columns: 1fr;
    }

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

    .service-card {
        padding: var(--spacing-md);
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs);
    }

    .gallery-filters {
        gap: var(--spacing-xs);
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Page Header */
    .page-header {
        padding: 100px 0 40px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-title {
        margin-top: var(--spacing-md);
    }

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

    /* Contact Form */
    .contact-form {
        padding: var(--spacing-md);
    }

    /* Map */
    .map-container iframe {
        height: 300px;
    }

    /* Scroll top button */
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    /* Lightbox */
    .lightbox-nav {
        font-size: 2rem;
        padding: var(--spacing-sm);
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-close {
        top: -35px;
        font-size: 1.5rem;
    }
}

/* ============================================
   Mobile Small (up to 575px)
   ============================================ */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }

    /* Hero */
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-location {
        font-size: 0.95rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .feature-item {
        display: flex;
        align-items: center;
        text-align: left;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }

    .feature-icon {
        margin: 0;
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .feature-icon svg {
        width: 25px;
        height: 25px;
    }

    /* Cards */
    .card-image {
        height: 200px;
    }

    .card-content {
        padding: var(--spacing-sm);
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-item {
        aspect-ratio: 1;
    }

    /* CTA */
    .cta-section {
        padding: var(--spacing-lg) 0;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    /* Blog */
    .blog-image {
        height: 180px;
    }

    .blog-content {
        padding: var(--spacing-sm);
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Booking */
    .booking-widget {
        padding: var(--spacing-md);
    }
}

/* ============================================
   Very Small Screens (up to 375px)
   ============================================ */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .nav-menu {
        width: 100%;
        max-width: none;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Landscape Mobile
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* ============================================
   High DPI Screens
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on retina displays */
    .card-image img,
    .gallery-item img,
    .blog-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .footer,
    .scroll-top,
    .lang-switcher,
    .menu-toggle,
    .btn,
    .gallery-item-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .hero {
        min-height: auto;
        padding: 20px;
        background: none;
    }

    .hero-overlay,
    .hero-bg {
        display: none;
    }

    .hero-content {
        color: #000;
    }

    .hero-title,
    .page-title,
    h1, h2, h3, h4 {
        color: #000;
    }

    .card,
    .service-card,
    .blog-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .section {
        padding: 20px 0;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment below to enable automatic dark mode */
    /*
    :root {
        --white: #1a1a1a;
        --off-white: #2a2a2a;
        --gray-light: #333333;
        --gray-medium: #aaaaaa;
        --gray-dark: #e0e0e0;
        --black: #ffffff;
        --sea-pale: #1a3a4a;
    }

    .header {
        background: rgba(26, 26, 26, 0.95);
    }

    .card,
    .service-card,
    .blog-card,
    .contact-form {
        background: var(--off-white);
    }
    */
}
