/* ============================================================
   Dream Trackdays - Estilos globales
   ============================================================ */

/* ------------------ Reset y base ------------------ */
body {
    background-color: #FFFFFF;
    color: #212121;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

/* Enlaces */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: #f36958;
}

/* Tipografía secundaria/Títulos */
.font-title,
h1,
h2,
h3,
h4 {
    /* Añado h1, h2, h3, h4 para que usen Cinzel por defecto en títulos */
    font-family: 'Cinzel', serif !important;
}

/* ============================================================
   Animaciones
   ============================================================ */

/* ---- Aparición descendente (modales, formularios, etc.) ---- */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeInDown 0.3s ease-out;
}

/* ---- Aparición del banner de cookies ---- */
@keyframes fadeInCookies {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.animate-fade-in-cookies {
    animation: fadeInCookies 0.5s ease-out;
}

/* ---- Aparición general (tarjetas, eventos, elementos dinámicos) ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================================
   Componentes comunes
   ============================================================ */

/* Botones generales */
button {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    opacity: 0.9;
}

/* Tarjetas flotantes (base visual compartida) */
.card {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Contenedor de centrado para secciones amplias */
.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ============================================================
   Banner de cookies
   ============================================================ */
.cookies-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    color: #212121;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 50;
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.cookies-banner p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.cookies-banner button {
    background-color: #212121;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.2rem;
    margin: 0 0.3rem;
    font-size: 0.9rem;
}

.cookies-banner button.reject {
    background-color: #888;
}

/* ============================================================
   Carrusel de eventos (estructura base)
   ============================================================ */
.events-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 1rem;
}

.events-carousel::-webkit-scrollbar {
    display: none;
}

.events-carousel .event-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.events-carousel .event-card:hover {
    transform: scale(1.03);
}

/* ============================================================
   Carrusel de 4 tarjetas (estructura sincronizada con JS)
    NOTA: Esto parece ser para otro carrusel, mantenemos los IDs originales
   ============================================================ */
#carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-item {
    width: 25%;
    /* 4 tarjetas visibles */
    flex-shrink: 0;
    padding: 0 0.75rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.carousel-item>div {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Altura consistente en todas las tarjetas */
.carousel-item img {
    height: 10rem;
    object-fit: cover;
    width: 100%;
    border-radius: 0.75rem 0.75rem 0 0;
}

/* Responsivo: en tablet 2, móvil 1 */
@media (max-width: 768px) {
    .carousel-item {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        width: 100%;
    }
}

/* Calendario style */
@media (max-width: 768px) {
    #calendar {
        min-height: 400px;
    }
}

/* Fuente variable principal (Cinzel) */
@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/Cinzel-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Fuentes estáticas para pesos específicos (Cinzel) */
@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/static/Cinzel-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/static/Cinzel-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/static/Cinzel-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/static/Cinzel-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/static/Cinzel-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('https://8060-1104-6802-a1b2c3d4-5678-90ab-cdef-storage11111.s3.eu-south-2.amazonaws.com/assets/libs/fonts/Cinzel/static/Cinzel-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Estilos para perfil.php */
.btn-main {
    background-color: #212121;
    color: white;
    transition: .3s;
}

.btn-main:hover {
    background-color: #d62828;
}

.link-main {
    color: #212121;
    transition: .3s;
}

.link-main:hover {
    color: #d62828;
}

/* ============================================================
   AJUSTES DE ESTILO PARA FULLCALENDAR
   ============================================================ */

/* 1. Estilo de los Botones (Hoy, flechas, etc.) */
.fc .fc-button-primary {
    background-color: #212121;
    border-color: #212121;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.2s;
}

/* 2. Hover en los botones */
.fc .fc-button-primary:hover {
    background-color: #f36958;
    border-color: #f36958;
    box-shadow: none !important;
}

/* 3. Título del Calendario (Mes y Año) */
.fc-toolbar-title {
    /* Usamos la regla de body/h1-h4, pero si la queremos explícitamente Poppins la mantenemos */
    font-family: 'Poppins', sans-serif;
    font-size: 24px !important;
    font-weight: 700;
    color: #212121;
    margin: 0 !important;
}

/* 4. Cabecera de días (DOM, LUN, MAR...) */
.fc .fc-col-header-cell-cushion {
    color: #212121;
    font-weight: 600;
    padding-top: 5px;
    padding-bottom: 5px;
}

/* 5. Texto eventos */
.fc .fc-event-title {
    white-space: normal !important;
    line-height: 1.3 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* 6. Cuerpo del evento: Reducir padding interno para que el texto llene más */
.fc .fc-event-main {
    white-space: normal !important;
    overflow: visible !important;
    line-height: 1.3 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* 7. Contenedor principal del evento: Reducir margen externo */
.fc .fc-daygrid-event {
    margin-top: 0px;
    margin-bottom: 1px;
    padding: 0px 1px;
}

/* Estilos adicionales para la revisión de eventos de administración */

.container {
    margin-top: 30px;
}

.table img {
    max-width: 80px;
    height: auto;
}

.data-raw {
    font-size: 0.8em;
    color: #555;
    background-color: #f7f7f7;
    padding: 5px;
    border-radius: 3px;
}

/* --- Estilos específicos para la tabla de Administración de Usuarios --- */

/* Contenedor principal para scroll horizontal */
.admin-table-container {
    max-width: 100%;
    overflow-x: auto;
}

/* Base de la tabla: ancho mínimo de columna y evitar salto de línea por defecto */
.admin-table th,
.admin-table td {
    min-width: 100px;
    white-space: nowrap;
}

/* Ancho específico para la columna 'Nombre' (segunda columna) */
.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    min-width: 150px;
}

/* Ajuste para la columna 'Dirección' (séptima columna) - Permite salto de línea */
.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
    min-width: 200px;
    white-space: normal;
}

/* Ajuste para la última columna ('Acciones') - Permite salto de línea */
.admin-table th:last-child,
.admin-table td:last-child {
    min-width: 250px;
    white-space: normal;
}

/* CSS del Carrusel de Países Deshabilitado para permitir lógica JS dinámica con Tailwind */


/* 4. Estilos de los Botones de Navegación Estándar */
/* Se aplica a todos los botones de navegación con la clase .carousel-nav-btn 
   para uniformidad en el hover y transiciones. */

.carousel-nav-btn {
    transition: all 0.2s ease;
    opacity: 1;
    display: flex;
    /* Asegura que la flecha se centre */
    align-items: center;
    justify-content: center;
    border: none;
    line-height: 1;
}

.carousel-nav-btn:hover {
    opacity: 0.95;
}

/* ============================================================
   MOBILE VS DESKTOP DIFFERENTIATION
   ============================================================ */

/* Mobile optimizations (applied via js/device-utils.js) */
/* body.is-mobile a, body.is-mobile button { ... } */

/* Disable hover effects on mobile to prevent sticky states */
body.is-mobile .card:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    /* Reset to original */
}

body.is-mobile .events-carousel .event-card:hover {
    transform: none;
}

/* Ensure mobile menu inputs are easy to tap */
body.is-mobile input,
body.is-mobile select,
body.is-mobile textarea {
    font-size: 16px;
    /* Prevents iOS zooom on focus */
}

/* ============================================================
   MOBILE MENU DRAWER
   ============================================================ */
.mobile-menu-drawer {
    /* Initially hidden via transform */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu-drawer.is-open {
    transform: translateX(0);
}

/* Ensure hidden on desktop (md breakpoint approx 768px matches Tailwind) */
/* Ensure hidden on desktop (md breakpoint approx 768px matches Tailwind) */
@media (min-width: 768px) {
    .mobile-menu-drawer {
        display: none !important;
    }
}

/* ============================================================
   CUSTOM VISIBILITY UTILITIES (Replacements for missing Tailwind classes)
   ============================================================ */

/* Mobile Menu Button: Visible on mobile, hidden on desktop */
.mobile-menu-btn {
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Force styling for the SVG icon since Tailwind classes might be missing */
.mobile-menu-btn svg {
    width: 32px;
    height: 32px;
    color: #f36958;
    /* Force the orange color */
}

/* Desktop Menu: Hidden on mobile, visible flex on desktop */
.desktop-menu {
    display: none;
}

@media (min-width: 768px) {
    .desktop-menu {
        display: flex !important;
    }
}

/* ============================================================
   HEADER LAYOUT UTILITIES
   ============================================================ */

/* Utility for pointer events if missing */
.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}

/* Header Logo Container */
/* Mobile: Flexbox behavior, aligns nicely with hamburger */
.header-logo-container {
    display: flex;
    /* justify-content: center;  We can keep it left or center on mobile. User didn't specify mobile centering, but let's keep it standard left or flex-grow for now. */
    align-items: center;
    flex-grow: 1;
    /* Pushes hamburger to the right */
}

/* Desktop: Absolute centering */
@media (min-width: 768px) {
    .header-logo-container {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 100%;
        justify-content: center;
        flex-grow: 0;
        pointer-events: none;
        /* Allows clicks to pass through empty space */
        display: flex;
        /* Ensure it's flex so we can center content */
    }
}