@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/*
 * 9hSports - Estilos generales
 * Version: 1.0.0
 */

/* Variables globales */
:root {
    --primary: #F17501;
    --primary-dark: #D56500;
    --secondary: #1d4f8a;
    --secondary-dark: #164070;
    --marathon-red: #F17501;
}

/* Estilos base */
body {
    padding-top: 66px;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Colores de texto */
.text-orange,
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

tr.red-text, tr.red-text td {
    color: #cc33ff !important;
}

.blue-text{
    color: #6b6bff !important;
}

/* Botones */
.btn-orange,
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-orange:hover,
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: white;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    margin-bottom: 0px;
    overflow: hidden; /* Evitar que se vean elementos fuera del slider */
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden; /* Ocultar elementos que sobresalen */
}



.hero-slide {
    background-position: center;
    background-size: cover;
    height: 80vh; /* Aumentamos considerablemente la altura */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Centrado horizontal también */
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-slide .container {
    position: relative;
    z-index: 2; /* Mayor índice para asegurar que esté por encima */
    padding: 40px 20px;
    display: flex; /* Usar flexbox para el contenedor */
    flex-direction: column; /* Organizar contenido verticalmente */
    justify-content: center; /* Centrar verticalmente */
    align-items: center; /* Centrar horizontalmente para text-center */
    height: 100%; /* Asegurar que ocupe todo el alto disponible */
}

/* Indicadores del carousel */
.carousel-indicators {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    padding-left: 0;
}

.carousel-indicators [data-bs-target] {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 8px;
    height: 8px;
    padding: 0;
    margin-right: 5px;
    margin-left: 5px;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    background-clip: padding-box;
    opacity: 0.5;
    transition: opacity 0.6s ease;
}

.carousel-indicators .active {
    opacity: 1;
    background-color: var(--primary);
}

/* Controles del carousel */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 15; /* Asegurar que estén por encima */
    width: 5%;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Hero antiguo */
.hero {
    background-position: center;
    background-size: cover;
    padding: 80px 0;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

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

/* Cards */
.card-hover {
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-header{
    border-bottom: var(--bs-card-border-width) solid #000 !important;
}



/* ===================================
   MARATHON CARDS - MODERN DESIGN
   =================================== */

.marathon-card {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid black;
}

.marathon-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* === STATUS BADGE === */
.race-status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.race-status-is,
.race-status-t,
.race-status-in {
    background: transparent;
}

.race-status-badge i {
    margin-right: 5px;
}

/* === DATE SECTION === */
.marathon-date {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    min-width: 60px;
    box-shadow: none;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    display: block;
}

.date-month {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-top: 2px;
}

.date-year {
    font-size: 0.65rem;
    opacity: 0.8;
    margin-top: 1px;
}

@media (max-width: 767px) {
    .marathon-card {
      width: 75%;
      min-width: 0;
      min-height: 430px; /* O el alto que prefieras para que no se vea achatada */
      margin-left: auto;
      margin-right: auto;
    }

    .marathon-poster {
        height: 58vw; /* Más alto en móvil */
        min-height: 250px;
    }    

    .marathon-content {
       padding-bottom: 0px !important;
    }    

  }

/* === POSTER SECTION === */
.marathon-poster {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.marathon-card:hover .poster-img {
    transform: scale(1.08);
}

.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 15px;
}

.location-info {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.location-info i {
    margin-right: 8px;
    opacity: 0.9;
}

/* === CONTENT SECTION === */
.marathon-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.marathon-content {
    padding: 25px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.marathon-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.marathon-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    width: 20px;
    margin-right: 10px;
    color: #ff6b35;
    font-size: 0.9rem;
}

.detail-item span {
    flex: 1;
}

.marathon-actions {
    margin-top: auto;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-arrow {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-action:hover .btn-arrow {
    transform: translateX(5px);
}

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

.btn-is:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(241, 117, 1, 0.35);
}

.btn-t,
.btn-in {
    background: #6c757d;
    color: white;
}

.btn-t:hover,
.btn-in:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(108, 117, 125, 0.3);
}

.btn-disabled {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #6c757d;
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ===================================
   RESPONSIVE DESIGN - MARATHON CARDS
   =================================== */

@media (max-width: 1200px) {
    .marathon-poster {
        height: 220px;
    }
    
    .marathon-title {
        font-size: 1.2rem;
    }
    
    .race-status-badge,
    .marathon-date {
        top: 12px;
    }
    
    .race-status-badge {
        left: 12px;
    }
    
    .marathon-date {
        right: 12px;
    }
}

@media (max-width: 992px) {
    /* .marathon-poster {
        height: 200px;
    }
    
    .marathon-content {
        padding: 20px 15px 15px;
    }
    
    .marathon-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    } */

    .marathon-card {
        width: 85%;
        min-width: 0;
        min-height: 430px; /* O el alto que prefieras para que no se vea achatada */
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        padding-bottom: 18px;
      }
  
      .marathon-poster {
          height: 28vw; /* Más alto en móvil */
      }    
      .marathon-info {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
      }

      .marathon-content {
         padding-bottom: 0px !important;
         flex: 1 1 auto;
         display: flex;
         flex-direction: column;
      }    

      
    
    .detail-item {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .date-day {
        font-size: 1.3rem;
    }
    
    .date-month {
        font-size: 0.65rem;
    }
    
    .date-year {
        font-size: 0.6rem;
    }
    
    .race-status-badge {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    .marathon-poster {
        height: 180px;
    }
    
    .marathon-content {
        padding: 18px 15px 15px;
    }
    
    .marathon-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .detail-item {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .btn-action {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
    
    .btn-arrow {
        width: 28px;
        height: 28px;
    }
    
    .location-info {
        font-size: 0.8rem;
    }
    
    .poster-overlay {
        padding: 25px 15px 12px;
    }

    html {
        scroll-padding-top: 60px; 
    }
    
    .spacer-menu {
        display: block;
        height: 50px;      /* igual a la altura de tu menú fijo */
        margin-top: -40px; 
        visibility: hidden;
    }    
}

@media (max-width: 576px) {
    .marathon-card {
        margin-bottom: 20px;
    }
    
    .marathon-poster {
        height: 160px;
    }
    
    .marathon-content {
        padding: 15px 12px 12px;
    }
    
    .marathon-title {
        font-size: 0.95rem;
        margin-bottom: 8px;
        letter-spacing: 0.3px;
    }
    
    .marathon-details {
        margin-bottom: 15px;
    }
    
    .detail-item {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }
    
    
    .btn-action {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .btn-text {
        text-align: center;
        font-size: 0.8rem;
    }
    
    .btn-arrow {
        width: 26px;
        height: 26px;
    }
    
    .race-status-badge,
    .marathon-date {
        top: 10px;
    }
    
    .race-status-badge {
        left: 10px;
        font-size: 0.65rem;
        padding: 5px 8px;
    }
    
    .marathon-date {
        right: 10px;
        padding: 8px;
        min-width: 50px;
    }
    
    .date-day {
        font-size: 1.1rem;
    }
    
    .date-month {
        font-size: 0.6rem;
    }
    
    .date-year {
        font-size: 0.55rem;
    }
    
    .location-info {
        font-size: 0.75rem;
    }
    
    .poster-overlay {
        padding: 20px 12px 10px;
    }     
}

@media (max-width: 480px) {
    .marathon-poster {
        height: 140px;
    }
    
    .marathon-content {
        padding: 12px 15px 10px;
    }
    
    .marathon-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .detail-item {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    .btn-action {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .btn-text {
        font-size: 0.75rem;
    }
    
    .btn-arrow {
        width: 24px;
        height: 24px;
    }
    
    .race-status-badge {
        font-size: 0.6rem;
        padding: 4px 6px;
    }
    
    .marathon-date {
        padding: 6px;
        min-width: 45px;
    }
    
    .date-day {
        font-size: 1rem;
    }
    
    .date-month {
        font-size: 0.55rem;
    }
    
    .date-year {
        font-size: 0.5rem;
    }
    
    .location-info {
        font-size: 0.7rem;
    }
    
    .poster-overlay {
        padding: 15px 10px 8px;
    }
}

/* Elementor estructura */
.e-con-full {
    display: flex;
    position: relative;
}

.e-flex {
    display: flex;
    flex-wrap: wrap;
}

.elementor-element.e-con-full {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.elementor-element {
    width: 100%;
}

.e-child {
    flex: 1;
}

.elementor-widget-container {
    width: 100%;
}

.elementor-heading-title {
    margin: 0;
}

.elementor-size-default {
    line-height: 1.4;
}

.elementor-icon-list-items {
    list-style-type: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.elementor-inline-items {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
}

.elementor-icon-list-item {
    margin-right: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.elementor-icon-list-icon {
    color: var(--primary);
    margin-right: 5px;
}

.elementor-divider {
    border-top: 1px solid #eee;
    margin: 15px 0;
    width: 100%;
}

/* Estilos específicos de Elementor */
.elementor-element.elementor-element-bfae085 {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.elementor-element.elementor-element-bfae085 h4 {
    margin-right: 5px;
}

.ekit-btn-wraper {
    display: flex;
}

.elementskit-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 15px;
    border-radius: 4px;
}

.elementskit-btn i {
    margin-left: 5px;
}

.whitespace--normal {
    white-space: normal;
}

/* Patrocinadores */
.sponsors-section {
    padding: 10px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.sponsors-title {
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: 1.2rem;
    color: #333;
}

.sponsors-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding-bottom: 10px; /* Espacio para sombras y efectos */
}

.sponsors-wrapper {
    display: flex;
    width: 200%; /* Para permitir el desplazamiento */
    transition: transform 0.5s ease;
}

.sponsor-item {
    flex: 0 0 12.5%; /* 8 items en total para el 100% (100% / 8), en un wrapper de 200% */
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; /* Importante para que el padding no afecte al ancho */
}

.sponsor-logo {
    height: 90px;
    width: 100%; /* Usar ancho completo del contenedor */
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(0%);
    opacity: 1;
    transition: all 0.3s ease;
}

.sponsor-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Video en el slider */
.video-slide {
    overflow: hidden;
    position: relative;
}

.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Para que no interfiera con los clicks en los botones */
    z-index: 0;
}

.video-wrapper iframe {
    width: 100vw;
    height: 56.25vw; /* Mantener ratio 16:9 */
    min-height: 100%;
    min-width: 177.77vh; /* 100 * 16 / 9 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.video-slide .container {
    z-index: 2;
    position: relative;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    object-fit: cover;
}

/* Animaciones */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animated-fast {
    animation-duration: 0.5s;
}

@keyframes slideInLeft {
    from {
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

.slideInLeft {
    animation-name: slideInLeft;
}

/* Font Awesome Beat Heart (si la clase fa-beat no existe) */
@keyframes heartBeatCustom {
    0% { transform: scale(1); }
    20% { transform: scale(1.2); }
    40% { transform: scale(1); }
    60% { transform: scale(1.2); }
    80% { transform: scale(1); }
    100% { transform: scale(1); }
}

.glyphicon-heart-empty.heart-beat {
    animation: heartBeatCustom 1.2s infinite;
}

/* Media Queries */
@media (min-width: 768px) {
    .elementor-element.elementor-element-a3f88ea {
        flex-direction: row;
        align-items: center;
    }

    .elementor-element.elementor-element-da53761 {
        flex: 0 0 15%;
        padding-right: 15px;
    }

    .elementor-element.elementor-element-c9a0474 {
        flex: 0 0 20%;
        padding: 0 15px;
    }

    .elementor-element.elementor-element-30b6a31 {
        flex: 0 0 45%;
        padding: 0 15px;
    }

    .elementor-element.elementor-element-aa7cd5b {
        flex: 0 0 20%;
        padding-left: 15px;
    }
}



@media (max-width: 768px) {
    .sponsors-section {
        padding: 30px 0;
    }

    .sponsors-title {
        text-align: center;
        margin-bottom: 20px;
    }

    .sponsor-item {
        flex: 0 0 25%; /* En móvil, 4 items visibles = 100% / 4 = 25% */
    }

    .sponsor-logo {
        max-width: 120px;
    }
}

@media (max-width: 767px) {
    .elementor-element.elementor-element-a3f88ea {
        flex-direction: column;
    }

    .elementor-element.elementor-element-da53761,
    .elementor-element.elementor-element-c9a0474,
    .elementor-element.elementor-element-30b6a31,
    .elementor-element.elementor-element-aa7cd5b {
        margin-bottom: 15px;
    }

    .video-wrapper iframe {
        width: 120vw; /* Un poco más ancho para cubrir mejor en móviles */
    }

    .hero-video {
        height: 100%;
        width: auto;
        object-position: center;
    }

    /* Botons del slider_home amb espai vertical */ 
    #heroSlider .hero-slide a {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        margin-right: 0 !important;
      }
      #heroSlider .hero-slide a:last-child {
        margin-bottom: 0;
      }    
}



.hero-slide {
    height: 40vh; /* Full height en móviles */
}

.carousel-indicators {
    bottom: 40px; /* Más espacio en móviles */
}


/* Separadores de sección */
.section-separator {
    padding: 30px 0;
    position: relative;
}

.separator-line {
    position: relative;
    height: 2px;
    background: linear-gradient(90deg, rgba(29, 79, 138, 0), rgba(29, 79, 138, 0.5) 50%, rgba(29, 79, 138, 0) 100%);
    margin: 0 auto;
    width: 80%;
}

.separator-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(241, 117, 1, 0.3);
}

.separator-icon i {
    font-size: 24px;
    color: var(--primary);
}

/* Añadir espacio a las secciones */
section {
    padding: 60px 0;
}

.section-padding0{
    padding: 0px !important;
}



/* Nuevo sistema de fondo con parallax simplificado */
.container-content-bg {
    position: relative;
    background-image: url('../imatges/fons_seccio_1.png');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

.container-content-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

.container-content-bg > * {
    position: relative;
    z-index: 1;
}

/* Mejoras para contenido en secciones con paralaje */
.parallax-section .section-header h2 {
    position: relative;
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    color: var(--secondary);
}

.parallax-section p {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.parallax-section .btn {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.parallax-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Fondo con patrón */
.pattern-bg {
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f17501' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* Divisor personalizado */
.divider-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.divider-line {
    height: 2px;
    width: 80px;
    background-color: var(--primary);
    opacity: 0.3;
}

.divider-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 15px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background-color: white;
}

.divider-icon i {
    font-size: 18px;
    color: var(--primary);
}

/* Encabezados de sección */
.section-header {
    margin-bottom: 40px;
}

.orange-text {
    color: #F17501 !important;
}

/* ===================================
   FOOTER MODERNO
   =================================== */

.footer-modern {
    background: linear-gradient(135deg, #1d4f8a 0%, #164070 100%);
    color: white;
    /*margin-top: 80px;*/
    padding: 60px 0 0;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Footer Brand */
.footer-brand {
    padding-right: 20px;
}

.footer-logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    background-color: white;
    padding: 10px;
    border-radius: 8px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Footer Social */
.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(241, 117, 1, 0.4);
}

/* Footer Navigation */
.footer-nav-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.footer-nav-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-list li {
    margin-bottom: 12px;
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.footer-nav-link:hover {
    color: var(--primary);
    transform: translateX(10px);
}

.footer-nav-link:hover::before {
    width: 8px;
}

/* Footer Contact */
.footer-contact {
    padding-left: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.contact-item i {
    width: 20px;
    color: var(--primary);
    margin-right: 12px;
    font-size: 1rem;
}

.contact-item span {
    transition: color 0.3s ease;
}

.contact-item:hover span {
    color: white;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    /*background-color: rgba(0, 0, 0, 0.2);*/
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

/* Responsive Footer */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 20px;
    }
    
    .footer-contact {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .footer-modern {
        padding: 40px 0 0;
        margin-top: 60px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand {
        grid-column: 1;
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .footer-nav-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav-link::before {
        display: none;
    }
    
    .footer-nav-link:hover {
        transform: none;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-logo {
        width: 150px;
    }
}

/* ========== EVENT DETAIL PAGE ========== */
.event-title {
    font-size: 2.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-meta {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-meta li {
    display: inline-block;
    margin-right: 1.25rem;
    color: #555;
}

.event-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.event-hero img {
    border-radius: 8px;
    max-height: 600px;
    /*width: 100%;*/
    object-fit: cover;
    object-position: center center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.more-events {
    border: 1px solid #000 !important;
    padding: 1.5rem;
    border-radius: 8px;
}

.more-events h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.more-event-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.7);
    margin-bottom: 10px;
    font-weight: 600;
    background: transparent;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

.share-links a {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.8);
    margin-right: 0.75rem;
    transition: color 0.3s ease;
}

.share-links a:hover {
    color: var(--primary);
}

/* ===== Subrace card (sidebar) ===== */
.subrace-card {
    border: 1px solid #000;
    padding: 12px 15px;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.subrace-card:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.subrace-card .badge {
    font-size: 0.75rem;
}
.border{
    border: 1px solid #000 !important;
}

/* Ajuste para botones pequeños en sidebar */
.btn-action.btn-sm {
    min-height: 32px;
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white;
}

.btn-action.btn-sm .btn-text {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action.btn-sm .btn-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.btn-action.btn-sm:hover .btn-arrow {
    transform: translateX(3px);
}

/* Estados específicos para botones pequeños - Estilo plano */
.btn-action.btn-sm.btn-is {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-action.btn-sm.btn-is:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(241, 117, 1, 0.2);
}

.btn-action.btn-sm.btn-t,
.btn-action.btn-sm.btn-in {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-action.btn-sm.btn-t:hover,
.btn-action.btn-sm.btn-in:hover {
    background: #5a6268;
    border-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

/* ===== Header interno ===== */
.inner-page-header{
    position:relative;
    background-size:cover;
    background-position:center;
    padding:100px 0 80px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inner-page-header .overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,0.5);
}
.inner-page-header .container{
    position:relative;
    z-index:2;
    width: 100%;
}
.page-title{
    font-size:2.5rem;
    font-weight:700;
    color:#fff;
    text-transform:uppercase;
}
.breadcrumb{
    background:transparent;
}
.breadcrumb-item{
    color:#fff;
    font-weight:500;
    text-transform:capitalize;
}
.breadcrumb-item a{color:#fff;}
.breadcrumb-item.active{color:var(--primary);}

/* ===== Escalat de grisos ===== */
.marathon-poster img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
  }
  
  .marathon-card:hover .marathon-poster img {
    filter: grayscale(0%);
    opacity: 1;
  }
/* ===== Fin Escalat de grisos ===== */  

/* ===== Anchors del slider ===== */
html {
    scroll-padding-top: 70px; 
}

.spacer-menu {
    display: block;
    height: 60px;      /* igual a la altura de tu menú fijo */
    margin-top: -50px; 
    visibility: hidden;
}

@media (max-width: 768px) {

    html {
        scroll-padding-top: 60px; 
    }
    .spacer-menu {
      height: 50px;      /* valor para móvil */
      margin-top: -40px;
    }
  }

@media (max-width: 992px) {

    html {
        scroll-padding-top: 60px; 
    }
    .spacer-menu {
      height: 50px;      /* valor para móvil */
      margin-top: -40px;
    }
}  
/* ===== Fin Anchors del slider ===== */

#heroSlider,
#heroSlider .carousel-inner {
    background-color: rgba(0, 0, 0, 0.6)
}

/* ===== Pàgina inscripcions ===== */
.cursa-link {
    color: var(--primary) !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-weight: 600;
}
.cursa-date-link {
    color: black !important;
    text-decoration: none !important;
}
.banner-inscripcions{
    background-color: #dfdfdf;
    color: white;
    padding: 20px;
    text-align: center;
    text-transform: uppercase;
    border-radius: 0px;
}

.banner-resultats {
    background-color: #dfdfdf;
    color: white;
    padding: 20px;
    text-align: center;
    text-transform: uppercase;
    border-radius: 0px;
}
img#podium {
    width: 172px;
}
.info-usuaris{
    background-image: url("../../images/fulles_llaure.png");
    background-color: var(--primary);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 260px auto;
    color: white;
    padding: 20px;
    text-align: center;
}

@media (max-width: 991px) {
    .info-usuaris {
      background-size: 180px auto;
    }
  }
  
  @media (max-width: 768px) {
    .info-usuaris{
      background-size: 300px auto;
    }
  }

  @media (max-width: 1200px) {
    .info-usuaris{
      background-size: 200px auto;
    }
  }  

.padding-top {
    padding-top: 50px;
}

.padding-bottom {
    padding-bottom: 50px;
}

.padding-top-bottom {
    padding-top: 50px;
    padding-bottom: 50px;
}


/* ===== Fin Pàgina inscripcions ===== */

.blink_me{
    font-size: 1.5rem;
}

.accordion-button {
    box-shadow: none !important;
    background-color: #fff !important;
    color: #222 !important;
}
.accordion-button:not(.collapsed) {
    background-color: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
}
.accordion-button:focus {
    box-shadow: none !important;
}

.accordion-item{
    border: 1px solid #000 !important;
    border-radius: 0px !important;
}

/* ===== DataTables Global Styles ===== /
/* Espaciado y alineación del título y buscador */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 18px;
}

.dataTables_wrapper.dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-weight: 500;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter {
    float: none;
    text-align: right;
}

.dataTables_wrapper .dataTables_length select {
    width: auto;
    min-width: 60px;
    display: inline-block;
    margin: 0 6px;
    padding: 4px 8px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-weight: 500;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter input[type="search"] {
    background: #f8f9fa;
    padding: 6px 16px;
    font-size: 1rem;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s;
}

.dataTables_wrapper .dataTables_filter input[type="search"]:focus {
    border-color: var(--primary) !important;
}

/* Tabla adaptativa */
.dataTable {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
}

/* Paginación centrada y moderna */
.dataTables_wrapper .dataTables_paginate {
    text-align: center !important;
    float: none !important;
    width: 100%;
    margin-bottom: 12px;
}

.dataTables_wrapper .pagination {
    display: inline-flex !important;
    justify-content: center;
    width: auto;
    margin: 0 auto;
    float: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    border: none;
    border-radius: 2px;
    padding: 6px 6px;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--primary) !important;
    background: none !important;
    text-decoration: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.active,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.active a {
    color: white !important;
    background: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button a {
    text-decoration: none !important;
    color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover a {
    color: white !important;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 12px;
    color: #888;
    font-size: 0.95rem;
}

/* Responsive: buscador y paginación apilados en móvil */
@media (max-width: 767px) {
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }
    .dataTables_wrapper .dataTables_filter input[type="search"] {
        width: 100%;
        margin-left: 0;
        margin-top: 6px;
    }
}
table.table-bordered th,
table.table-bordered td,
table.table-bordered {
    border-color: #000 !important;
}
/* ===== Fin DataTables Global Styles ===== */

.headerbox{
    margin-top: -66px; /* és pàgina de resultats, treure el pt del body*/
}

.form-control{
    border: 1px solid #000 !important;
    border-radius: 0px !important;
}

.img-corredors-header{
    max-height: 50px;
}

.img-responsive
{
    display: block;
    max-width: 100%;
    height: auto;
}

.campionat-block {
    margin-bottom: 1.5rem;
    padding: 1rem 1rem 0.5rem 1.2rem;
}
.campionat-block h5 {
    font-weight: bold;
    color: #F17501;
    text-align: center;
    margin-bottom: 0.7rem;
}
.campionat-block ul {
    margin-bottom: 0.5rem;
}
.campionat-block a {
    display: block;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    color: #222 !important;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.campionat-block a:hover {
    background: #F17501;
    color: #fff !important;
}

.hero-slide {
    height: 40vh !important; 
}
.inner-page-header {
    height: 40vh !important;
}

/* ===== Slider: ajustes SOLO móvil/tablet (no tocar desktop) ===== */
@media (max-width: 991.98px) {
    /* Altura flexible para que quepa el texto */
    .hero-slide {
        height: auto !important;
        min-height: 60vh;
    }
    /* Reducir padding interno para ganar espacio vertical */
    .hero-slide .container {
        padding: 24px 16px;
    }
    /* Tipografías más contenidas y sin desbordes */
    #heroSlider .display-4 {
        font-size: 2rem;
        line-height: 1.2;
    }
    #heroSlider .lead {
        font-size: 1rem;
        line-height: 1.5;
    }
    #heroSlider .hero-slide h1,
    #heroSlider .hero-slide p {
        word-break: break-word;
        overflow-wrap: anywhere;
        margin-bottom: 0.5rem;
    }
    /* Evitar que los indicadores tapen el texto */
    .carousel-indicators {
        bottom: 20px;
    }
}
@media (max-width: 575.98px) {
    /* Un poco más alto en móviles pequeños si hay 2-3 líneas + botones */
    .hero-slide {
        min-height: 70vh;
    }
    #heroSlider .display-4 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    #heroSlider .lead {
        font-size: 0.95rem;
    }
}
/* Igualar altura del carrusel en móvil/tablet para centrar el primer slide y evitar espacios */
@media (max-width: 991.98px) {
    #heroSlider,
    #heroSlider .carousel-inner {
        height: 65vh;
    }
    #heroSlider .carousel-item.hero-slide {
        height: 100% !important; /* Llenar la altura fija del carrusel */
    }
}
@media (max-width: 575.98px) {
    #heroSlider,
    #heroSlider .carousel-inner {
        height: 70vh;
    }
}

/* ===== Estilos responsive para page-title y inner-page-header ===== */
@media (max-width: 991.98px) {
    .inner-page-header {
        padding: 60px 0 50px;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .inner-page-header .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-title {
        font-size: 2.2rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 10px;
    }
    .page-title.long-text {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .inner-page-header {
        padding: 40px 0 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .page-title {
        font-size: 1.8rem;
        line-height: 1.25;
        padding: 0 5px;
    }
    .page-title.long-text {
        font-size: 1.4rem;
    }
}
/* ===== Fin estilos responsive page-title ===== */

/* ===== Estilos responsive para página de login ===== */
@media (max-width: 767.98px) {
    .padding-top-bottom {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    .card-minimal-event .card-body {
        padding: 1rem;
    }
    
    .card-minimal-event .card h4 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem !important;
    }
    
    .card-minimal-event .form-control {
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .card-minimal-event .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* =================================== 
    CONTACT PAGE - MINIMAL EVENT STYLE
    =================================== */

    .card-minimal-event {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-minimal-event:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-minimal-event .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    color: #495057;
}

.form-minimal-input {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease;
}

.form-minimal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(241, 117, 1, 0.1);
}

.btn-minimal-event {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-minimal-event:hover {
    transform: translateY(-1px);
}

.card { 
    padding: 35px;
}

@media (max-width: 768px) {
    .card {
        padding: 0;
    }
}

.card .border {
    border-color: #ccc !important;
}

.more-events {
    border: 1px solid #ccc !important;
}

.table.table-bordered th,
.table.table-bordered td {
    border: 1px solid #ccc !important;
}

.badge-danger{
    color: #fff !important;
    background-color: RGBA(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important;
}

.form-group{
    margin-bottom: 1rem;
}
/* Tabs personalizados */
.nav-tabs .nav-link {
    color: #bbb !important;
    background: none;
    border: none;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
}
.nav-tabs .nav-link.active {
    color: #fff !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) var(--primary) #fff !important;
    font-weight: 700;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(241,117,1,0.08);
}

/* ===== Estilos para contenido WYSIWYG dinámico (event-content) ===== */
/* Hace que las imágenes dentro del contenido dinámico sean responsivas */
.event-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* En móvil, asegurar que las imágenes no se desborden */
@media (max-width: 768px) {
    .event-content {
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    .event-content img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        margin: 1rem 0;
    }
    
    /* También hacer responsivas las tablas si las hay */
    .event-content table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Videos embebidos también responsivos */
    .event-content iframe,
    .event-content embed,
    .event-content object,
    .event-content video {
        max-width: 100% !important;
        height: auto !important;
    }
}
/* ===== Fin estilos contenido WYSIWYG ===== */
