/* =========================================================
   ALBERTO ITURRALDE - ESTILO GLOBAL (MODO EDITORIAL PRO)
   Inspiración: Fantasía Oscura, Grimorios, Web de autores premium.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cinzel:wght@400;600;700&display=swap');

:root {
    --gold: #d4af37;
    /* Ligeramente más brillante (Metálico real) */
    --dark-bg: #0d0d12;
    /* Un negro un poco más rico */
    --dark-surface: #1a1a24;
    --text-bone: #f5f2eb;
    /* Mucho más claro para contraste óptimo */
    --text-muted: #b8b3a7;
    /* Menos gris, más legible sobre fondos oscuros */
    --edalom-red: #8b0000;
    --gundolan-blue: #008080;
    --border-color: #383845;
    /* Bordes algo más visibles */
}

/* --- Base --- */
body.global {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--dark-bg);
    color: var(--text-bone);
    overflow-x: hidden;
    font-size: 1.25rem;
    /* Aumentado para mejor legibilidad */
    line-height: 1.65;
    letter-spacing: 0.3px;
}

.serif-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- Navbar Global --- */
body.global .page-navbar {
    background-color: rgba(18, 18, 18, 0.98) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    height: 80px;
}

body.global .page-navbar .nav-link {
    color: var(--text-bone) !important;
    text-transform: uppercase;
    font-size: 13px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 1.5px;
}

body.global .page-navbar .nav-link:hover {
    color: var(--gold) !important;
    text-shadow: 0 0 8px rgba(197, 160, 89, 0.4);
}

/* --- 1. HERO ANIMADO (NUEVO) --- */
.hero-banner-animated {
    position: relative;
    height: 90vh;
    min-height: 600px;
    margin-top: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

/* Efecto Ken Burns (Zoom lento en el fondo) */
.hero-banner-animated::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* El gradiente asegura que el texto blanco se lea siempre bien */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
        url("/static/core/imgs/banner-autor.png");
    background-size: cover;
    background-position: center;
    animation: kenburns 20s infinite alternate;
    z-index: 0;
}

@keyframes kenburns {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

/* Canvas de partículas */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-text-overlay h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: white;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
}

.author-name {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.btn-discover {
    display: inline-block;
    padding: 16px 45px;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    text-decoration: none !important;
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Cinzel', serif;
    transition: all 0.4s ease;
    background: rgba(13, 13, 18, 0.7);
    margin-top: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.btn-discover:hover {
    background: rgba(212, 175, 55, 0.15);
    /* Usando el nuevo var(--gold) en rgba */
    color: #fff !important;
    /* Texto blanco brillante al pasar el ratón */
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6), inset 0 0 15px rgba(212, 175, 55, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    border-color: #f7d670;
    transform: translateY(-3px);
}

/* --- 2. PORTALES DE MUNDOS --- */
.world-portal {
    padding: 80px 0;
}

.portal-card {
    position: relative;
    height: 450px;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.portal-card:hover {
    transform: translateY(-10px);
}

.portal-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
}

.portal-card:hover img {
    transform: scale(1.08);
}

.portal-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    color: white;
}

.portal-card.edalom {
    border-bottom: 5px solid var(--edalom-red);
}

.portal-card.gundolan {
    border-bottom: 5px solid var(--gundolan-blue);
}

/* --- 3. SECCIÓN SOBRE EL AUTOR --- */
.about-section {
    padding: 100px 0;
    background-color: var(--dark-bg);
}

.about-img-container {
    position: relative;
    display: inline-block;
}

.about-img-container::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--gold);
    z-index: 1;
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.8);
}

.about-img-container img {
    position: relative;
    z-index: 2;
    background: var(--dark-surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.about-text {
    padding-left: 40px;
    color: var(--text-bone);
}

@media (max-width: 768px) {
    .about-text {
        padding-left: 15px;
        text-align: center;
    }
}

/* --- 4. ZONA MECENAS --- */
.mecenas-minimal {
    background-color: #0d0d12;
    color: var(--text-bone);
    padding: 100px 0;
    position: relative;
}

.mecenas-box {
    border: 1px solid rgba(197, 160, 89, 0.3);
    padding: 60px 40px;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    background-color: rgba(26, 26, 36, 0.8);
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(197, 160, 89, 0.05);
    backdrop-filter: blur(5px);
}

.btn-gold {
    background-color: transparent;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    border-radius: 4px;
    /* Un poco de redondeo más elegante */
    padding: 15px 40px;
    font-weight: 700;
    letter-spacing: 3px;
    transition: all 0.4s ease;
    text-decoration: none !important;
    display: inline-block;
    font-family: 'Cinzel', serif;
    position: relative;
    overflow: hidden;
    background: rgba(26, 26, 36, 0.5);
}

.btn-gold:hover {
    background-color: rgba(212, 175, 55, 0.15);
    color: #fff !important;
    /* Blanco para destacar */
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.3);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    border-color: #f7d670;
    transform: translateY(-3px);
}

/* --- 5. CARRUSEL DE NOTICIAS --- */
.carousel-text-only {
    background-color: var(--dark-surface);
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--gold);
    min-height: 380px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.carousel-text-only .carousel-item {
    height: 380px;
    padding: 60px 10%;
    position: relative;
    z-index: 2;
}

.carousel-text-only .carousel-item a,
.carousel-text-only .carousel-item .btn {
    position: relative;
    z-index: 20 !important;
    pointer-events: auto !important;
}

.news-label {
    display: inline-block;
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
}

.news-title-link {
    color: var(--text-bone);
    text-decoration: none !important;
}

.news-title-link h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    transition: color 0.3s, text-shadow 0.3s;
    font-family: 'Playfair Display', serif;
}

.news-title-link:hover h2 {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.carousel-text-only .carousel-control-prev,
.carousel-text-only .carousel-control-next {
    width: 80px;
    opacity: 0.7;
    z-index: 100;
    transition: opacity 0.3s;
}

.carousel-text-only .carousel-control-prev:hover,
.carousel-text-only .carousel-control-next:hover {
    opacity: 1;
}

.carousel-text-only .ti-angle-left,
.carousel-text-only .ti-angle-right {
    font-size: 2.5rem !important;
    color: var(--gold) !important;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.carousel-indicators {
    z-index: 101;
}

.carousel-indicators li {
    background-color: var(--text-muted);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.5;
}

.carousel-indicators li.active {
    background-color: var(--gold);
    opacity: 1;
    box-shadow: 0 0 8px var(--gold);
}

/* --- 6. FOOTER & NEWSLETTER EDITORIAL --- */
.footer-editorial {
    padding: 100px 0 50px 0;
    background-color: #08080c;
    border-top: 1px solid #1a1a24;
    text-align: center;
    position: relative;
}

.footer-editorial::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    opacity: 0.3;
    pointer-events: none;
}

.newsletter-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--text-bone);
}

.newsletter-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.minimal-form {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.minimal-form .form-control {
    border: none !important;
    border-bottom: 1px solid rgba(197, 160, 89, 0.4) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--gold) !important;
    padding: 10px 0 !important;
    text-align: center;
    font-size: 1.2rem;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.4s ease;
}

.minimal-form .form-control::placeholder {
    color: rgba(230, 225, 214, 0.3);
}

.minimal-form .form-control:focus {
    border-bottom-color: var(--gold) !important;
    box-shadow: 0 10px 15px -10px rgba(197, 160, 89, 0.5) !important;
    outline: none;
}

.btn-subscribe {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 10px 40px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 30px;
    transition: all 0.4s ease;
    cursor: pointer;
    font-family: 'Cinzel', serif;
}

.btn-subscribe:hover {
    background-color: rgba(197, 160, 89, 0.1);
    color: var(--gold);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    text-shadow: 0 0 8px rgba(197, 160, 89, 0.8);
}

.footer-social {
    margin: 60px 0 40px 0;
    position: relative;
    z-index: 2;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.4rem;
    margin: 0 15px;
    transition: all 0.3s;
}

.footer-social a:hover {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.8);
    transform: translateY(-3px);
    display: inline-block;
}

.copyright-text {
    font-size: 0.75rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    font-family: 'Cinzel', serif;
}

/* Ajuste para que en Edalom el footer siga siendo oscuro */
body.edalom .footer-editorial {
    background-color: #111 !important;
    border-top: 1px solid #222;
    color: white;
}

body.edalom .newsletter-title {
    color: white !important;
}

body.edalom .minimal-form .form-control {
    border-bottom-color: #444 !important;
    color: white !important;
}

body.edalom .btn-subscribe {
    border-color: white;
    color: white;
}

body.edalom .btn-subscribe:hover {
    background-color: white;
    color: black;
}

/* --- 7. PERFIL & INSIGNIAS --- */
.insignia-container {
    position: relative;
    padding: 10px;
    text-align: center;
}

.img-insignia {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.img-insignia:hover {
    transform: scale(1.1) rotate(5deg);
}

.galon {
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-top: -10px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.galon-0 {
    background: #eee;
    color: #666;
}

.galon-1 {
    background: #cd7f32;
    color: white;
}

/* Cobre */
.galon-3 {
    background: #c0c0c0;
    color: #333;
}

/* Plata */
.galon-5 {
    background: var(--gold);
    color: black;
}

/* Oro */
/* --- 8. GLOBAL DARK MODE OVERRIDES (Bootstrap Purge) --- */
body.global .card {
    background-color: var(--dark-surface) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-bone) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

body.global .card-header {
    background-color: #111 !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-weight: bold;
    letter-spacing: 1px;
}

body.global .card-footer {
    background-color: #111 !important;
    border-top: 1px solid var(--border-color) !important;
}

body.global .list-group-item {
    background-color: var(--dark-surface) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-bone);
}

body.global table {
    color: var(--text-bone) !important;
}

body.global table thead th {
    border-bottom: 2px solid var(--gold) !important;
    font-family: 'Cinzel', serif;
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.9rem;
}

body.global table td,
body.global table th {
    border-top: 1px solid var(--border-color) !important;
}

body.global .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

body.global .table-hover tbody tr:hover {
    background-color: rgba(197, 160, 89, 0.05) !important;
    color: var(--gold) !important;
}

/* Nav Tabs Profile Override */
body.global .nav-tabs {
    border-bottom: 1px solid var(--border-color) !important;
}

body.global .nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    border-radius: 0;
}

body.global .nav-tabs .nav-link:hover {
    color: var(--gold) !important;
    border-color: transparent !important;
}

body.global .nav-tabs .nav-link.active {
    background-color: transparent !important;
    color: var(--gold) !important;
    border-bottom: 2px solid var(--gold) !important;
}

/* Modal Dark Override */
body.global .modal-content {
    background-color: var(--dark-surface) !important;
    border: 1px solid var(--gold) !important;
    color: var(--text-bone);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
}

body.global .modal-header {
    border-bottom: 1px solid var(--border-color);
}

body.global .modal-title {
    font-family: 'Cinzel', serif;
    color: var(--gold);
}

body.global .modal-footer {
    border-top: 1px solid var(--border-color);
}

body.global .close {
    color: var(--text-bone);
    text-shadow: none;
    opacity: 0.8;
}

body.global .close:hover {
    color: var(--gold);
    opacity: 1;
}