/**
 * Estilos para la página de inicio (Home)
 * Sistema de Gestión de Visitas INACAP
 * Optimizado para rendimiento y mantenibilidad
 */

/* ==========================================
   ANIMACIONES
   ========================================== */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-20px); 
    }
}

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

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

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, #B71C1C 0%, #D32F2F 50%, #E53935 100%);
    color: white;
    padding: 100px 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url("#grid#grid")"/></svg>');
    opacity: 0.3;
}

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

.hero-section h1 {
    animation: fadeInUp 1s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero-section p {
    animation: fadeInUp 1s ease-out 0.2s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-section .btn {
    animation: fadeInUp 1s ease-out 0.4s both;
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-section img {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* ==========================================
   FEATURE CARDS
   ========================================== */
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #D32F2F, #F44336, #E91E63);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(211, 47, 47, 0.15);
}

.feature-card .card-body {
    padding: 40px 30px;
}

.feature-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #D32F2F, #F44336);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h4 {
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ==========================================
   TALLERES Y CURSOS SECTION
   ========================================== */
#talleres {
    background: #f8f9fa;
}

.taller-card {
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.taller-card-simple {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.taller-card-simple:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.taller-card-imagen {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    color: white;
}

/* Tarjeta Python - imagen completa visible sin recortes */
.taller-python {
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
    background-color: #1e2a3a;
}

/* Tarjetas con imagen de fondo tipo cover */
.taller-cover {
    background-size: cover;
    background-position: center;
}

.taller-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    margin-bottom: 16px;
    width: fit-content;
}

.taller-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 10px;
}

.taller-card-imagen .taller-titulo {
    color: white;
}

.taller-descripcion {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: auto;
    flex-grow: 1;
}

.taller-link {
    color: #D32F2F;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.taller-link:hover {
    color: #B71C1C;
    gap: 10px;
}

.taller-card-imagen .taller-link {
    color: white;
}

.taller-card-imagen .taller-link:hover {
    color: #ffcdd2;
}

/* Banner Destacado */
.banner-destacado {
    border-radius: 20px;
    padding: 50px 40px;
    background-size: cover;
    /* background-position se define inline para permitir personalización */
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-badge {
    display: inline-block;
    background: #D32F2F;
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    width: fit-content;
}

.banner-titulo {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    max-width: 600px;
}

.banner-descripcion {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 550px;
    line-height: 1.6;
}

.btn-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #D32F2F;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
    border: none;
}

.btn-banner:hover {
    background: #B71C1C;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

/* Responsive para talleres */
@media (max-width: 768px) {
    .taller-card {
        min-height: 180px;
        padding: 24px;
    }
    
    .banner-destacado {
        padding: 35px 25px;
        min-height: 240px;
    }
    
    .banner-titulo {
        font-size: 1.6rem;
    }
    
    .banner-descripcion {
        font-size: 1rem;
    }
}

/* ==========================================
   STATS SECTION
   ========================================== */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    margin: 0;
    position: relative;
}

.stat-card {
    text-align: center;
    padding: 40px 20px;
    transition: all 0.3s ease;
    border-radius: 15px;
    background: white;
    margin: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover i {
    animation: pulse 1s infinite;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #D32F2F, #F44336);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    line-height: 1;
}

.stat-card p {
    color: #6c757d;
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.cta-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: white;
    padding: 80px 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-section .btn {
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-section .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   INFORMACIÓN SECTION
   ========================================== */
#informacion {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 80px 0;
    position: relative;
}

#informacion h2 {
    color: #1e3a5f;
    font-weight: 800;
    margin-bottom: 20px;
}

#informacion .lead {
    font-weight: 600;
}

#informacion .card {
    border-radius: 20px;
    border: none;
    transition: all 0.3s ease;
}

#informacion .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

#informacion .bi-check-circle-fill,
#informacion .bi-arrow-right-circle-fill {
    transition: all 0.3s ease;
}

#informacion .d-flex:hover .bi-check-circle-fill,
#informacion .d-flex:hover .bi-arrow-right-circle-fill {
    transform: scale(1.2);
}

/* ==========================================
   SERVICIOS SECTION
   ========================================== */
#servicios {
    padding: 80px 0;
}

#servicios h2 {
    color: #1e3a5f;
    font-weight: 800;
    margin-bottom: 15px;
}

#servicios .lead {
    font-size: 1.2rem;
}

/* ==========================================
   CONTACTO SECTION
   ========================================== */
#contacto {
    padding: 80px 0;
}

#contacto h2 {
    color: #1e3a5f;
    font-weight: 800;
}

#contacto h5 {
    color: #1e3a5f;
    font-weight: 700;
}

#contacto i {
    transition: all 0.3s ease;
}

#contacto .col-md-4:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* ==========================================
   UTILIDADES
   ========================================== */
.text-muted {
    color: #6c757d !important;
}

strong {
    font-weight: 700;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .feature-card .card-body {
        padding: 30px 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stats-section,
    #informacion,
    #servicios,
    #contacto {
        padding: 50px 0;
    }
    
    .cta-section::before,
    .cta-section::after {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
