/*
 *  @Copyright (c) 2016 - 2023. XPanel® Hostiberi - Powerful CMS
 *  @Author: Hostiberi
 *  @Email: info@hostiberi.com
 *  @Filename: style.css
 *  @Last modified by: hostiberi
 *  @web: www.hostiberi.com
 */
/* ======================================================
   VARIABLES DE TEMA – Dark / Light
   ====================================================== */
:root {
    --color-bg: #0e0e0e;
    --color-text: #f0f0f0;
    --color-text-inv: #000;
    --color-muted: #aaa;
    --color-primary: #e70b0b;
    --color-border: #222;
    --color-card: #181818;
    --color-card-hover: #202020;
    --color-input-bg: #1c1c1c;
    --color-input-border: #2b2b2b;
    --color-btn-hover: #ff2525;
    --color-success: #4caf50;
    --color-error: #f44336;
    --color-warning: #ff9800;
    --color-info: #2196f3;
    --color-link: #007bff;
    --color-link-hover: #0056b3;
    --color-link-visited: #6610f2;
    --color-link-active: #8a2be2;
    --color-link-focus: #007bff;
    --color-link-focus-visible: #007bff;
    /* Estado colores (tema oscuro) */
    --estado-open-bg: linear-gradient(135deg, #888 0%, #444 100%);
    --estado-sent-bg: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    --estado-closed-bg: linear-gradient(135deg, #b30000 0%, #5a0000 100%);
    --estado-pending-bg: linear-gradient(135deg, #555 0%, #2a2a2a 100%);
    --estado-text-color: #fff;
}

.theme-light {
    --color-bg: #f7f7f7;
    --color-text: #111;
    --color-text-inv: #fff;
    --color-muted: #444;
    --color-primary: #e70b0b;
    --color-border: #e9ecef;
    --color-card: #ffffff;
    --color-card-hover: #f5f5f5;
    --color-input-bg: #fff;
    --color-input-border: #ced4da;
    --color-btn-hover: #ff3c3c;
    --color-success: #4caf50;
    --color-error: #f44336;
    --color-warning: #ff9800;
    --color-info: #2196f3;
    --color-link: #007bff;
    --color-link-hover: #0056b3;
    --color-link-visited: #6610f2;
    --color-link-active: #8a2be2;
    --color-link-focus: #007bff;
    --color-link-focus-visible: #007bff;
    /* Estado colores (tema claro) */
    --estado-open-bg: linear-gradient(135deg, #d0d0d0 0%, #999 100%);
    --estado-sent-bg: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --estado-closed-bg: linear-gradient(135deg, #ff4d4d 0%, #cc0000 100%);
    --estado-pending-bg: linear-gradient(135deg, #aaa 0%, #777 100%);
    --estado-text-color: #111;
}

/* Transición suave entre temas */
html, body, .hero, .equipo, .buscador, .footer {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
}

.bg-body {
    background-color: var(--color-card)!important;
}
.user-login .badge {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem; /* Aumenta el tamaño del icono dentro del badge */
}

.user-login .badge i {
    font-size: 1.2rem;
    width: 18px;
    text-align: center;
}

/* HERO */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35)),
    url("/static/media/images/home/header.png") center center / cover no-repeat;
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    border-bottom: 3px solid var(--color-primary);
}

.hero h1 {
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.hero h1 span {
    color: var(--color-primary);
}

.hero p {
    margin: 10px 0 25px;
    color: var(--color-muted);
    font-size: 1.1rem;
}
.text-muted {
    color: var(--color-muted) !important;
}

.buton-user {
    font-size: 1rem;
    font-weight: 100;
    color: #fff;
    text-decoration: none;
    border: 1px solid #fff;
    padding: 0 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.buton-user:hover {
    background-color: #fff;
    color: #000;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-save {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--color-btn-hover);
}

/* Updated btn-iracing styles */
.btn-iracing {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--color-primary);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-iracing:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Adaptación para tema claro */
.theme-light .btn-iracing {
    background-color: #fff;
    color: #000;
    border: 1px solid var(--color-primary);
}

.theme-light .btn-iracing:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* BUSCADOR */
.buscador {
    background-color: #121212;
    padding: 50px 20px;
    text-align: center;
    border-bottom: 2px solid #1f1f1f;
}

.buscador h2 {
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: 1.4rem;
    color: #fff;
}

.search-form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form input,
.search-form select {
    background-color: var(--color-input-bg);
    color: var(--color-text);
    border: 1px solid var(--color-input-border);
    border-radius: 6px;
    padding: 10px 14px;
    min-width: 160px;
    font-size: 14px;
    outline: none;
}

.search-form button {
    background-color: var(--color-primary);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background-color: var(--color-btn-hover);
}

/* GRID DE EQUIPOS */
.equipos {
    padding: 60px 40px;
}

.equipos h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-text);
}

.equipos-slider {
    position: relative;
    overflow: visible;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(231, 11, 11, 0.9);
}

.slider-btn.left {
    left: -50px;
}

.slider-btn.right {
    right: -50px;
}

.grid-equipos::-webkit-scrollbar {
    display: none;
}

.grid-equipos {
    scrollbar-width: none;
}

.grid-equipos {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding-bottom: 15px;
}

.grid-equipos {
    padding-right: 40px; /* espacio al final del carrusel */
}

.grid-equipos::after {
    content: '';
    flex: 0 0 40px;
}


.equipo {
    flex: 0 0 calc(25% - 20px); /* resta el gap para evitar compresión visual */
    scroll-snap-align: start;
}

@media (max-width: 768px) {
    .equipo {
        flex: 0 0 85%;
    }
}

.equipo {
    background-color: var(--color-card);
    border-radius: 10px;
    text-align: center;
    padding: 25px;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 0 10px rgba(231, 11, 11, 0.05);
}

.equipo:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(231, 11, 11, 0.15);
}

.equipo-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background-color: #0c0c0c;
    padding: 12px;
    margin-bottom: 12px;
}

.equipo h3 {
    color: var(--color-text);
    margin: 5px 0;
    font-size: 18px;
}

.equipo p {
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 0;
}

.grid-equipos .tags {
    margin-bottom: 15px;
    min-height: 90px;
}

.flag {
    font-size: 2rem;
}

.tag {
    display: inline-block;
    background-color: #2a2a2a;
    border-radius: 4px;
    color: var(--color-text);
    padding: 4px 8px;
    font-size: 12px;
    margin: 2px;
    text-transform: uppercase;
}

.tag.gt3 {
    background-color: var(--color-primary);
}

.tag.lmp2 {
    background-color: #007bff;
}

.tag.gte {
    background-color: #f5b400;
}

.tag.division {
    background-color: #333;
}


/* Estado - Botones con estilo Racing */
.estado {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--estado-text-color);
    position: relative;
    overflow: hidden;
    cursor: default;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    font-size: .8rem;
}

.estado::before {
    content: none !important;
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.estado:hover::before {
    left: 125%;
}

/* Estados individuales usando variables */
.estado.open {
    background: var(--estado-open-bg);
}

.estado.sent {
    background: var(--estado-sent-bg);
}

.estado.closed {
    background: var(--estado-closed-bg);
}

.estado.pending {
    background: var(--estado-pending-bg);
}

/* FOOTER */
.footer {
    background-color: var(--color-card);
    color: var(--color-muted);
    text-align: center;
    padding: 25px 15px;
    border-top: 2px solid #1a1a1a;
}

.footer strong {
    color: var(--color-primary);
}

.social a {
    color: var(--color-muted);
    margin: 0 8px;
    font-size: 18px;
    transition: color 0.3s;
}

.social a:hover {
    color: #fff;
}

/* NAVIGATION */
.main-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    box-sizing: border-box;
    z-index: 10;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin: 0 15px;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--color-primary);
}

.nav-left a {
    font-size: 15px;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-link i {
    margin-right: 5px;
}

.lang-switch img {
    width: 44px;
    height: 36px;
    border-radius: 2px;
    margin-left: 6px;
    transition: transform 0.2s;
}

.lang-switch img:hover {
    transform: scale(1.1);
}

/* Light Theme Overrides */
.theme-toggle-btn {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
}

/* Apply light theme by adding .theme-light on <html> */
.theme-light body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.theme-light .theme-toggle-btn {
    color: #222;
}

/* Navbar links */
.theme-light .navbar .nav-link {
    color: #222 !important;
}

.theme-light .navbar .nav-link:hover {
    color: var(--color-primary) !important;
}

/* Hero */
.theme-light .hero {
    color: var(--color-text);
    border-bottom-color: var(--color-primary);
    background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.5)), url("/static/media/images/home/header.png") center center/cover no-repeat;
}

.theme-light .hero p {
    color: var(--color-muted);
}

/* Buttons */
.theme-light .buton-user {
    color: #222;
    border-color: #222;
}

.theme-light .buton-user:hover {
    background: #222;
    color: #fff;
}

.theme-light .btn-primary {
    color: #fff;
}

/* Buscador */
.theme-light .buscador {
    background-color: var(--color-bg);
    border-bottom-color: var(--color-border);
}

.theme-light .buscador h2 {
    color: var(--color-text);
}

.theme-light .search-form input,
.theme-light .search-form select {
    background-color: var(--color-input-bg);
    color: var(--color-text);
    border-color: var(--color-input-border);
}

/* Cards */
.theme-light .equipo {
    background-color: var(--color-card);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.06);
}

.theme-light .equipo h3 {
    color: var(--color-text);
}

.theme-light .equipo p {
    color: #555;
}

.theme-light .equipo-logo img {
    background-color: #f1f3f5;
}

.theme-light .tag {
    color: #fff;
}

.theme-light .tag.division {
    background-color: var(--color-border);
    color: var(--color-text);
}

.theme-light .estado.closed {
    background-color: var(--color-error);
    color: #fff;
}

/* Piloto panel: solicitudes en una sola línea */
.equipo.solicitud-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 12px 16px;
}

.equipo.solicitud-inline .equipo-logo img {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
    padding: 8px;
}

.equipo.solicitud-inline .solicitud-body {
    flex: 1 1 auto;
    min-width: 0;
}

.equipo.solicitud-inline h3 {
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equipo.solicitud-inline .solicitud-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
}

.equipo.solicitud-inline .tags {
    margin: 0;
}

.equipo.solicitud-inline .estado {
    padding: 6px 10px;
    font-size: 11px;
}

/* Range (iRating) styling */
.irating-range {
    width: 100%;
    height: 2px;
    background: transparent;
}

.irating-range::-webkit-slider-runnable-track {
    height: 4px;
    background: #2b2b2b;
    border-radius: 2px;
}

.irating-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 2px solid #111;
}

.irating-range:focus {
    outline: none;
}

.irating-range::-moz-range-track {
    height: 4px;
    background: #2b2b2b;
    border-radius: 2px;
}

.irating-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border: 2px solid #111;
    border-radius: 50%;
}

/* Modal light theme overrides */
.theme-light .modal-content {
    background: #ffffff !important;
    color: #111 !important;
    border-color: var(--color-border) !important;
}

.theme-light .modal-header {
    border-bottom-color: var(--color-border) !important;
}

.theme-light .irating-range::-webkit-slider-runnable-track {
    background: #dee2e6;
}

.theme-light .irating-range::-moz-range-track {
    background: #dee2e6;
}

.theme-light .irating-range::-webkit-slider-thumb {
    border-color: #fff;
}

.theme-light .irating-range::-moz-range-thumb {
    border-color: #fff;
}

/* Footer */
.theme-light .footer {
    background-color: var(--color-card);
    color: #666;
    border-top-color: var(--color-border);
}

.theme-light .social a {
    color: #666;
}

.theme-light .social a:hover {
    color: var(--color-text);
}

#formConfigPanel label {
    font-weight: bold;
}
/* Anuncio meta info */
.anuncio-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
    color: var(--color-muted);
    font-size: 12px;
}
.anuncio-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 4px 8px;
}
.theme-light .anuncio-meta span {
    background: #fff;
    border-color: var(--color-border);
}

.user-login .card {
    background-color: var(--color-card);
    border-color: var(--color-border);
}

.card {
    background-color: var(--color-card);
    border-color: var(--color-border);
}


/* Botón Formulario - Estilo Racing */
.boton-form {
    display: inline-block;
    background: linear-gradient(135deg, #e70b0b 0%, #8b0000 100%);
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(231, 11, 11, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.boton-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.boton-form:hover::before {
    left: 125%;
}

.boton-form:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #a00000 100%);
    box-shadow: 0 6px 25px rgba(255, 26, 26, 0.4);
    transform: translateY(-2px);
}

.boton-form.dark {
    background: #111;
    color: #fff;
    border: 1px solid #e70b0b;
}


.boton-form.dark:hover {
    background: #e70b0b;
    color: #fff;
    box-shadow: 0 0 15px rgba(231, 11, 11, 0.5);
}

/* Botón Formulario - Estilo Racing (Cerrar / Cancelar) */
.boton-form-closed {
    display: inline-block;
    background: linear-gradient(135deg, #444 0%, #1c1c1c 100%);
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.boton-form-closed::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.boton-form-closed:hover::before {
    left: 125%;
}

.boton-form-closed:hover {
    background: linear-gradient(135deg, #666 0%, #2a2a2a 100%);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.estado-wrapper {
    position: relative;
}
.estado-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #181818;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 6px 0;
    z-index: 10;
    min-width: 130px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.estado-menu button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    padding: 6px 14px;
    font-size: 14px;
    transition: background 0.2s;
}
.estado-menu button:hover {
    background: rgba(255,255,255,0.1);
}

/* ============================
   HOME - Secciones nuevas
   ============================ */

/* Sección Cómo funciona */
.como-funciona {
    background: var(--color-card);
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
}
.como-funciona h2 {
    color: var(--color-text);
    margin-bottom: 40px;
}
.como-funciona h4 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 700;
}
.como-funciona p {
    color: var(--color-muted);
    max-width: 300px;
    margin: 0 auto;
}

/* Hero secundario */
.hero-secundario {
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('/static/media/images/home/simrace-bg.jpg') center/cover no-repeat;
    color: #fff;
    border-top: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
}
.hero-secundario h2 {
    font-size: 2rem;
    letter-spacing: 1px;
}
.hero-secundario p {
    max-width: 600px;
    margin: 0 auto 25px;
    color: #ddd;
}

/* Estadísticas */
.estadisticas {
    background: var(--color-bg);
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
}
.estadisticas h3 {
    font-size: 2.2rem;
    color: var(--color-primary);
}
.estadisticas p {
    color: var(--color-muted);
    margin: 0;
}

/* Blog preview */
.blog-preview {
    background: var(--color-card);
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
}
.blog-preview .card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-preview .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(231, 11, 11, 0.25);
}
.blog-preview .card img {
    height: 180px;
    object-fit: cover;
}
.blog-preview .card-body {
    padding: 20px;
}
.blog-preview .card-title {
    color: var(--color-text);
}
.blog-preview .card-text {
    color: var(--color-muted);
}

/* Testimonios */
.testimonios {
    background: linear-gradient(135deg, #111, #1a1a1a);
    border-top: 3px solid var(--color-primary);
}
.testimonios h2 {
    color: var(--color-primary);
}
.testimonios blockquote {
    font-size: 1.2rem;
    color: #ddd;
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}
.testimonios .blockquote-footer {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-top: 10px;
}