/* ===================== VARIABLES GLOBALES ===================== */
:root {
    --primary-gradient: linear-gradient(135deg, #3c566e, #2C3E4F);
    --accent-gradient: linear-gradient(135deg, #6b73ff, #000dff);

    --color-text: #333;
    --color-muted: #666;
    --color-bg: #f5f5f5;
    --color-white: #fff;
    --color-accent: #000dff;
    --color-warning: #FDB141;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 6px 16px rgba(0,0,0,0.08);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;

    --max-width: 1200px;
}

/* ===================== RESET ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===================== UTILIDADES ===================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.surface {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s ease;
}

.surface:hover {
    box-shadow: var(--shadow-lg);
}

.loading {
    font-style: italic;
    color: var(--color-muted);
}

/* ===================== HEADER ===================== */
header {
    background: var(--primary-gradient);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    margin: 0;
    padding: 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.brand {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    max-width: 200px;
}

/* ===================== MENÚ ===================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}

.menu a:hover {
    background: rgba(255,255,255,0.2);
}

/* ===================== SUBMENÚ ===================== */
.submenu {
    position: relative;
    display: flex;
    align-items: center;
}

.submenu-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: var(--primary-gradient);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.submenu-items a {
    display: block;
    padding: 10px;
    white-space: nowrap;
}

.submenu-items a:hover {
    background: rgba(255,255,255,0.15);
}

.submenu:hover .submenu-items {
    display: block;
}

/* ===================== MAIN ===================== */
main {
    flex: 1;
    width: 100%;
    padding-top: 0; /* elimina espacio extra arriba del hero */
}

/* ===================== SECCIONES ===================== */
section {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

.content-section {
    width: 100%;
    padding: 1rem 2rem;
}

.section-inner {
    padding: 1.5rem 2rem;
}

.content-section h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 0.8rem;
    color: var(--color-accent);
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-section ul {
    padding-left: 1.2rem;
    list-style-type: disc;
}

/* ===================== FLEX / TARJETAS ===================== */
.flex-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.flex-item {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* ===================== CARDS ===================== */
.card {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-warning);
}

.card-body {
    font-size: 1rem;
    color: #444;
}

.card-body p {
    margin-bottom: 1.5rem;
}

/* ===================== BOTONES ===================== */
.button {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: white;
    background: var(--primary-gradient);
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.button:hover {
    box-shadow: var(--shadow-sm);
}

.button-accent {
    background: var(--accent-gradient);
}

/* ===================== FOOTER ===================== */
footer {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 0;
    margin-top: 3rem;
}

footer .container {
    text-align: right;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 0.5rem;
        background: #2C3E4F;
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ===================== GRID ===================== */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.col-4 {
    flex: 1 1 calc(33.333% - 1rem);
    box-sizing: border-box;
}

/* ===================== HERO GENERAL ===================== */
.hero-fables {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.hero-fables .video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-fables .video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh; /* 16:9 */
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ===================== MODAL VIDEO ===================== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.video-box {
    position: relative;
    width: 90%;
    max-width: 900px;
}

.video-box iframe {
    width: 100%;
    height: 500px;
}

.close-video {
    position: absolute;
    top: -15px;
    right: -15px;
    background: red;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ===================== HERO ORGANIZACIÓN ===================== */
.hero-fables-home {
    position: relative;
    width: 100%;
    height: 60vh;
    max-height: 600px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.hero-fables-home iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-fables-home .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.hero-fables-home .contenido {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 1rem;
    max-width: 900px;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
}

.hero-fables-home h1 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ===================== FIN CSS ===================== */
