/* design: estilos migrados preservando el diseño original. */

/* ==========================================================
   ANTHORIA — DESIGN PAGE

   Fondo compartido con las páginas de servicios.
   Sin hero, tarjeta ni textos superpuestos.
   ========================================================== */

body.design-page {
    min-height: 100vh;
    overflow-x: hidden;

    background-image:
        linear-gradient(rgba(244, 239, 230, 0.48),
            rgba(244, 239, 230, 0.62)),
        url(../../assets/images/home-background.jpg);

    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

body.design-page main {
    min-height: calc(100vh - 88px);
    background: transparent;
}

/* Mantiene el fondo hasta el borde inferior en escritorios compactos. */
@media (min-width: 769px) and (max-width: 1599px) {
    body.design-page main,
    body.design-page main.design-main>.design-showcase {
        min-height: calc((100vh / 0.9) - 88px);
    }
}


/* ==========================================================
   DARK THEME
   ========================================================== */

body.design-page.dark-theme {
    background-image:
        linear-gradient(rgba(10, 9, 8, 0.54),
            rgba(10, 9, 8, 0.68)),
        url(../../assets/images/home-background-dark.jpg);

    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}


/* ==========================================================
   TABLET Y MÓVIL
   ========================================================== */

@media (max-width: 768px) {

    body.design-page {
        min-height: 100svh;

        background-image:
            linear-gradient(to bottom,
                rgba(244, 239, 230, 0.48) 0%,
                rgba(244, 239, 230, 0.62) 70%,
                rgba(244, 239, 230, 0.78) 84%,
                rgba(244, 239, 230, 0.94) 94%,
                #f4efe6 100%),
            url(../../assets/images/home-background.jpg);

        background-repeat: no-repeat;
        background-position: center top;
        background-size: cover;
        background-attachment: scroll;
    }

    body.design-page main {
        min-height: calc(100svh - 82px);
    }

    body.design-page.dark-theme {
        background-image:
            linear-gradient(to bottom,
                #050605 0%,
                rgba(5, 6, 5, 0.88) 7%,
                rgba(10, 9, 8, 0.54) 16%,
                rgba(10, 9, 8, 0.68) 84%,
                rgba(5, 6, 5, 0.90) 93%,
                #050605 100%),
            url(../../assets/images/home-background-dark.jpg);

        background-attachment: scroll;
    }
}

/* ==========================================================
   DESIGN — PORTFOLIO CAROUSEL
   ========================================================== */

body.design-page {
    --design-card-width: clamp(620px, 58vw, 920px);
    --design-card-height: clamp(390px, 52vh, 560px);
    --design-card-gap: clamp(20px, 2.2vw, 34px);
}

body.design-page main.design-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.design-page main>.design-showcase {
    position: relative;
    display: flex;
    align-items: center;

    width: 100%;
    max-width: none;
    min-height: calc(100vh - 88px);

    margin: 0;
    padding: 34px 0 76px;

    overflow: hidden;
}

body.design-page .design-carousel {
    position: relative;
    width: 100%;
    min-width: 0;
}

body.design-page .design-carousel-track {
    display: flex;
    align-items: center;
    gap: var(--design-card-gap);

    width: 100%;

    margin: 0;

    padding:
        30px max(24px, calc((100vw - var(--design-card-width)) / 2)) 68px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;
    cursor: grab;

    overscroll-behavior-inline: contain;
    touch-action: pan-x pan-y;
}

body.design-page .design-carousel-track::-webkit-scrollbar {
    display: none;
}

body.design-page .design-carousel-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
    user-select: none;
}

body.design-page .design-carousel-track:focus-visible {
    outline: none;
}


/* ==========================================================
   CARDS
   ========================================================== */

body.design-page .design-card {
    position: relative;

    flex: 0 0 var(--design-card-width);

    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.72fr);

    width: var(--design-card-width);
    min-height: var(--design-card-height);

    margin: 0;

    overflow: hidden;

    border: 1px solid rgba(183, 138, 61, 0.42);
    border-radius: clamp(22px, 2vw, 32px);

    background:
        radial-gradient(circle at 100% 0%,
            rgba(221, 181, 108, 0.20),
            transparent 38%),
        linear-gradient(145deg,
            rgba(255, 253, 249, 0.92),
            rgba(235, 222, 201, 0.84));

    box-shadow:
        0 28px 70px rgba(63, 44, 20, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);

    opacity: 0.68;

    transform: scale(0.92);
    transform-origin: center;

    scroll-snap-align: center;
    scroll-snap-stop: always;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

body.design-page .design-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 12%;
    z-index: 4;

    width: 76%;
    height: 1px;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(211, 162, 79, 0.92),
            transparent);

    pointer-events: none;
}

body.design-page .design-card.is-active {
    z-index: 3;

    border-color: rgba(183, 138, 61, 0.74);

    opacity: 1;

    transform: scale(1);

    box-shadow:
        0 38px 100px rgba(53, 36, 17, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}


/* ==========================================================
   EMPTY CARDS
   ========================================================== */

body.design-page .design-card--empty {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
}

body.design-page .design-card--empty::after {
    content: "";

    position: absolute;
    inset: 24px;

    border: 1px solid rgba(183, 138, 61, 0.15);
    border-radius: 22px;

    pointer-events: none;
}

body.design-page .design-empty-state {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: min(430px, 72%);
    min-height: 210px;

    padding: 36px;

    border: 1px solid rgba(183, 138, 61, 0.27);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.20);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    text-align: center;
}

body.design-page .design-empty-state>span {
    color: rgba(155, 108, 44, 0.74);

    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.16em;
}

body.design-page .design-empty-line {
    width: 70px;
    height: 1px;

    margin: 20px 0 24px;

    background:
        linear-gradient(90deg,
            transparent,
            #b78a3d,
            transparent);
}

body.design-page .design-empty-state p {
    max-width: 330px;

    margin: 0;

    color: var(--anthoria-gold);

    text-shadow:
        0 1px 1px rgba(255, 255, 255, 0.65),
        0 3px 14px rgba(183, 138, 61, 0.18);

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.01em;
}


/* ==========================================================
   REAL PROJECT CARD
   ========================================================== */

body.design-page .design-card-media {
    position: relative;

    min-width: 0;
    min-height: 100%;

    overflow: hidden;

    background: rgba(183, 138, 61, 0.10);
}

body.design-page .design-card-media img {
    display: block;

    width: 100%;
    height: 100%;
    max-width: none;

    object-fit: cover;
    object-position: center top;
}

body.design-page .design-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;

    padding: clamp(30px, 4vw, 58px);
}

body.design-page .design-card-label {
    margin: 0 0 14px;

    color: #9b6c2c;

    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

body.design-page .design-card-content h2 {
    margin: 0;

    color: #2d2924;

    font-size: clamp(2.2rem, 3.7vw, 3.8rem);
    font-weight: 600;
    line-height: 0.95;
}

body.design-page .design-card-features {
    display: grid;
    gap: 13px;

    margin: 32px 0 0;
    padding: 24px 0 0;

    border-top: 1px solid rgba(183, 138, 61, 0.28);

    list-style: none;
}

body.design-page .design-card-features li {
    position: relative;

    margin: 0;
    padding-left: 18px;

    color: rgba(45, 41, 36, 0.72);

    font-size: 0.78rem;
    line-height: 1.55;
}

body.design-page .design-card-features li::before {
    content: "";

    position: absolute;
    top: 0.65em;
    left: 0;

    width: 8px;
    height: 1px;

    background: #b78a3d;
}


/* ==========================================================
   CONTROLS
   ========================================================== */

body.design-page .design-carousel-control {
    position: absolute;
    top: 50%;
    z-index: 8;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    padding: 0;

    border: 1px solid rgba(158, 108, 36, 0.48);
    border-radius: 50%;

    color: #966527;
    background: rgba(255, 251, 245, 0.72);

    box-shadow:
        0 14px 34px rgba(58, 39, 17, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    font-family: "Cormorant Garamond", serif;
    font-size: 2.3rem;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-55%);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background-color 0.25s ease;
}

body.design-page .design-carousel-control--previous {
    left: clamp(16px, 4vw, 66px);
}

body.design-page .design-carousel-control--next {
    right: clamp(16px, 4vw, 66px);
}

body.design-page .design-carousel-control:hover:not(:disabled) {
    background: rgba(255, 250, 241, 0.94);
    transform: translateY(-55%) scale(1.06);
}

body.design-page .design-carousel-control:disabled {
    opacity: 0.24;
    cursor: default;
}

body.design-page .design-carousel-status {
    position: absolute;
    bottom: 12px;
    left: 50%;
    z-index: 8;

    min-width: 80px;

    padding: 7px 14px;

    border: 1px solid rgba(158, 108, 36, 0.24);
    border-radius: 999px;

    color: rgba(93, 61, 24, 0.76);
    background: rgba(255, 251, 245, 0.52);

    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-align: center;

    transform: translateX(-50%);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


/* ==========================================================
   DARK THEME
   ========================================================== */

body.design-page.dark-theme .design-card {
    border-color: rgba(209, 168, 95, 0.34);

    background:
        radial-gradient(circle at 100% 0%,
            rgba(209, 168, 95, 0.12),
            transparent 38%),
        linear-gradient(145deg,
            rgba(18, 16, 14, 0.93),
            rgba(31, 25, 20, 0.86));

    box-shadow:
        0 34px 86px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.design-page.dark-theme .design-card.is-active {
    border-color: rgba(209, 168, 95, 0.66);

    box-shadow:
        0 42px 110px rgba(0, 0, 0, 0.64),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.design-page.dark-theme .design-empty-state {
    border-color: rgba(209, 168, 95, 0.25);
    background: rgba(255, 255, 255, 0.026);
}

body.design-page.dark-theme .design-empty-state>span,
body.design-page.dark-theme .design-card-label {
    color: #d1a85f;
}

body.design-page.dark-theme .design-empty-state p {
    color: var(--anthoria-gold-dark);

    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.72),
        0 0 18px rgba(209, 168, 95, 0.22);
}

body.design-page.dark-theme .design-card-content h2 {
    color: #f3eadc;
}

body.design-page.dark-theme .design-card-features li {
    color: rgba(243, 234, 220, 0.68);
}

body.design-page.dark-theme .design-carousel-control {
    border-color: rgba(209, 168, 95, 0.42);
    color: #d1a85f;
    background: rgba(12, 11, 10, 0.74);
}

body.design-page.dark-theme .design-carousel-status {
    border-color: rgba(209, 168, 95, 0.24);
    color: rgba(243, 234, 220, 0.74);
    background: rgba(10, 9, 8, 0.58);
}


/* ==========================================================
   TABLET AND MOBILE
   ========================================================== */

@media (max-width: 768px) {

    body.design-page {
        --design-card-width: 82vw;
        --design-card-height: clamp(420px, 60svh, 590px);
        --design-card-gap: 14px;
    }

    body.design-page main>.design-showcase {
        min-height: calc(100svh - 82px);
        padding: 112px 0 82px;
    }

    body.design-page .design-carousel-track {
        padding:
            16px calc((100vw - var(--design-card-width)) / 2) 82px;
    }

    body.design-page .design-card {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(235px, 1fr) auto;

        border-radius: 23px;

        transform: scale(0.94);
    }

    body.design-page .design-card.is-active {
        transform: scale(1);
    }

    body.design-page .design-card--empty {
        grid-template-rows: 1fr;
    }

    body.design-page .design-card--empty::after {
        inset: 14px;
        border-radius: 16px;
    }

    body.design-page .design-empty-state {
        width: 78%;
        min-height: 190px;

        padding: 28px 22px;

        border-radius: 18px;
    }

    body.design-page .design-empty-state p {
        font-size: clamp(1.25rem, 5.8vw, 1.7rem);
        font-weight: 500;
        line-height: 1.15;
    }

    body.design-page .design-card-media {
        min-height: 245px;
    }

    body.design-page .design-card-content {
        padding: 26px;
    }

    body.design-page .design-card-content h2 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    body.design-page .design-carousel-control {
        top: auto;
        bottom: 18px;

        width: 44px;
        height: 44px;

        transform: none;
    }

    body.design-page .design-carousel-control:hover:not(:disabled) {
        transform: scale(1.05);
    }

    body.design-page .design-carousel-control--previous {
        left: calc(50% - 88px);
    }

    body.design-page .design-carousel-control--next {
        right: calc(50% - 88px);
    }

    body.design-page .design-carousel-status {
        bottom: 26px;
    }
}
