/* Responsive Styles */

/* Large Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Medium Screens (Tablets) */
@media (max-width: 991.98px) {
    h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 80px 0;
    }




    .about-content,
    .membership-content {
        padding: 0;
        margin-top: 40px;
    }

    .activity-date {
        min-width: 80px;
        padding: 15px;
    }

    .testimonial-item {
        padding: 30px;
    }

    .course-card.featured {
        transform: none;
    }

    .course-card.featured:hover {
        transform: translateY(-10px);
    }
}

/* Small Screens (Mobile) */
@media (max-width: 767.98px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 0;
    }


    .btn {
        padding: 10px 20px;
    }

    .activity-card {
        flex-direction: column;
    }

    .activity-date {
        width: 100%;
        flex-direction: row;
        padding: 10px;
        justify-content: center;
    }

    .day {
        font-size: 1.5rem;
        margin-right: 5px;
    }

    .month {
        font-size: 1.5rem;
    }

    .testimonial-item {
        padding: 20px;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-text:before {
        font-size: 3rem;
        left: -15px;
        top: -20px;
    }

    .testimonial-img {
        width: 50px;
        height: 50px;
    }

    .carousel-control-prev {
        left: 2%;
    }

    .carousel-control-next {
        right: 2%;
    }

    .footer-section {
        padding: 60px 0 20px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
        display: flex;
    }
}

/* Extra Small Screens */
@media (max-width: 575.98px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .testimonial-item {
        padding: 15px;
    }



    .activity-content {
        padding: 15px;
    }

    .news-card img {
        height: 180px;
    }
}

@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 70px;
    }

    .hero-text {
        font-size: 1.8rem;
    }

    .bg-text-container span {
        font-size: 220px;
    }
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 60px;
    }

    .hero-text {
        font-size: 1.6rem;
    }

    .bg-text-container span {
        font-size: 180px;
    }

    .img-principal {
        max-width: 300px;
        margin-top: 30px;
    }

    /* Estilos para tablets del nuevo hero section */
    .hero-section {
        padding-top: 10px;
        padding-bottom: 20px;
        height: auto;
        min-height: 100vh;
    }

    .hero-container {
        padding: 0 40px;
    }

    .hero-title {
        font-size: 3.8rem;
    }

    .hero-description {
        font-size: 1.2rem;
    }

    .hero-svg-container {
        max-width: 500px;
        justify-content: center;
        margin: 0 auto;
    }

    .hero-svg-1 {
        max-width: 920px;
    }

    .hero-svg-2 {
        max-width: 250px;
        right: 80px;
    }

    /* Centering content for Tablet View */
    .hero-content-col {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content {
        text-align: center;
        width: 100%;
        justify-items: center;
    }

    .hero-buttons-wrapper {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .title-nav {
        display: none;
    }

    .logo-nav {
        width: 40px;
        height: 40px;
    }

    .hero-section {
        min-height: 100vh;
        text-align: center;
    }

    .hero-title {
        font-size: 45px !important;
        margin-bottom: 8px;
    }

    .hero-text {
        font-size: 1.4rem;
        margin: 15px 0;
    }

    .bg-text-container span {
        font-size: 120px;
    }

    .botonazo {
        padding: 12px 25px;
        font-size: 12px;
    }

    .img-principal {
        max-width: 250px;
        margin-top: 20px;
    }

    .nav-link {
        padding: 8px 12px !important;
    }

    /* Estilos responsivos para el nuevo hero section */
    .hero-section {
        padding-top: 70px;
        min-height: 100vh;
    }

    .hero-container {
        padding: 0 25px;
    }

    .hero-content-col {
        padding-left: 0;
        text-align: center;
        margin-bottom: 40px;
    }

    .hero-content {
        padding: 30px 0;
        text-align: center;
    }

    .hero-title {
        font-size: 2.8rem !important;
        margin-bottom: 1.2rem;
        text-align: center;
    }

    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        max-width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-btn {
        padding: 15px 35px;
        font-size: 1rem;
    }

    .hero-decorative-col {
        min-height: 400px;
        margin-top: 20px;
        order: -1;
        /* Mover SVGs arriba en móvil */
    }

    .hero-svg-container {
        padding-right: 0;
        justify-content: center;
        max-width: 100%;
        display: flex;
        align-items: center;
    }

    .hero-svg {
        position: relative;
        max-width: 320px;
        right: auto !important;
        top: auto !important;
        transform: none !important;
    }

    .hero-svg-1 {
        max-width: 250px;
        position: relative;
        margin-bottom: -30px;
    }

    .hero-svg-2 {
        max-width: 160px;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        margin-left: -50px;
        position: relative;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 35px !important;
    }

    .hero-text {
        font-size: 1.2rem;
    }

    .bg-text-container span {
        font-size: 80px;
    }

    .img-principal {
        max-width: 200px;
    }

    .botonazo {
        padding: 10px 20px;
        font-size: 11px;
    }

    /* Estilos para móviles pequeños del nuevo hero section */
    .hero-section {
        padding-top: 65px;
    }

    .hero-container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-cta-btn {
        padding: 14px 30px;
        font-size: 0.95rem;
    }

    .hero-decorative-col {
        min-height: 350px;
    }

    .hero-svg-1 {
        max-width: 200px;
    }

    .hero-svg-2 {
        max-width: 130px;
        margin-left: -40px;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 28px !important;
    }

    .hero-text {
        font-size: 1rem;
    }

    .bg-text-container span {
        font-size: 60px;
    }

    .img-principal {
        max-width: 150px;
    }

    .hero-svg-1 {
        max-width: 320px !important;
    }

    .hero-decorative-col {
        min-height: 320px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-text {
        font-size: 1.2rem;
        margin: 10px 0;
    }

    .bg-text-container span {
        font-size: 100px;
    }
}

/* ===== ESTILOS RESPONSIVE PARA INDEX.PHP ===== */

/* Puzzle Section - Responsive */
@media (max-width: 991.98px) {
    .puzzle-section {
        padding: 60px 0 !important;
    }

    .puzzle-section .container {
        padding: 0 20px;
    }

    #lichess-puzzle-container {
        height: 400px !important;
        margin-bottom: 30px;
    }

    .puzzle-section h2 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }

    .puzzle-section p {
        font-size: 1rem !important;
    }

    .puzzle-section .content-box {
        padding-left: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .puzzle-section {
        padding: 40px 0 !important;
    }

    .puzzle-section .container {
        padding: 0 15px;
    }

    #lichess-puzzle-container {
        height: 350px !important;
        border-radius: 15px !important;
        margin-bottom: 25px;
    }

    .puzzle-section h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }

    .puzzle-section p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-top: 15px !important;
    }

    .puzzle-section .d-grid {
        gap: 15px !important;
    }

    .puzzle-section .btn {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }

    .puzzle-section small {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 575.98px) {
    #lichess-puzzle-container {
        height: 300px !important;
        border-radius: 12px !important;
    }

    .puzzle-section h2 {
        font-size: 1.5rem !important;
    }

    .puzzle-section p {
        font-size: 0.9rem !important;
    }

    .puzzle-section .btn {
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
    }

    .puzzle-section .btn i {
        font-size: 0.8rem !important;
    }
}

/* News Section - Responsive */
@media (max-width: 991.98px) {
    .news-section {
        padding: 60px 0 !important;
    }

    .news-section .container {
        padding: 0 20px;
    }

    .news-section h2 {
        font-size: 2rem !important;
        margin-bottom: 25px !important;
    }

    .news-item {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    .news-item h5 {
        font-size: 1.1rem !important;
    }

    .news-item p {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 767.98px) {
    .news-section {
        padding: 40px 0 !important;
    }

    .news-section .container {
        padding: 0 15px;
    }

    .news-section h2 {
        font-size: 1.75rem !important;
        margin-bottom: 20px !important;
        text-align: center;
    }

    .news-section .row {
        flex-direction: column-reverse;
    }

    .news-section .col-lg-7 {
        padding-right: 0 !important;
        margin-top: 30px;
    }

    .news-section .col-lg-5 {
        margin-bottom: 0 !important;
    }

    .news-section .position-relative {
        margin-bottom: 20px;
    }

    .news-section .position-relative>div:first-child {
        display: none;
        /* Ocultar el círculo decorativo en móvil */
    }

    .news-section img {
        border-radius: 15px !important;
        border: 3px solid #fff !important;
    }

    .news-item {
        flex-direction: column;
        padding: 15px !important;
        margin-bottom: 15px !important;
    }

    .news-item .news-date {
        min-width: auto !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .news-item .news-date span:first-child {
        font-size: 1.5rem !important;
    }

    .news-item h5 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .news-item p {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 575.98px) {
    .news-section h2 {
        font-size: 1.5rem !important;
    }

    .news-item {
        padding: 12px !important;
    }

    .news-item h5 {
        font-size: 0.95rem !important;
    }

    .news-item p {
        font-size: 0.8rem !important;
    }

    .news-section a {
        font-size: 0.9rem !important;
    }
}

/* Hero Section - Ajustes adicionales para botones en móvil */
.hero-buttons-wrapper {
    margin-top: 1rem;
}

@media (max-width: 767.98px) {
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons-wrapper {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta-btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .hero-title br {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .hero-buttons-wrapper {
        gap: 12px !important;
    }

    .hero-cta-btn {
        padding: 12px 25px !important;
        font-size: 0.9rem !important;
    }
}

/* Ajustes para WhatsApp button en móvil */
@media (max-width: 767.98px) {
    .whatsapp {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }

    .whatsapp-icon {
        margin-top: 11px;
    }
}

/* Ajustes generales de padding para móviles */
@media (max-width: 767.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Mejoras para pantallas muy pequeñas */
@media (max-width: 400px) {
    .puzzle-section h2 {
        font-size: 1.3rem !important;
    }

    .news-section h2 {
        font-size: 1.3rem !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }
}

/* Custom Table Card View for Torneos */
@media (max-width: 991px) {
    .custom-table thead {
        display: none;
    }

    .custom-table,
    .custom-table tbody,
    .custom-table tr,
    .custom-table td {
        display: block;
        width: 100%;
    }

    .custom-table tr {
        margin-bottom: 20px;
        background-color: #fff;
        border: 1px solid rgba(0, 0, 0, 0.125);
        border-radius: 0.5rem;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        padding: 1.25rem;
        position: relative;
    }

    .custom-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.75rem 0;
        border-bottom: 1px solid #dee2e6;
        min-height: 40px;
        /* Asegurar altura mínima */
    }

    .custom-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .custom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        text-align: left;
        margin-right: auto;
        padding-right: 15px;
        /* Espacio entre label y contenido */
        flex-shrink: 0;
        /* El label no se encoge */
        max-width: 40%;
        /* El label ocupa máximo 40% */
    }

    /* Header/Title styling (First column - Fechas o Nombre según diseño) */
    /* En este caso, el usuario quiere el NOMBRE como título principal, pero en el HTML */
    /* la primera columna es FECHA. Vamos a ajustar para que FECHA sea secundario o */
    /* vamos a destacar el NOMBRE (2da columna) */

    /* Destacar Nombre del Torneo (2da columna) */
    .custom-table td[data-label="Torneo"] {
        font-size: 1.15rem;
        font-weight: 700;
        color: #212529;
        border-bottom: 2px solid #f8f9fa;
        margin-bottom: 0.5rem;
        padding-top: 0;
        display: block;
        /* Para que ocupe todo el ancho sin flex */
        text-align: left;
    }

    .custom-table td[data-label="Torneo"]::before {
        display: none;
        /* Ocultar el label "Torneo" para que parezca título */
    }

    .custom-table td[data-label="Torneo"] .nombre-wrapper {
        white-space: normal;
        /* Permitir wrap en móvil */
        max-width: 100%;
        margin-bottom: 5px;
    }

    /* Ajustes para badges dentro del nombre */
    .custom-table td[data-label="Torneo"] .d-flex {
        margin-top: 5px;
    }

    /* Button area */
    .custom-table td:last-child {
        margin-top: 1rem;
        padding-top: 0;
    }

    .custom-table td:last-child a {
        width: 100%;
        border-radius: 5px;
        /* Botón cuadrado en móvil */
    }

    .custom-table td:last-child::before {
        display: none;
    }
}