/* ========================================
   KARAPETYAN & KHAYAT - RESPONSIVE STYLES
   ======================================== */

/* ========================================
   Large Desktop (1400px+)
   ======================================== */
@media (min-width: 1400px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* ========================================
   Desktop (1200px and below)
   ======================================== */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .about-intro {
        gap: var(--spacing-lg);
    }
}

/* ========================================
   Tablet Landscape (1024px and below)
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-xl: 4rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px var(--spacing-md) var(--spacing-md);
        background-color: rgba(10, 10, 10, 0.98);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        transition: right var(--transition-normal);
        gap: 0;
    }

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

    .nav-menu a {
        width: 100%;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .lang-selector {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .team-grid {
        gap: var(--spacing-md);
    }

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

    .about-intro {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Tablet Portrait (768px and below)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 3rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .hero {
        min-height: 500px;
    }

    .hero::before {
        display: none;
    }

    .hero-background::after {
        display: none;
    }

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

    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

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

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

    .team-image {
        width: 200px;
        height: 200px;
    }

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

    .footer-brand img {
        margin: 0 auto var(--spacing-md);
    }

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

    .footer-contact p {
        justify-content: center;
    }

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

    .footer-legal {
        justify-content: center;
    }

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

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

    .listings-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

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

    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
    }

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

    .testimonial-quote {
        font-size: 1.2rem;
    }

    .calculator {
        padding: var(--spacing-md);
        grid-template-columns: 1fr;
    }

    .calculator-fields {
        grid-template-columns: 1fr;
    }

    .calculator .btn {
        width: 100%;
        align-self: stretch;
    }

    .calculator-result {
        border-left: none;
        border-top: 3px solid var(--color-secondary);
    }

    .calculator-result .result-value {
        font-size: 2rem;
    }

    .royal-lepage-logo {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   Mobile Large (576px and below)
   ======================================== */
@media (max-width: 576px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

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

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .logo img {
        height: 50px;
    }

    .header.scrolled .logo img {
        height: 40px;
    }

    .hero {
        min-height: 450px;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

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

    .section-header p {
        font-size: 1rem;
    }

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

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

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .team-image {
        width: 160px;
        height: 160px;
    }

    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px 14px;
    }

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

    .page-header {
        padding: calc(var(--spacing-lg) + 80px) 0 var(--spacing-lg);
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .property-card .card-features {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .testimonial-quote::before {
        font-size: 3rem;
    }

    .about-image::before {
        display: none;
    }

    .calculator-container {
        gap: var(--spacing-md);
    }

    .nav-menu {
        width: 100%;
        right: -100%;
    }
}

/* ========================================
   Mobile Small (400px and below)
   ======================================== */
@media (max-width: 400px) {
    h1 {
        font-size: 1.6rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    .cookie-buttons .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .team-image {
        width: 140px;
        height: 140px;
    }

    .footer-brand img {
        height: 60px;
    }
}

/* ========================================
   Height-based queries (short screens)
   ======================================== */
@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding: calc(var(--spacing-xl) + 80px) 0 var(--spacing-xl);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .btn,
    .menu-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .page-header {
        padding-top: var(--spacing-md);
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .card {
        break-inside: avoid;
    }
}

/* ========================================
   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;
    }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --color-text-light: #ffffff;
        --color-secondary: #ffd700;
    }

    .card,
    .calculator,
    .contact-info-card {
        border-width: 2px;
    }
}

/* ========================================
   Dark Mode (already dark, but ensure consistency)
   ======================================== */
@media (prefers-color-scheme: light) {
    /* Site is designed dark-first, so we maintain dark mode */
    /* No changes needed */
}
