/* 
* Corona de Gracia - Main Stylesheet
* Style: Vibrant, Flat, Modern, Youthful
*/

/* Fonts cargadas vía <link> en cada HTML para evitar @import bloqueante */

:root {
    /* Vibrant Color Palette */
    --primary: #1B365D;
    /* Coral Red - Energy & Love */
    --secondary: #8CA391;
    /* Teal - Calm & Balance */
    --accent: #C5A059;
    /* Sunny Yellow - Happiness */
    --dark: #1B365D;
    /* Dark Grey - Text */
    --light: #ffffff;
    /* Mint White - Background */
    --white: #ffffff;

    /* UI Variables */
    --radius: 24px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --transition: background-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

/* Dark Mode */
:root.dark-mode {
    --primary: #C5A059;
    --secondary: #9B94B1;
    --accent: #FFD93D;
    --dark: #F7F9FC;
    --light: #1A1A1A;
    --white: #2C2C2C;
}

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

html,
body {
    overflow-x: clip;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 107, 107, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(78, 205, 196, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 230, 109, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(78, 205, 196, 0.10) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    color: var(--dark);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(140, 163, 145, 0.4);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-white:hover {
    background-color: var(--secondary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(140, 163, 145, 0.4);
}

/* Header */
header {
    padding: 9px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

header.header-scrolled {
    padding: 7px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-buttons .btn {
    padding: 6px 14px;
    font-size: 0.82rem;
    box-shadow: none;
    letter-spacing: 0.01em;
}

.nav-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}



.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-links>li>a {
    font-weight: 500;
    font-size: 0.855rem;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    padding: 5px 9px;
    border-radius: 6px;
    letter-spacing: 0.01em;
}

.nav-links>li>a::after {
    display: none;
}

.nav-links>li>a:hover {
    color: var(--primary);
    background: rgba(27, 54, 93, 0.06);
}

.nav-links>li>a.active {
    color: var(--primary);
    font-weight: 600;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    display: inline-block;
    height: 28px;
    width: calc(28px * 268 / 52);
    background-color: var(--dark);
    -webkit-mask-image: url('../Logo azul.svg');
    mask-image: url('../Logo azul.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: left center;
    mask-position: left center;
}

:root.dark-mode .logo-img {
    background-color: #8ca391;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 6px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1001;
    list-style: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 7px 12px;
    font-size: 0.845rem;
    color: var(--dark);
    transition: all 0.15s;
    border-radius: 6px;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: rgba(27, 54, 93, 0.06);
    color: var(--primary);
    padding-left: 14px;
}

/* Mobile Nav adjustment */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.3s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Hide the duplicate mobile button on desktop */
@media (min-width: 992px) {
    nav>.theme-toggle-btn {
        display: none;
    }
}

/* Hide the desktop button on mobile (inside nav-menu/nav-buttons) */
@media (max-width: 991px) {
    .nav-buttons .theme-toggle-btn {
        display: none;
    }
}

.theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

:root.dark-mode .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Icons */
.theme-icon-sun,
.theme-icon-moon {
    width: 20px;
    height: 20px;
    display: block;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Default state (Light Theme): Show Moon, Hide Sun */
.theme-icon-sun {
    opacity: 0;
    transform: translate(-50%, 50%) rotate(90deg) scale(0.5);
}

.theme-icon-moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Dark Mode State: Show Sun, Hide Moon */
:root.dark-mode .theme-icon-sun {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

:root.dark-mode .theme-icon-moon {
    opacity: 0;
    transform: translate(-50%, -150%) rotate(-90deg) scale(0.5);
}

.mobile-word-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    margin-right: 15px;
    padding: 5px;
    transition: transform 0.3s ease;
}

.mobile-word-btn:hover {
    transform: scale(1.1);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--dark);
    cursor: pointer;
    line-height: 1;
}

.hamburger i {
    pointer-events: none;
}

/* Hero Section */
#hero {
    padding: 80px 0;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 span {
    color: var(--secondary);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    /* Simple animation for floating effect */
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Resources Section */
#resources {
    padding: 100px 0;
    /* Removed background for uniform gradient */
    border-radius: 60px 60px 0 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.808);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    padding: 15px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
}

/* Cards con imagen (Recursos para ti - inicio) */
.card-with-image {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-with-image:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(26, 82, 153, 0.13);
}

.card-image-link {
    display: block;
    text-decoration: none;
}

.card-with-image .card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--light);
    position: relative;
}

.card-with-image .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.card-with-image:hover .card-image img {
    transform: scale(1.05);
}

/* Badge de categoría sobre la imagen */
.card-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-with-image .card-text {
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-with-image .card-text h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    line-height: 1.45;
}

.card-with-image .card-text p {
    flex-grow: 1;
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #666;
}

/* Footer de la tarjeta: tiempo de lectura + link */
.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.card-readtime {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-with-image .card-link {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
}

.cards-grid-resources {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

@media (max-width: 640px) {
    .card-with-image .card-text {
        padding: 18px 20px 22px;
    }
}

/* Dark mode: cards de artículos */
:root.dark-mode .card-with-image {
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

:root.dark-mode .card-with-image .card-text p {
    color: #8890a0;
}

:root.dark-mode .card-footer-row {
    border-top-color: rgba(255, 255, 255, 0.08);
}

:root.dark-mode .card-readtime {
    color: #666;
}

:root.dark-mode #resources p[style] {
    color: #8890a0 !important;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.card-link {
    color: var(--primary);
    font-weight: 700;
    margin-top: 20px;
    display: inline-block;
}

/* Filter Buttons */
.filter-btn {
    background: white;
    border: 2px solid #eee;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #777;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn:hover {
    transform: translateY(-3px);
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.15);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
}

.filter-btn.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.5);
}

/* Videos Section */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 20px;
    color: var(--primary);
    font-size: 1.2rem;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.1rem;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--secondary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.video-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure all items take full height of grid cell */
}

.video-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.video-item:hover .video-wrapper {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Push content to fill space */
    justify-content: center;
    /* Center text vertically if needed */
    text-align: center;
}

.video-item h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Limit long titles to 3 lines for strict alignment */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dark Mode Adjustments */
:root.dark-mode .video-item {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

:root.dark-mode .search-input {
    background: #1e1e1e;
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.chat-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.5);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-btn:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 700px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow: hidden;
}

.chat-window.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.maximize-chat-btn,
.clear-chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.maximize-chat-btn:hover,
.clear-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chat-interface.maximized-chat {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 95vw !important;
    height: 90vh !important;
    max-width: 1400px !important;
    max-height: 900px !important;
    z-index: 2001 !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.chat-maximized {
    overflow: hidden !important;
}

body.chat-maximized::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
}

/* Additional subtle visual elements */
.chat-visual-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.chat-visual-element:nth-child(1) {
    top: 20%;
    left: 70%;
    width: 25px;
    height: 25px;
    background: var(--primary);
    animation: floatSlow 12s ease-in-out infinite;
}

.chat-visual-element:nth-child(2) {
    top: 60%;
    left: 5%;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    animation: floatSlow 15s ease-in-out infinite reverse;
}

.chat-visual-element:nth-child(3) {
    bottom: 30%;
    left: 50%;
    width: 15px;
    height: 15px;
    background: var(--accent);
    animation: floatSlow 18s ease-in-out infinite;
}

.chat-body .message {
    position: relative;
    z-index: 1;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
}

.chat-input-area input:focus {
    border-color: var(--secondary);
}

.send-btn {
    background: var(--secondary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.5);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Messages */
.message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(20px);
    animation: messageSlideIn 0.5s ease-out forwards;
}

.message.bot {
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    animation-delay: 0.1s;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary, #1B365D);
    opacity: 0.4;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);    opacity: 1; }
}

.message.user {
    background: var(--secondary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    animation-delay: 0.1s;
}

@keyframes messageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator animation */
.message.loading {
    animation: typingPulse 1.5s ease-in-out infinite;
}

@keyframes typingPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Footer */
footer {
    background: rgba(41, 47, 54, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 60px 0 30px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

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

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    nav {
        position: relative;
    }

    /* Logo slightly larger on mobile for readability */
    .logo-img {
        height: 26px;
        width: calc(26px * 268 / 52);
    }

    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
        z-index: 3001;
        transition: all 0.3s ease;
        border-radius: 8px;
    }

    /* When menu is active, hamburger icon should be white */
    .nav-menu.active+.hamburger,
    .nav-menu.active~.hamburger {
        color: white;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 78%;
        max-width: 300px;
        height: 100vh;
        background-color: #1B365D;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-end;
        padding: 72px 26px 32px;
        z-index: 3000;
        display: flex;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
        border-radius: 0;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 4px;
        list-style: none;
        width: 100%;
        text-align: right;
    }

    .nav-links>li>a {
        color: rgba(255, 255, 255, 0.85);
        font-size: 1.05rem;
        font-weight: 500;
        transition: all 0.2s ease;
        padding: 8px 10px;
        border-radius: 8px;
        background: transparent;
    }

    .nav-links>li>a:hover,
    .nav-links>li>a.active {
        color: #fff;
        background: rgba(255, 255, 255, 0.12);
    }

    /* Submenu for Sidebar */
    .dropdown-menu {
        position: static;
        display: none;
        background: rgba(255, 255, 255, 0.07);
        width: 100%;
        padding: 6px;
        margin-top: 3px;
        border-radius: 8px;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        text-align: right;
        border: none;
    }

    li.dropdown.open>.dropdown-menu {
        display: block;
        animation: fadeInSlide 0.25s ease;
    }

    .dropdown-menu li a {
        font-size: 0.92rem;
        padding: 6px 12px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.78);
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .dropdown-menu li a:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        padding-right: 14px;
    }

    @keyframes fadeInSlide {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-menu .btn {
        width: 100%;
        margin-top: 8px;
        font-size: 0.9rem;
        padding: 9px 14px;
    }

    .nav-menu .btn-secondary {
        background-color: rgba(255, 255, 255, 0.15);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.25);
    }

    .nav-menu .btn-secondary:hover {
        background-color: rgba(255, 255, 255, 0.22);
    }

    /* Hide redundant buttons in mobile menu */
    .nav-buttons .btn-primary[onclick*="openWordOfDayModal"] {
        display: none;
    }

    .mobile-word-btn {
        display: inline-flex;
        font-size: 1.3rem;
        margin-right: 10px;
    }

    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 100px;
    }

    /* Chat Page Mobile */
    .chat-page-container {
        flex-direction: column;
        padding: 10px;
        padding-top: 80px;
        min-height: 100vh;
        height: auto;
        align-items: stretch;
        gap: 15px;
    }

    .left-sidebar {
        width: 100%;
        max-width: 100%;
        padding: 20px 15px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border-radius: 16px;
    }

    .impact-title {
        font-size: 1.1rem;
        color: var(--dark);
        font-style: normal;
        animation: none;
    }

    .chat-interface {
        width: 100%;
        max-width: 100%;
        margin: 0;
        height: calc(100vh - 220px);
        min-height: 400px;
        max-height: none;
        border-radius: 16px;
    }

    .chat-body {
        padding: 15px;
    }

    .chat-input-area {
        padding: 10px;
    }

    .chat-input-area input {
        font-size: 16px;
        /* prevent zoom on iOS */
    }
}

/* --- Chat Page Specific Styles --- */
.chat-page-container {
    min-height: 100vh;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 20px !important;
    padding-top: 100px !important;
    gap: 30px !important;
    /* Removed background for uniform gradient */
}

.left-sidebar {
    width: 100% !important;
    max-width: 500px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px 20px !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    order: 1 !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

.impact-title {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    font-style: italic !important;
    color: var(--dark) !important;
    text-align: center !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    animation: fadeInTitle 2s ease-in-out !important;
    position: static !important;
    float: none !important;
    margin: 0 0 30px 0 !important;
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-interface {
    width: 100% !important;
    max-width: 600px !important;
    height: 65vh !important;
    min-height: 450px !important;
    max-height: 600px !important;
    background: var(--white) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
    order: 2 !important;
    float: none !important;
    margin: 0 !important;
}

.chat-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    background-color: white !important;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader img {
    max-width: 200px;
    max-height: 200px;
}

/* --- New Page Styles --- */

/* Page Header */
.page-header {
    background: var(--light);
    padding: 130px 0 40px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* ----- Videos page: Hero minimalista + Categorías ----- */
/* Nuevo Hero Dinámico de Videos */
.videos-dynamic-hero {
    position: relative;
    padding: 100px 0 80px 0;
    overflow: hidden;
    background: linear-gradient(135deg, #1B365D 0%, #2E5F9F 100%);
}

:root.dark-mode .videos-dynamic-hero {
    background: linear-gradient(135deg, #0f1f36 0%, #1a3a6b 100%);
}

.hero-animated-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.6;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    animation: blob-float 20s infinite alternate ease-in-out;
}

.shape-1 { top: -20%; left: -10%; width: 500px; height: 500px; background: rgba(78, 205, 196, 0.4); animation-delay: 0s; }
.shape-2 { bottom: -20%; right: -10%; width: 400px; height: 400px; background: rgba(140, 163, 145, 0.4); animation-delay: -5s; }
.shape-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: rgba(255, 107, 107, 0.3); animation-delay: -10s; }

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.videos-hero-inner.dynamic-layout {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content-col {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 30px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge i { color: #FFD700; }

.videos-hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
}

.videos-hero-accent {
    color: #8ca391;
    position: relative;
    display: inline-block;
}

.videos-hero-accent::after {
    content: '';
    position: absolute;
    bottom: 5px; left: 0; right: 0; height: 8px;
    background: rgba(140, 163, 145, 0.3);
    z-index: -1;
    border-radius: 4px;
}

.videos-hero-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
}

.hero-actions-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-hero-explore {
    padding: 14px 28px;
    background: white;
    color: #1B365D;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-hero-explore:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.2);
    color: #1B365D;
}

.btn-outline-dynamic {
    padding: 14px 28px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-dynamic:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.hero-visual-col {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-composition {
    position: relative;
    width: 100%;
    height: 400px;
}

.comp-card {
    position: absolute;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comp-img {
    width: 100%; height: 100%; object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27, 54, 93, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0.8;
}

.v-card-1 {
    width: 220px; height: 280px;
    top: 20px; left: 0;
    transform: rotate(-10deg);
    z-index: 1;
}

.v-card-2 {
    width: 200px; height: 260px;
    top: -10px; right: 20px;
    transform: rotate(8deg);
    z-index: 2;
}

.v-card-main {
    width: 280px; height: 180px;
    bottom: 20px; left: 50%;
    margin-left: -140px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
    transform: translateY(0);
}

.video-composition:hover .v-card-1 { transform: rotate(-15deg) scale(1.05) translate(-10px, -10px); }
.video-composition:hover .v-card-2 { transform: rotate(12deg) scale(1.05) translate(10px, -10px); }
.video-composition:hover .v-card-main { transform: translateY(-10px); box-shadow: 0 30px 50px rgba(0,0,0,0.4); }

.glass-play-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
    position: relative;
    flex-shrink: 0;
}

.pulse-ring {
    position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px;
    border: 2px solid var(--secondary);
    border-radius: 50%;
    animation: pulsar 2s infinite;
}

@keyframes pulsar {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.main-card-info { color: white; }
.main-card-info .tag {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
    background: var(--primary); padding: 3px 8px; border-radius: 4px; margin-bottom: 8px; display: inline-block;
}
.main-card-info h4 { font-size: 1.1rem; margin: 0; }

@media (max-width: 992px) {
    .videos-hero-inner.dynamic-layout { flex-direction: column; text-align: center; gap: 40px; }
    .hero-actions-container { justify-content: center; }
    .hero-badge { margin: 0 auto 20px auto; }
}
@media (max-width: 768px) {
    .video-composition { height: 320px; transform: scale(0.85); }
    .v-card-main { margin-left: -120px; width: 240px; }
    .videos-dynamic-hero { padding: 80px 0 40px 0; }
}

/* Categorías de videos */
.video-category-wrap {
    margin-bottom: 32px;
}

.video-category-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.video-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    color: var(--dark);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.video-category-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-2px);
}

.video-category-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.video-item-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .videos-hero {
        min-height: 32vh;
        padding: 40px 0;
    }

    .video-category-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        gap: 8px;
    }

    .video-category-pills::-webkit-scrollbar {
        display: none;
    }

    .video-category-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
}

:root.dark-mode .video-category-label {
    color: #c0c0c0;
}

:root.dark-mode .video-category-btn {
    background: #1e1e1e;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

:root.dark-mode .video-category-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

:root.dark-mode .video-category-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Navigation Active State */
.nav-links a.active {
    color: var(--primary);
    font-weight: 800;
}

/* Topic Cards (Recursos) */
.topic-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
}

.topic-content {
    padding: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.topic-content:hover {
    background: rgba(255, 107, 107, 0.05);
}

.topic-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.topic-card h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topic-card h2 .chevron {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.topic-card.expanded h2 .chevron {
    transform: rotate(180deg);
}

.topic-body {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.topic-card.expanded .topic-body {
    max-height: 3000px;
    /* Increased to prevent cutoff */
    padding-top: 20px;
}

/* Comments Section */
.comments-section {
    background: #f9f9f9;
    padding: 0 40px;
    border-top: 1px solid #eee;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.topic-card.expanded .comments-section {
    max-height: 3000px;
    /* Increased to accommodate form + scrollable list */
    padding: 30px 40px;
}

/* Scrollable Container for Comments List */
.comments-section>div[id^="comments-"] {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
    padding-right: 10px;
    /* Space for scrollbar */
}

/* Custom Scrollbar for Comments */
.comments-section>div[id^="comments-"]::-webkit-scrollbar {
    width: 6px;
}

.comments-section>div[id^="comments-"]::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.comments-section>div[id^="comments-"]::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.comments-section>div[id^="comments-"]::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary);
}

.comment-form {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars {
    color: #ffd700;
    cursor: pointer;
    font-size: 1.2rem;
}

.comment-name,
.comment-text {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 10px;
    font-family: inherit;
}

.comment-text {
    min-height: 80px;
    resize: vertical;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.comment-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--secondary);
}

.comment-item p {
    font-size: 0.9rem;
    line-height: 1.4;
}

.like-section {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--primary);
    font-size: 0.9rem;
    margin-left: auto;
    padding: 5px 8px;
    border-radius: 20px;
    transition: var(--transition);
    background: rgba(255, 107, 107, 0.1);
}

.like-section:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.05);
}

.like-section i {
    font-size: 1rem;
}

/* Topic Footer */
.topic-footer {
    padding: 0 40px;
    border-top: 1px solid #eee;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.topic-card.expanded .topic-footer {
    max-height: 400px;
    /* Increased significantly to prevent cutoff on mobile */
    padding: 20px 40px;
}

.topic-footer p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

/* Mobile Responsiveness for Topic Footer */
@media (max-width: 768px) {
    .topic-card.expanded .topic-footer {
        padding: 20px 20px;
    }

    .topic-footer .btn {
        width: 100%;
        display: block;
        margin-top: 5px;
    }
}

/* Share Buttons */
.share-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.share-buttons button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--dark);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-buttons button:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

:root.dark-mode .topic-footer {
    background: rgba(45, 45, 45, 0.5);
    border-color: #444;
}

:root.dark-mode .topic-footer p {
    color: #c0c0c0;
}

:root.dark-mode .share-buttons button {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: #c0c0c0;
}

:root.dark-mode .share-buttons button:hover {
    background: var(--primary);
    color: white;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Contact Form */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #eee;
    border-radius: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    outline: none;
}


.videos-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Buscador Videos */
.search-container {
    margin: 30px auto 50px auto;
    max-width: 600px;
    position: relative;
    z-index: 10;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid transparent;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 12px 35px rgba(27, 54, 93, 0.15);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.search-input-wrapper i {
    position: absolute;
    left: 20px;
    color: #999;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within i {
    color: var(--secondary);
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--dark);
    font-family: inherit;
    outline: none;
}

.search-input::placeholder {
    color: #aaa;
}

#searchDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: none;
}

/* Video Grid and Items */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.video-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.video-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-content {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-content h3 {
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--dark);
    margin: 0;
    font-weight: 600;
}

/* Dark Mode Overrides for Videos */
:root.dark-mode .search-input-wrapper {
    background: #2D2D2D;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

:root.dark-mode .search-input-wrapper:focus-within {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    border-color: var(--secondary);
}

:root.dark-mode .search-input {
    color: #e0e0e0;
}

:root.dark-mode .video-item {
    background: #2D2D2D;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

:root.dark-mode .video-item:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

:root.dark-mode .video-content h3 {
    color: #e0e0e0;
}

.video-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7a90;
}

.video-empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

.video-empty-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
}

.video-empty-sub {
    font-size: 0.88rem;
    margin: 0;
}

:root.dark-mode .video-empty-state {
    color: #8a9ab0;
}

/* YouTube CTA */
.youtube-cta {
    text-align: center;
    padding: 60px 20px;
    background: var(--light);
}

.youtube-cta img {
    max-width: 300px;
    margin-bottom: 30px;
    animation: float 4s ease-in-out infinite;
}

.youtube-cta-btn {
    background-color: #1B365D;
    margin-top: 20px;
}

/* AI Chat CTA Section */
#ai-chat-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    border-top: 1px solid #eee;
}

.cta-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.cta-text h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 20px;
}

.cta-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

.cta-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: float 5s ease-in-out infinite;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.theme-toggle:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* Background Alternativo Global */
.bg-alt {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

/* Dark Mode Specific Styles */
:root.dark-mode input,
:root.dark-mode textarea {
    background-color: #333;
    border-color: #555 !important;
    color: #c0c0c0;
}

:root.dark-mode .bg-alt {
    background-color: #222;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

:root.dark-mode input::placeholder,
:root.dark-mode textarea::placeholder {
    color: #999;
}

:root.dark-mode input:focus,
:root.dark-mode textarea:focus {
    border-color: var(--primary) !important;
    background-color: #3a3a3a;
}

:root.dark-mode .topic-card {
    background-color: #2D2D2D;
    border-color: #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

:root.dark-mode .topic-body {
    background-color: #333;
    color: #c0c0c0;
}

:root.dark-mode .topic-body ul,
:root.dark-mode .topic-body li {
    color: #c0c0c0;
}

:root.dark-mode .rating-input span {
    color: #c0c0c0;
}

:root.dark-mode .comments-section {
    background-color: #333;
    border-color: #444;
}

:root.dark-mode .comment-form {
    background-color: #2a2a2a;
}

:root.dark-mode .filter-btn {
    background-color: #333;
    color: var(--dark);
    border-color: #555;
}

:root.dark-mode .filter-btn:hover {
    background-color: #3a3a3a;
}

:root.dark-mode .filter-btn.active {
    background-color: var(--primary);
    color: white;
}

:root.dark-mode header {
    background-color: rgba(18, 18, 22, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

:root.dark-mode header.header-scrolled {
    background-color: rgba(15, 15, 18, 0.99);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

:root.dark-mode footer {
    background-color: #1A1A1A;
    border-top-color: #333;
}

:root.dark-mode .page-header {
    background: linear-gradient(135deg, #1A1A1A, #2a2a2a);
}

:root.dark-mode p {
    color: #c0c0c0;
}

:root.dark-mode .topic-icon {
    background-color: #333;
}

:root.dark-mode h1,
:root.dark-mode h2,
:root.dark-mode h3 {
    color: #c0c0c0;
}

:root.dark-mode .section-header p {
    color: #c0c0c0;
}

:root.dark-mode .card {
    background: rgba(45, 45, 45, 0.7);
}

:root.dark-mode .card p {
    color: #c0c0c0;
}

:root.dark-mode .filter-btn {
    color: #c0c0c0;
}

:root.dark-mode .nav-links>li>a {
    color: rgba(200, 200, 210, 0.9);
}

:root.dark-mode .nav-links>li>a:hover,
:root.dark-mode .nav-links>li>a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

:root.dark-mode .dropdown-menu {
    background: #1e1e24;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

:root.dark-mode .dropdown-menu a {
    color: rgba(200, 200, 210, 0.85);
}

:root.dark-mode .dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    padding-left: 14px;
}

:root.dark-mode .scroll-text {
    color: #c0c0c0;
}

/* ── Dark Mode: Sección Especialistas Promo ── */
:root.dark-mode #especialistas-promo {
    background: linear-gradient(135deg, #1a1f2e 0%, #1f1a14 100%) !important;
}

:root.dark-mode #especialistas-promo h2 {
    color: #e8eaf0 !important;
}

:root.dark-mode #especialistas-promo p {
    color: #a0a8b8 !important;
}

:root.dark-mode #especialistas-promo .spec-chip {
    background: #2a2f3e !important;
    border-color: #3a4460 !important;
    color: #8CA391 !important;
}

/* Chips de especialidades (spans dentro del flex wrap) */
:root.dark-mode #especialistas-promo div[style*="display: flex; flex-wrap: wrap"] span {
    background: #252b3b !important;
    border-color: #3a4460 !important;
    color: #8ca391 !important;
}

/* Tarjetas flotantes */
:root.dark-mode #especialistas-promo div[style*="position: absolute"][style*="background: #fff"],
:root.dark-mode #especialistas-promo div[style*='background: #fff'] {
    background: #2c2c3a !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

:root.dark-mode #especialistas-promo div[style*="position: absolute"] div[style*="color: #222"],
:root.dark-mode #especialistas-promo div[style*="position: absolute"] div[style*="color: #888"],
:root.dark-mode #especialistas-promo div[style*="color: #777"] {
    color: #b0b8c8 !important;
}

/* Stats labels */
:root.dark-mode #especialistas-promo div[style*="font-size: 0.8rem"][style*="color: #777"] {
    color: #888 !important;
}

/* ── Dark Mode: Sección Gracia IA ── */
:root.dark-mode #consejero-section {
    background-color: #181c28 !important;
}

:root.dark-mode #consejero-section h2 {
    color: #e8eaf0 !important;
}

/* Tags "¿Para qué te sirve?" */
:root.dark-mode #consejero-section div[style*="display: flex; flex-wrap: wrap"] span {
    background: #252b3b !important;
    color: #8ca391 !important;
}

/* Aviso amarillo */
:root.dark-mode #consejero-section div[style*="background: #fffbf0"] {
    background: #2a2415 !important;
    border-left-color: #c4922a !important;
}

:root.dark-mode #consejero-section div[style*="background: #fffbf0"] p {
    color: #d4b87a !important;
}

:root.dark-mode #consejero-section div[style*="background: #fffbf0"] a {
    color: #8ca391 !important;
}

/* ── Dark Mode: Service Cards en Suscripciones ── */
:root.dark-mode .service-card {
    background: #232836 !important;
    border-color: #3a4460 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

:root.dark-mode .service-card h3 {
    color: #c0c8d8 !important;
}

:root.dark-mode .service-card p,
:root.dark-mode .service-card span {
    color: #8890a0 !important;
}

:root.dark-mode .service-card strong {
    color: #d0d8e8 !important;
}

:root.dark-mode .service-card div[style*="background: #eee"] {
    background: #333 !important;
    color: #aaa !important;
}

:root.dark-mode #suscripciones .section-header h2 {
    color: var(--primary) !important;
}

:root.dark-mode #suscripciones .section-header p {
    color: #a0a8b8 !important;
}

@media (max-width: 768px) {
    .cta-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-image {
        order: -1;
        margin-bottom: 30px;
    }
}

/* --- Intake Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    background: var(--primary);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.home-btn {
    background: var(--secondary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.home-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.modal-body {
    padding: 30px;
}

.disclaimer-box {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light);
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--secondary);
    outline: none;
    background: var(--white);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.form-check input {
    margin-top: 4px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.start-chat-btn {
    width: 100%;
    padding: 16px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.start-chat-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary);
    color: white;
}

:root.dark-mode header {
    background-color: rgba(18, 18, 22, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

:root.dark-mode header.header-scrolled {
    background-color: rgba(15, 15, 18, 0.99);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

:root.dark-mode footer {
    background-color: #1A1A1A;
    border-top-color: #333;
}

:root.dark-mode .page-header {
    background: linear-gradient(135deg, #1A1A1A, #2a2a2a);
}

:root.dark-mode p {
    color: #c0c0c0;
}

:root.dark-mode .topic-icon {
    background-color: #333;
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.1rem;
        gap: 6px;
    }

    .mobile-word-btn {
        display: inline-flex;
    }

    .cta-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-image {
        order: -1;
        margin-bottom: 30px;
    }
}

/* --- Intake Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    background: var(--primary);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.home-btn {
    background: var(--secondary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.home-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.modal-body {
    padding: 30px;
}

.disclaimer-box {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light);
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--secondary);
    outline: none;
    background: var(--white);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.form-check input {
    margin-top: 4px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.start-chat-btn {
    width: 100%;
    padding: 16px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.start-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

/* Intake reason grid */
.intake-reason-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.reason-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid var(--border, #dde3ed);
    border-radius: 12px;
    background: var(--white, #fff);
    color: var(--text, #333);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.reason-btn i {
    font-size: 1.3rem;
    color: var(--primary, #1B365D);
}

.reason-btn:hover {
    border-color: var(--primary, #1B365D);
    background: #f0f4f9;
}

.reason-btn.selected {
    border-color: var(--primary, #1B365D);
    background: var(--primary, #1B365D);
    color: #fff;
}

.reason-btn.selected i {
    color: #fff;
}

@media (max-width: 480px) {
    .intake-reason-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide chat interface initially */
.chat-interface.locked {
    filter: blur(5px);
    pointer-events: none;
    opacity: 0.5;
    transition: all 0.5s ease;
}

/* Overlay de restricción de acceso (sin sesión o sin suscripción) */
.chat-access-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    padding: 20px;
}

:root.dark-mode .chat-access-overlay {
    background: var(--dark);
}

.chat-access-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 48px 40px;
    max-width: 520px;
    text-align: center;
}

:root.dark-mode .chat-access-card {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-access-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 24px;
    display: block;
}

.chat-access-card h1 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--dark);
}

:root.dark-mode .chat-access-card h1 {
    color: #e0e0e0;
}

.chat-access-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark);
    margin-bottom: 28px;
    opacity: 0.9;
}

:root.dark-mode .chat-access-card p {
    color: #c0c0c0;
}

.chat-access-video {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    margin: 0 auto 24px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chat-access-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.chat-access-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* --- Left Sidebar Controls (Theme & Scroll) --- */
.left-controls {
    position: fixed;
    left: 30px;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    z-index: 1000;
}

/* Theme Switcher Pill (hidden - replaced by navbar toggle) */
.theme-switch-wrapper {
    display: none;
}

:root.dark-mode .theme-switch-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 60px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark);
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.6;
}

.theme-option i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.theme-option span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.theme-option.active {
    background: var(--white);
    color: var(--primary);
    opacity: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

:root.dark-mode .theme-option.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    transform: translateY(20px);
}

.scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--dark);
    text-transform: uppercase;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background-color: var(--dark);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.scroll-indicator:hover .scroll-line::after {
    transform: translateY(0);
}

.scroll-indicator:hover .scroll-text {
    color: var(--primary);
}

/* Ajuste para m??viles */
@media (max-width: 768px) {
    .left-controls {
        left: 10px;
        bottom: 20px;
        transform: scale(0.8);
        transform-origin: bottom left;
    }

    .preloader img {
        max-width: 150px;
        max-height: 150px;
    }

    .topic-content {
        padding: 30px;
    }

    .topic-card h2 .chevron {
        font-size: 1.2rem;
    }
}

/* --- Captcha Num??rico Styles --- */
.captcha-group {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 107, 107, 0.1));
    padding: 20px;
    border-radius: 16px;
    border: 2px dashed var(--secondary);
    margin-bottom: 20px;
}

.captcha-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 1rem;
}

.captcha-group label i {
    color: var(--secondary);
    font-size: 1.2rem;
}

.captcha-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input-row input {
    flex: 1;
    padding: 14px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background: var(--white);
    transition: var(--transition);
}

.captcha-input-row input:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.refresh-captcha-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
}

.refresh-captcha-btn:hover {
    transform: rotate(180deg) scale(1.1);
    background: var(--primary);
}

.refresh-captcha-btn:active {
    transform: rotate(180deg) scale(0.95);
}

:root.dark-mode .captcha-group {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(255, 107, 107, 0.15));
    border-color: var(--secondary);
}

:root.dark-mode .captcha-input-row input {
    background: #333;
    border-color: #555;
    color: #fff;
}

/* =========================================
   PRELOADER (PANTALLA DE CARGA)
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #ffffff 0%, #E6F9F0 55%, #c8f0de 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#preloader img {
    width: 280px;
    height: 280px;
    object-fit: contain;
    animation: preloader-fadein 0.5s ease forwards;
}

@keyframes preloader-fadein {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Word of the Day Modal (Robust Redesign) --- */
.word-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.word-modal.active {
    opacity: 1;
    visibility: visible;
}

.word-modal-content {
    width: 90%;
    max-width: 400px;
    height: 580px;
    perspective: 2000px;
    /* High perspective for better 3D */
}

.word-card-container {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.word-card-container:hover {
    transform: scale(1.02);
}

.word-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.word-card.flipped {
    transform: rotateY(180deg);
}

.word-card-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Front Face */
.word-card-front {
    background: radial-gradient(ellipse at 50% 40%, #1e3a5f 0%, #0d1b2e 60%, #050d18 100%);
    color: white;
    transform: rotateY(0deg);
    z-index: 2;
}

/* Rayos de luz dorada girando */
.word-card-front::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(197, 160, 89, 0.08) 20deg,
        transparent 40deg,
        transparent 60deg,
        rgba(197, 160, 89, 0.12) 80deg,
        transparent 100deg,
        transparent 130deg,
        rgba(197, 160, 89, 0.07) 150deg,
        transparent 170deg,
        transparent 200deg,
        rgba(197, 160, 89, 0.1) 220deg,
        transparent 240deg,
        transparent 270deg,
        rgba(197, 160, 89, 0.09) 290deg,
        transparent 310deg,
        transparent 340deg,
        rgba(197, 160, 89, 0.06) 360deg
    );
    animation: raysSpin 12s linear infinite;
    border-radius: 0;
}

/* Halo dorado central */
.word-card-front::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.25) 0%, rgba(197, 160, 89, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    animation: haloPulse 3s ease-in-out infinite;
}

/* Estrellas/partículas flotantes */
.word-card-front .card-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 30px;
    pointer-events: none;
}

.word-card-front .card-stars span {
    position: absolute;
    display: block;
    width: 3px;
    height: 3px;
    background: rgba(197, 160, 89, 0.9);
    border-radius: 50%;
    animation: starFloat linear infinite;
}

.word-card-front .card-stars span:nth-child(1)  { left: 15%; top: 20%; width: 2px; height: 2px; animation-duration: 6s; animation-delay: 0s; }
.word-card-front .card-stars span:nth-child(2)  { left: 80%; top: 35%; width: 3px; height: 3px; animation-duration: 8s; animation-delay: 1s; }
.word-card-front .card-stars span:nth-child(3)  { left: 45%; top: 10%; width: 2px; height: 2px; animation-duration: 7s; animation-delay: 2s; }
.word-card-front .card-stars span:nth-child(4)  { left: 70%; top: 75%; width: 2px; height: 2px; animation-duration: 9s; animation-delay: 0.5s; }
.word-card-front .card-stars span:nth-child(5)  { left: 25%; top: 60%; width: 3px; height: 3px; animation-duration: 5s; animation-delay: 3s; }
.word-card-front .card-stars span:nth-child(6)  { left: 90%; top: 15%; width: 2px; height: 2px; animation-duration: 7s; animation-delay: 1.5s; }
.word-card-front .card-stars span:nth-child(7)  { left: 10%; top: 80%; width: 2px; height: 2px; animation-duration: 6s; animation-delay: 4s; }
.word-card-front .card-stars span:nth-child(8)  { left: 55%; top: 88%; width: 3px; height: 3px; animation-duration: 8s; animation-delay: 2.5s; }
.word-card-front .card-stars span:nth-child(9)  { left: 35%; top: 45%; width: 2px; height: 2px; animation-duration: 10s; animation-delay: 0.8s; }
.word-card-front .card-stars span:nth-child(10) { left: 65%; top: 55%; width: 2px; height: 2px; animation-duration: 7s; animation-delay: 3.5s; }

/* Estado: cargando (rayos acelerados al hacer clic) */
.word-card-front.charging::before {
    animation-duration: 1.2s;
    filter: brightness(2.5) saturate(1.5);
}

.word-card-front.charging::after {
    animation-duration: 0.6s;
    opacity: 1;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.6) 0%, rgba(197, 160, 89, 0.2) 40%, transparent 70%);
}

.word-card-front.charging .card-pattern {
    animation-duration: 0.8s;
    box-shadow: 0 0 50px rgba(197, 160, 89, 0.8), 0 0 100px rgba(197, 160, 89, 0.4);
    color: #FFD700;
}

.word-card-front.charging .card-stars span {
    animation-duration: 1.5s !important;
    opacity: 1;
}

@keyframes raysSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes haloPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -60%) scale(1); }
    50%       { opacity: 1;   transform: translate(-50%, -60%) scale(1.15); }
}

@keyframes starFloat {
    0%   { opacity: 0; transform: translateY(0) scale(1); }
    20%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-60px) scale(0.5); }
}

.word-card-front .card-pattern {
    font-size: 4rem;
    color: #C5A059;
    background: rgba(197, 160, 89, 0.12);
    width: 110px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(197, 160, 89, 0.4);
    margin-bottom: 25px;
    animation: floatIcon 4s ease-in-out infinite;
    position: relative;
    z-index: 5;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3), 0 0 60px rgba(197, 160, 89, 0.1);
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.word-card-front-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 5;
}

.word-card-front-hint {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 18px;
    border-radius: 20px;
    position: relative;
    z-index: 5;
}

/* Back Face */
.word-card-back {
    background: #ffffff;
    color: #333;
    transform: rotateY(180deg);
}

.word-card-back::after {
    content: '';
    position: absolute;
    inset: 15px;
    border: 2px solid var(--secondary);
    border-radius: 20px;
    opacity: 0.25;
    pointer-events: none;
}

.word-card-back::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    border-top: 4px solid var(--secondary);
    border-left: 4px solid var(--secondary);
    border-radius: 20px 0 0 0;
}

.word-verse-ref {
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.word-verse-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #444;
    font-style: italic;
    margin-bottom: 30px;
    position: relative;
}

.word-verse-text::before {
    content: '"';
    position: absolute;
    top: -25px;
    left: -15px;
    font-size: 4rem;
    color: rgba(78, 205, 196, 0.15);
    font-family: serif;
}

.word-action-btn {
    background: var(--primary);
    color: white;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.word-action-btn:hover {
    transform: translateY(-2px);
}

.word-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #333;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.3s;
    z-index: 3001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.word-close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.timer-message {
    background: rgba(255, 75, 75, 0.1);
    border: 1px solid rgba(255, 75, 75, 0.3);
    padding: 15px;
    border-radius: 12px;
    color: #d32f2f;
    font-weight: 600;
    margin-top: 20px;
    font-size: 0.95rem;
    display: none;
    text-align: center;
}

/* --- Notification Modal (Auth/Alerts) --- */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.notification-modal.active {
    opacity: 1;
    visibility: visible;
}

.notification-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.notification-modal.active .notification-content {
    transform: translateY(0);
}

.notification-header {
    background: var(--primary);
    padding: 30px 20px;
    color: white;
}

.notification-header i {
    font-size: 2.8rem;
    margin-bottom: 12px;
    display: block;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: white !important;
}

.notification-body {
    padding: 30px 25px;
    color: var(--dark);
    font-size: 1.05rem;
    line-height: 1.6;
}

.notification-footer {
    padding: 0 25px 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.notification-btn {
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notification-btn.primary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
}

.notification-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

/* Specific Mobile Optimization for Notifications */
@media (max-width: 480px) {
    .notification-content {
        max-width: 100%;
        border-radius: 24px;
    }

    .notification-header {
        padding: 25px 15px;
    }

    .notification-header i {
        font-size: 2.4rem;
    }

    .notification-body {
        padding: 25px 20px;
        font-size: 1rem;
    }

    .notification-footer {
        flex-direction: column-reverse;
        /* Put main action on top or bottom? No, column puts secondary then primary. */
        gap: 10px;
        padding: 0 20px 25px;
    }

    .notification-btn {
        width: 100%;
        padding: 14px;
    }
}

:root.dark-mode .notification-content {
    background: #2D2D2D;
}

:root.dark-mode .notification-body {
    color: #e0e0e0;
}

:root.dark-mode .notification-btn.secondary {
    background: #444;
    color: #ccc;
}

/* --- Topic Header Layout Styles --- */
.topic-header-layout {
    display: flex;
    align-items: start;
    gap: 30px;
    margin-bottom: 25px;
}

.topic-info {
    flex: 1;
}

.topic-info h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-info p {
    margin-bottom: 0;
    color: #666;
    line-height: 1.6;
    font-size: 1.05rem;
}

.topic-image-square {
    flex: 0 0 160px;
    /* Increased size */
    height: 160px;
    /* Increased size */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.topic-image-square:hover {
    transform: scale(1.02);
}

.topic-image-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Responsiveness for Topic Header */
@media (max-width: 768px) {
    .topic-header-layout {
        flex-direction: column-reverse;
        /* Stack: Image on Top? No, column-reverse puts last element first? Wait. HTML: Info (1), Image (2). column-reverse -> Image Top, Info Bottom. Yes. */
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .topic-info h2 {
        justify-content: center;
    }

    .topic-image-square {
        width: 100%;
        max-width: 100%;
        /* Go full width on mobile or limited? User said 'amontonado'. Full width or large square looks good. */
        height: 250px;
        /* Taller on mobile for better visual */
        flex: none;
    }
}

/* --- Improved Typography for Topic Content --- */
.topic-body {
    font-size: 1.05rem;
    /* Slightly larger base text */
    padding-bottom: 20px;
}

.topic-body p {
    line-height: 1.8;
    /* More breathing room */
    margin-bottom: 20px;
    /* Space between paragraphs */
    color: #444;
    /* Softer black for readability */
}

.topic-body h3 {
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: var(--primary);
    /* Highlight headers */
    letter-spacing: -0.5px;
}

.topic-body ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.topic-body li {
    margin-bottom: 12px;
    /* Space between list items */
    line-height: 1.7;
    padding-left: 5px;
}

.topic-body strong {
    color: var(--dark);
    font-weight: 700;
}

/* Specific styling for the footer emphasis text usually in strong tags */
.topic-body>strong {
    display: block;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    /* Light background */
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.7;
}

/* ============================================================
   BLOG — Índice, Artículos y Categorías
   ============================================================ */

/* Hero */
.blog-hero {
    background:
        linear-gradient(135deg, #0d1f3c 0%, #1B365D 55%, #183050 100%);
    color: white;
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}

/* Orbes de luz suaves */
.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 700px 450px at 15% 60%, rgba(78,205,196,0.13) 0%, transparent 65%),
        radial-gradient(ellipse 500px 350px at 85% 15%, rgba(197,160,89,0.11) 0%, transparent 60%),
        radial-gradient(ellipse 350px 250px at 65% 95%, rgba(78,205,196,0.07) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* Patrón de puntos sutiles */
.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

#hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

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

.blog-hero-title {
    text-align: center;
    margin-bottom: 42px;
}

.blog-hero-title h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    letter-spacing: -1px;
}

/* Slider */
.blog-slider-wrap {
    position: relative;
    overflow: hidden;
}

.blog-slides-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(.4, 0, .2, 1);
}

.blog-slide {
    min-width: 100%;
    display: flex;
    align-items: stretch;
    gap: 40px;
    padding: 10px 0 48px;
}

.blog-slide-content {
    flex: 1;
    min-width: 0;
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-slide-cat {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.blog-slide-content h2 {
    font-size: 1.95rem;
    font-weight: 800;
    color: white;
    line-height: 1.3;
    margin-bottom: 14px;
}

.blog-slide-content p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.06rem;
    margin-bottom: 28px;
    line-height: 1.7;
}

.blog-slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--dark);
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.22s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.blog-slide-btn:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.blog-slide-img {
    flex: 0 0 52%;
    order: 1;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 16/11;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.blog-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px 0 30px;
}

/* Progress bar */
.blog-progress-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 440px;
}

.blog-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    position: relative;
    transition: background 0.2s;
}

.blog-progress-segment:hover {
    background: rgba(255, 255, 255, 0.38);
}

.blog-progress-fill {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 3px;
    will-change: width;
}

/* Arrows — minimal, outline style */
.blog-slider-arrow {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.75);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.blog-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.65);
    color: white;
}

/* Secciones del blog */
.blog-section {
    padding: 56px 0;
}

.blog-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.blog-section-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--dark);
}

.blog-section-link {
    color: var(--dark);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-section-link:hover {
    text-decoration: underline;
}

/* Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.blog-card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.04);
}

.blog-card-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--dark);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-body h3 {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-body p {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.blog-card-meta {
    font-size: 0.78rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* CTA Banner */
.blog-cta-banner {
    background: #1B365D;
    /* Keep background blue as accent */
    padding: 52px 0;
}

.blog-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.blog-cta-text h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    line-height: 1.3;
}

.blog-cta-text p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    margin-bottom: 26px;
    line-height: 1.6;
    max-width: 520px;
}

.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--dark);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.97rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.blog-cta-btn:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.blog-cta-illustration {
    flex-shrink: 0;
    width: 220px;
    text-align: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 9rem;
    line-height: 1;
    user-select: none;
}

/* Categorías todos */
.blog-all-cats {
    background: #f4f7fb;
    padding: 52px 0;
}

.blog-all-cats h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 26px;
    text-align: center;
}

.blog-cat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.blog-cat-btn {
    display: inline-block;
    padding: 10px 22px;
    border: 2px solid var(--dark);
    color: var(--dark);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.blog-cat-btn:hover {
    background: var(--dark);
    color: white;
}

/* ---- Dark mode: sección blog ---- */
:root.dark-mode .blog-section {
    background: transparent;
}

:root.dark-mode .blog-section-header h2 {
    color: #e5e7eb;
}

:root.dark-mode .blog-section-link {
    color: var(--secondary);
}

:root.dark-mode .blog-card {
    background: #2C2C2C;
    border: 1px solid #3a3a3a;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
}

:root.dark-mode .blog-card-body h3 {
    color: #f0f0f0;
}

:root.dark-mode .blog-card-body p {
    color: #aaa;
}

:root.dark-mode .blog-card-meta {
    color: #777;
}

:root.dark-mode .blog-card-cat {
    background: #1e3a5f;
    color: #c8dcf5;
}

:root.dark-mode .blog-slide-btn {
    background: #2C2C2C;
    color: #e5e7eb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

:root.dark-mode .blog-slide-btn:hover {
    background: #3a3a3a;
    color: #fff;
}

:root.dark-mode .blog-cta-banner {
    background: #0d1f3c;
}

:root.dark-mode .blog-cta-btn {
    color: #1a1a1a;
}

:root.dark-mode .blog-cta-btn:hover {
    background: #e8ecff;
}

:root.dark-mode .blog-all-cats {
    background: #1a1a1a;
    border-top: 1px solid #333;
}

:root.dark-mode .blog-all-cats h2 {
    color: #e5e7eb;
}

:root.dark-mode .blog-cat-btn {
    background: #2C2C2C;
    border-color: #444;
    color: #c0c0c0;
}

:root.dark-mode .blog-cat-btn:hover {
    background: #3a3a3a;
    border-color: var(--secondary);
    color: #fff;
}

/* ---- Página de artículo individual ---- */
.article-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 110px 20px 70px;
}

.article-breadcrumb {
    font-size: 0.82rem;
    color: #aaa;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: #aaa;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: var(--dark);
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 18px;
}

.article-intro {
    font-size: 1.08rem;
    color: #555;
    line-height: 1.75;
    margin-bottom: 28px;
}

.article-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 16px;
    display: block;
}

.article-cat-badge {
    display: inline-block;
    background: var(--dark);
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
    text-decoration: none;
}

/* ── Botón Favorito ──────────────────────────────────────── */
.article-fav-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 28px;
    margin-top: -16px;
}

.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    background: transparent;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}

.fav-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.04);
}

.fav-btn--saved {
    background: var(--primary);
    color: #fff;
}

.fav-btn--saved:hover {
    background: transparent;
    color: var(--primary);
}

/* ── Modal "Inicia sesión para guardar" ────────────────────── */
.fav-prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.fav-prompt-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.fav-prompt-card {
    background: var(--card-bg, #fff);
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(24px);
    transition: transform 0.25s;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.fav-prompt-overlay.active .fav-prompt-card {
    transform: translateY(0);
}

.fav-prompt-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted, #888);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.fav-prompt-close:hover {
    color: var(--text, #222);
    background: var(--bg-alt, #f0f0f0);
}

.fav-prompt-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.6rem;
    color: var(--primary);
}

.fav-prompt-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin: 0 0 10px;
}

.fav-prompt-text {
    font-size: 0.92rem;
    color: var(--text-muted, #666);
    line-height: 1.55;
    margin: 0 0 24px;
}

.fav-prompt-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fav-prompt-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
}

.fav-prompt-btn:hover {
    opacity: 0.88;
    transform: scale(1.02);
}

.fav-prompt-btn--primary {
    background: var(--primary);
    color: #fff;
}

.fav-prompt-btn--secondary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.article-body {
    line-height: 1.82;
    font-size: 1.03rem;
    color: var(--dark);
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 30px 0 10px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body ul {
    margin: 0 0 16px 22px;
}

.article-body ul li {
    margin-bottom: 10px;
}

.article-body strong {
    color: var(--dark);
}

.article-bible-quote {
    background: rgba(27, 54, 93, 0.05);
    border-left: 4px solid var(--dark);
    padding: 18px 22px;
    border-radius: 0 12px 12px 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--dark);
}

.article-bible-quote strong {
    font-style: normal;
    color: var(--dark);
}

/* CTA boxes en artículo */
.article-cta-section {
    padding: 48px 0 20px;
}

.article-cta-section h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    text-align: center;
}

.article-cta-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.article-cta-box {
    background: #1B365D;
    border-radius: 16px;
    padding: 28px 24px;
    color: white;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.article-cta-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(27, 54, 93, 0.28);
}

.article-cta-box i {
    font-size: 2.2rem;
    opacity: 0.85;
}

.article-cta-box h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.article-cta-box p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    line-height: 1.5;
}

.article-cta-box .cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.article-cta-box .cta-pill:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Artículos recomendados */
.article-recommended {
    padding: 40px 0 60px;
}

.article-recommended h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 22px;
}

/* ---- Página de categoría ---- */
.cat-hero {
    background: #1B365D;
    padding: 130px 0 56px;
    margin-bottom: 48px;
}

.cat-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.cat-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
}

.cat-back {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

.cat-back:hover {
    color: white;
}

/* Responsive */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero-title h1 {
        font-size: 1.85rem;
        letter-spacing: -0.5px;
    }

    .blog-slide {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 36px;
    }

    .blog-slide-img {
        flex: none;
        width: 100%;
        aspect-ratio: 16/9;
        order: 1;
    }

    .blog-slide-content {
        order: 2;
    }

    .blog-slide-content h2 {
        font-size: 1.3rem;
    }

    .blog-slide-content p {
        font-size: 0.97rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .blog-cta-illustration {
        display: none;
    }

    .blog-cta-text p {
        max-width: 100%;
    }

    .article-cta-boxes {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 1.55rem;
    }

    .cat-hero h1 {
        font-size: 1.8rem;
    }

    .article-wrap {
        padding: 90px 16px 50px;
    }
}

/* ── Franja de emergencias ────────────────────────────────── */
.crisis-banner {
    background-color: #1B365D;
    color: #fff;
    text-align: center;
    padding: 14px 24px;
    font-size: 0.87rem;
    line-height: 1.65;
}

.crisis-banner i {
    color: #fbbf24;
    margin-right: 6px;
}

.crisis-banner a {
    color: #93c5fd;
    text-decoration: underline;
    font-weight: 600;
}

.crisis-banner a:hover {
    color: #fff;
}

/* ============================================================
   FOOTER PROFESIONAL v2
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, #1B365D 0%, #0f2044 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
    margin-top: 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo-wrap {
    display: block;
}

.footer-logo-wrap .logo-img {
    display: block;
    height: 52px;
    width: calc(52px * 268 / 52);
    /* mantiene proporción del SVG: 268×52 */
    background-color: #fff !important;
    /* blanco sobre fondo oscuro del footer */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: left center;
    mask-position: left center;
    margin-bottom: 4px;
}

:root.dark-mode .footer-logo-wrap .logo-img {
    background-color: #fff !important;
}

.footer-brand-name {
    display: none;
    /* el SVG del logo ya incluye el nombre */
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

.footer-social {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.footer-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-col h4.footer-col-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-col ul li a.footer-work-link {
    color: #a78bfa;
    font-weight: 600;
}

.footer-col ul li a.footer-work-link:hover {
    color: #c4b5fd;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: #fff;
}

/* Dark mode — footer se mantiene oscuro */
:root.dark-mode .site-footer {
    background: linear-gradient(135deg, #0d1b2e 0%, #060f1f 100%);
}

/* Sección Trabaja con nosotros */
.trabajar-con-nosotros {
    background: linear-gradient(135deg, #1B365D 0%, #2d5a9e 100%);
    padding: 64px 24px;
}

.trabajar-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.trabajar-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}

.trabajar-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 520px;
    line-height: 1.6;
}

.btn-trabajar {
    display: inline-block;
    padding: 14px 32px;
    background: #fff;
    color: #1B365D;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-trabajar:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
}

:root.dark-mode .trabajar-con-nosotros {
    background: linear-gradient(135deg, #0f2044 0%, #1a3a6e 100%);
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        align-items: center;
        text-align: center;
    }

    .footer-logo-wrap .logo-img {
        -webkit-mask-position: center center;
        mask-position: center center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-tagline {
        text-align: center;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
    }

    .trabajar-inner {
        flex-direction: column;
        text-align: center;
    }

    .trabajar-text p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════
   TESTIMONIOS SLIDER
══════════════════════════════════════════ */
.testi-slider-outer {
    overflow: hidden;
    padding: 8px 4px 20px;
}

.testi-track {
    display: flex;
    gap: 28px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Tarjeta */
.testi-card {
    flex: 0 0 calc((100% - 56px) / 3);
    min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px 28px 24px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(6px);
}

.testi-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Estrellas */
.testi-stars {
    font-size: 1.15rem;
    color: #f5c518;
    letter-spacing: 2px;
    margin-bottom: 18px;
    line-height: 1;
}

/* Comilla decorativa */
.testi-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    right: 22px;
    font-size: 5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.05);
    font-family: Georgia, serif;
    pointer-events: none;
}

/* Texto */
.testi-quote {
    font-size: 0.93rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 24px;
    flex-grow: 1;
}

/* Autor */
.testi-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.testi-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a5299, #8ca391);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.testi-author strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

.testi-author span {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* Número de rating */
.testi-rating-num {
    position: absolute;
    bottom: 24px;
    right: 26px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #f5c518;
    background: rgba(245, 197, 24, 0.12);
    border-radius: 20px;
    padding: 3px 10px;
}

/* Controles */
.testi-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
}

.testi-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.testi-btn:hover {
    background: rgba(140, 163, 145, 0.3);
    border-color: #8ca391;
    color: #fff;
    transform: scale(1.08);
}

.testi-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.testi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.testi-dot.active {
    background: #8ca391;
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .testi-card {
        flex: 0 0 calc((100% - 28px) / 2);
    }
}

@media (max-width: 600px) {
    .testi-card {
        flex: 0 0 100%;
    }

    .testi-card::before {
        display: none;
    }
}

/* ══════════════════════════════════════════
   COOKIE CONSENT BANNER
══════════════════════════════════════════ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: rgba(27, 54, 93, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.4s ease;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
}

.cookie-banner-show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner-hide {
    transform: translateY(100%);
    opacity: 0;
}

.cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.cookie-banner-text {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.cookie-icon {
    font-size: 1.8rem;
    color: #fbbf24;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-banner-text strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cookie-banner-text p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cookie-banner-actions .btn-primary {
    background: linear-gradient(135deg, #8ca391, #44b8b0);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.3);
}

.cookie-banner-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(78, 205, 196, 0.45);
}

.cookie-banner-actions .btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.cookie-banner-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Dark mode */
:root.dark-mode .cookie-banner {
    background: rgba(10, 18, 35, 0.95);
    border-top-color: rgba(255, 255, 255, 0.06);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        padding: 20px 20px;
        gap: 18px;
        text-align: center;
    }

    .cookie-banner-text {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .cookie-icon {
        font-size: 1.5rem;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .cookie-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* ── OCULTAR SECCIONES PREMIUM (pendiente lanzamiento post 20-abr-2026) ── */
a[href="recursos-premium.html"],
a[href="videos-premium.html"] {
    display: none !important;
}
li:has(> a[href="recursos-premium.html"]),
li:has(> a[href="videos-premium.html"]) {
    display: none !important;
}