/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
}

.section-title span {
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Navegación */
nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px; /* Espacio reducido */
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}

.logo span {
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* BARRA DE BÚSQUEDA - TAMAÑO ADECUADO */
.search-container {
    flex: 1; /* Ocupa el espacio disponible */
    max-width: 350px; /* Tamaño adecuado */
    margin: 0 15px;
}

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

.search-icon {
    position: absolute;
    right: 12px;
    color: #666;
    z-index: 1;
    cursor: pointer;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* QUITAR LA "X" DEL INPUT */
.search-input::-webkit-search-cancel-button,
.search-input::-ms-clear,
.search-input::-webkit-clear-button {
    display: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.search-input:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.1);
}

.clear-search-btn {
    display: none;
}

/* Menú de navegación - Ajustado para no salirse */
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px; /* Espacio reducido */
    flex-shrink: 0;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
}

nav ul li a:hover {
    color: #e63946;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e63946;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.logo-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e63946;
    transition: border 0.3s ease;
}

.dark-mode .logo-img {
    border: 2px solid #fff;
}

/* Botones de navegación - Ajustados */
.nav-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.translate-btn {
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.translate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(230, 57, 70, 0.2);
}

.dark-mode-btn {
    background: linear-gradient(90deg, #1d3557 0%, #457b9d 100%);
}

.dark-mode-btn:hover {
    box-shadow: 0 3px 8px rgba(29, 53, 87, 0.2);
}

.translate-btn i {
    font-size: 0.9rem;
}

.lang-icon {
    font-size: 1rem;
}

/* ===== SUBMENÚ "MÁS" - PERFECTAMENTE ALINEADO ===== */
.nav-more {
    position: relative;
    display: inline-block;
}

.more-toggle {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 0; /* EXACTAMENTE igual que Contacto */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

/* Línea inferior igual que otros enlaces */
.more-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e63946;
    transition: width 0.3s ease;
}

.nav-more:hover .more-toggle::after {
    width: 100%;
}

/* Flechita pequeña - alineada verticalmente */
.more-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Dropdown - Simple y discreto */
.more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff; /* BLANCO PURO pero suave */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Sombra más suave */
    border-radius: 10px; /* Bordes más redondeados */
    min-width: 200px; /* Un poco más ancho */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transición más suave */
    z-index: 1000;
    padding: 10px 0; /* Más padding */
    border: 1px solid #f0f0f0; /* Borde más suave */
}

/* Mostrar al hover */
.nav-more:hover .more-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px); /* Menos desplazamiento */
}

.nav-more:hover .more-arrow {
    transform: rotate(180deg);
}

/* Enlaces del dropdown - MODO CLARO (COLORES MÁS SUAVES) */
.more-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px; /* Más espacio entre icono y texto */
    padding: 12px 20px; /* Más padding */
    color: #444444; /* GRIS OSCURO SUAVE en lugar de negro puro */
    text-decoration: none;
    font-size: 0.9rem; /* Un poco más grande */
    font-weight: 500; /* Texto un poco más grueso */
    transition: all 0.25s ease;
    border-radius: 6px; /* Bordes redondeados en los items */
    margin: 0 8px; /* Margen lateral */
    width: calc(100% - 16px); /* Ancho completo menos margen */
}

.more-dropdown a:hover {
    background: linear-gradient(90deg, rgba(230, 57, 70, 0.08) 0%, rgba(255, 107, 107, 0.08) 100%);
    color: #e63946; /* Rojo al hacer hover */
    transform: translateX(4px); /* Pequeño desplazamiento a la derecha */
}

.more-dropdown a i {
    width: 18px; /* Iconos un poco más grandes */
    text-align: center;
    font-size: 1rem;
    color: #e63946; /* Rojo para iconos */
    transition: transform 0.3s ease;
}

.more-dropdown a:hover i {
    transform: scale(1.1); /* Icono crece ligeramente al hover */
}

/* ===== MODO OSCURO - COLORES SUAVES Y ELEGANTES ===== */
body.dark-mode .nav-more .more-dropdown {
    background: #1e1e2e !important; /* AZUL OSCURO ELEGANTE (no negro puro) */
    border: 1px solid #2d3748 !important; /* Borde gris azulado */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important; /* Sombra más pronunciada */
}

body.dark-mode .nav-more .more-dropdown a {
    color: #e2e8f0 !important; /* GRIS CLARO SUAVE (no blanco puro) */
}

body.dark-mode .nav-more .more-dropdown a:hover {
    background: linear-gradient(90deg, rgba(230, 57, 70, 0.15) 0%, rgba(255, 107, 107, 0.15) 100%) !important;
    color: #ff6b6b !important; /* Rojo más claro en hover */
    transform: translateX(4px) !important;
}

body.dark-mode .nav-more .more-dropdown a i {
    color: #ff6b6b !important; /* Rojo claro para iconos en modo oscuro */
}

/* Separador entre items (opcional, más elegante) */
.more-dropdown a:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
}

body.dark-mode .nav-more .more-dropdown a:not(:last-child) {
    border-bottom: 1px solid #2d3748 !important;
}

/* ===== AJUSTE PARA ALINEAR "MÁS" CON LOS DEMÁS ===== */
/* Solo este pequeño ajuste para alinear verticalmente */
nav ul li {
    display: flex;
    align-items: center;
}

.nav-more {
    display: flex;
    align-items: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    nav .container {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .search-container {
        flex: 1;
        max-width: 300px;
        margin: 0 10px;
    }
    
    nav ul {
        gap: 12px;
    }
    
    nav ul li a {
        font-size: 0.9rem;
    }
    
    .translate-btn {
        padding: 7px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    nav .container {
        gap: 10px;
    }
    
    .search-container {
        max-width: 250px;
    }
    
    nav ul {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .logo h2 span {
        display: none;
    }
    
    .search-container {
        display: none;
    }
    
    .dark-mode-text, .lang-text {
        display: none;
    }
    
    .translate-btn {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .translate-btn i, .lang-icon {
        margin: 0;
    }
    
    /* Menú "Más" en móvil */
    .nav-more {
        width: auto;
    }
    
    .more-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: 180px;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 8px;
    }
    
    nav ul li a {
        font-size: 0.85rem;
        padding: 4px 0;
    }
    
    .more-toggle {
        font-size: 0.85rem;
        padding: 4px 0; /* Ajustado para móvil */
    }
    
    .more-dropdown {
        min-width: 160px;
    }
}

/* Hero Section */
.hero {
    padding-top: 150px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.highlight {
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #555;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-photo {
    width: 300px;        /* tamaño de la imagen */
    height: 300px;       /* altura igual para mantener proporción */
    object-fit: cover;   /* recorta si es necesario */
    border-radius: 30%;  /* imagen circular */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* sombra suave */
}


/* About Section */
.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.about-text {
    flex: 0 0 100%;   /* ocupa todo el ancho */
    max-width: 950px; /* ancho máximo para que no se vea demasiado largo */
    margin: 0 auto;   /* lo centra dentro del contenedor */
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-image {
    flex: 0 0 40%;
}

.skills {
    margin: 30px 0;
}

.skills h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.skill-list span {
    padding: 8px 20px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* ====== Sección Lenguajes de Programación ====== */
.habilidad-titulo {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 2rem auto 1.5rem auto;
  color: #e63946;
  text-transform: uppercase;
  text-align: center;
  margin-left: 100px; /* mismo desplazamiento que el grid */
}

.skills-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
  margin-left: 110px;
  transform: translateX(-10px); /* mueve todo 50px a la izquierda */
}

/* Tarjetas estilo neon */
.skill-card {
    width: 150px;               /* Mismo ancho para todas */
    background: #ece0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}


/* Projects Section */
.projects {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* ahora 2 columnas en pantallas grandes */
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

/* 🔹 Ajuste para imágenes */
.project-image {
    width: 100%;
    height: 200px; /* puedes subir a 250px si quieres más grandes */
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* recorta la imagen sin deformarla */
    display: block;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.project-info p {
    margin-bottom: 15px;
    color: #666;
}

.project-link {
    color: #e63946;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.project-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(5px);
}
/* ================================
   VARIABLES DE COLOR
   ================================ */
:root {
    --modal-section-bg: #ffffff;     /* Fondo en modo claro */
    --modal-section-text: #333;
    --modal-section-border: #e63946;
}

[data-theme="dark"],
.dark-mode {
    --modal-section-bg: #2b2b2b;     /* Fondo en modo oscuro */
    --modal-section-text: #ddd;
    --modal-section-border: #e63946;
}

/* ================================
   ESTILO DE CADA SECCIÓN DEL MODAL
   ================================ */
#projectModal .detail-section {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--modal-section-bg);     /* Ahora cambia según tema */
    color: var(--modal-section-text);
    border-radius: 10px;
    border-left: 4px solid var(--modal-section-border);
    transition: background 0.3s ease, color 0.3s ease;
}

#projectModal .detail-section.full-width {
    margin-top: 10px;
}

/* Títulos */
#projectModal .detail-section h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--modal-section-text);
}

/* Texto interno */
#projectModal .detail-section p,
#projectModal .detail-section ul {
    color: var(--modal-section-text);
    line-height: 1.6;
}

/* Lista solución */
#modalSolution li {
    margin-bottom: 6px;
}

/* ===== SECCIÓN CONTACTO ACTUALIZADA ===== */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

[data-theme="dark"] .contact {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

/* Contenedor principal */
.contact-content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    align-items: flex-start;
}

/* Columna izquierda - Información de contacto */
.contact-info {
    flex: 0 0 45%;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .contact-info {
    background: var(--card-bg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(230, 57, 70, 0.12);
}

/* Decoración de esquina */
.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1) 0%, transparent 100%);
    border-radius: 0 20px 0 0;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

[data-theme="dark"] .contact-info h3 {
    color: var(--text-color);
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 2px;
}

.contact-info p {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.7;
    font-size: 1.1rem;
}

[data-theme="dark"] .contact-info p {
    color: #b0b0b0;
}

/* Detalles de contacto - MEJORADO */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 35px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #fff;
    padding: 18px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

[data-theme="dark"] .contact-item {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left-color: #e63946;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

[data-theme="dark"] .contact-item:hover {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15) 0%, rgba(255, 107, 107, 0.1) 100%);
}

.contact-item i {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.contact-item p {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

[data-theme="dark"] .contact-item p {
    color: var(--text-color);
}

/* Enlaces sociales - MEJORADOS */
.social-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
    justify-content: center;
}

[data-theme="dark"] .social-links {
    border-top: 2px solid #404040;
}

.social-links a {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-links a:hover::before {
    width: 120px;
    height: 120px;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(230, 57, 70, 0.5);
}

.social-links a i {
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.social-links a:hover i {
    transform: rotate(15deg) scale(1.2);
}

/* Estilos específicos para cada red social */
.social-links a[href*="linkedin"] {
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
    box-shadow: 0 6px 20px rgba(0, 119, 181, 0.3);
}

.social-links a[href*="linkedin"]:hover {
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.5);
}

.social-links a[href*="github"] {
    background: linear-gradient(135deg, #333 0%, #666 100%);
    box-shadow: 0 6px 20px rgba(51, 51, 51, 0.3);
}

.social-links a[href*="github"]:hover {
    box-shadow: 0 10px 30px rgba(51, 51, 51, 0.5);
}

/* Columna derecha - Formulario */
.contact-form-container {
    flex: 0 0 50%;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.contact-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .contact-form {
    background: var(--card-bg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(230, 57, 70, 0.12);
}

/* Grupos de inputs */
.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .input-group label {
    color: var(--text-color);
}

.input-group:hover label {
    color: #e63946;
}

/* Contenedor de inputs con iconos */
.input-icon {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
}

[data-theme="dark"] .input-icon {
    background: rgba(255, 255, 255, 0.05);
    border-color: #404040;
}

.input-icon:hover,
.input-icon:focus-within {
    border-color: #e63946;
    background: #fff;
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.08);
}

[data-theme="dark"] .input-icon:hover,
[data-theme="dark"] .input-icon:focus-within {
    background: rgba(255, 255, 255, 0.08);
}

.input-icon i {
    position: absolute;
    left: 18px;
    color: #6c757d;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-icon:hover i,
.input-icon:focus-within i {
    color: #e63946;
}

/* Inputs y textarea */
.input-icon input,
.input-icon textarea {
    flex: 1;
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

[data-theme="dark"] .input-icon input,
[data-theme="dark"] .input-icon textarea {
    color: var(--text-color);
}

.input-icon input::placeholder,
.input-icon textarea::placeholder {
    color: #adb5bd;
    font-size: 0.95rem;
}

[data-theme="dark"] .input-icon input::placeholder,
[data-theme="dark"] .input-icon textarea::placeholder {
    color: #777;
}

/* Textarea específico */
.input-icon.textarea-icon {
    align-items: flex-start;
}

.input-icon.textarea-icon i {
    margin-top: 18px;
}

.input-icon textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Botón de enviar */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.3);
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-submit:hover i {
    transform: translateX(5px) rotate(10deg);
}

/* Mensajes Flash */
.flash-messages {
    margin-top: 25px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    animation: slideDown 0.3s ease;
    display: none;
}

.flash-messages.show {
    display: block;
}

.flash-messages.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #c3e6cb;
}

[data-theme="dark"] .flash-messages.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 69, 0.1) 100%);
    color: #d4edda;
    border-color: rgba(40, 167, 69, 0.3);
}

.flash-messages.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f5c6cb;
}

[data-theme="dark"] .flash-messages.error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #f8d7da;
    border-color: rgba(220, 53, 69, 0.3);
}

.flash-messages p {
    margin: 0;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.flash-messages i {
    font-size: 1.1rem;
}

/* Validación visual */
.input-icon.valid {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, rgba(212, 237, 218, 0.1) 100%);
}

.input-icon.valid i {
    color: #28a745;
}

.input-icon.invalid {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, rgba(248, 215, 218, 0.1) 100%);
}

.input-icon.invalid i {
    color: #dc3545;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.input-icon.shake {
    animation: shake 0.5s ease;
}

/* Efecto de pulse en iconos de contacto */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 57, 70, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    }
}

.contact-item i {
    animation: pulse 2s infinite;
}

.contact-item:nth-child(2) i {
    animation-delay: 1s;
}

.contact-item:hover i {
    animation: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .contact-content {
        flex-direction: column;
        gap: 50px;
    }
    
    .contact-info,
    .contact-form {
        flex: 0 0 100%;
        width: 100%;
    }
    
    .contact-info {
        padding: 35px;
    }
    
    .contact-form {
        padding: 35px;
    }
    
    .contact-info h3 {
        font-size: 1.6rem;
    }
    
    .social-links {
        margin-top: 35px;
        padding-top: 35px;
    }
    
    .social-links a {
        width: 55px;
        height: 55px;
    }
    
    .social-links a i {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 80px 0;
    }
    
    .contact-info,
    .contact-form {
        padding: 30px;
    }
    
    .contact-details {
        gap: 20px;
    }
    
    .contact-item {
        padding: 15px;
        gap: 15px;
    }
    
    .contact-item i {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .contact-item p {
        font-size: 0.95rem;
    }
    
    .social-links {
        margin-top: 30px;
        padding-top: 30px;
        gap: 15px;
    }
    
    .social-links a {
        width: 50px;
        height: 50px;
    }
    
    .social-links a i {
        font-size: 1.3rem;
    }
    
    .input-icon input,
    .input-icon textarea {
        padding: 14px 18px 14px 45px;
        font-size: 0.95rem;
    }
    
    .btn-submit {
        padding: 16px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .contact {
        padding: 60px 0;
    }
    
    .contact-info,
    .contact-form {
        padding: 25px 20px;
    }
    
    .contact-info h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .contact-info p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .contact-item:hover {
        transform: translateY(-5px);
    }
    
    .contact-item i {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .social-links a {
        width: 55px;
        height: 55px;
    }
    
    .social-links a i {
        font-size: 1.4rem;
    }
    
    .input-icon i {
        left: 15px;
        font-size: 1rem;
    }
    
    .input-icon input,
    .input-icon textarea {
        padding: 13px 15px 13px 40px;
    }
    
    .btn-submit {
        flex-direction: column;
        gap: 8px;
        padding: 14px;
    }
    
    .btn-submit i {
        font-size: 1.1rem;
    }
    
    .flash-messages p {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .contact-info h3 {
        font-size: 1.3rem;
    }
    
    .contact-item {
        padding: 18px 15px;
    }
    
    .social-links a {
        width: 60px;
        height: 60px;
    }
    
    .social-links a i {
        font-size: 1.5rem;
    }
    
    .btn-submit {
        padding: 12px;
    }
}

/* Efecto de carga en botón */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container,
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .hero-content, 
    .hero-image,
    .about-text,
    .about-image,
    .contact-info,
    .contact-form {
        flex: 0 0 100%;
        width: 100%;
    }
    
    .hero-image,
    .about-image {
        margin-top: 50px;
    }
    
    .contact-form {
        margin-top: 50px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr; /* en móvil se ve solo una columna */
    }
}
/* === ANIMACIONES SUAVES EN EL PORTAFOLIO === */

/* Animación de aparición al hacer scroll */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Suaviza las transiciones globales */
* {
  transition: all 0.3s ease;
}

/* Animación inicial al cargar */
body.page-loaded {
  animation: fadeInBody 1s ease forwards;
}

@keyframes fadeInBody {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Efecto flotante leve en botones al pasar el mouse */
.btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Animación sutil en títulos */
.section-title {
  transition: all 0.8s ease;
}

.section-title.visible {
  letter-spacing: 1px;
}
/* ===== BOTÓN DE TRADUCCIÓN ===== */
.translate-btn {
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
    outline: none;
    position: relative;
    overflow: hidden;
}

/* Ícono del botón */
.lang-icon {
    font-size: 1.2rem;
    transition: transform 0.4s ease, text-shadow 0.3s ease;
}

/* Texto del idioma */
.lang-text {
    letter-spacing: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hover animado */
.translate-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5);
}

.translate-btn:hover .lang-icon {
    transform: rotate(360deg);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Active */
.translate-btn:active {
    transform: scale(0.95);
}

/* Siempre mantiene el mismo estilo aunque cambie el idioma */
.translate-btn:focus,
.translate-btn:focus-visible {
    outline: none;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
}

/* Evita que los estilos desaparezcan tras actualización */
.translate-btn * {
    color: inherit;
}

/* === MARCA PERSONAL - VERSIÓN FINAL AJUSTADA === */
.marca-personal {
  background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
  padding: 80px 0;
  text-align: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);

  /* 🔹 NUEVO: baja toda la franja */
  margin-top: 60px; /* puedes ajustar el valor (40px, 80px, etc.) */
}

/* Contenido centrado */
.marca-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

/* Imagen del logo */
.marca-logo img {
  width: 240px; /* 🔸 Más grande */
  height: 240px;
  object-fit: contain; /* 🔸 se ve completa sin recorte */
  border-radius: 50%;
  background-color: #fff;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marca-logo img:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Texto */
.marca-texto .frase {
  font-style: italic;
  font-size: 1.3rem;
  color: #444;
  margin-bottom: 12px;
}

.marca-texto .autor {
  color: #e63946;
  font-weight: 600;
  font-size: 1.05rem;
}

/* 🔹 Línea roja decorativa más ancha */
.marca-personal .section-title::after {
  content: '';
  display: block;
  width: 50%;
  max-width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
  margin: 15px auto 0 auto;
  border-radius: 10px;
}

/* Responsivo */
@media (max-width: 768px) {
  .marca-logo img {
    width: 180px;
    height: 180px;
  }

  .marca-texto .frase {
    font-size: 1.1rem;
  }
}

/* ===== MODAL DE PROYECTOS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    color: #333;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 10;
}

.close-modal:hover {
    color: #e63946;
}

.project-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.detail-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #e63946;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.btn-github {
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ===== ESTILOS PARA LAS NUEVAS SECCIONES ===== */
.solution-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.solution-list li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.solution-list li:last-child {
    border-bottom: none;
}

.solution-list li:hover {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    padding-left: 35px;
}

.solution-list li:before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

/* Estilos específicos para los íconos de las nuevas secciones */
.detail-section h3 i.fa-exclamation-triangle {
    color: #ff9800;
}

.detail-section h3 i.fa-check-circle {
    color: #4CAF50;
}

.detail-section h3 i.fa-chart-line {
    color: #2196F3;
}

.detail-section p {
    line-height: 1.6;
    margin: 0;
    color: #555;
}

.detail-section h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

/* Efectos hover para todas las secciones */
.detail-section {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .project-details-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-list li {
        padding: 10px 0;
        padding-left: 35px;
    }
    
    .solution-list li:before {
        left: 15px;
    }
    
    .detail-section h3 {
        font-size: 1rem;
    }
    
    .detail-section h3 i {
        font-size: 0.9rem;
    }
}

/* ===== HABILIDADES MEJORADAS - ESTILOS SUPER SEGUROS ===== */
/* Solo elementos específicos dentro de .about .skills */
.about .skills > h3[data-i18n="skillsTitulo"] {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

.about .skills h4[data-i18n="skillsFuertes"],
.about .skills h4[data-i18n="skillsBlandas"] {
    font-size: 1.3rem;
    margin: 30px 0 20px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffeaea;
    display: block;
}

.about .skills h4 i {
    color: #e63946;
}
/* Separación mejorada entre galería y botón */
.project-gallery {
    margin-bottom: 30px;
}

.modal-actions {
    margin-top: 35px;
    padding-top: 25px;
    text-align: center;
    position: relative;
}

/* Línea separadora elegante (opcional) */
.modal-actions::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(230, 57, 70, 0.3), 
        transparent
    );
}

/* Mejora el botón */
.btn-github {
    margin-top: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-github:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

/* Responsive para la separación */
@media (max-width: 768px) {
    .project-gallery {
        margin-bottom: 25px;
    }
    
    .modal-actions {
        margin-top: 30px;
        padding-top: 20px;
    }
}
/* Mejora las listas existentes SIN cambiar estructura */
.about .skills ul:first-of-type {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.about .skills ul:first-of-type li {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    border-left: 4px solid #e63946;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.about .skills ul:first-of-type li:hover {
    transform: translateX(8px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.15);
}

.about .skills ul:first-of-type li::before {
    content: '✓';
    color: #e63946;
    font-weight: bold;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.about .skills ul:first-of-type li span {
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* Segunda lista (habilidades blandas) */
.about .skills ul:last-of-type {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.about .skills ul:last-of-type li {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    border-left: 4px solid #e63946;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.about .skills ul:last-of-type li:hover {
    transform: translateX(8px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.15);
}

.about .skills ul:last-of-type li::before {
    content: '✓';
    color: #e63946;
    font-weight: bold;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.about .skills ul:last-of-type li span {
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}
/* ===== BOTONES DE NAVEGACIÓN ===== */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botón de modo oscuro con estilo rojo como traducción */
.dark-mode-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    outline: none;
    position: relative;
    overflow: hidden;
}

/* Ícono del botón */
.dark-mode-btn i {
    font-size: 1.2rem;
    transition: transform 0.4s ease, text-shadow 0.3s ease;
}

/* Texto del modo */
.dark-mode-text {
    letter-spacing: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hover animado */
.dark-mode-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.dark-mode-btn:hover i {
    transform: rotate(360deg);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Active */
.dark-mode-btn:active {
    transform: scale(0.95);
}

/* Estados del botón en modo oscuro */
[data-theme="dark"] .dark-mode-btn {
    background: linear-gradient(135deg, #ff8e8e 0%, #ff6b6b 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

[data-theme="dark"] .dark-mode-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

[data-theme="dark"] .dark-mode-btn i::before {
    content: "\f185"; /* Icono de sol */
}

/* ===== MODO OSCURO ===== */
[data-theme="dark"] {
    /* Colores modo oscuro */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --nav-bg: #2d2d2d;
    --hero-bg: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    --projects-bg: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    --border-color: #404040;
    --skill-card-bg: #3d3d3d;
    --marca-bg: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] nav {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero {
    background: var(--hero-bg);
}

[data-theme="dark"] .projects {
    background: var(--projects-bg);
}

[data-theme="dark"] .marca-personal {
    background: var(--marca-bg);
}

[data-theme="dark"] .project-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .contact-item,
[data-theme="dark"] .skill-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .project-info h3,
[data-theme="dark"] .about-text p,
[data-theme="dark"] .contact-info h3,
[data-theme="dark"] .contact-info p,
[data-theme="dark"] .marca-texto .frase,
[data-theme="dark"] .contact-item p {
    color: var(--text-color);
}

[data-theme="dark"] .detail-section,
[data-theme="dark"] .about .skills ul:first-of-type li,
[data-theme="dark"] .about .skills ul:last-of-type li {
    background: var(--skill-card-bg);
}

[data-theme="dark"] .close-modal {
    color: var(--text-color);
}

[data-theme="dark"] .close-modal:hover {
    color: #e63946;
}

[data-theme="dark"] footer {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

[data-theme="dark"] .project-info p,
[data-theme="dark"] .about-text p,
[data-theme="dark"] .contact-info p {
    color: #b0b0b0;
}

/* Mantener los gradientes de texto */
[data-theme="dark"] .highlight,
[data-theme="dark"] .section-title span,
[data-theme="dark"] .logo span {
    background: linear-gradient(90deg, #e63946 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .marca-texto .autor {
    color: #e63946;
}

/* ===== CORRECCIÓN ESPECÍFICA PARA NAVEGACIÓN Y HABILIDADES ===== */
/* Navegación - selectores exactos basados en tu HTML */
[data-theme="dark"] nav ul li a,
[data-theme="dark"] nav a {
    color: #e0e0e0 !important;
}

[data-theme="dark"] nav ul li a:hover {
    color: #e63946 !important;
}

/* Habilidades - selectores exactos basados en tu HTML */
[data-theme="dark"] .about .skills h4,
[data-theme="dark"] .about .skills h4[data-i18n="skillsFuertes"],
[data-theme="dark"] .about .skills h4[data-i18n="skillsBlandas"] {
    color: #e0e0e0 !important;
}

/* También asegurar los elementos de lista de habilidades */
[data-theme="dark"] .about .skills ul li {
    color: #e0e0e0 !important;
}

/* Ajustes para habilidades */
[data-theme="dark"] .skills h3,
[data-theme="dark"] .skills h4,
[data-theme="dark"] .habilidad-titulo {
    color: var(--text-color);
}

[data-theme="dark"] .about .skills ul:first-of-type li::before,
[data-theme="dark"] .about .skills ul:last-of-type li::before {
    color: #e63946;
}

[data-theme="dark"] .about .skills ul:first-of-type li span,
[data-theme="dark"] .about .skills ul:last-of-type li span {
    color: var(--text-color);
}

/* Ajustes para el modal en modo oscuro */
[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .project-header h2 {
    color: var(--text-color);
}

[data-theme="dark"] .detail-section h3 {
    color: var(--text-color);
}

[data-theme="dark"] .detail-section p {
    color: #b0b0b0;
}

[data-theme="dark"] .project-gallery h3 {
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-buttons {
        gap: 8px;
    }
    
    .dark-mode-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
/* Ajustes para habilidades */
[data-theme="dark"] .skills h3,
[data-theme="dark"] .skills h4,
[data-theme="dark"] .habilidad-titulo {
    color: var(--text-color);
}

[data-theme="dark"] .about .skills ul:first-of-type li::before,
[data-theme="dark"] .about .skills ul:last-of-type li::before {
    color: #e63946;
}

[data-theme="dark"] .about .skills ul:first-of-type li span,
[data-theme="dark"] .about .skills ul:last-of-type li span {
    color: var(--text-color);
}

/* Ajustes para el modal en modo oscuro */
[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .project-header h2 {
    color: var(--text-color);
}

[data-theme="dark"] .detail-section h3 {
    color: var(--text-color);
}

[data-theme="dark"] .detail-section p {
    color: #b0b0b0;
}

[data-theme="dark"] .project-gallery h3 {
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-buttons {
        gap: 8px;
    }
    
    .dark-mode-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* ===== ESTILOS PARA PREMIOS Y RECONOCIMIENTOS CON CARRUSEL ===== */
.premios {
    padding: 80px 0;
    background: #f9f9f9;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .premios {
    background: var(--bg-color);
}

.premios-carrusel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
}

.carrusel-container {
    overflow: hidden;
    border-radius: 20px;
    background: white;
    position: relative;
}

[data-theme="dark"] .carrusel-container {
    background: var(--card-bg);
}

/* ELIMINAR: .premio-card:not(:first-child) { display: none; } */

.carrusel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%; /* Ancho total */
}

.premio-card {
    flex: 0 0 100%; /* CADA TARJETA OCUPA EL 100% DEL VIEWPORT */
    min-width: 100%;
    max-width: 100%;
    display: flex; /* TODAS LAS TARJETAS VISIBLES EN EL FLOW */
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .premio-card {
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.premio-imagen {
    flex: 0 0 55%;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.premio-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.premio-card:hover .premio-imagen img {
    transform: scale(1.03);
}

.premio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(230, 57, 70, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.premio-imagen:hover .premio-overlay {
    opacity: 1;
}

.premio-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.premio-imagen:hover .premio-overlay i {
    transform: scale(1);
}

.premio-content {
    flex: 0 0 45%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

[data-theme="dark"] .premio-content {
    background: rgba(45, 45, 45, 0.8);
}

.premio-desc {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: justify;
}

[data-theme="dark"] .premio-desc {
    color: #b0b0b0;
}

.ver-diploma-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.ver-diploma-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

/* Botones del carrusel */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
    z-index: 20;
    border: 3px solid white;
}

[data-theme="dark"] .carrusel-btn {
    border: 3px solid var(--card-bg);
}

.carrusel-btn:hover {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.6);
}

.carrusel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carrusel-btn:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Indicadores del carrusel */
.carrusel-indicadores {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.indicador {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.indicador.active {
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    transform: scale(1.3);
    border-color: #e63946;
}

.indicador:hover {
    background: #e63946;
    transform: scale(1.2);
}

/* Modal para diploma */
.diploma-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.diploma-modal-content {
    background: white;
    border-radius: 15px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

[data-theme="dark"] .diploma-modal-content {
    background: var(--card-bg);
}

.close-diploma-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    background: rgba(230, 57, 70, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-diploma-modal:hover {
    background: rgba(230, 57, 70, 1);
    transform: rotate(90deg);
}

.diploma-modal-body {
    display: flex;
    flex-direction: column;
}

.diploma-modal-body img {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 10px 10px 0 0;
    padding: 20px;
}

.diploma-modal-info {
    padding: 25px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 0 0 10px 10px;
}

[data-theme="dark"] .diploma-modal-info {
    background: rgba(45, 45, 45, 0.5);
}

.diploma-modal-info h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

[data-theme="dark"] .diploma-modal-info h3 {
    color: var(--text-color);
}

#diplomaModalDate {
    color: #e63946;
    font-weight: 600;
    margin-bottom: 15px;
}

#diplomaModalDesc {
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

[data-theme="dark"] #diplomaModalDesc {
    color: #b0b0b0;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .premios-carrusel {
        padding: 0 70px;
    }
}

@media (max-width: 992px) {
    .premio-card {
        flex-direction: column;
        max-height: none;
    }
    
    .premio-imagen {
        flex: 0 0 300px;
        min-height: 300px;
    }
    
    .premio-content {
        flex: 1;
        padding: 30px;
    }
    
    .ver-diploma-btn {
        align-self: center;
    }
    
    .carrusel-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .prev-btn {
        left: 5px;
    }
    
    .next-btn {
        right: 5px;
    }
}

@media (max-width: 768px) {
    .premios-carrusel {
        padding: 0 50px;
    }
    
    .carrusel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .premio-content {
        padding: 25px;
    }
    
    .premio-desc {
        font-size: 1rem;
        text-align: left;
    }
    
    .ver-diploma-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .premio-imagen {
        min-height: 250px;
    }
}

@media (max-width: 576px) {
    .premios {
        padding: 60px 0;
    }
    
    .premios-carrusel {
        padding: 0 40px;
    }
    
    .carrusel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .premio-imagen {
        flex: 0 0 200px;
        min-height: 200px;
    }
    
    .premio-content {
        padding: 20px;
    }
    
    .carrusel-indicadores {
        margin-top: 30px;
        gap: 12px;
    }
    
    .indicador {
        width: 12px;
        height: 12px;
    }
}

/* ===== AGRANDAR DIPLOMA EN EL MODAL ===== */
/* Aumentar ancho del modal */
.diploma-modal-content {
    max-width: 1200px !important;  /* Antes 900px */
    max-height: 95vh !important;   /* Más alto */
}

/* Hacer la imagen del diploma mucho más grande */
.diploma-modal-body img {
    max-height: 82vh !important;   /* Antes 65vh */
    padding: 10px !important;      /* Menos margen alrededor */
}

/* Hacer el modal más cómodo visualmente */
.diploma-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;  /* Centra el diploma */
}

/* Texto más grande y mejor distribuido */
.diploma-modal-info {
    padding: 35px !important;
}

.diploma-modal-info h3 {
    font-size: 1.7rem !important;
}

#diplomaModalDesc {
    font-size: 1.2rem !important;
    line-height: 1.9 !important;
}

/* ===== ESTILOS PARA MIS INTERESES ===== */
.intereses {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

[data-theme="dark"] .intereses {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

.intereses-carrusel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 70px;
}

.intereses-container {
    overflow: hidden;
    border-radius: 20px;
    padding: 20px 0;
}

.intereses-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
}

.interes-card {
    flex: 0 0 calc(50% - 15px); /* 2 tarjetas por fila (- gap) */
    min-width: calc(50% - 15px);
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    border-left: 4px solid #e63946;
}

[data-theme="dark"] .interes-card {
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.interes-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(230, 57, 70, 0.15);
}

[data-theme="dark"] .interes-card:hover {
    box-shadow: 0 15px 40px rgba(230, 57, 70, 0.25);
}

.interes-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

.interes-icon i {
    font-size: 28px;
    color: white;
}

.interes-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .interes-card h3 {
    color: var(--text-color);
}

.interes-desc {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    text-align: justify;
}

[data-theme="dark"] .interes-desc {
    color: #b0b0b0;
}

/* Botones del carrusel */
.carrusel-intereses-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
    z-index: 10;
    border: 3px solid white;
}

[data-theme="dark"] .carrusel-intereses-btn {
    border: 3px solid var(--card-bg);
}

.carrusel-intereses-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

.carrusel-intereses-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carrusel-intereses-btn:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.prev-intereses-btn {
    left: 10px;
}

.next-intereses-btn {
    right: 10px;
}

/* Indicadores del carrusel */
.intereses-indicadores {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.interes-indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.interes-indicador.active {
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    transform: scale(1.3);
}

.interes-indicador:hover {
    background: #e63946;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 992px) {
    .interes-card {
        flex: 0 0 calc(50% - 15px);
        min-width: calc(50% - 15px);
    }
    
    .intereses-carrusel {
        padding: 0 60px;
    }
    
    .carrusel-intereses-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .interes-card {
        padding: 30px;
    }
    
    .interes-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .interes-icon i {
        font-size: 24px;
    }
    
    .interes-card h3 {
        font-size: 1.3rem;
        min-height: 55px;
    }
}

@media (max-width: 768px) {
    .intereses-carrusel {
        padding: 0 50px;
    }
    
    .interes-card {
        flex: 0 0 100%; /* 1 tarjeta por fila en móviles */
        min-width: 100%;
    }
    
    .carrusel-intereses-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .prev-intereses-btn {
        left: 5px;
    }
    
    .next-intereses-btn {
        right: 5px;
    }
    
    .interes-card {
        padding: 25px;
    }
    
    .interes-card h3 {
        font-size: 1.2rem;
        min-height: auto;
        margin-bottom: 15px;
    }
    
    .interes-desc {
        font-size: 0.95rem;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .intereses {
        padding: 60px 0;
    }
    
    .intereses-carrusel {
        padding: 0 40px;
    }
    
    .carrusel-intereses-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .interes-card {
        padding: 20px;
    }
    
    .interes-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .interes-icon i {
        font-size: 20px;
    }
    
    .intereses-indicadores {
        margin-top: 30px;
        gap: 12px;
    }
    
    .interes-indicador {
        width: 10px;
        height: 10px;
    }
}

/* === EXPANDIR EL FONDO DE LA SECCIÓN INTERESES A LOS BORDES === */
.intereses {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-top: 80px;
    padding-bottom: 80px;
}

/* ==== ANIMACIÓN ESPECIAL PARA ICONOS ==== */
/* AURA ANIMADA */
.interes-icon {
    position: relative;
    overflow: visible;
}

.interes-icon::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(rgba(255, 90, 90, 0.35), transparent 70%);
    animation: auraAnime 3s infinite ease-in-out;
    z-index: -1;
}

@keyframes auraAnime {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.18);
        opacity: 1;
    }
}

/* PULSO SUAVE DEL ICONO */
.interes-icon i {
    animation: pulseAnime 2.2s infinite ease-in-out;
}

@keyframes pulseAnime {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

/* MICRO REBOTE AL PASAR EL MOUSE */
.interes-icon:hover i {
    animation: bounceAnime 0.5s ease;
}

@keyframes bounceAnime {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-5px); }
    60%  { transform: translateY(3px); }
    100% { transform: translateY(0); }
}

/* ===== ESTILOS PARA TESTIMONIOS Y RESEÑAS ===== */
.testimonios {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

[data-theme="dark"] .testimonios {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

.testimonios-carrusel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 70px;
}

.testimonios-container {
    overflow: hidden;
    border-radius: 20px;
    padding: 20px 0;
}

.testimonios-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
    box-sizing: border-box;
}

.testimonio-card {
    flex: 0 0 calc(100% - 30px);
    min-width: calc(100% - 30px);
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    border-left: 5px solid #e63946;
}

[data-theme="dark"] .testimonio-card {
    background: var(--card-bg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.testimonio-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 25px;
}

.testimonio-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.testimonio-icon i {
    color: white;
    font-size: 28px;
}

.testimonio-info {
    flex: 1;
}

.testimonio-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

[data-theme="dark"] .testimonio-info h3 {
    color: var(--text-color);
}

.testimonio-cargo {
    color: #e63946;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.testimonio-contenido {
    position: relative;
    padding-left: 40px;
}

.comillas {
    position: absolute;
    left: 0;
    top: -15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

.comillas i {
    color: white;
    font-size: 16px;
}

.testimonio-texto {
    color: #555;
    font-size: 1.15rem;
    line-height: 1.8;
    font-style: italic;
    margin: 0;
    padding: 10px 0;
}

[data-theme="dark"] .testimonio-texto {
    color: #d0d0d0;
}

/* Comillas de cierre alineadas exactamente al final del texto */
.comillas-fin {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: inline-flex; /* Alinea como parte del texto */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);

    position: absolute;
    right: 0;
    bottom: 0;   /* Alineado EXACTO al final del texto */

    transform: translateY(20%); /* Ajuste fino para perfecto alineamiento */
}

.comillas-fin i {
    color: white;
    font-size: 14px;
}

/* Botones del carrusel */
.carrusel-testimonio-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(230, 57, 70, 0.3);
    z-index: 10;
    border: 3px solid white;
}

[data-theme="dark"] .carrusel-testimonio-btn {
    border: 3px solid var(--card-bg);
}

.carrusel-testimonio-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5);
}

.carrusel-testimonio-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carrusel-testimonio-btn:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 5px 20px rgba(230, 57, 70, 0.3);
}

.prev-testimonio-btn {
    left: 10px;
}

.next-testimonio-btn {
    right: 10px;
}

/* Indicadores del carrusel */
.testimonios-indicadores {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.testimonio-indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.testimonio-indicador.active {
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    transform: scale(1.3);
    border-color: #e63946;
}

.testimonio-indicador:hover {
    background: #e63946;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 992px) {
    .testimonios-carrusel {
        max-width: 800px;
        padding: 0 60px;
    }
    
    .testimonio-card {
        padding: 35px;
    }
    
    .testimonio-icon {
        width: 65px;
        height: 65px;
    }
    
    .testimonio-icon i {
        font-size: 25px;
    }
    
    .testimonio-info h3 {
        font-size: 1.4rem;
    }
    
    .testimonio-texto {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .testimonios-carrusel {
        padding: 0 50px;
    }
    
    .testimonio-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .testimonio-icon {
        width: 70px;
        height: 70px;
    }
    
    .testimonio-contenido {
        padding-left: 30px;
    }
    
    .comillas {
        left: -10px;
        top: -10px;
    }
    
    .carrusel-testimonio-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .prev-testimonio-btn {
        left: 5px;
    }
    
    .next-testimonio-btn {
        right: 5px;
    }
}

@media (max-width: 576px) {
    .testimonios {
        padding: 60px 0;
    }
    
    .testimonios-carrusel {
        padding: 0 40px;
    }
    
    .testimonio-card {
        padding: 30px 25px;
    }
    
    .testimonio-icon {
        width: 60px;
        height: 60px;
    }
    
    .testimonio-icon i {
        font-size: 22px;
    }
    
    .testimonio-info h3 {
        font-size: 1.3rem;
    }
    
    .testimonio-cargo {
        font-size: 0.95rem;
    }
    
    .testimonio-texto {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    
    .carrusel-testimonio-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .testimonios-indicadores {
        margin-top: 35px;
        gap: 12px;
    }
    
    .testimonio-indicador {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .testimonios-carrusel {
        padding: 0 35px;
    }
    
    .testimonio-card {
        padding: 25px 20px;
    }
    
    .testimonio-contenido {
        padding-left: 25px;
    }
    
    .comillas {
        width: 35px;
        height: 35px;
    }
    
    .comillas i {
        font-size: 14px;
    }
    
    .testimonio-texto {
        font-size: 1rem;
    }
}

/* ===== BARRA DE BÚSQUEDA ===== */
.search-container {
    position: relative;
    width: 300px;
    margin: 0 20px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 8px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

[data-theme="dark"] .search-wrapper {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.search-wrapper:focus-within {
    border-color: #e63946;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    color: #e63946;
    font-size: 1.1rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #333;
    outline: none;
    padding: 5px 0;
    font-family: 'Poppins', sans-serif;
}

[data-theme="dark"] .search-input {
    color: var(--text-color);
}

.search-input::placeholder {
    color: #999;
    font-size: 0.9rem;
}

[data-theme="dark"] .search-input::placeholder {
    color: #aaa;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
}

.clear-search-btn.visible {
    opacity: 1;
}

.clear-search-btn:hover {
    color: #e63946;
}

/* Resultados en tiempo real (dropdown) */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    animation: fadeIn 0.2s ease;
}

[data-theme="dark"] .search-results {
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

[data-theme="dark"] .search-result-item {
    border-bottom: 1px solid #444;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f9f9f9;
}

[data-theme="dark"] .search-result-item:hover {
    background-color: #3d3d3d;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .search-result-title {
    color: var(--text-color);
}

.search-result-title i {
    color: #e63946;
    font-size: 0.9rem;
}

.search-result-snippet {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .search-result-snippet {
    color: #aaa;
}

.search-result-category {
    display: inline-block;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    color: #e63946;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 8px;
    font-weight: 500;
}

[data-theme="dark"] .search-result-category {
    background: rgba(230, 57, 70, 0.2);
}

/* Sección de resultados de búsqueda */
.search-results-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    animation: slideDown 0.4s ease;
}

[data-theme="dark"] .search-results-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-results-header .section-title {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-results-header .section-title i {
    color: #e63946;
    font-size: 1.8rem;
}

.close-results-btn {
    background: #666;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-results-btn:hover {
    background: #e63946;
    transform: translateY(-2px);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.search-result-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #e63946;
    cursor: pointer;
}

[data-theme="dark"] .search-result-card {
    background: var(--card-bg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(230, 57, 70, 0.15);
}

.search-result-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.search-result-card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

.search-result-card-icon i {
    color: white;
    font-size: 1.2rem;
}

.search-result-card-title {
    flex: 1;
}

.search-result-card-title h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

[data-theme="dark"] .search-result-card-title h3 {
    color: var(--text-color);
}

.search-result-card-category {
    display: inline-block;
    background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.search-result-card-content {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

[data-theme="dark"] .search-result-card-content {
    color: #b0b0b0;
}

.search-result-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

[data-theme="dark"] .search-result-card-footer {
    border-top: 1px solid #444;
}

.search-result-card-section {
    color: #e63946;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-result-card-link {
    color: #e63946;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.search-result-card-link:hover {
    gap: 8px;
}

.search-highlight {
    background-color: rgba(255, 235, 59, 0.3);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Sin resultados */
.no-search-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-results-content i {
    font-size: 4rem;
    color: #e63946;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

[data-theme="dark"] .no-results-content h3 {
    color: var(--text-color);
}

.no-results-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

[data-theme="dark"] .no-results-content p {
    color: #aaa;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .search-container {
        width: 250px;
        margin: 0 15px;
    }
}

@media (max-width: 992px) {
    nav .container {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .search-results-section {
        padding: 60px 0;
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-results-header .section-title {
        font-size: 2rem;
    }
    
    .close-results-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-result-card {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .search-input::placeholder {
        font-size: 0.85rem;
    }
    
    .search-result-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-result-card-icon {
        align-self: center;
    }
    
    .search-result-card-title {
        text-align: center;
        width: 100%;
    }
    
    .search-result-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .no-results-content i {
        font-size: 3rem;
    }
    
    .no-results-content h3 {
        font-size: 1.5rem;
    }
}

