﻿/* Estilos para barra lateral moderna */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 280px;
    height: 100%;
    background-color: white;
    z-index: 1050;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    overflow-y: auto;
    overscroll-behavior: contain; /* Previene scroll de página cuando llegas al límite */
}

    .sidebar-menu.active {
        left: 0;
        transform: translateX(0);
    }

.sidebar-parent-link {
    display: flex;
    align-items: center;
    width: 100%;
}

    .sidebar-parent-link .sidebar-link {
        flex-grow: 1;
        padding-right: 0;
    }

    .sidebar-parent-link .disabled-link {
        pointer-events: none; /* Deshabilita clics en enlaces # */
    }

.submenu-toggle {
    width: 50px;
    height: 48px;
    padding: 0;
    background: transparent;
    border: none;
    color: #555;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
}

    .submenu-toggle i {
        transition: transform 0.3s;
    }

    .submenu-toggle.active i {
        transform: rotate(180deg);
    }

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
    position: relative;
}

    .sidebar-link:hover,
    .sidebar-link:focus,
    .sidebar-link:active {
        background-color: #f5f5f5;
        color: var(--ter-back);
        text-decoration: none;
    }

    .sidebar-link i {
        margin-right: 10px;
        width: 20px;
        text-align: center;
    }

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f9f9f9;
}

    .sidebar-submenu.expanded {
        max-height: 1000px;
    }

    .sidebar-submenu .sidebar-link {
        padding-left: 40px;
        font-size: 15px;
        color: #555;
    }

/* Estilos adicionales para el menú móvil */
.sidebar-item-submenu {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

    .sidebar-item-submenu:last-child {
        border-bottom: none;
    }

.has-nested-menu .sidebar-link {
    padding-right: 50px;
}

.nested-toggle {
    position: absolute;
    right: 0;
    top: 0;
}

.sidebar-nested-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f0f0f0;
}

    .sidebar-nested-submenu.expanded {
        max-height: 1000px;
    }

    .sidebar-nested-submenu .sidebar-link {
        padding-left: 55px;
        font-size: 14px;
    }

.sidebar-item-submenu.has-nested-menu {
    position: relative;
}

/* Efecto de toque claramente visible */
.sidebar-link:active {
    background-color: #e9e9e9;
}

.sidebar-item {
    border-bottom: 1px solid #eee;
}

    .sidebar-item:last-child {
        border-bottom: none;
    }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

    .sidebar-overlay.active {
        display: block;
    }

.sidebar-header {
    padding: 20px;
    position: relative;
    border-bottom: 1px solid #eee;
}

.sidebar-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.club-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.club-logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.club-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    color: var(--prim-back);
}

.sidebar-content {
    padding: 15px 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    border-bottom: 1px solid #eee;
}

    .sidebar-item > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        color: #333;
        font-size: 16px;
        text-decoration: none;
        transition: background-color 0.3s;
    }

        .sidebar-item > a:hover,
        .sidebar-item > a:focus {
            background-color: #f5f5f5;
            color: var(--ter-back);
        }

        .sidebar-item > a i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }

        .sidebar-item > a .fa-chevron-down {
            margin-right: 0;
            transition: transform 0.3s;
        }

        .sidebar-item > a.expanded .fa-chevron-down {
            transform: rotate(180deg);
        }

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f9f9f9;
}

    .sidebar-submenu.expanded {
        max-height: 1000px; /* Valor alto para asegurar que se expanda completamente */
    }

    .sidebar-submenu li {
        border-top: 1px solid #eee;
    }

        .sidebar-submenu li a {
            display: block;
            padding: 12px 20px 12px 45px;
            color: #555;
            font-size: 15px;
            text-decoration: none;
        }

            .sidebar-submenu li a:hover,
            .sidebar-submenu li a:focus {
                background-color: #f0f0f0;
                color: var(--ter-back);
            }

/* Barra superior móvil mejorada */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--prim-back);
    color: var(--prim-fore);
    z-index: 1030;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    height: 70px;
}

.mobile-header-content {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
}

.mobile-menu-trigger {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    margin-right: 10px;
}

.mobile-logo {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 12px 0 5px;
}

    .mobile-logo img {
        max-width: 100%;
        max-height: 100%;
        border-radius: 4px;
    }

.mobile-club-name {
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-family: 'Abel', sans-serif;
}

/* Búsqueda móvil */
.mobile-search {
    position: fixed;
    top: -68px;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 1035;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: top 0.3s ease;
}

    .mobile-search.active {
        top: 70px;
    }

.mobile-search-form {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

    .mobile-search-form input {
        flex: 1;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 16px;
    }

    .mobile-search-form .btn-search,
    .mobile-search-form .btn-close-search {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 18px;
        margin-left: 5px;
        cursor: pointer;
    }

    .mobile-search-form .btn-search {
        color: var(--ter-back);
    }

    .mobile-search-form .btn-close-search {
        color: #666;
    }

/* Mejorar apariencia visual de tarjetas y secciones */
.card, .panel, .box, section.slice, .news-item, .article-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: none;
}

.card-header, .panel-heading {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background-color: rgba(0,0,0,0.02);
    padding: 15px;
}

.card-body, .panel-body {
    padding: 15px;
}

/* Estilos para el botón de inscripción en el menú móvil */
.inscription-link {
    background-color: var(--ter-back);
    color: var(--ter-fore) !important;
    border-radius: 4px;
    margin: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

    .inscription-link:before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.2);
        transition: all 0.4s ease;
    }

    .inscription-link:hover:before {
        left: 100%;
    }

    .inscription-link:hover,
    .inscription-link:focus,
    .inscription-link:active {
        background-color: var(--ter-back) !important;
        color: var(--ter-fore) !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    .inscription-link i {
        margin-right: 10px;
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Específicamente para pantallas móviles */
@media (max-width: 767px) {
    .inscription-link {
        margin: 15px;
        padding: 12px 15px;
    }
}

/* Botones modernos */
@media (max-width: 767px) {
    body {
        padding-top: 70px !important;
        margin-top: 0 !important;
    }

    .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin: 0;
    }

    #toTop {
        display: none !important;
    }

    .container.shadow-main {
        margin-top: 0 !important;
        padding-top: 0 !important;
        box-shadow: none;
    }

    .btn {
        border-radius: 8px;
        font-weight: 600;
        padding: 10px 20px;
        transition: all 0.3s;
        border: none;
        position: relative;
        overflow: hidden;
    }

    .btn-primary, .btn-base {
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .btn:active {
        transform: translateY(2px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* Títulos de sección mejorados */
    .section-title, h1, h2, h3.section-title {
        position: relative;
        margin-bottom: 25px;
        font-family: 'Oswald', sans-serif;
        font-weight: 600;
    }

        .section-title:after, h1:after, h2:after, h3.section-title:after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -8px;
            width: 40px;
            height: 3px;
            background-color: var(--ter-back);
            border-radius: 3px;
        }

        .text-center .section-title:after,
        .text-center h1:after,
        .text-center h2:after,
        h1.text-center:after,
        h2.text-center:after {
            left: 50%;
            margin-left: -20px;
        }

    /* Transiciones y efectos visuales */
    a, button, .btn, .card, .panel {
        transition: all 0.3s ease;
    }

        a:active, button:active {
            transform: scale(0.98);
        }

    /* Mejorar listas de noticias y elementos */
    .news-item, .item, .article-wrapper {
        margin-bottom: 20px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

        .news-item:active, .item:active, .article-wrapper:active {
            transform: translateY(2px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .news-item img, .item img, .article-wrapper img {
            border-radius: 8px 8px 0 0;
            width: 100%;
            height: auto;
        }

        .news-item .caption, .item .caption, .article-wrapper .caption {
            padding: 15px;
        }

        .news-item h3, .item h3, .article-wrapper h3 {
            font-size: 18px;
            margin-top: 0;
            margin-bottom: 10px;
        }

        .news-item p, .item p, .article-wrapper p {
            font-size: 14px;
            line-height: 1.5;
            color: #666;
        }

    /* Efecto de carga progresiva para imágenes */
    .progressive-img {
        position: relative;
        overflow: hidden;
        background-color: #f0f0f0;
    }

        .progressive-img img {
            transition: opacity 0.3s ease, filter 0.5s ease;
        }

            .progressive-img img.loading {
                opacity: 0;
                filter: blur(10px);
            }

            .progressive-img img.loaded {
                opacity: 1;
                filter: blur(0);
            }

    /* Botón flotante de acción rápida */
    .fab-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
    }

    .fab-button {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: var(--ter-back);
        color: var(--ter-fore);
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        cursor: pointer;
        transition: all 0.3s;
    }

        .fab-button:active {
            transform: scale(0.95);
        }

    .fab-options {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: flex-end;
    }

        .fab-options.active {
            display: flex;
        }

    .fab-option {
        display: flex;
        align-items: center;
        background: white;
        border-radius: 25px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        margin-bottom: 10px;
        overflow: hidden;
        transform: scale(0);
        animation: scaleIn 0.3s ease forwards;
    }

        .fab-option a {
            display: flex;
            align-items: center;
            padding: 10px 15px;
            color: #333;
            text-decoration: none;
            white-space: nowrap;
        }

        .fab-option i {
            margin-right: 8px;
        }

    @keyframes scaleIn {
        from {
            transform: scale(0);
        }

        to {
            transform: scale(1);
        }
    }

    /* Efecto táctil mejorado */
    .touch-effect {
        position: relative;
        overflow: hidden;
    }

        .touch-effect:after {
            content: '';
            display: block;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            pointer-events: none;
            background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
            background-repeat: no-repeat;
            background-position: 50%;
            transform: scale(10, 10);
            opacity: 0;
            transition: transform .5s, opacity 1s;
        }

        .touch-effect:active:after {
            transform: scale(0, 0);
            opacity: .3;
            transition: 0s;
        }

    /* Ocultamos la cabecera original y la navegación en móvil */
    .headClubBig,
    .navbar-wp,
    #dl-menu {
        display: none !important;
    }

    .shadow-main {
        margin-top: 0;
        box-shadow: none;
    }

    /* Ajustes para el contenido principal */
    #contentMain {
        margin-top: 0 !important;
        padding-top: 15px !important;
    }

    /* Eliminar cualquier padding o margen adicional */
    header, nav, section:first-of-type {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Mejorar el espaciado y la legibilidad */
    .section-title, h1, h2, h3 {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    p, ul, ol {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Mejorar el aspecto de las imágenes */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
    }

    /* Mejorar formularios */
    input, select, textarea, .form-control {
        font-size: 16px !important;
        padding: 12px !important;
        height: auto;
        border-radius: 8px;
        border: 1px solid #ddd;
    }

    .input-group-btn .btn {
        height: 100%;
        padding: 12px 15px !important;
    }

    /* Banner de cookies responsive */
    #barraaceptacion, #barraConfigCookies {
        padding: 15px !important;
    }

        #barraaceptacion .container, #barraConfigCookies .container {
            width: 100%;
            padding: 0;
        }

        #barraaceptacion .btn, #barraConfigCookies .btn {
            width: 100%;
            margin-bottom: 10px !important;
            border-radius: 8px !important;
            text-transform: uppercase;
            font-weight: bold;
        }
}

/* Asegurar que la barra lateral solo aparezca en pantallas pequeñas */
@media (min-width: 768px) {
    .mobile-header,
    .sidebar-menu,
    .sidebar-overlay,
    .mobile-search,
    .fab-container {
        display: none !important;
    }

    body {
        padding-top: 0;
    }
}

/* Estilos para el contenedor de patrocinadores - visibles en todos los dispositivos */
section.container.slice:has(#patro),
.patrocinadores-section {
    display: block !important;
    margin-bottom: 20px !important;
    clear: both !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Contenedor del carrusel */
#patro {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    text-align: center !important;
    min-height: 120px !important; /* Ajustar según el tamaño de tus banners */
    visibility: hidden; /* Solo oculto inicialmente */
}

    /* Cada banner individual */
    #patro article {
        width: 100% !important;
        margin: 0 auto !important;
        transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out !important;
        opacity: 0; /* Inicialmente invisible */
    }

        /* Imágenes dentro de los banners */
        #patro article img {
            max-width: 100% !important;
            height: auto !important;
            margin: 0 auto !important;
            display: block !important;
        }

/* Ajustes específicos para móviles */
@media (max-width: 767px) {
    #patro {
        min-height: 80px !important;
    }

    /* Forzar visibilidad en móviles */
    section:has(#patro),
    #patro {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
        z-index: 10 !important; /* Asegurar que está por encima de otros elementos */
    }

        /* Transición más simple para móviles */
        #patro article {
            transition: opacity 0.5s ease-in-out !important;
        }
}

/* Corrección para IOS Safari */
@supports (-webkit-overflow-scrolling: touch) {
    #patro,
    #patro article {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}