/* PAGE LEVEL CSS SUPPLEMENT */

/* GENERAL PAGE HERO */
.page-hero {
    padding: 220px 5% 100px;
    text-align: center;
    background: var(--bg-light-secondary);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content:''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(216, 107, 74, 0.05) 0%, transparent 70%);
}
.page-hero .editorial-title {
    margin-bottom: 20px;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    position: relative;
    z-index: 2;
}
.page-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted-dark);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* EXPLORE PAGE */
.explore-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 50px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.filter-btn {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 12px 30px;
    border-radius: 30px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}
.filter-btn:hover, .filter-btn.active {
    background: #121212;
    color: #fff;
    border-color: #121212;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Mobile-only stand-in for .explore-filters (same data-filter values,
   same applyFilter() in script.js — see the mobile breakpoint below for
   which of the two is actually shown). */
.explore-filters-mobile { display: none; }
.explore-filter-select-wrap { position: relative; width: 100%; }
.explore-filter-select {
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 30px;
    padding: 14px 44px 14px 22px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
}
.explore-filter-select-wrap i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-muted-dark);
    pointer-events: none;
}

/* Listing: the square thumbnail is the visual hero — no card chrome
   (background/shadow/border) wrapping thumbnail + text as one box. Name
   and category sit directly beneath the thumbnail, flush with its edges. */
.design-gallery-scroll-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 5% 150px;
}
.design-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 48px 40px;
}
.design-card {
    display: block;
    position: relative;
    color: inherit;
}
.d-card-visual {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--bg-light-secondary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.design-card:hover .d-card-visual {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.14);
}
.d-card-info {
    padding: 16px 2px 0;
}
.d-card-info h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.d-card-info span {
    font-size: 0.75rem;
    color: var(--text-muted-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}
.d-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(18,18,18,0.75);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}
.d-card-hover {
    position: absolute;
    inset: 0;
    background: rgba(18,18,18,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}
.design-card:hover .d-card-hover {
    opacity: 1;
}
.view-btn {
    padding: 15px 35px;
    border: 1px solid #fff;
    border-radius: 30px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* EXPLORE PAGE SPECIFIC MOCKUPS */
.explore-mockup-inner { width: 100%; height: 100%; position: relative; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
/* A real template-cover thumbnail (e.g. Eternal Bloom's), used in place of
   an .explore-mockup-inner CSS mockup on cards that have one. */
.d-card-thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
/* .mock-name was a <h4> in each variant below; now a <p> (it's decorative mockup
   text, not a real heading) so line-height/font-weight that used to come from
   the global h1-h6 reset are set explicitly here instead, to keep it pixel-identical. */
/* Eternal Bloom */
.mock-eb { background: #fcf9f2; border: 1px solid rgba(0,0,0,0.1); }
.mock-eb .mock-name { font-size: 2.3rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-family: var(--font-heading); color: #222; }
/* Afterglow — still used by how-it-works.php's decorative mockup pair */
.mock-ag { background: #1a1a1c; color: #fff; }
.mock-ag .mock-name { font-size: 2.2rem; font-weight: 300; line-height: 1.15; font-family: var(--font-heading); z-index: 1;}
.mock-ag::before { content:''; position:absolute; top:0; right:0; width:150px; height:150px; background:radial-gradient(circle, rgba(216,107,74,0.3), transparent); }


/* DESIGN DETAIL PAGE
   Grid + named areas (rather than flex) so the mobile breakpoint can
   reorder header/visual/features/cta without duplicating markup — see
   the mobile override below for the reordered template. */
.design-detail-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "visual header"
        "visual features"
        "visual cta";
    align-content: start;
    column-gap: 8%;
    row-gap: 0;
    padding: 150px 5% 100px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}
.dd-visual { grid-area: visual; position: relative; }
.dd-header { grid-area: header; padding-top: 50px; }
.dd-features { grid-area: features; }
.dd-cta { grid-area: cta; justify-self: start; align-self: start; }

/* Realistic device frame — the invitation renders live inside via iframe
   (or a labeled "Coming Soon" panel for themes with no real build yet),
   never a static screenshot. */
.dd-mockup-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    aspect-ratio: 9 / 19.5;
    background: #0e0e10;
    border-radius: 52px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.18), inset 0 0 0 10px #1c1c1e, inset 0 0 0 12px rgba(255,255,255,0.06);
    position: sticky;
    top: 120px;
    overflow: hidden;
}
.dd-mockup-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 26px;
    background: #0e0e10;
    border-radius: 16px;
    z-index: 3;
}
.dd-screen-viewport {
    position: absolute;
    inset: 10px;
    border-radius: 42px;
    overflow: hidden;
    background: #fff;
}
.dd-live-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    /* Content inside must scroll like a real phone; the frame stays put. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dd-live-iframe::-webkit-scrollbar { display: none; }

/* "Open Full Preview" — sits directly under the phone frame, in normal
   flow, so it never overlaps the mockup or anything else in .dd-visual. */
.dd-fullpreview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    margin: 18px auto 0;
    padding: 14px 22px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 30px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.dd-fullpreview-btn:hover { background: #121212; color: #fff; border-color: #121212; }

/* Full Preview — expands the SAME #dd-mockup (and the iframe inside it)
   to fill the viewport purely via CSS. The iframe element itself is
   never removed/reinserted, so it never reloads and every bit of state
   (animation position, music, scroll) survives entering/leaving this
   mode. The container's own bottom inset (not the bar's z-index) is what
   keeps the action bar from ever covering the invitation — there is no
   overlap for it to hide behind. */
#dd-mockup.is-fullscreen {
    position: fixed;
    inset: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    width: 100vw;
    height: auto;
    max-width: none;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 2000;
    top: 0;
}
#dd-mockup.is-fullscreen .dd-mockup-notch { display: none; }
#dd-mockup.is-fullscreen .dd-screen-viewport { inset: 0; border-radius: 0; }
body.dd-fullpreview-open { overflow: hidden; }

.dd-fullpreview-bar {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 2001;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 64px;
    padding: 0 16px calc(env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.dd-fullpreview-bar.is-active { display: flex; }
.dd-fullpreview-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    padding: 10px 6px;
}
.dd-fullpreview-cta { padding: 12px 24px; font-size: 0.8rem; white-space: nowrap; }

.dd-coming-soon {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    gap: 16px;
}
.dd-coming-soon-badge {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid;
    border-radius: 30px;
    padding: 8px 18px;
}
.dd-coming-soon-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
}
.dd-coming-soon-note {
    font-size: 0.9rem;
    opacity: 0.7;
    max-width: 280px;
    line-height: 1.6;
}

.dd-category {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}
.dd-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 25px;
}
.dd-desc {
    font-size: 1.1rem;
    color: var(--text-muted-dark);
    margin-bottom: 50px;
    line-height: 1.7;
    max-width: 500px;
}
.dd-features {
    margin-bottom: 60px;
}
.dd-features h2 {
    font-family: var(--font-ui);
    font-size: 1rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    font-weight: 500;
}
.feature-list i {
    color: var(--accent);
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

/* HOW IT WORKS PAGE */
.hiw-page-section {
    padding: 100px 0;
}
.hiw-page-step {
    display: flex;
    align-items: center;
    gap: 10%;
    max-width: 1200px;
    margin: 0 auto 150px;
    padding: 0 5%;
}
.hiw-page-step:nth-child(even) {
    flex-direction: row-reverse;
}
.h-step-content {
    flex: 1;
}
.h-step-num {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 5rem);
    color: var(--accent);
    line-height: 1;
    margin-bottom: 20px;
}
.h-step-content h2 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    margin-bottom: 20px;
}
.h-step-content p {
    font-size: 1.1rem;
    color: var(--text-muted-dark);
    line-height: 1.7;
}
.h-step-visual {
    flex: 1;
    height: 500px;
    background: #fdfcf9;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.03);
}

/* ABOUT PAGE */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10%;
    max-width: 1400px;
    margin: 100px auto 150px;
    padding: 0 5%;
    align-items: center;
}
.about-text h2 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 30px;
}
.about-text p {
    font-size: 1.15rem;
    color: var(--text-muted-dark);
    margin-bottom: 25px;
    line-height: 1.8;
}
.about-visual {
    height: 650px;
    background: var(--bg-dark);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}
.about-mockup { width: 300px; height: 550px; background: #1a1a1c; border-radius: 40px; border: 8px solid #121212; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px;}
.about-mockup .mock-welcome { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 600; line-height: 1.15; z-index: 1;}
.about-glow { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(216,107,74,0.2) 0%, transparent 70%); }

/* CTA Block for pages */
.page-cta-block {
    text-align: center;
    padding: 150px 5%;
}
.page-cta-block:not(.dark-section) {
    background: var(--bg-light-secondary);
}
.page-cta-block h2 {
    font-size: clamp(2rem, 7vw, 3.5rem);
    margin-bottom: 40px;
}

/* ============================================
   PAGES.CSS � MOBILE RESPONSIVE
   One clean block. No duplicates.
   ============================================ */

@media (max-width: 1024px) {

    /* ----- PAGE HERO (inner pages) ----- */
    .page-hero {
        padding: 120px 20px 60px;
        min-height: auto;
        text-align: center;
    }
    .page-hero .editorial-title { font-size: clamp(2.2rem, 9vw, 3.2rem); }

    /* ----- ABOUT PAGE ----- */
    .about-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; padding: 0 20px; }
    .about-text h2 { font-size: 2.2rem; margin-bottom: 16px; }

    /* ----- CTA BLOCK ----- */
    .page-cta-block { padding: 70px 20px; }
    .page-cta-block h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); margin-bottom: 28px; }

    /* ----- TEMPLATE GALLERY (templates.php) -----
       Reuses the same swipe-track + pagination-dots pattern as the
       homepage showcase (see style.css .showcase-track and
       script.js's initSwipeDots) instead of a new carousel mechanism. */
    .explore-filters { display: none; }
    .explore-filters-mobile {
        display: block;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 40px;
        padding: 0 20px;
        box-sizing: border-box;
    }
    .design-gallery-scroll-container { padding: 60px 20px 40px; }
    .design-gallery {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 20px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .design-gallery::-webkit-scrollbar { display: none; }
    .design-card {
        flex-shrink: 0;
        width: 78vw;
        min-width: 78vw;
        scroll-snap-align: start;
    }
    .design-gallery-dots { display: flex; margin-top: 20px; }

    /* ----- HOW IT WORKS PAGE ----- */
    .hiw-page-section { padding: 60px 0; }
    .hiw-page-step,
    .hiw-page-step:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 36px;
        margin-bottom: 60px;
        padding: 0 20px;
    }
    .h-step-content { text-align: center; }
    .h-step-content h3 { font-size: 2rem; margin-bottom: 12px; }
    .h-step-visual { width: 100%; height: auto; aspect-ratio: 4/5; max-height: 460px; }

    /* ----- DESIGN DETAIL PAGE -----
       Reordered via grid-template-areas (not markup order): name +
       category + description, then the live phone preview, then
       features, then the CTA — matches the requested mobile flow. */
    .design-detail-section {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "visual"
            "features"
            "cta";
        row-gap: 32px;
        padding: 110px 20px 60px;
        min-height: auto;
    }
    .dd-visual { width: 100%; }
    .dd-mockup-container {
        position: relative;
        top: auto;
        max-width: 300px;
        margin: 0 auto;
    }
    .dd-header {
        padding-top: 0;
        text-align: center;
    }
    .dd-title { font-size: 2.6rem; margin-bottom: 16px; }
    .dd-desc { max-width: 100%; margin: 0 auto; font-size: 1rem; }
    .dd-features {
        width: 100%;
        max-width: 100%;
        text-align: left;
        background: #fff;
        padding: 28px;
        border-radius: 20px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    }
    .dd-features h2 { text-align: center; margin-bottom: 20px; }
    .feature-list { margin-bottom: 0; }
    .dd-cta {
        width: 100%;
        justify-self: stretch;
    }
    .dd-cta.btn { text-align: center; }
}

@media (max-width: 480px) {
    .page-hero .editorial-title { font-size: clamp(2rem, 9vw, 2.6rem); }
    .dd-mockup-container { max-width: 260px; }
    .page-cta-block h2 { font-size: 1.9rem; }
    .h-step-content h3 { font-size: 1.7rem; }
}
