/*
Theme Name: Carlos Ibáñez Sánchez - Personal Website
Description: Tema personalizado para el sitio web profesional de Carlos Ibáñez
Version: 11.0
Author: Carlos Ibáñez Sánchez
*/

/* ========================================
   VARIABLES CSS Y CONFIGURACIÓN BASE
======================================== */

:root {
    --primary-dark: #0a0a0a;
    --primary-gray: #1a1a1a;
    --accent-gold: #d4af37;
    --accent-blue: #4a90e2;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --text-light: #666666;
    --bg-dark: #111111;
    --bg-section: #1a1a1a;
    --border-color: #333333;
}

/* Modo claro */
:root.light-mode {
    --primary-dark: #ffffff;
    --primary-gray: #f8f9fa;
    --accent-gold: #d4af37;
    --accent-blue: #4a90e2;
    --text-white: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-dark: #f0f0f0;
    --bg-section: #f8f9fa;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background: var(--primary-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   UTILIDADES GENERALES
======================================== */

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

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #f4d03f 100%);
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--accent-gold);
}

.btn-outline:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

/* ========================================
   NAVEGACIÓN
======================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-white);
}

/* Botón modo noche */
.dark-mode-toggle {
    background: none;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 16px;
}

.dark-mode-toggle:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    transform: rotate(15deg) scale(1.1);
}

.dark-mode-toggle i {
    transition: transform 0.3s ease;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   HERO SECTION
======================================== */

.hero {
    padding: 120px 0 80px;
    background: var(--primary-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 30px;
}

.hero-quote {
    font-size: 1.3rem;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 30px;
    line-height: 1.6;
    border-left: 4px solid var(--accent-gold);
    padding-left: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ========================================
   SECCIONES PRINCIPALES
======================================== */

/* About Section */
.about-section {
    background: var(--bg-section);
}

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

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-gray);
}

.about-text h3 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
    margin-top: 30px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    background: var(--primary-gray);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-gray);
    font-weight: 500;
}

.about-image {
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Kairos Section */
.kairos-section {
    background: var(--primary-dark);
}

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

.kairos-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.kairos-text p {
    margin-bottom: 20px;
    color: var(--text-gray);
}

.kairos-text h3 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
    margin-top: 30px;
}

.kairos-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--primary-gray);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--accent-gold);
    transform: translateX(5px);
}

.feature-icon {
    background: var(--accent-gold);
    color: var(--primary-dark);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.feature-content h4 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-content p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

.kairos-image {
    text-align: center;
}

.kairos-mockup {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Research Section */
.research-section {
    background: var(--bg-section);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.research-card {
    background: var(--primary-gray);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.research-icon {
    background: var(--accent-gold);
    color: var(--primary-dark);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
}

.research-card h3 {
    color: var(--text-white);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.research-card p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 25px;
}

.research-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-progress {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.status-planning {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* Articles Section */
.articles-section {
    background: var(--primary-dark);
}

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

.article-preview {
    background: var(--primary-gray);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.article-preview:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.article-image {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-dark);
}

.article-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.article-date {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.article-category {
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content h3 {
    color: var(--text-white);
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--text-white);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--bg-section);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.newsletter-input {
    flex: 1;
    padding: 15px 20px;
    background: var(--primary-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
}

.newsletter-input::placeholder {
    color: var(--text-gray);
}

.newsletter-btn {
    padding: 15px 30px;
    background: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* Projects Section */
.projects-section {
    background: var(--primary-dark);
}

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

.project-card {
    background: var(--primary-gray);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-header {
    padding: 25px 25px 0;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-year {
    color: var(--text-gray);
    font-weight: 600;
}

.project-card h3 {
    color: var(--text-white);
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.project-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tech-tag {
    background: var(--bg-dark);
    color: var(--text-gray);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.project-links {
    padding: 0 25px 25px;
    display: flex;
    gap: 15px;
}

.project-link {
    flex: 1;
    padding: 12px;
    background: var(--bg-dark);
    color: var(--accent-gold);
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-link:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
}

/* Call to Action Section */
.cta-section {
    background: var(--bg-section);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

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

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: var(--bg-dark);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    background: var(--primary-gray);
    color: var(--text-gray);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ========================================
   NOTIFICACIONES
======================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-gray);
    color: var(--text-white);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.notification.error {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.notification.info {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* ========================================
   PÁGINA SOBRE MÍ
======================================== */

.sobre-mi-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

.texto-trayectoria h2 {
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 24px;
    font-weight: 700;
}

.texto-trayectoria p {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.imagen-perfil {
    position: sticky;
    top: 120px;
}

.imagen-perfil img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Barra de redes sociales */
.social-bar {
    margin-top: 40px;
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-gray);
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--text-white);
}

.social-btn.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.social-btn.twitter:hover {
    background: #000000;
    border-color: #000000;
}

.social-btn.orcid:hover {
    background: #a6ce39;
    border-color: #a6ce39;
    color: var(--primary-dark);
}

.social-btn.email:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--primary-dark);
}

.social-btn.github:hover {
    background: #333333;
    border-color: #333333;
}

.social-btn i {
    font-size: 1.1rem;
}

/* ========================================
   CRONOGRAMA CORREGIDO - SOLUCIÓN DEFINITIVA
======================================== */

/* Reset completo del timeline */
.timeline-section {
    background: var(--bg-section);
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Línea central - NO superpuesta */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--accent-gold) 5%,
        var(--accent-gold) 95%,
        transparent 100%
    );
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 2px;
}

/* Estructura de items mejorada */
.timeline-item {
    position: relative;
    margin-bottom: 80px;
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 40px;
    align-items: start;
    width: 100%;
    min-height: 150px;
}

/* LADO IZQUIERDO - Año (elementos impares) */
.timeline-item:nth-child(odd) .timeline-year-container {
    grid-column: 1;
    text-align: right;
    padding-right: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 20px;
}

.timeline-item:nth-child(odd) .timeline-marker {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    z-index: 10;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 3;
    padding-left: 20px;
    text-align: left;
}

/* LADO DERECHO - Año (elementos pares) */
.timeline-item:nth-child(even) .timeline-content {
    grid-column: 1;
    padding-right: 20px;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-marker {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    z-index: 10;
}

.timeline-item:nth-child(even) .timeline-year-container {
    grid-column: 3;
    text-align: left;
    padding-left: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
}

/* Marcador central */
.timeline-marker {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 10;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border: 4px solid var(--primary-dark);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 20;
}

/* Año */
.timeline-year {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-gold);
    background: var(--primary-dark);
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid var(--accent-gold);
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tarjeta del evento mejorada */
.event-card {
    background: var(--primary-gray);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    z-index: 5; /* Menor que el marker para evitar superposición */
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-gold);
}

/* Flechas conectoras - CORREGIDAS */
.timeline-item:nth-child(odd) .event-card::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 30px;
    width: 0;
    height: 0;
    border-right: 15px solid var(--border-color);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    z-index: 3;
}

.timeline-item:nth-child(even) .event-card::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid var(--border-color);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    z-index: 3;
}

.timeline-item:nth-child(odd) .event-card:hover::before {
    border-right-color: var(--accent-gold);
}

.timeline-item:nth-child(even) .event-card:hover::before {
    border-left-color: var(--accent-gold);
}

/* Contenido del evento */
.event-date {
    font-size: 0.95rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-card h4 {
    font-size: 1.4rem;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.event-role {
    font-size: 1rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 15px;
    padding: 6px 12px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.event-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.event-location i {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* Enlaces del evento */
.event-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.event-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary-dark);
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--accent-gold);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-link:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.event-link.pdf-link {
    border-color: #dc3545;
    color: #dc3545;
}

.event-link.pdf-link:hover {
    background: #dc3545;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.event-link.youtube-link {
    border-color: #ff0000;
    color: #ff0000;
}

.event-link.youtube-link:hover {
    background: #ff0000;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* CV Download Button */
.cv-download {
    margin-top: 30px;
    text-align: center;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #f4d03f 100%);
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cv-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.cv-download-btn i {
    font-size: 1.2rem;
}

/* RESPONSIVE - Móvil */
@media (max-width: 768px) {
    .timeline {
        padding: 40px 10px;
    }
    
    .timeline::before {
        left: 40px;
        transform: none;
    }
    
    .timeline-item {
        display: block;
        padding-left: 80px;
        margin-bottom: 60px;
        grid-template-columns: none;
        gap: 0;
    }
    
    .timeline-year-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 70px;
        text-align: center;
        padding: 0;
        grid-column: auto;
    }
    
    .timeline-year {
        font-size: 1.1rem;
        padding: 8px 6px;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .timeline-marker {
        position: absolute;
        left: 40px;
        top: 25px;
        transform: translateX(-50%);
        padding: 0;
        grid-column: auto;
    }
    
    .timeline-content {
        padding: 0;
        margin-top: 0;
        grid-column: auto;
        text-align: left;
    }
    
    .event-card {
        max-width: none;
        margin-top: 20px;
    }
    
    .event-card::before,
    .timeline-item:nth-child(odd) .event-card::before,
    .timeline-item:nth-child(even) .event-card::before {
        left: -60px;
        right: auto;
        border-right: 15px solid var(--border-color);
        border-left: none;
    }
    
    .event-card:hover::before,
    .timeline-item:nth-child(odd) .event-card:hover::before,
    .timeline-item:nth-child(even) .event-card:hover::before {
        border-right-color: var(--accent-gold);
        border-left-color: transparent;
    }
    
    .event-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .event-link {
        justify-content: center;
        width: 100%;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .timeline-item {
        gap: 30px;
    }
    
    .timeline-year-container {
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .timeline-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .timeline-year {
        font-size: 2rem;
        padding: 10px 16px;
    }
    
    .event-card {
        max-width: 400px;
        padding: 25px;
    }
}

/* Modo claro */
:root.light-mode .timeline-year {
    background: #ffffff;
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

:root.light-mode .timeline-dot {
    border-color: #ffffff;
}

:root.light-mode .event-card::before {
    border-right-color: #dee2e6;
    border-left-color: #dee2e6;
}

:root.light-mode .timeline-item:nth-child(odd) .event-card:hover::before {
    border-right-color: var(--accent-gold);
}

:root.light-mode .timeline-item:nth-child(even) .event-card:hover::before {
    border-left-color: var(--accent-gold);
}

/* Animaciones de entrada */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    animation: timelineItemIn 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

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

/* Título de la sección corregido */
.timeline-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.timeline-section .section-subtitle {
    text-align: center;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .about-content,
    .kairos-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .hero-cta {
        justify-content: center;
    }
    
    /* Responsive para Sobre mí */
    .sobre-mi-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .imagen-perfil {
        position: static;
        order: -1;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ========================================
   BOTONES DE IDIOMA Y MODO NOCHE
======================================== */

/* Botones de idioma */
.language-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-left: 15px;
}

.language-btn {
    background: var(--primary-gray);
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-btn:hover,
.language-btn.active {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

.language-btn i {
    font-size: 0.8rem;
}

/* Modo noche - asegurar funcionalidad */
.dark-mode-toggle {
    background: none !important;
    border: 2px solid var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    padding: 8px 12px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    transition: all 0.3s ease !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 16px !important;
    position: relative !important;
    z-index: 1000 !important;
}

.dark-mode-toggle:hover {
    background: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
    transform: rotate(15deg) scale(1.1) !important;
}

.dark-mode-toggle:focus {
    outline: 3px solid rgba(212, 175, 55, 0.5) !important;
    outline-offset: 2px !important;
}

.dark-mode-toggle i {
    transition: transform 0.3s ease !important;
    pointer-events: none !important;
}

/* Iconos del modo noche corregidos */
:root.light-mode .dark-mode-toggle i.fa-sun {
    display: none !important;
}

:root.light-mode .dark-mode-toggle i.fa-moon {
    display: inline-block !important;
}

:root:not(.light-mode) .dark-mode-toggle i.fa-moon {
    display: none !important;
}

:root:not(.light-mode) .dark-mode-toggle i.fa-sun {
    display: inline-block !important;
}

/* ========================================
   CORRECCIONES ESPECÍFICAS
======================================== */

/* Newsletter button corregido */
.newsletter-btn,
.newsletter-section .newsletter-btn,
.newsletter-form button[type="submit"] {
    background: #0a0a0a !important;
    color: #ffffff !important;
    border: 2px solid #0a0a0a !important;
}

.newsletter-btn:hover,
.newsletter-section .newsletter-btn:hover,
.newsletter-form button[type="submit"]:hover {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #1a1a1a !important;
}

/* Responsive adicional */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px !important;
    }
    
    .language-switcher {
        margin-left: 0 !important;
        justify-content: center !important;
        margin-top: 15px !important;
        padding-top: 15px !important;
        border-top: 1px solid var(--border-color) !important;
    }
    
    .language-btn {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .dark-mode-toggle {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        z-index: 1001 !important;
        margin: 0 !important;
    }
}

/* Modo claro - botones de idioma */
:root.light-mode .language-btn {
    background: #f8f9fa !important;
    border-color: #e0e0e0 !important;
    color: #666666 !important;
}

:root.light-mode .language-btn:hover,
:root.light-mode .language-btn.active {
    background: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
    border-color: var(--accent-gold) !important;
}

:root.light-mode .dark-mode-toggle {
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

:root.light-mode .dark-mode-toggle:hover {
    background: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
}

/* Prevenir duplicación */
.logo {
    white-space: nowrap !important;
}

/* 2. MODO NOCHE - ICONOS CORREGIDOS */
/* Por defecto (modo oscuro) mostrar sol */
.dark-mode-toggle i.fa-moon {
    display: none !important;
}

.dark-mode-toggle i.fa-sun {
    display: inline-block !important;
}

/* En modo claro mostrar luna */
:root.light-mode .dark-mode-toggle i.fa-sun {
    display: none !important;
}

:root.light-mode .dark-mode-toggle i.fa-moon {
    display: inline-block !important;
}

/* 3. MODO NOCHE - ASEGURAR FUNCIONALIDAD */
.dark-mode-toggle {
    background: none !important;
    border: 2px solid var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    padding: 8px 12px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    transition: all 0.3s ease !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 16px !important;
    position: relative !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.dark-mode-toggle:hover {
    background: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
    transform: rotate(15deg) scale(1.1) !important;
}

.dark-mode-toggle i {
    pointer-events: none !important;
    transition: transform 0.3s ease !important;
}

/* 4. VARIABLES MODO CLARO - CORREGIDAS */
:root.light-mode {
    --primary-dark: #ffffff !important;
    --primary-gray: #f8f9fa !important;
    --accent-gold: #d4af37 !important;
    --accent-blue: #4a90e2 !important;
    --text-white: #1a1a1a !important;
    --text-gray: #666666 !important;
    --text-light: #999999 !important;
    --bg-dark: #f0f0f0 !important;
    --bg-section: #f8f9fa !important;
    --border-color: #e0e0e0 !important;
}

/* 5. APLICAR MODO CLARO A ELEMENTOS PRINCIPALES */
:root.light-mode body {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

:root.light-mode nav {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: #e0e0e0 !important;
}

:root.light-mode .hero {
    background: #ffffff !important;
}

:root.light-mode .section {
    background: #f8f9fa !important;
}

:root.light-mode .section:nth-child(even) {
    background: #ffffff !important;
}

:root.light-mode .dark-mode-toggle {
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

:root.light-mode .dark-mode-toggle:hover {
    background: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
}

/* 6. BOTONES DE IDIOMA EN MODO CLARO */
:root.light-mode .language-btn {
    background: #f8f9fa !important;
    border-color: #e0e0e0 !important;
    color: #666666 !important;
}

:root.light-mode .language-btn:hover,
:root.light-mode .language-btn.active {
    background: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
    border-color: var(--accent-gold) !important;
}

/* 7. RESPONSIVE PARA MODO NOCHE */
@media (max-width: 768px) {
    .dark-mode-toggle {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        z-index: 1001 !important;
        margin: 0 !important;
        background: var(--primary-gray) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
    
    :root.light-mode .dark-mode-toggle {
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
}
/* ========================================
   CORRECCIÓN ESPACIADO HEADER - AÑADIR AL FINAL DE style.css
======================================== */

/* 1. NAVEGACIÓN - ESPACIADO CORREGIDO */
.nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    padding: 0 !important;
}

/* 2. LOGO - TAMAÑO RESPONSIVE */
.logo {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--accent-gold) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: 200px !important;
    max-width: 250px !important;
}

/* 3. NAVEGACIÓN - AJUSTE DE ESPACIOS */
.nav-links {
    display: flex !important;
    list-style: none !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

/* 4. ENLACES DE NAVEGACIÓN - MÁS COMPACTOS */
.nav-links a {
    color: var(--text-gray) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
    font-size: 0.95rem !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--text-white) !important;
    background: rgba(212, 175, 55, 0.1) !important;
}

/* 5. NAVEGACIÓN RESPONSIVE - TABLETS */
@media (max-width: 1200px) {
    .logo {
        font-size: 1.2rem !important;
        min-width: 180px !important;
        max-width: 200px !important;
    }
    
    .nav-links {
        gap: 15px !important;
    }
    
    .nav-links a {
        font-size: 0.9rem !important;
        padding: 6px 10px !important;
    }
}

@media (max-width: 1024px) {
    .logo {
        font-size: 1.1rem !important;
        min-width: 160px !important;
        max-width: 180px !important;
    }
    
    .nav-links {
        gap: 12px !important;
    }
    
    .nav-links a {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }
}

/* 6. MÓVIL - MANTENER NAVEGACIÓN HAMBURGUESA */
@media (max-width: 768px) {
    .logo {
        font-size: 1rem !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    .nav-links {
        display: none !important;
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        background: var(--primary-gray) !important;
        flex-direction: column !important;
        padding: 20px !important;
        border: 1px solid var(--border-color) !important;
        border-top: none !important;
        z-index: 999 !important;
        gap: 15px !important;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links a {
        width: 100% !important;
        text-align: center !important;
        padding: 12px !important;
        font-size: 1rem !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: none !important;
        border: none !important;
        color: var(--text-white) !important;
        font-size: 1.5rem !important;
        cursor: pointer !important;
        padding: 8px !important;
    }
}

/* 7. PANTALLAS PEQUEÑAS - LOGO MÁS CORTO */
@media (max-width: 480px) {
    .logo {
        font-size: 0.9rem !important;
    }
    
    /* Opción de mostrar solo iniciales en pantallas muy pequeñas */
    .logo.compact::after {
        content: "" !important;
    }
    
    .logo.compact {
        content: "C.I.S." !important;
    }
}

/* 8. BOTONES DE IDIOMA Y MODO NOCHE - AJUSTADOS */
.language-switcher {
    display: flex !important;
    gap: 5px !important;
    align-items: center !important;
    margin-left: 10px !important;
    flex-shrink: 0 !important;
}

.language-btn {
    background: var(--primary-gray) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-gray) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 35px !important;
}

.dark-mode-toggle {
    background: none !important;
    border: 2px solid var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    padding: 6px 8px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
}

/* 9. NAVEGACIÓN PRINCIPAL - CONTENEDOR */
nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 1000 !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    min-height: 60px !important;
}

.container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* 10. AJUSTES ESPECÍFICOS PARA EVITAR SUPERPOSICIÓN */
@media (max-width: 1100px) and (min-width: 769px) {
    /* En este rango crítico, hacer ajustes específicos */
    .nav-links a {
        font-size: 0.8rem !important;
        padding: 4px 6px !important;
    }
    
    .nav-links {
        gap: 8px !important;
    }
    
    .logo {
        font-size: 1rem !important;
    }
    
    .language-btn {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
        min-width: 30px !important;
    }
    
    .dark-mode-toggle {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
}

/* 11. MODO CLARO - NAVEGACIÓN */
:root.light-mode nav {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: #e0e0e0 !important;
}

:root.light-mode .nav-links a:hover,
:root.light-mode .nav-links a.active {
    background: rgba(212, 175, 55, 0.15) !important;
}

/* 12. DEBUGGING - REMOVER EN PRODUCCIÓN */
/*
.nav-container {
    border: 1px solid red !important;
}
.logo {
    border: 1px solid blue !important;
}
.nav-links {
    border: 1px solid green !important;
}
*/
/* ========================================
   INTEGRACIÓN SUBSTACK - AÑADIR AL FINAL DE style.css
======================================== */

/* Contenedor del iframe de Substack */
.newsletter-substack-embed {
    margin: 30px auto 20px;
    max-width: 480px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.newsletter-substack-embed-large {
    margin: 20px auto;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Iframe de Substack responsive */
.newsletter-substack-embed iframe,
.newsletter-substack-embed-large iframe {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    border-radius: 8px !important;
}

/* Formulario personalizado como fallback */
.newsletter-custom-form,
.newsletter-custom-form-hero {
    margin: 20px auto;
    max-width: 480px;
}

.newsletter-custom-form .newsletter-form,
.newsletter-custom-form-hero .newsletter-form-hero {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.newsletter-custom-form .newsletter-input,
.newsletter-custom-form-hero .newsletter-input-hero {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
}

.newsletter-custom-form .newsletter-input::placeholder,
.newsletter-custom-form-hero .newsletter-input-hero::placeholder {
    color: #666;
}

.newsletter-custom-form .newsletter-btn-white,
.newsletter-custom-form-hero .btn {
    padding: 12px 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .newsletter-substack-embed,
    .newsletter-substack-embed-large {
        margin-left: 10px;
        margin-right: 10px;
        max-width: calc(100% - 20px);
    }
    
    .newsletter-custom-form .newsletter-form,
    .newsletter-custom-form-hero .newsletter-form-hero {
        flex-direction: column;
        gap: 12px;
    }
    
    .newsletter-custom-form .newsletter-input,
    .newsletter-custom-form-hero .newsletter-input-hero,
    .newsletter-custom-form .newsletter-btn-white,
    .newsletter-custom-form-hero .btn {
        width: 100%;
    }
}

/* Estilos para modo claro */
:root.light-mode .newsletter-substack-embed,
:root.light-mode .newsletter-substack-embed-large {
    background: #f8f9fa;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

:root.light-mode .newsletter-custom-form .newsletter-form,
:root.light-mode .newsletter-custom-form-hero .newsletter-form-hero {
    background: rgba(0, 0, 0, 0.05);
}

/* Toggle entre iframe y formulario personalizado */
.use-custom-form .newsletter-substack-embed,
.use-custom-form .newsletter-substack-embed-large {
    display: none !important;
}

.use-custom-form .newsletter-custom-form,
.use-custom-form .newsletter-custom-form-hero {
    display: block !important;
}

/* Animaciones */
.newsletter-substack-embed,
.newsletter-substack-embed-large {
    transition: all 0.3s ease;
}

.newsletter-substack-embed:hover,
.newsletter-substack-embed-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}