/* =========================================================
   CERNUNNOS BASE · servicios.css
   Sección Diseño Web — slider orbital de cards temáticas.
   ========================================================= */

/* ── Sección principal ────────────────────────────────────── */
.dw-section {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

.dw-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

/* ── Columna de texto ─────────────────────────────────────── */
.dw-text-col h2 {
    font-size: clamp(1.9rem, 2.8vw, 2.5rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    color: var(--color-heading);
}

.dw-text-col > p {
    color: var(--color-text-light);
    max-width: 38ch;
    line-height: 1.75;
}

/* ── Columna de cards ─────────────────────────────────────── */
.dw-cards-col {
    position: relative;
    height: 460px;
    perspective: 900px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y; /* permite scroll vertical, el JS maneja el horizontal */
}

.dw-orbit {
    position: absolute;
    top: 46%;
    left: 50%;
    width: 0;
    height: 0;
}

.dw-card {
    position: absolute;
    width: 215px;
    height: 310px;
    top: -155px;
    left: -107px;
    will-change: transform, opacity;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.dw-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.22),
                0 4px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.12s ease, box-shadow 0.2s ease;
    user-select: none;
    background: #111;
}

/* ── Preview iframe ───────────────────────────────────────── */
.dw-preview-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/*
 * iframe 1200×1735px — escala exacta para llenar la card 215×310:
 *   scale = 215/1200 = 0.1792  →  ancho visual = 215px  ✓
 *   1735 × 0.1792 ≈ 311px      →  alto visual ≈ 310px   ✓
 * left:0 muestra el ancho completo de la página desktop.
 */
.dw-preview-frame {
    display: block;
    width: 1200px;
    height: 1735px;
    border: none;
    transform: scale(0.1792);
    transform-origin: top left;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* ── Label + CTA superpuestos ─────────────────────────────── */
.dw-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 12px 13px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
}

.dw-card-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 5px;
}

.dw-card-cta {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 3px 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dw-card.is-front:hover .dw-card-cta,
.dw-card.is-front:focus-visible .dw-card-cta {
    opacity: 1;
}

.dw-card:hover .dw-card-inner {
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.3),
                0 6px 18px rgba(0, 0, 0, 0.14);
}

/* ── Componentes compartidos del mock ──────────────────────── */
.cm-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    flex-shrink: 0;
    height: 38px;
}

.cm-brand {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.cm-hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}

.cm-hamburger span {
    display: block;
    height: 1.5px;
    width: 14px;
    background: currentColor;
    opacity: 0.55;
    border-radius: 1px;
}

.cm-hamburger span:last-child { width: 10px; }

.cm-site-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    text-align: center;
    position: relative;
}

.cm-big-icon {
    font-size: 28px;
    line-height: 1;
    display: block;
}

.cm-site-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 20px;
    line-height: 1.0;
    letter-spacing: -0.01em;
    margin: 0;
}

.cm-site-tagline {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.09em;
    opacity: 0.55;
    margin: 0;
    text-transform: uppercase;
}

.cm-tag-row {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 12px 10px;
    flex-shrink: 0;
}

.cm-tag {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cm-site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    flex-shrink: 0;
    height: 46px;
}

.cm-site-cta {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 7px 16px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-block;
    cursor: pointer;
}

/* ── Barbería ─────────────────────────────────────────────── */
.card-barberia {
    background: #0f0f0f;
    color: #D4AF37;
}

.card-barberia .cm-site-header {
    background: #080808;
    border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}

.card-barberia .cm-site-hero {
    background: #0f0f0f;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(212, 175, 55, 0.04) 0px, rgba(212, 175, 55, 0.04) 1px,
        transparent 1px, transparent 8px
    );
}

.card-barberia .cm-site-title {
    color: #D4AF37;
    font-style: italic;
    letter-spacing: 0.05em;
    font-size: 18px;
}

.card-barberia .cm-site-tagline { color: rgba(212, 175, 55, 0.5); }

.card-barberia .cm-tag-row { border-top: 1px solid rgba(212, 175, 55, 0.1); }

.card-barberia .cm-tag {
    border: 1px solid rgba(212, 175, 55, 0.28);
    color: rgba(212, 175, 55, 0.72);
}

.card-barberia .cm-site-footer {
    background: #080808;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.card-barberia .cm-site-cta {
    background: #D4AF37;
    color: #080808;
}

/* ── Restaurante Mexicano ─────────────────────────────────── */
.card-mexicano { background: #F7C948; color: #1a1a1a; }

.card-mexicano .cm-site-header {
    background: #CC2936;
    color: #fff;
    border-bottom: 3px solid #1a1a1a;
}

.card-mexicano .cm-site-hero { background: #F7C948; }

.card-mexicano .cm-big-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.card-mexicano .cm-site-title {
    color: #CC2936;
    text-transform: uppercase;
    font-size: 17px;
    letter-spacing: 0.02em;
}

.cm-mx-badge {
    background: #2DC653;
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: inline-block;
}

.card-mexicano .cm-tag-row { border-top: 2px solid rgba(0,0,0,0.1); }

.card-mexicano .cm-tag { background: rgba(0,0,0,0.08); color: #1a1a1a; font-size: 8px; }

.card-mexicano .cm-site-footer {
    background: #CC2936;
    border-top: 2px solid #1a1a1a;
}

.card-mexicano .cm-site-cta { background: #F7C948; color: #1a1a1a; }

/* ── Clínica Veterinaria ──────────────────────────────────── */
.card-vet { background: #fff; color: #1a1a1a; }

.card-vet .cm-site-header { background: #0077B6; color: #fff; }

.card-vet .cm-site-hero { background: #F0F8FF; }

.cm-vet-cross {
    width: 34px;
    height: 34px;
    background: #0077B6;
    border-radius: 8px;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    flex-shrink: 0;
    line-height: 1;
}

.card-vet .cm-site-title { color: #0077B6; font-size: 17px; }

.card-vet .cm-site-tagline {
    color: #555;
    text-transform: none;
    letter-spacing: 0;
    opacity: 1;
    font-size: 9px;
}

.card-vet .cm-tag-row { border-top: 1px solid rgba(0, 119, 182, 0.12); }

.card-vet .cm-tag { background: rgba(0, 119, 182, 0.09); color: #0077B6; }

.card-vet .cm-site-footer { background: #0077B6; }

.card-vet .cm-site-cta { background: #fff; color: #0077B6; }

/* ── Bar de Copas ─────────────────────────────────────────── */
.card-bar { background: #080808; color: #BF5AF2; }

.card-bar .cm-site-header {
    background: #040404;
    border-bottom: 1px solid rgba(191, 90, 242, 0.16);
}

.card-bar .cm-brand {
    letter-spacing: 0.18em;
    font-size: 9px;
    color: #BF5AF2;
    text-shadow: 0 0 10px rgba(191, 90, 242, 0.5);
}

.card-bar .cm-hamburger span { background: rgba(191, 90, 242, 0.55); }

.card-bar .cm-site-hero {
    background: radial-gradient(ellipse at 50% 30%, rgba(55, 0, 90, 0.55) 0%, transparent 70%),
                #080808;
    gap: 4px;
}

.card-bar .cm-big-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(191, 90, 242, 0.7));
}

.card-bar .cm-site-title {
    color: #BF5AF2;
    font-size: 22px;
    letter-spacing: 0.07em;
    text-shadow: 0 0 16px rgba(191, 90, 242, 0.7),
                 0 0 40px rgba(191, 90, 242, 0.3);
}

.card-bar .cm-site-tagline {
    color: rgba(191, 90, 242, 0.5);
    letter-spacing: 0.12em;
}

.card-bar .cm-tag-row { border-top: 1px solid rgba(191, 90, 242, 0.1); }

.card-bar .cm-tag {
    border: 1px solid rgba(191, 90, 242, 0.28);
    color: rgba(191, 90, 242, 0.78);
}

.card-bar .cm-site-footer {
    background: #040404;
    border-top: 1px solid rgba(191, 90, 242, 0.1);
}

.card-bar .cm-site-cta {
    background: #BF5AF2;
    color: #000;
    box-shadow: 0 0 12px rgba(191, 90, 242, 0.45);
}

/* ── Academia de Inglés ──────────────────────────────────── */
.card-english { background: #012169; color: #fff; }

.card-english .cm-site-header {
    background: #CF142B;
    color: #fff;
    border-bottom: 3px solid #fff;
}

.card-english .cm-site-hero { background: #012169; gap: 8px; }

.cm-speech-bubble {
    background: #fff;
    color: #012169;
    padding: 5px 13px;
    border-radius: 10px 10px 10px 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
    line-height: 1;
}

.card-english .cm-site-title { color: #fff; font-size: 18px; }

.card-english .cm-site-tagline {
    color: rgba(255, 255, 255, 0.65);
    text-transform: none;
    letter-spacing: 0.04em;
    opacity: 1;
    font-size: 10px;
}

.card-english .cm-tag-row { border-top: 1px solid rgba(255, 255, 255, 0.12); }

.card-english .cm-tag {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.85);
}

.card-english .cm-site-footer {
    background: #CF142B;
    border-top: 2px solid rgba(255, 255, 255, 0.18);
}

.card-english .cm-site-cta { background: #fff; color: #CF142B; }

/* ── Sección alternada (fondo suave) ─────────────────────── */
.dw-section--alt { background: var(--color-surface); }

/* ── Sección Matrix (WordPress Especializado) ─────────────── */
.dw-section--matrix {
    position: relative;
    background: var(--color-primary); /* #001F3F */
}

#matrix-wp {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: block;
    width: 100%;
    height: 100%;
}

.dw-section--matrix .container {
    position: relative;
    z-index: 1;
}

/* Overrides de texto para fondo oscuro */
.dw-section--matrix .dw-text-col h2 {
    color: #ffffff;
}

.dw-section--matrix .dw-text-col > p {
    color: rgba(255, 255, 255, 0.72);
}

/* Tiles semitransparentes para que el matrix se intuya en el fondo */
.dw-section--matrix .dw-feat-tile {
    background: rgba(0, 31, 63, 0.78);
    backdrop-filter: blur(1px);
}

/* ── Layout invertido: contenido izq / texto der ─────────── */
.dw-layout--flip { grid-template-columns: 1fr 400px; }

/* ── Feature grid · WordPress Especializado ───────────────── */
.dw-feat-col { padding: var(--spacing-sm) 0; }

.dw-feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dw-feat-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--spacing-md) var(--spacing-sm);
    background: #0d0d0f;
    border: 1px solid rgba(57, 255, 20, 0.45);
    border-radius: 10px;
    transition: var(--transition);
}

.dw-feat-tile:hover {
    border-color: rgba(57, 255, 20, 0.95);
    box-shadow: 0 0 8px  rgba(57, 255, 20, 0.45),
                0 0 22px rgba(57, 255, 20, 0.28),
                0 0 50px rgba(57, 255, 20, 0.14),
                inset 0 0 20px rgba(57, 255, 20, 0.07);
    transform: translateY(-2px);
}

.dw-feat-icon {
    display: flex;
    color: var(--color-secondary);
    margin-bottom: 2px;
}

.dw-feat-tile strong {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
    line-height: 1.2;
}

.dw-feat-tile span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}

/* ── Stats · Soporte Continuo ─────────────────────────────── */
.dw-stats-col { display: flex; align-items: center; }

.dw-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    width: 100%;
}

.dw-stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--color-primary);
    border-radius: 12px;
    border: 1px solid rgba(57, 255, 20, 0.1);
    transition: var(--transition);
}

.dw-stat-item:hover {
    border-color: rgba(57, 255, 20, 0.35);
    box-shadow: 0 8px 32px rgba(0, 31, 63, 0.25),
                0 0 20px rgba(57, 255, 20, 0.08);
}

.dw-stat-num {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 900;
    color: var(--color-secondary);
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
}

.dw-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.3;
}

/* Lista de incluidos · Soporte */
.dw-soporte-list {
    list-style: none;
    margin-top: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dw-soporte-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--color-text);
}

.dw-soporte-list li .cernunnos-icon--check {
    flex-shrink: 0;
    color: var(--color-secondary);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
    .dw-layout,
    .dw-layout--flip {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* En móvil el feature grid vuelve al orden natural (texto arriba) */
    .dw-layout--flip .dw-feat-col { order: 2; }
    .dw-layout--flip .dw-text-col { order: 1; }

    .dw-text-col { text-align: center; }
    .dw-text-col > p { max-width: none; margin-left: auto; margin-right: auto; }
    .dw-list { align-items: center; }
    .dw-nav { justify-content: center; }

    .dw-cards-col { height: 390px; }

    .dw-card {
        width: 185px;
        height: 268px;
        top: -134px;
        left: -92px;
    }

    /* scale = 185/1200 = 0.1542 · 1735×0.1542 ≈ 268px */
    .dw-preview-frame {
        transform: scale(0.1542);
        left: 0;
    }

    .dw-feat-grid { grid-template-columns: repeat(3, 1fr); }
    .dw-stats-grid { grid-template-columns: 1fr 1fr; }
    .dw-soporte-list { align-items: flex-start; }
}

@media (max-width: 600px) {
    .dw-cards-col { height: 330px; }

    .dw-card {
        width: 162px;
        height: 234px;
        top: -117px;
        left: -81px;
    }

    /* scale = 162/1200 = 0.135 · 1735×0.135 ≈ 234px */
    .dw-preview-frame {
        transform: scale(0.135);
        left: 0;
    }

    .dw-feat-grid { grid-template-columns: 1fr 1fr; }
    .dw-stats-grid { grid-template-columns: 1fr 1fr; }
}
