/* =========================================
   ESTILOS PERSONALIZADOS - BOMBEROS LAS GRUTAS
   Corrige colores para coincidir con diseño original
   ========================================= */

/* Variables de colores principales */
:root {
    --bomberos-red: #dc2626;      /* Rojo principal */
    --bomberos-red-dark: #b91c1c; /* Rojo oscuro hover */
    --bomberos-orange: #f97316;   /* Naranja botones */
    --bomberos-gray: #4b5563;     /* Gris navegación */
    --bomberos-text-gray: #666;
}

html {
    scroll-behavior: smooth; /* Opcional: para un desplazamiento suave */
    scroll-padding-top: 140px; /* La altura de tu sticky menu */
}
/* Barra superior - Forzar fondo rojo intenso y texto blanco */

header {
    border-bottom: 5px solid var(--bomberos-red);
}

header .bg-red-600 {
    background-color: var(--bomberos-red) !important;
}

header .bg-red-600 span,
header .bg-red-600 div {
    color: white !important;
}

header .bg-red-600 svg {
    fill: white !important;
}

/* Header - Barra roja superior ya está bien en el HTML */

/* Navegación - Asegurar contraste */
header nav a {
    color: var(--bomberos-gray);
    font-weight: 500;
}

header nav a:hover {
    color: var(--bomberos-red);
}

/* Botón "¡Únete a la Academia!" - debe ser NARANJA */
.btn-academia {
    background-color: var(--bomberos-orange) !important;
    padding: 1em;
    color: #1a1a1a !important;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-academia:hover {
    background-color: #ea580c !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

/* Hero Section - Todo el texto en BLANCO */
#inicio {
    color: white !important;
}

#inicio h2,
#inicio p,
#inicio .max-w-4xl {
    color: white !important;
}

/* Título principal del hero - primera línea en BLANCO */
#inicio h2 {
    color: white !important;
    font-weight: 700;
}

/* Título "Nuestra Comunidad" en ROJO */
.hero-title-red {
    color: var(--bomberos-red) !important;
    font-weight: 700;
}

/* Párrafo descripción en BLANCO */
#inicio p {
    color: white !important;
    opacity: 1 !important;
}

/* Botón "¡Únete Como Voluntario!" - ROJO con gradiente */
.btn-voluntario {
    background: linear-gradient(135deg, var(--bomberos-red) 0%, #ef4444 100%) !important;
    color: white !important;
    font-weight: 600;
    border: none !important;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-voluntario:hover {
    background: linear-gradient(135deg, var(--bomberos-red-dark) 0%, var(--bomberos-red) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

/* Botón "Conoce Nuestra Labor" - Gris oscuro con borde blanco */
.btn-conocer {
    background-color: rgba(75, 85, 99, 0.9) !important;
    color: white !important;
    font-weight: 600;
    border: 2px solid white !important;
    transition: all 0.3s ease;
}

.btn-conocer:hover {
    background-color: rgba(55, 65, 81, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Tarjetas de estadísticas - Fondo rojo semi-transparente */
.stat-card {
    background: rgba(185, 0, 0, 0.3) !important;
    backdrop-filter: blur(4px);
    border: 3px solid rgb(220, 38, 38) !important;
    color: white !important;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(220, 38, 38, 0.85) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.4);
}

.stat-card .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: white;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Iconos en estadísticas - Color rojo */
.stat-icon {
    color: var(--bomberos-red);
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .stat-card .stat-number {
        font-size: 2.5rem;
    }
    
    .btn-academia,
    .btn-voluntario,
    .btn-conocer {
        width: 100%;
        text-align: center;
    }
}

/* =========================================
   SECCIONES - FONDOS ALTERNADOS
   ========================================= */

/* Sección Hero - Ya tiene imagen de fondo */
#inicio {
    /* Mantiene su fondo con imagen */
}

/* Sección Quiénes Somos - Gris muy claro */
#quienes-somos {
    background: #f9fafb !important;
}

/* Sección Capacitaciones - Blanco puro */
#capacitaciones {
    background: #ffffff !important;
}

/* Sección CFP - Gris claro con toque rojo */
#cfp {
    /*background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%) !important;*/
    background: #f9fafb !important;
}

/* Sección Academia - Blanco puro */
#academia {
    background: #ffffff !important;
}

/* Sección Galería - Gris muy claro */
#galeria {
    background: #f9fafb !important;
}

/* Sección Contacto - Gradiente sutil */
#contacto {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%) !important;
}

/* Bordes sutiles entre secciones */
.section {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Animaciones suaves */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sombras personalizadas */
.shadow-bomberos {
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15);
}

.shadow-bomberos-lg {
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

/* Títulos de sección con línea decorativa */
.section-title {
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--bomberos-red) 0%, var(--bomberos-orange) 100%);
    border-radius: 2px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--bomberos-text-gray);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.normal-text {
    font-size: 1rem;
    color: var(--bomberos-text-gray);
    margin-bottom: 3rem;
    max-width: 800px;
}

.text-gray {
    color: var(--bomberos-text-gray);
}

/* Hero overlay mejorado */
.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(220, 38, 38, 0.2) 100%
    );
}

/* =========================================
   SECCIÓN CONTACTO - BOTÓN ENVIAR
   ========================================= */

#contacto form button[type="submit"] {
    background: linear-gradient(135deg, var(--bomberos-red) 0%, #ef4444 100%) !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

#contacto form button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--bomberos-red-dark) 0%, var(--bomberos-red) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

#contacto form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

/* =========================================
   CARDS DE SERVICIOS Y CAPACITACIONES
   ========================================= */

/* Grid contenedor de cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

/* Card base */
.service-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 32px 24px;
    text-align: center;
}

/* Círculo de ícono */
.card-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Variante roja (servicios de emergencia) */
.card-icon-wrap--red {
    background: #fee2e2;
}

/* Variante naranja (cursos) */
.card-icon-wrap--orange {
    background: #fef1e7;
}

/* Título dentro de la card */
.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a202c;
}

/* Descripción dentro de la card */
.card-desc {
    color: #595f6b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Encabezado de grupo de cards */
.cards-section-header {
    margin-top: 60px;
    text-align: center;
}

.cards-section-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a202c;
}

/* =========================================
   FOOTER - GRID
   ========================================= */

.footer-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

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

/* =========================================
   FOOTER - GRIS OSCURO CON LETRAS BLANCAS
   ========================================= */

footer {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
    color: white !important;
    border-top: 3px solid var(--bomberos-red);
}

footer h4 {
    color: white !important;
    font-weight: 700;
}

footer p,
footer ul,
footer li,
footer a {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer a:hover {
    color: white !important;
    text-decoration: underline;
}

/* Línea de copyright en footer */
footer .text-center {
    color: rgba(255, 255, 255, 0.6) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
}

/* =========================================
   GALERÍA - CARRUSEL
   ========================================= */

.galeria-carrusel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    max-height: 520px;
    background: #1a202c;
}

.galeria-carrusel-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.galeria-carrusel-slide {
    flex: 0 0 100%;
    position: relative;
}

.galeria-carrusel-slide img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.galeria-slide-titulo {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 15px;
    font-weight: 500;
}

/* Botones prev/next */
.galeria-carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
    border: none;
    color: white;
    font-size: 36px;
    width: 48px;
    height: 64px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
    z-index: 2;
}
.galeria-carrusel-btn:hover { background: rgba(0,0,0,0.6); }
.galeria-carrusel-prev { left: 10px; }
.galeria-carrusel-next { right: 10px; }

/* Dots indicadores */
.galeria-carrusel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 2;
}

.galeria-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.galeria-dot.active {
    background: white;
    transform: scale(1.3);
}

/* ===== Grid dentro del modal ===== */
.galeria-modal-grid {
    columns: 3;
    column-gap: 14px;
}

.galeria-item {
    break-inside: avoid;
    margin-bottom: 14px;
    cursor: zoom-in;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}
.galeria-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.18); }

.galeria-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}
.galeria-item:hover img { transform: scale(1.03); }

.galeria-item-titulo {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    color: white;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s;
}
.galeria-item:hover .galeria-item-titulo { opacity: 1; }

@media (max-width: 900px) { .galeria-modal-grid { columns: 2; } }
@media (max-width: 500px) {
    .galeria-modal-grid { columns: 1; }
    .galeria-carrusel-btn { display: none; }
}

/* =========================================
   CAPACITACIONES - CARDS ESTILO POSTER
   ========================================= */

[data-capacitaciones-container] {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card: relación 4:5 como Instagram */
.capacitacion-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    aspect-ratio: 4 / 5;
    background: #1a202c;
    cursor: pointer;
}

/* Imagen ocupa todo el card */
.capacitacion-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.capacitacion-item:hover .capacitacion-banner {
    transform: scale(1.04);
}

/* Placeholder cuando no hay imagen */
.capacitacion-banner-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

/* Gradiente oscuro sobre la imagen — siempre visible */
.capacitacion-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 35%,
        rgba(0, 0, 0, 0.55) 65%,
        rgba(0, 0, 0, 0.85) 100%
    );
    pointer-events: none;
}

/* Texto superpuesto sobre el gradiente */
.capacitacion-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px 18px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.capacitacion-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Botón: oculto por defecto, aparece al hover */
.capacitacion-btn-inscribir {
    margin-top: 6px;
    align-self: flex-start;
    padding: 8px 20px !important;
    font-size: 0.88rem !important;
    cursor: pointer;
    border: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.capacitacion-item:hover .capacitacion-btn-inscribir {
    opacity: 1;
    transform: translateY(0);
}

/* Icono de lupa sobre la imagen (zoom) */
.capacitacion-zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.capacitacion-item:hover .capacitacion-zoom-hint { opacity: 1; }

/* Sin imagen: texto más visible */
.capacitacion-item.sin-banner .capacitacion-titulo { font-size: 1.1rem; }

@media (max-width: 900px) {
    [data-capacitaciones-container] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    [data-capacitaciones-container] {
        grid-template-columns: 1fr;
    }
}

.empty-capacitaciones {
    text-align: center;
    color: #595f6b;
    padding: 40px 0;
    grid-column: 1 / -1;
}
