/* Estilos para el navbar */
.navbar-dark-red {
    background-color: #480000 !important;
    background-image: url("../images/Fondo navbar.png");
    background-size: cover;
    background-position: left;
    background-repeat: no-repeat;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    border: 4px solid #000000;
    transition: transform 0.3s ease-in-out;
}

.navbar-brand img {
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    animation: fire-border 2s ease-in-out infinite;
}

@keyframes fire-border {
    0% {
        box-shadow: 
            0 0 5px #ff0000,
            0 0 10px #ff4400,
            0 0 15px #ff8800,
            0 0 20px #ffaa00,
            0 0 5px #ff0000 inset,
            -2px -2px 0 #ff0000,
            2px -2px 0 #ff0000,
            -2px 2px 0 #ff0000,
            2px 2px 0 #ff0000;
    }
    25% {
        box-shadow: 
            0 0 8px #ff4400,
            0 0 12px #ff6600,
            0 0 18px #ffaa00,
            0 0 22px #ffcc00,
            0 0 6px #ff4400 inset,
            -3px -2px 0 #ff4400,
            3px -2px 0 #ff6600,
            -2px 3px 0 #ff4400,
            2px 3px 0 #ff6600;
    }
    50% {
        box-shadow: 
            0 0 10px #ff6600,
            0 0 15px #ff8800,
            0 0 20px #ffcc00,
            0 0 25px #ffff00,
            0 0 8px #ff6600 inset,
            -2px -3px 0 #ff6600,
            2px -3px 0 #ff8800,
            -3px 2px 0 #ff6600,
            3px 2px 0 #ff8800;
    }
    75% {
        box-shadow: 
            0 0 8px #ff4400,
            0 0 12px #ff6600,
            0 0 18px #ffaa00,
            0 0 22px #ffcc00,
            0 0 6px #ff4400 inset,
            -3px -2px 0 #ff4400,
            3px -2px 0 #ff6600,
            -2px 3px 0 #ff4400,
            2px 3px 0 #ff6600;
    }
    100% {
        box-shadow: 
            0 0 5px #ff0000,
            0 0 10px #ff4400,
            0 0 15px #ff8800,
            0 0 20px #ffaa00,
            0 0 5px #ff0000 inset,
            -2px -2px 0 #ff0000,
            2px -2px 0 #ff0000,
            -2px 2px 0 #ff0000,
            2px 2px 0 #ff0000;
    }
}

.navbar-brand:hover img {
    transform: scale(1.1);
    animation-duration: 1.5s;
}

/* Links estilo */
.navbar-nav .nav-link {
    position: relative;
    color: #e0e0e0 !important;
    font-weight: 500;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* Línea inferior tipo energía */
.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #b11226, #ff2a2a);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Hover */
.navbar-nav .nav-link:hover {
    color: #ff2a2a !important;
    text-shadow: 0 0 6px rgba(255, 42, 42, 0.6);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Link activo */
.navbar-nav .nav-link.active {
    color: #ff2a2a !important;
}

.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Responsive: Ajustes para diferentes tamaños */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        margin: 0;
    }
}

/* Estilos para tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
        font-size: 0.95rem;
    }
}

/* Estilos para escritorio */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        margin: 0 1rem;
        font-size: 1rem;
    }
}

/* Estilos para animación del navbar al hacer scroll */
.navbar-visible {
    transform: translateY(0);
}

.navbar-hidden {
    transform: translateY(-100%);
}

/* Fin de los estilos del navbar */
/* Cuerpo del documento */
body {
    background-color: #0b0506;
    background-image: url("../images/Fondo-web.png");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: #333333;
    border: 4px solid #000000;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1 {
    color: #e7dfdf;
    font-family: 'Cinzel', serif;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

h2 {
    color: #e2e2e2;
    margin: 5px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: 0.5px;
}

h3 {
    color: #e2e2e2;
    margin: 5px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.4rem;
}

p {
    margin-bottom: 1.4rem;
    padding: 0;
    text-indent: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #dcdcdc;
}

/*Presentación del libro (hero) + párrafo*/
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: visible;
}

.hero .container, .hero-content {
    overflow: visible;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    /* Texto degradado similar a la lava */
    background: linear-gradient(90deg,#ffb07a 0%, #ff6a2b 25%, #b11226 50%, #ff4b2a 75%, #ffd6a5 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 18px rgba(255,110,50,0.18), 0 12px 48px rgba(177,18,38,0.22);
    transition: transform .28s ease, text-shadow .28s ease, background-position .5s linear;
    /* Un suave brillo animado en las letras */
    animation: lavaFlow 6s ease-in-out infinite;
}

.hero h1:hover {
    transform: scale(1.06);
    text-shadow: 0 18px 64px rgba(177,18,38,0.55), 0 6px 24px rgba(255,120,60,0.32);
}

.hero-lead {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: #f0f0f0;
    line-height: 1.8;
}

/* Estilo impactante para el párrafo debajo del h1 (subtítulo hero) */
h1 + p, .hero-subtitle, .hero-lead {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    max-width: 70ch;
    margin: 0.8rem auto 1.6rem;
    text-align: center;
    line-height: 1.7;
    letter-spacing: 0.02em;
    /* gradiente cálido en el texto; background-clip permite animarlo (ola de color) */
    background: linear-gradient(90deg, #ffd6a5 0%, #ff9a5c 20%, #b11226 50%, #ff5a2a 80%, #ffd6a5 100%);
    background-size: 350% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* halo/portal glow */
    text-shadow: 0 2px 24px rgba(177,18,38,0.22);
    transition: transform .28s ease, text-shadow .28s ease, letter-spacing .35s ease;
    transform-origin: center center;
    /* bloque en línea para permitir el escalado de la transformación sin afectar el flujo */
    display: inline-block;
    /* Permitir el ajuste normal para evitar el desbordamiento que corta las palabras */
    white-space: normal;
    overflow: visible;
    position: relative;
    z-index: 1;
    will-change: transform, background-position;
    /* ola lenta */
    /* ola más rápida para cambio de color (sin mover texto) */
    animation: warmWave 8s linear infinite;
}

h1 + p::before, .hero-subtitle::before, .hero-lead::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 0.45rem;
    border-radius: 3px;
    background: linear-gradient(90deg,#ffb07a,#b11226,#ffb07a);
    box-shadow: 0 0 12px rgba(177,18,38,0.45);
}

h1 + p:hover, .hero-subtitle:hover, .hero-lead:hover {
    /* Al pasar el cursor: intensifica la onda de color y el brillo. */
    letter-spacing: 0.04em;
    text-shadow: 0 14px 56px rgba(177,18,38,0.6);
    /* Acelera la onda de color para un efecto reactivo. */
    animation-duration: 5s;
    transform: scale(1.06); /* Esto es para que coincida con la escala h1 */
    z-index: 2; /* Paa asegurarse de que no lo corten los hermanos. */
}

@media (max-width: 600px) {
    h1 + p,
    .hero-subtitle,
    .hero-lead {
        font-size: 1.15rem;
        max-width: calc(100% - 2rem);
        margin-left: 1rem;
        margin-right: 1rem;
        display: block;
        white-space: normal;
    }
}

@keyframes warmWave {
    /* Move gradient from left to right continuously */
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes lavaFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    animation: fadeUp 1.2s ease-out;
}


@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*Estilo portada del libro*/
/* Asegura que la portada quede siempre debajo del párrafo y centrada */
.book-wrap {
    display: block;
    margin: 1.2rem auto 0;
    max-width: 520px;
    position: relative;
    overflow: visible;
    border-radius: 10px;
}

.book-wrap::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 14px;
    /* Single dark red tone for the halo */
    background: rgba(140,8,18,0.92);
    filter: blur(10px);
    opacity: 0.9;
    z-index: -1;
    transition: transform .35s ease, opacity .35s ease;
}

.book-wrap:hover::before {
    transform: scale(1.03);
    opacity: 1;
}

.book-cover {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .book-wrap { max-width: 420px; }
}

@media (min-width: 992px) {
    .book-wrap { max-width: 520px; }
}

/*Para que el texto sea más legible*/
.lead-text { 
    font-size: 1.15rem;
    color: #f0f0f0;
    font-weight: 500;
}

/* Crea una linea decorativa debajo de los títulos h2 en sus secciones */
.section-title {
    display: inline-block;
    position: relative;
    padding-bottom: 0.25rem;
}

.section-title::after {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff2a2a, #b11226, #ff2a2a);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.5);
}

/* Caja de lectura */
.read-box {
    background: rgba(255,255,255,0.04);
    border-left: 4px solid #ff2a2a;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

section {
    margin-bottom: 50px;
}

/* Reveal animation for sections when entering viewport */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1.1s cubic-bezier(.22,.9,.28,1), transform 1.1s cubic-bezier(.22,.9,.28,1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Slightly different pace for larger elements (if needed) */
.reveal.slow {
    transition-duration: 1.4s;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; transform: none; opacity: 1; }
}

/* estilo botones */
.cta-section .btn {
    margin-top: 1.6rem;
    margin-bottom: 3rem;
    padding: 1.1em 2.4em;
    font-size: 14px;
    font-family: Cinzel, serif;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(90deg, #b11226 0%, #ff2a2a 100%);
    border: solid 2px #2e0000;
    border-radius: 8px;
    box-shadow: 0px 8px 18px rgba(177, 18, 38, 0.25);
    transition: all 0.28s ease 0s;
    cursor: pointer;
    display: inline-block;
    outline: none;
}

.cta-section .btn:hover,
.cta-section .btn:focus {
    background: linear-gradient(90deg, #ff2a2a 0%, #b11226 100%);
    box-shadow: 0px 14px 26px rgba(255, 42, 42, 0.35);
    color: #ffffff;
    transform: translateY(-6px);
    text-decoration: none;
}

.cta-section .btn:active {
    transform: translateY(-2px);
}

/* En móvil: apilar los botones uno debajo de otro y centrar */
@media (max-width: 576px) {
    .cta-section .row .col-auto {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        display: flex;
        justify-content: center;
    }

    .cta-section .row .col-auto .btn {
        width: 70%;
        margin: 1rem;
        max-width: 360px;
        display: inline-block;
    }
}

/* En tablet: apilar los botones uno debajo de otro y centrar */
@media (min-width: 577px) and (max-width: 991.98px) {
    .cta-section .row .col-auto {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        display: flex;
        justify-content: center;
    }

    .cta-section .row .col-auto .btn {
        width: 60%;
        margin: 1rem;
        max-width: 420px;
        display: inline-block;
    }
}

/* Fin de los estilos del cuerpo del documento */
/* Footer */
.site-footer {
    padding: 3rem 0;
    background: rgba(0,0,0,0.4);
    border-top: 2px solid rgba(0, 0, 0, 0.466);
}

.footer-title {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-indent: 0;
}

.footer-text {
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: #bdbdbd;
    margin-bottom: 1rem;
    text-indent: 0;
}

/* =========================================================
    TABLA DE UMBRAL
   ========================================================= */

/* ====== CONFIGURACIÓN DE COLOR ======
    Cambia ESTE color si quieres clonar la tabla con otro tono
*/
:root {
    --umbral-border-color: #ff2a2a; /* ROJO BRILLANTE */
}

/* Contenedor general de la tabla */
.umbral-table {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-collapse: collapse;
    border: 3px solid var(--umbral-border-color);
    background: rgba(0, 0, 0, 0.35);
}

/* Bordes internos */
.umbral-table td {
    border: 2px solid var(--umbral-border-color);
    padding: 1.2rem;
    vertical-align: middle;
}

/* Tablas */
/* ====== COLOR CLONABLE ======
    Cambia este valor si quieres otra tabla con otro color
*/
:root {
    --umbral-border-color: #ff2a2a;
}

/* Tabla principal */
.umbral-table {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-collapse: collapse;
    border: 5px solid var(--umbral-border-color);
}

/* Celdas */
.umbral-table td {
    border: 5px solid var(--umbral-border-color);
    background: rgba(0, 0, 0, 0.55);
    padding: 0;
    vertical-align: middle;
}

/* =========================================================
    IMÁGENES
    ========================================================= */

/* Celda de imagen - ocupa todo el espacio */
.umbral-image {
    width: 35%;
    padding: 0;
    background: transparent;
}

/* Contenedor de imágenes */
.image-stack {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Imagen - llenar todo el espacio */
.image-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 1;
}

/* Limitar el área de la celda de imagen y centrar la imagen dentro */
.umbral-image {
    width: 35%;
    padding: 0;
    background: transparent;
    max-width: 480px; /* ancho máximo de la celda */
    max-height: 360px; /* alto máximo de la celda */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* recorta si la imagen supera la celda */
}

.image-stack {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-stack img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* la imagen se ajusta sin recortarse */
    display: block;
    margin: 0 auto;
}

/* Asegurar que las celdas principales tengan padding y anchos previstos */
.umbral-table {
    table-layout: fixed; /* fuerza que las columnas respeten sus anchos */
}

.umbral-table td.umbral-name,
.umbral-table td.umbral-description,
.umbral-table td.umbral-danger {
    box-sizing: border-box;
    padding: 0.6rem 1.2rem; /* padding izquierdo/derecho para que no pegue al borde */
    vertical-align: middle;
}

/* Más espacio a la izquierda para mejorar legibilidad en escritorio */
@media (min-width: 992px) {
    /* Forzar comportamiento de tabla para escritorio y mantener padding */
    .umbral-table { display: table; width: 100%; table-layout: fixed; }
    .umbral-table tr { display: table-row; }
    .umbral-table td { display: table-cell; vertical-align: middle; }

    .umbral-table td.umbral-name,
    .umbral-table td.umbral-description,
    .umbral-table td.umbral-danger {
        padding-left: 2rem;
        padding-right: 1.6rem;
        text-align: left;
        vertical-align: middle;
    }
}

/* Anchos en escritorio: name y peligrosidad mismo ancho */
@media (min-width: 992px) {
    .umbral-image { width: 35%; }
    /* Forzar la segunda columna (todo lo que no sea .umbral-image) a ocupar el resto */
    .umbral-table td:not(.umbral-image) { width: 65%; }
}

/* =========================================================
    TEXTO
    ========================================================= */

.umbral-content {
    padding: 0;
}

.umbral-name {
    padding: 0.6rem 1.2rem; /* ← AJUSTA AQUÍ */
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #f5f5f5;
    border-bottom: 2px solid var(--umbral-border-color);
}

.umbral-description {
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
}

.umbral-description p {
    text-indent: 0;
}

.artist-credit {
    font-size: 0.85rem;
    color: #bdbdbd;
    font-style: italic;
}

.umbral-danger {
    font-family: 'Cinzel', serif;
    color: #ff9a9a;
    background: rgba(255, 42, 42, 0.12);
}

/* =========================================================
    RESPONSIVE – TABLET Y MÓVIL (IMAGEN CORRECTA Y COMPLETA)
   ========================================================= */

@media (max-width: 991.98px) {

    /* TABLA EN BLOQUE */
    .umbral-table {
        display: block;
        width: 100%;
        border-collapse: collapse;
        border-width: 2px;
    }

    .umbral-table tbody {
        display: block;
        width: 100%;
    }

    .umbral-table tr {
        display: block;
        width: 100%;
    }

    /* CELDAS */
    .umbral-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 1rem;
        border-width: 2px;
    }

    /* =================================================
        CELDA DE IMAGEN – RESET TOTAL
       ================================================= */

    .umbral-image {
        width: 100%;
        padding: 0 !important;
        margin: 0;
        max-width: none !important;
        max-height: none !important;
        overflow: hidden;
        display: block;
        background: transparent;
    }

    /* ELIMINAR FLEX Y CENTRADOS ANTERIORES */
    .image-stack {
        display: block !important;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    /* IMAGEN: SIEMPRE COMPLETA */
    .image-stack img {
        display: block;
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: none;
        object-fit: contain; /* CLAVE */
        margin: 0;
        padding: 0;
    }

    /* =================================================
        TEXTO
       ================================================= */

    .umbral-name {
        font-size: 1.4rem;
        padding-top: 1rem;
    }

    .umbral-description {
        padding-top: 0.8rem;
    }

    .umbral-danger {
        padding-top: 0.8rem;
    }
}

/* =========================================================
    ADVERTENCIA – UMBRALES APOCALÍPTICOS
   ========================================================= */

.apocalypse-warning {
    position: relative;
    padding: 1.2rem 1.6rem;
    margin: 3rem auto 3.5rem;
    max-width: 1100px;

    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: #fff3f3;
    text-align: center;

    background:
        repeating-linear-gradient(
            45deg,
            rgba(255, 42, 42, 0.25),
            rgba(255, 42, 42, 0.25) 12px,
            rgba(120, 0, 0, 0.35) 12px,
            rgba(120, 0, 0, 0.35) 24px
        ),
        rgba(0, 0, 0, 0.65);

    border: 3px solid #ff2a2a;
    border-radius: 8px;

    box-shadow:
        0 0 18px rgba(255, 42, 42, 0.35),
        inset 0 0 12px rgba(0, 0, 0, 0.6);
}

/* Énfasis en la palabra ADVERTENCIA */
.apocalypse-warning strong {
    color: #ff2a2a;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 576px) {
    .apocalypse-warning {
        font-size: 0.95rem;
        padding: 1rem 1.2rem;
        margin: 2.5rem 1rem 3rem;
    }
}

/* Fin de los estilos de la tabla de umbral */
/* =========================================================
    FORMULARIO DE CONTACTO
   ========================================================= */

.contact-section {
    max-width: 720px;
}

/* Contenedor del formulario */
.contact-form {
    background: rgba(0, 0, 0, 0.55);
    padding: 2.5rem 2rem;
    border: 3px solid var(--umbral-border-color);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(177, 18, 38, 0.25);
}

/* Grupo de campos */
.form-group {
    margin-bottom: 1.6rem;
}

/* Etiquetas */
.contact-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #f0f0f0;
}

/* Inputs y textarea */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 42, 42, 0.4);
    border-radius: 6px;
    color: #f5f5f5;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Quitar resize exagerado */
.contact-form textarea {
    resize: vertical;
}

/* Focus */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--umbral-border-color);
    box-shadow: 0 0 12px rgba(255, 42, 42, 0.45);
}

/* Botón */
.contact-btn {
    margin-top: 1rem;
    padding: 0.9em 2.6em;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(90deg, #b11226 0%, #ff2a2a 100%);
    border: 2px solid #2e0000;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(177, 18, 38, 0.35);
    transition: all 0.3s ease;
}

/* Hover */
.contact-btn:hover {
    background: linear-gradient(90deg, #ff2a2a 0%, #b11226 100%);
    box-shadow: 0 14px 26px rgba(255, 42, 42, 0.5);
    transform: translateY(-4px);
}

/* Active */
.contact-btn:active {
    transform: translateY(-1px);
}

/* SPINER DE CARGA */
.contact-btn .spinner-border {
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
    /* Usamos tu rojo de acento */
    color: #ff2a2a !important; 
    /* Un pequeño resplandor para que destaque sobre el botón oscuro */
    filter: drop-shadow(0 0 5px #b11226);
    border-width: 0.15em;
    margin-right: 8px;
}

/* Estado del botón mientras envía */
.contact-btn:disabled {
    background-color: #200000 !important; /* Rojo muy oscuro */
    border-color: #000000;
    color: #888 !important;
    cursor: not-allowed;
    box-shadow: inset 0 0 10px #000;
    opacity: 0.9;
}


/* Responsive */
@media (max-width: 576px) {
    .contact-form {
        padding: 2rem 1.4rem;
    }
}

/* =========================================================
    ESTADOS DE VALIDACIÓN DEL FORMULARIO
   ========================================================= */

.form-group input,
.form-group textarea {
    border: 2px solid #555;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Vacío / error */
.form-group.error input,
.form-group.error textarea {
    border-color: #ff2a2a;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.6);
}

/* Correcto */
.form-group.success input,
.form-group.success textarea {
    border-color: #2aff7a;
    box-shadow: 0 0 10px rgba(42, 255, 122, 0.6);
}

/* =========================================================
    TABLAS DE COMANDANTES
   ========================================================= */
.commander-kaelor   { --commander-border-color: #ff8000; } /* Naranja */
.commander-nerion   { --commander-border-color: #00e1ff; } /* Azul marino */
.commander-eryndor  { --commander-border-color: #ffd000; } /* Amarillo */
.commander-valeria  { --commander-border-color: #2ecc71; } /* Verde esmeralda */
.commander-ricardo  { --commander-border-color: #8800ff; } /* Morado */
.commander-claudia  { --commander-border-color: #fff200; } /* Amarillo eléctrico */
.commander-pedro    { --commander-border-color: #ff0000; } /* Rojo */

.commander-table {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-collapse: collapse;
    border: 5px solid var(--commander-border-color);
    background: rgba(0, 0, 0, 0.55);
    table-layout: fixed;
}

.commander-table td {
    border: 5px solid var(--commander-border-color);
    padding: 0;
    vertical-align: middle;
    box-sizing: border-box;
}

.commander-image {
    width: 35%;
    padding: 0;
    background: transparent;
    max-width: 480px;
    max-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.commander-image .image-stack {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.commander-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.commander-name {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #f5f5f5;
    padding: 0.6rem 1.2rem;
    border-bottom: 2px solid var(--commander-border-color);
}

.commander-description {
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    padding: 0.6rem 1.2rem;
}

.commander-description p {
    text-indent: 0;
}

/* Crédito de artista en tablas de comandantes */
.commander-description .commander-artist-credit {
    display: block;
    margin-top: 0.8rem;
    padding-top: 0.4rem;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--commander-border-color);
    opacity: 0.85;
    text-indent: 0;
}

.commander-rank {
    font-family: 'Cinzel', serif;
    color: var(--commander-border-color);
    background: color-mix(
        in srgb,
        var(--commander-border-color) 15%,
        transparent
    );
    padding: 0.6rem 1.2rem;
}

@media (min-width: 992px) {

    .commander-table {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .commander-table tr {
        display: table-row;
    }

    .commander-table td {
        display: table-cell;
        vertical-align: middle;
    }

    .commander-image { width: 35%; }
    .commander-table td:not(.commander-image) { width: 65%; }

    /* Padding de lectura en escritorio */
    .commander-table td:not(.commander-image) {
        padding-left: 2rem;
        padding-right: 1.6rem;
        text-align: left;
    }
}

@media (max-width: 991.98px) {

    .commander-table,
    .commander-table tbody,
    .commander-table tr {
        display: block;
        width: 100%;
    }

    .commander-table td {
        display: block;
        width: 100%;
        padding: 1rem;
        border-width: 2px;
    }

    /* RESET TOTAL DE IMAGEN */
    .commander-image {
        width: 100%;
        padding: 0 !important;
        max-width: none !important;
        max-height: none !important;
        display: block;
        overflow: hidden;
    }

    .commander-image .image-stack {
        display: block;
        width: 100%;
        height: auto;
    }

    .commander-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }

    .commander-name {
        font-size: 1.4rem;
        padding-top: 1rem;
    }
}