/* ========================================
   AI Decoded - Estilos Globales
   ======================================== */

/* --- Variables de Tema y Estilos Base --- */
:root {
    --brand-dark-blue: #0d1b2a;
    --brand-blue: #1b263b;
    --brand-mid-blue: #415a77;
    --brand-light-blue: #778da9;
    --brand-accent: #00bcd4;
    --brand-accent-dark: #0097a7;
    --dark-gray: #3a3537;
    --white: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* gris muy claro */
    color: #3a3537;
}

/* --- Clases de Ayuda del Tema (usadas en HTML) --- */
.bg-brand-dark-blue { background-color: var(--brand-dark-blue); }
.bg-brand-blue { background-color: var(--brand-blue); }
.bg-brand-mid-blue { background-color: var(--brand-mid-blue); }
.text-brand-light-blue { color: var(--brand-light-blue); }
.text-brand-accent { color: var(--brand-accent); }
.bg-brand-accent { background-color: var(--brand-accent); }
.hover\:bg-brand-accent-dark:hover { background-color: var(--brand-accent-dark); }
.border-brand-accent { border-color: var(--brand-accent); }
.text-brand-dark-blue { color: var(--brand-dark-blue); }
.text-brand-blue { color: var(--brand-blue); }
.hover\:text-brand-accent:hover { color: var(--brand-accent); }


/* ========================================
   ESTILOS DEL PORTAFOLIO (Compartidos)
   ======================================== */
.portfolio-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.work-category { margin-bottom: 60px; }

.work-category h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--brand-dark-blue);
    text-align: center;
    margin-bottom: 40px;
}

.creativos-header-simple, .reels-header-simple { text-align: center; margin-bottom: 30px; }

.creativos-header-simple h3, .reels-header-simple h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--brand-dark-blue);
    margin-bottom: 15px;
}

.creativos-info p, .reels-info p { color: var(--dark-gray); font-size: 1rem; opacity: 0.8; }
.pagina-info { font-size: 0.9rem; opacity: 0.6; margin-left: 10px; }

.creative-grid, .reels-grid {
    display: grid;
    margin-bottom: 40px;
}

.creative-item, .reel-item {
    width: 100%;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}
.creative-item:hover, .reel-item:hover { transform: translateY(-5px); }

.creative-image-container {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    cursor: pointer;
}

.creative-image {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease; display: block;
}

.creative-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.9) 0%, rgba(0, 188, 212, 0.9) 100%);
    opacity: 0; transition: opacity 0.3s ease;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.creative-item:hover .creative-overlay { opacity: 1; }
.creative-item:hover .creative-image { transform: scale(1.05); }

.creative-info { text-align: center; color: white; }
.creative-icon { font-size: 2.5rem; margin-bottom: 10px; }
.creative-title { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.2rem; margin-bottom: 5px; }
.creative-type { font-size: 0.9rem; opacity: 0.9; margin-bottom: 10px; color: var(--brand-accent); }
.creative-description { font-size: 0.85rem; opacity: 0.8; line-height: 1.4; }

.creativos-navegacion, .reels-navegacion { text-align: center; margin-top: 40px; }

.btn-mostrar-mas, .btn-mostrar-mas-reels {
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
    color: white; border: none; padding: 15px 40px; border-radius: 50px;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.1rem;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 6px 20px rgba(0,188,212,0.3);
    display: inline-flex; align-items: center; gap: 10px;
}
.btn-mostrar-mas:hover, .btn-mostrar-mas-reels:hover { transform: translateY(-3px); }
.btn-icon { font-size: 1.2rem; animation: bounce 2s infinite; }
.btn-arrow { transition: transform 0.3s ease; }
.btn-mostrar-mas:hover .btn-arrow, .btn-mostrar-mas-reels:hover .btn-arrow { transform: translateX(5px); }

.reel-video-container {
    position: relative; width: 100%; border-radius: 15px; overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); cursor: pointer; background: #000;
    aspect-ratio: 9/16;
}
.reel-video { width: 100%; height: 100%; object-fit: cover; display: block; }

.reel-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(13, 27, 42, 0.95) 100%);
    opacity: 0; transition: opacity 0.3s ease;
    display: flex; align-items: flex-end; padding: 20px;
}
.reel-item:hover .reel-overlay { opacity: 1; }
.reel-info { color: white; width: 100%; text-align: left; }

.reel-play-button {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60px; height: 60px; background: rgba(255,255,255,0.95);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 10;
}
.play-icon { font-size: 1.5rem; color: var(--brand-dark-blue); margin-left: 3px; }

.videos-horizontales-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px; max-width: 1000px; margin-left: auto; margin-right: auto;
}

.video-horizontal-item {
    width: 100%; opacity: 0; animation: fadeInUp 0.8s ease forwards;
}

.video-horizontal-container {
    position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 20px;
    overflow: hidden; box-shadow: 0 12px 35px rgba(0,0,0,0.2); cursor: pointer; background: #000;
}
.video-horizontal { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ========================================
   AVATARES (Autores/Equipo)
   Fuerza relación 1:1 y evita deformaciones
   ======================================== */
.author-avatar {
    aspect-ratio: 1 / 1;
    border-radius: 9999px; /* círculo */
    object-fit: cover;
    display: block;
}

/* ========================================
   MODAL & ANIMATIONS
   ======================================== */
.modal-overlay.hidden { display: none; }
.modal-overlay { transition: opacity 0.3s ease-in-out; }
.modal-content { transition: transform 0.3s ease-in-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-2px); }
}
