/**
 * Drones Page Styles
 *
 * 5 sections: Hero, Featured Products, Choose Your Style, Quiz, Product Grid.
 * RTL-first, responsive, BEM naming.
 *
 * @package Mesa
 * @since 2.3.0
 */

/* ============================================
   Page Wrapper
   ============================================ */
.mesa-drones {
    direction: rtl;
}

/* ============================================
   1. HERO
   ============================================ */
.mesa-drones__hero {
    position: relative;
    width: 100%;
    height: clamp(25rem, 36vw, 34.375rem);
    overflow: hidden;
    background-color: var(--mesa-black, #08050C);
}

.mesa-drones__hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mesa-drones__hero-media--mobile {
    display: none;
}

.mesa-drones__hero-overlay {
    position: absolute;
    inset: 0;
}

.mesa-drones__hero-content {
    position: absolute;
    top: 7.625rem;
    right: clamp(2rem, 11.84%, 11.25rem);
    text-align: right;
    display: flex;
    flex-direction: column;
}

/* Title: Open Sans 700 Italic 60px/70px white */
.mesa-drones__hero-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(2rem, 3.97vw, 3.75rem); /* 60px at 1512 */
    line-height: 4.375rem; /* 70px */
    letter-spacing: 0;
    text-align: right;
    color: #FFFFFF;
    margin: 0 0 2.5rem; /* 40px */
    white-space: nowrap;
}

/* Description: Open Sans 500 16px/150% white, 450px max */
.mesa-drones__hero-desc {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem; /* 16px */
    line-height: 150%;
    letter-spacing: 0;
    text-align: right;
    color: #FFFFFF;
    margin: 0 0 2.5rem; /* 40px */
    max-width: 28.125rem; /* 450px */
}

.mesa-drones__hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Secondary button: white background with diagonal clip-path */
.mesa-drones__hero-btn--secondary {
    background-color: #FFFFFF !important;
    color: var(--mesa-black, #08050C) !important;
}

.mesa-drones__hero-btn--secondary:hover {
    opacity: 0.85;
}

/* ============================================
   2. FEATURED PRODUCTS
   ============================================ */
.mesa-drones__featured {
    /* No container — full-width cards */
}

.mesa-drones__featured-card {
    position: relative;
    display: flex;
    align-items: center;
    height: clamp(22rem, 37.7vw, 35.625rem); /* 570px at 1512 */
    overflow: hidden;
}

.mesa-drones__featured-card:nth-child(even) {
    flex-direction: row-reverse;
}

.mesa-drones__featured-media {
    position: absolute;
    inset: 0;
}

.mesa-drones__featured-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.mesa-drones__featured-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mesa-drones__featured-content {
    position: relative;
    z-index: 1;
    padding: 3rem clamp(2rem, 11.84%, 11.25rem);
    text-align: right;
}

.mesa-drones__featured-card:nth-child(even) .mesa-drones__featured-content {
    margin-inline-start: auto;
}

/* Title: Open Sans 700 Italic 60px/70px uppercase white */
.mesa-drones__featured-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(2rem, 3.97vw, 3.75rem); /* 60px at 1512 */
    line-height: 4.375rem; /* 70px */
    letter-spacing: 0;
    text-align: right;
    text-transform: uppercase;
    color: #FFFFFF;
    margin: 0 0 2.5rem; /* 40px */
    white-space: nowrap;
}

/* Description: Open Sans 500 16px/150% white */
.mesa-drones__featured-desc {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem; /* 16px */
    line-height: 150%;
    letter-spacing: 0;
    text-align: right;
    color: #FFFFFF;
    margin: 0 0 2.5rem; /* 40px */
    max-width: 28.125rem; /* 450px */
}

/* ============================================
   3. CHOOSE YOUR STYLE
   ============================================ */
.mesa-drones__styles {
    background-color: var(--mesa-black, #08050C);
    padding-block: 4rem;
    position: relative;
    overflow: hidden;
}

/* Decorative SVGs */
.mesa-drones__styles-shape {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.mesa-drones__styles-shape--top {
    top: 0;
    left: 0;
}

.mesa-drones__styles-shape--bottom {
    bottom: -1px;
    right: 0;
}

/* Title: Open Sans 700 Italic 52px/100% white */
.mesa-drones__styles-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(1.5rem, 3.44vw, 3.25rem); /* 52px at 1512 */
    line-height: 100%;
    letter-spacing: 0;
    text-align: right;
    color: #FFFFFF;
    margin: 0 0 2.5rem;
    position: relative;
    z-index: 2;
}

.mesa-drones__styles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.mesa-drones__style-card {
    position: relative;
    display: block;
    overflow: hidden;
    height: clamp(12rem, 18.52vw, 17.5rem); /* 280px at 1512 */
    text-decoration: none;
}

.mesa-drones__style-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(29, 29, 29, 0) 0%, #000000 100%);
    z-index: 1;
    pointer-events: none;
}

.mesa-drones__style-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.mesa-drones__style-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mesa-drones__style-card:hover .mesa-drones__style-image {
    transform: scale(1.05);
}

/* When video exists, fade to video on hover */
.mesa-drones__style-card:hover .mesa-drones__style-video {
    opacity: 1;
}

.mesa-drones__style-card:has(.mesa-drones__style-video):hover .mesa-drones__style-image {
    opacity: 0;
}

/* Style name: Open Sans 700 Italic 52px/120% lime */
.mesa-drones__style-name {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(1.5rem, 3.44vw, 3.25rem); /* 52px at 1512 */
    line-height: 120%;
    letter-spacing: 0;
    text-align: right;
    color: var(--mesa-lime, #CEFE65);
    z-index: 2;
}

/* ============================================
   4. QUIZ
   ============================================ */
.mesa-drones__quiz {
    background-color: var(--mesa-lime, #CEFE65);
    position: relative;
    overflow: hidden;
}

.mesa-drones__quiz-screen {
    display: none;
    min-height: 32rem;
    position: relative;
}

.mesa-drones__quiz-screen.is-active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem clamp(2rem, 11.84%, 11.25rem);
    direction: rtl;
}

/* Welcome screen decorative shapes */
.mesa-drones__quiz-shape {
    position: absolute;
    pointer-events: none;
}

.mesa-drones__quiz-shape--top {
    top: 0;
    left: 0;
}

.mesa-drones__quiz-shape--bottom {
    bottom: 0;
    right: 0;
}

.mesa-drones__quiz-welcome-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Quiz buttons: black bg, white text */
.mesa-drones__quiz .mesa-hero-slider__btn {
    background-color: var(--mesa-black, #08050C) !important;
    color: #FFFFFF !important;
}

.mesa-drones__quiz .mesa-hero-slider__btn:hover {
    opacity: 0.85;
}

/* Welcome title: Open Sans 700 Italic ~52px */
.mesa-drones__quiz-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(2rem, 3.44vw, 3.25rem); /* 52px at 1512 */
    line-height: 120%;
    color: var(--mesa-black, #08050C);
    margin: 0 0 1.5rem;
}

/* Welcome description: Open Sans 500 16px/150% */
.mesa-drones__quiz-desc {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 150%;
    color: var(--mesa-black, #08050C);
    margin: 0 0 2.5rem;
    max-width: 30rem;
    margin-inline: auto;
}

/* Progress bar — 5 segments, full width */
.mesa-drones__quiz-progress {
    display: flex;
    gap: 0.375rem;
    width: 100%;
    max-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.mesa-drones__quiz-progress-segment {
    flex: 1;
    height: 0.375rem; /* 6px */
    background-color: rgba(0, 0, 0, 0.12);
}

.mesa-drones__quiz-progress-segment.is-filled {
    background-color: var(--mesa-black, #08050C);
}

/* Question content */
.mesa-drones__quiz-question-content {
    width: 100%;
    max-width: 37.5rem; /* 600px */
    text-align: center;
}

/* Question title: Open Sans 700 Italic ~48px */
.mesa-drones__quiz-question-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(1.5rem, 3.17vw, 3rem); /* 48px at 1512 */
    line-height: 120%;
    color: var(--mesa-black, #08050C);
    margin: 0 0 2.5rem;
}

/* Options — white cards with rounded border */
.mesa-drones__quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem; /* 10px */
}

.mesa-drones__quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: #FFFFFF;
    border: 1px solid #B3B7BD;
    border-radius: 0.5rem; /* 8px */
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem; /* 16px */
    line-height: 150%;
    letter-spacing: 0;
    text-align: right;
    color: var(--mesa-black, #08050C);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.mesa-drones__quiz-option:hover {
    border-color: var(--mesa-black, #08050C);
}

.mesa-drones__quiz-option input {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--mesa-black, #08050C);
    cursor: pointer;
    border: 1px solid #08050C;
    -webkit-appearance: none;
    appearance: none;
    background: #FFFFFF;
    border-radius: 2px;
    position: relative;
}

.mesa-drones__quiz-option input:checked {
    background-color: var(--mesa-black, #08050C);
}

.mesa-drones__quiz-option input:checked::after {
    content: '✓';
    color: #FFFFFF;
    font-size: 0.75rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mesa-drones__quiz-option input:checked + .mesa-drones__quiz-option-text {
    font-weight: 700;
}

.mesa-drones__quiz-option:has(input:checked) {
    border-color: var(--mesa-black, #08050C);
    background-color: rgba(0, 0, 0, 0.04);
}

.mesa-drones__quiz-hint {
    font-size: 0.875rem;
    color: var(--mesa-black, #08050C);
    margin: 0.75rem 0 0;
    text-align: right;
}

/* Quiz navigation — RTL handles ordering: button right, arrows left in HTML → arrows right, button left visually */
.mesa-drones__quiz-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 3rem;
    width: 100%;
    max-width: 37.5rem; /* match question content */
}

.mesa-drones__quiz-next {
    margin-inline-end: auto;
}

.mesa-drones__quiz-arrows {
    display: flex;
    gap: 0.5rem;
}

.mesa-drones__quiz-arrow {
    width: 3.5rem; /* 56px */
    height: 3.5rem;
    border-radius: 50%;
    border: 2px solid var(--mesa-black, #08050C);
    background: #FFFFFF;
    color: var(--mesa-black, #08050C);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mesa-drones__quiz-arrow:hover {
    background-color: var(--mesa-black, #08050C);
    color: #FFFFFF;
}

.mesa-drones__quiz-arrow svg {
    width: 1.5rem; /* 24px */
    height: 1.5rem;
    stroke: currentColor;
}

.mesa-drones__quiz-reset {
    display: block;
    margin: 1.5rem auto 0;
    background: none;
    border: none;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--mesa-black, #08050C);
    text-decoration: underline;
    cursor: pointer;
}

/* Results screen */
.mesa-drones__quiz-screen--results {
    background-color: var(--mesa-lime, #CEFE65);
}

.mesa-drones__quiz-close {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mesa-black, #08050C);
}

/* Results title: same as welcome */
.mesa-drones__quiz-results-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(2rem, 3.44vw, 3.25rem);
    line-height: 120%;
    color: var(--mesa-black, #08050C);
    margin: 0 0 0.75rem;
}

.mesa-drones__quiz-results-desc {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--mesa-black, #08050C);
    margin: 0 0 2rem;
}

/* Profile-specific result title (populated by JS) */
.mesa-drones__quiz-profile-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 2.12vw, 2rem);
    line-height: 130%;
    color: var(--mesa-black, #08050C);
    margin: 0 0 0.5rem;
}

/* Profile-specific result description */
.mesa-drones__quiz-profile-desc {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 150%;
    color: var(--mesa-black, #08050C);
    margin: 0 0 1.5rem;
}

/* Fallback no-match message */
.mesa-drones__quiz-no-match {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.125rem;
    color: var(--mesa-black, #08050C);
    text-align: center;
    padding: 2rem 0;
}

.mesa-drones__quiz-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 50rem;
    width: 100%;
}

.mesa-drones__quiz-contact-text {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--mesa-black, #08050C);
    margin: 2rem 0 0.25rem;
}

.mesa-drones__quiz-contact {
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--mesa-black, #08050C);
    text-decoration: underline;
}

/* ============================================
   5. PRODUCT GRID
   ============================================ */

/* Filter trigger button (visible on mobile) */
.mesa-drones__filter-trigger {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #FFFFFF !important;
    border: 1px solid #D0D0D0;
    border-radius: 0.25rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--mesa-black, #08050C) !important;
    cursor: pointer;
}

.mesa-drones__filter-trigger:hover,
.mesa-drones__filter-trigger:focus,
.mesa-drones__filter-trigger:active {
    background: #FFFFFF !important;
    color: var(--mesa-black, #08050C) !important;
    box-shadow: none !important;
    outline: none !important;
}

.mesa-drones__filter-trigger:focus-visible {
    outline: 2px solid var(--mesa-black, #08050C) !important;
    outline-offset: 2px;
}

.mesa-drones__filter-trigger svg {
    width: 1.125rem;
    height: 1.125rem;
}
.mesa-drones__grid {
    background-color: var(--mesa-light-gray, #F1F1F1);
    padding-block: 4rem;
}

.mesa-drones__grid-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-style: italic !important;
    font-size: clamp(2rem, 3.44vw, 3.25rem);
    line-height: 100%;
    color: #08050C;
    margin: 0 0 2rem;
    text-align: right;
}

.mesa-drones__grid-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ============================================
   RESPONSIVE: TABLET (<=1200px)
   ============================================ */
@media screen and (max-width: 1200px) {
    .mesa-drones__grid-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   RESPONSIVE: MOBILE (<=768px)
   ============================================ */
@media screen and (max-width: 768px) {
    /* Hero */
    .mesa-drones__hero {
        height: 40.625rem;
    }

    .mesa-drones__hero-media--desktop {
        display: none;
    }

    .mesa-drones__hero-media--mobile {
        display: block;
    }

    .mesa-drones__hero-overlay {
        background: linear-gradient(to top, rgba(8, 5, 12, 0.9) 55%, transparent 100%);
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .mesa-drones__hero-content {
        position: static;
        text-align: right;
        max-width: 100%;
        padding: 2rem 2rem 2rem 1.25rem;
        white-space: normal;
    }

    .mesa-drones__hero-title {
        font-size: clamp(1.5rem, 7vw, 2.25rem);
        white-space: normal;
        margin-bottom: 1.25rem;
    }

    .mesa-drones__hero-desc {
        max-width: 100%;
        margin-bottom: 1.25rem;
    }

    .mesa-drones__hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Featured Products — image stays as full background, content overlays */
    .mesa-drones__featured-card {
        flex-direction: column !important;
        min-height: 28rem;
        justify-content: flex-end;
    }

    .mesa-drones__featured-content {
        padding: 2rem 1.25rem;
        max-width: 100%;
    }

    .mesa-drones__featured-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: 1.25rem;
    }

    .mesa-drones__featured-desc {
        font-size: 0.875rem;
        max-width: 100%;
        margin-bottom: 1.25rem;
    }

    /* Choose Your Style */
    .mesa-drones__styles {
        padding-block: 2rem;
    }

    .mesa-drones__styles-shape--top {
        top: 0;
        left: 0;
    }

    .mesa-drones__styles-shape--top svg {
        width: 8rem;
        height: auto;
    }

    .mesa-drones__styles-shape--bottom {
        display: none;
    }

    .mesa-drones__styles-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .mesa-drones__style-name {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    /* Quiz */
    .mesa-drones__quiz-screen.is-active {
        padding: 3rem 1.25rem 2rem;
        min-height: 28rem;
    }

    .mesa-drones__quiz-shape svg {
        width: 140px;
        height: auto;
    }

    .mesa-drones__quiz-question-title {
        font-size: clamp(1.25rem, 5.5vw, 1.75rem);
    }

    .mesa-drones__quiz-nav {
        flex-wrap: wrap;
    }

    .mesa-drones__quiz-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Product Grid */
    .mesa-drones__grid {
        padding-block: 2rem;
    }

    .mesa-drones__grid-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .mesa-drones__filter-trigger {
        display: flex;
    }

    .mesa-drones__grid .mesa-shop__controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .mesa-drones__grid .mesa-shop__controls-right {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }

    .mesa-drones__grid .mesa-shop__controls-right .mesa-shop__sort {
        flex: 1;
    }

    .mesa-drones__grid .mesa-shop__controls-right .mesa-shop__sort-select {
        width: 100%;
    }

    .mesa-drones__grid-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .mesa-drones__style-image,
    .mesa-drones__style-video {
        transition: none;
    }
}
