/*
Theme Name: CreaReels
Theme URI: https://creareels.es
Author: CreaReels
Author URI: https://creareels.es
Description: Tema a medida para la productora audiovisual CreaReels. Diseno moderno, oscuro y minimalista con acento morado, optimizado para SEO y WPO. Sin constructores visuales.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: creareels
Tags: custom-theme, video, dark, purple, responsive
*/

/* ==========================================================================
   RESET / BASE GLOBAL
   El diseno de la Home vive en home-styles.css (encolado solo en la portada).
   Aqui dejamos unicamente el reset minimo y los estilos globales del tema.
   ========================================================================== */

:root {
    --cr-bg: #0D0D12;
    --cr-bg-alt: #16161D;
    --cr-text: #F5F5F7;
    --cr-text-muted: #A0A0B0;
    --cr-accent: #7C3AED;
    --cr-accent-dark: #6B21A8;
    --cr-bg-alt: #16161D;
    --cr-bg-soft: #1E1E27;
    --cr-border: rgba(255, 255, 255, 0.08);
    --cr-border-hover: rgba(124, 58, 237, 0.6);
    --cr-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Degradado de marca (extraido del logo CreaReels) */
    --cr-gradient: linear-gradient(90deg, #0abcf0 0%, #1b6ed8 23%, #7235b7 39%, #e22e7d 55%, #f47c37 78%, #f1b830 93%);
    /* Degradado frio (cian -> azul -> morado -> magenta) para titulares del footer */
    --cr-gradient-cool: linear-gradient(90deg, #18b4e9 0%, #2f7ad6 30%, #7c3aed 68%, #c026a3 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--cr-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--cr-text);
    background-color: var(--cr-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--cr-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cr-text);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin: 0 0 0.5em;
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

/* Accesibilidad: ocultar visualmente manteniendo lectura por screen readers */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--cr-accent);
    color: #fff;
    padding: 0.75em 1.25em;
    z-index: 9999;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    color: #fff;
}

/* ==========================================================================
   UTILIDAD: TEXTO CON DEGRADADO DE MARCA
   ========================================================================== */
.cr-gradient-text {
    background: var(--cr-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ==========================================================================
   CABECERA (base global)
   El overlay transparente sobre el hero se define en home-styles.css.
   ========================================================================== */
.site-header {
    width: 100%;
    background: var(--cr-bg);
    border-bottom: 1px solid var(--cr-border);
}

.site-header__inner {
    position: relative;
    max-width: 1180px;
    margin-inline: auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-branding {
    flex: 0 0 auto;
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-logo img,
.custom-logo {
    height: 64px;
    width: auto;
    display: block;
}

@media (min-width: 768px) {
    .site-logo img,
    .custom-logo {
        height: 80px;
    }
}

.site-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--cr-text);
}

/* Menu central */
.site-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-nav__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.site-nav__list a {
    color: var(--cr-text-muted);
    font-weight: 500;
    font-size: 0.98rem;
    transition: color 0.3s ease;
}

.site-nav__list a:hover {
    color: var(--cr-accent);
}

/* ==========================================================================
   BOTONES (globales, disponibles en todo el sitio)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.9rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn--primary {
    background: var(--cr-accent);
    color: #fff;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background: var(--cr-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(124, 58, 237, 0.5);
}

.btn--block {
    width: 100%;
}

/* Boton CTA del header (borde morado) */
.btn--outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    color: var(--cr-text);
    background: transparent;
    border: 2px solid var(--cr-accent);
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn--outline:hover,
.btn--outline:focus-visible {
    background: var(--cr-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.4);
}

.site-header__cta {
    flex: 0 0 auto;
}

.site-nav__cta--mobile {
    display: none;
}

/* Conmutador / hamburguesa (oculto en escritorio) */
.cr-nav-toggle {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cr-nav-burger {
    display: none;
}

/* ==========================================================================
   SUBMENUS DESPLEGABLES (dropdown en hover, solo CSS)
   ========================================================================== */
.site-nav__list .menu-item {
    position: relative;
}

/* Indicador (chevron) en elementos con hijos */
.site-nav__list .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 0.42em;
    height: 0.42em;
    margin-left: 0.45em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease;
}

.site-nav__list .menu-item-has-children:hover > a::after {
    transform: translateY(1px) rotate(225deg);
}

.site-nav__list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 250px;
    background: var(--cr-bg-soft);
    border: 1px solid var(--cr-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 70;
}

/* Puente invisible para que no se cierre al bajar el cursor */
.site-nav__list .menu-item-has-children::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 14px;
}

.site-nav__list .menu-item-has-children:hover > .sub-menu,
.site-nav__list .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.site-nav__list .sub-menu li {
    width: 100%;
}

.site-nav__list .sub-menu a {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 9px;
    color: var(--cr-text);
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.site-nav__list .sub-menu a:hover {
    background: var(--cr-accent-soft, rgba(124, 58, 237, 0.14));
    color: var(--cr-accent);
}

/* --- Cabecera responsive (menu movil) --- */
@media (max-width: 860px) {
    .site-nav {
        order: 5;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--cr-bg);
        border-top: 1px solid var(--cr-border);
        border-bottom: 1px solid var(--cr-border);
        padding: 0.75rem 1.25rem 1.25rem;
        display: none;
        z-index: 60;
    }

    .cr-nav-toggle:checked ~ .site-nav {
        display: flex;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .site-nav__list a {
        display: block;
        padding: 0.85rem 0.25rem;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--cr-border);
    }

    /* Submenus en movil: estaticos e indentados (sin flotar) */
    .site-nav__list .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        padding: 0 0 0 1rem;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .site-nav__list .menu-item-has-children::before {
        display: none;
    }

    .site-nav__list .menu-item-has-children > a::after {
        float: right;
    }

    .site-nav__list .sub-menu a {
        font-size: 0.98rem;
        color: var(--cr-text-muted);
    }

    .site-nav__cta--mobile {
        display: inline-flex;
        margin-top: 1rem;
        align-self: flex-start;
    }

    /* El CTA de escritorio se oculta; en su lugar se ve la hamburguesa */
    .site-header__cta {
        display: none;
    }

    .cr-nav-burger {
        order: 4;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        cursor: pointer;
        border: 1px solid var(--cr-border);
        border-radius: 10px;
    }

    .cr-nav-burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--cr-text);
        transition: all 0.3s ease;
    }

    /* Animacion a "X" cuando esta abierto */
    .cr-nav-toggle:checked ~ .cr-nav-burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .cr-nav-toggle:checked ~ .cr-nav-burger span:nth-child(2) {
        opacity: 0;
    }
    .cr-nav-toggle:checked ~ .cr-nav-burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* ==========================================================================
   PIE DE PAGINA (global, presente en todas las paginas)
   ========================================================================== */
.site-footer {
    background: var(--cr-bg);
    border-top: 1px solid var(--cr-border);
    padding-block: 4rem 2rem;
}

.site-footer__inner {
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* --- Bloque de marca / CTA --- */
.footer-brand__logo {
    display: inline-flex;
    margin-bottom: 1.5rem;
}

.footer-brand__logo img {
    height: 84px;
    width: auto;
}

@media (min-width: 768px) {
    .footer-brand__logo img {
        height: 100px;
    }
}

.footer-brand__cta {
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
    margin: 0 0 1.75rem;
    color: var(--cr-text);
}

.footer-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cr-text-muted);
    transition: color 0.3s ease;
}

.footer-brand__link:hover {
    color: var(--cr-text);
}

.footer-brand__arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-brand__link:hover .footer-brand__arrow {
    transform: translateX(8px);
}

/* --- Columnas --- */
.footer-col--stack {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.footer-block__title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 1.1rem;
    /* Degradado frio cian -> magenta (estilo de la version anterior) */
    background: var(--cr-gradient-cool);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.footer-block__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-block__list a {
    color: var(--cr-text);
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-block__list a:hover {
    color: var(--cr-accent);
}

.footer-block__text {
    margin: 0 0 0.85rem;
    color: var(--cr-text);
    line-height: 1.6;
}

.footer-block__text:last-child {
    margin-bottom: 0;
}

/* --- Barra legal inferior --- */
.site-footer__bottom {
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--cr-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
}

.site-footer__copy {
    margin: 0;
    color: var(--cr-text-muted);
    font-size: 0.85rem;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-footer__legal a {
    color: var(--cr-text-muted);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.site-footer__legal a:hover {
    color: var(--cr-accent);
}

/* --- Responsive footer --- */
@media (min-width: 720px) {
    .site-footer__grid {
        grid-template-columns: 1.6fr 1fr 1fr;
        gap: 2.5rem;
    }

    .site-footer__bottom {
        flex-direction: row;
        align-items: center;
    }
}

/* ==========================================================================
   CONTENEDOR GLOBAL (disponible en todas las paginas, no solo la Home)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.container--narrow {
    max-width: 760px;
}

/* ==========================================================================
   PAGINA DE SERVICIO (template-servicio.php)
   ========================================================================== */
.service-page {
    background: var(--cr-bg);
}

/* Hero */
.svc-hero {
    position: relative;
    padding-block: 5rem 4rem;
    text-align: center;
    background: linear-gradient(160deg, #1a1030 0%, var(--cr-bg) 60%, #14121f 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.svc-hero--image {
    background-blend-mode: normal;
}

.svc-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 13, 18, 0.72) 0%, rgba(13, 13, 18, 0.9) 100%),
        radial-gradient(90% 80% at 50% 0%, rgba(124, 58, 237, 0.35) 0%, transparent 60%);
}

.svc-hero .container {
    position: relative;
    z-index: 1;
}

.svc-hero__title {
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0 auto 1rem;
    max-width: 900px;
}

.svc-hero__subtitle {
    font-size: clamp(1rem, 2.6vw, 1.3rem);
    color: var(--cr-text-muted);
    max-width: 680px;
    margin: 0 auto;
}

/* Cuerpo de dos columnas */
.svc-body {
    padding-block: 4rem;
}

.svc-body__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.svc-content {
    color: var(--cr-text);
    font-size: 1.05rem;
    line-height: 1.8;
    min-width: 0;
}

.svc-content h2 {
    font-size: 1.7rem;
    margin: 2rem 0 1rem;
}

.svc-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
}

.svc-content img,
.svc-content video,
.svc-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--cr-radius, 16px);
    margin: 1.5rem 0;
}

.svc-content a {
    color: var(--cr-accent);
    text-decoration: underline;
}

/* Columna lateral de valor */
.svc-aside {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.svc-box {
    padding: 1.75rem;
    background: var(--cr-bg-soft);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius, 16px);
}

.svc-box__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.svc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.svc-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--cr-text);
    line-height: 1.5;
}

.svc-list__check {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--cr-accent-soft, rgba(124, 58, 237, 0.14));
    color: var(--cr-accent);
    margin-top: 1px;
}

.svc-list__dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--cr-accent);
    margin-top: 8px;
}

.svc-timeline {
    margin: 0;
    color: var(--cr-text);
    line-height: 1.6;
}

/* CTA final */
.svc-cta {
    padding-block: 4rem;
    text-align: center;
    background: var(--cr-bg-alt);
    border-top: 1px solid var(--cr-border);
}

.svc-cta__title {
    font-size: clamp(1.6rem, 4.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.svc-cta__text {
    color: var(--cr-text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   GALERIA DE VIDEOS DE EJEMPLO (showreel)
   Tarjetas de IGUAL ALTURA: asi horizontal (16:9) y vertical (9:16)
   conviven equilibrados en la misma fila.
   ========================================================================== */
.svc-examples {
    padding-block: 4.5rem;
    background: var(--cr-bg-alt);
    border-top: 1px solid var(--cr-border);
}

.svc-examples__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0 0 2.75rem;
}

.svc-examples__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.75rem;
}

.svc-example {
    margin: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: 100%;
}

.svc-example__media {
    position: relative;
    /* Altura fija -> el ancho lo deriva la orientacion (misma altura para todos) */
    height: clamp(340px, 44vh, 440px);
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--cr-border);
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.svc-example__media:hover {
    transform: translateY(-5px);
    border-color: var(--cr-border-hover, rgba(124, 58, 237, 0.6));
}

.svc-example--horizontal .svc-example__media {
    aspect-ratio: 16 / 9;
}

.svc-example--vertical .svc-example__media {
    aspect-ratio: 9 / 16;
}

.svc-example__media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Boton de sonido flotante */
.svc-example__sound {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(13, 13, 18, 0.55);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.svc-example__sound:hover {
    background: rgba(13, 13, 18, 0.8);
}

.svc-example__sound.is-on {
    background: var(--cr-accent);
    border-color: var(--cr-accent);
}

/* Placeholder elegante (hueco reservado) */
.svc-example__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    line-height: 1.45;
    background:
        radial-gradient(120% 90% at 50% 22%, rgba(124, 58, 237, 0.28) 0%, transparent 60%),
        linear-gradient(160deg, #181022 0%, #0d0d12 72%);
}

.svc-example__play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    padding-left: 4px;
}

.svc-example__hint {
    max-width: 200px;
}

.svc-example__caption {
    margin-top: 0.85rem;
    font-size: 0.9rem;
    color: var(--cr-text-muted);
    text-align: center;
    max-width: 100%;
}

/* Movil: apiladas, cada una a su ancho natural */
@media (max-width: 767px) {
    .svc-example {
        width: 100%;
    }

    .svc-example__media {
        height: auto;
        width: 100%;
    }

    .svc-example--vertical .svc-example__media {
        max-width: 320px;
        margin-inline: auto;
    }
}

/* Escritorio: 2 columnas (contenido + valor) */
@media (min-width: 900px) {
    .svc-body__grid {
        grid-template-columns: 1.7fr 1fr;
        gap: 3.5rem;
        align-items: start;
    }

    .svc-aside {
        position: sticky;
        top: 2rem;
    }

    .svc-hero {
        padding-block: 6.5rem 5rem;
    }
}

