/* ================================ */
/*      TELARES PADEL STYLES       */
/* ================================ */

/* Variables y paleta de colores */
:root {
    --color-azul: #003366;
    --color-naranja: #FF6600;
    --color-blanco: #FFFFFF;
    --color-gris-claro: #F5F5F5;
    --color-gris: #E0E0E0;
    --color-gris-oscuro: #333333;
    --color-texto: #444444;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-texto);
    background-color: var(--color-blanco);
}

.container{
    max-width: 1200px;
    width: 95%;
    margin: auto;
}

.container-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ================================ */
/*           NAVBAR                 */
/* ================================ */

.navbar {
    background: #FFFFFF;
    padding: 15px 0;
    position: sticky;
    color: #030f37;
    top: 0;
    z-index: 1000;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
}

.logo {
    height: 60px;
    width: auto;
}

.club-title h1 {
    color: #0d0c0c;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.club-title p {
    color: var(--color-naranja);
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: #0d0c0c;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 5px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-naranja);
    background-color: rgba(255, 102, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    width: 0;
    height: 2px;
    background-color: var(--color-naranja);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: calc(100% - 30px);
}

/* ================================ */
/*          HERO SECTION            */
/* ================================ */

.hero {
    background: linear-gradient(135deg, var(--color-azul) 0%, #004d80 100%);
    color: var(--color-blanco);
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="dots" x="0" y="0" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="1200" height="600" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--color-naranja);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================ */
/*          BOTONES                 */
/* ================================ */

.btn {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

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

.btn-primary:hover {
    background-color: #FF8533;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-blanco);
    border: 2px solid var(--color-blanco);
}

.btn-secondary:hover {
    background-color: var(--color-blanco);
    color: var(--color-azul);
    transform: translateY(-2px);
}

.btn-info {
    background-color: var(--color-naranja);
    color: var(--color-blanco);
    padding: 10px 20px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background-color: #FF8533;
}

/* ================================ */
/*      INFO CLUB SECTION           */
/* ================================ */

.info-club {
    padding: 80px 20px;
    background-color: var(--color-gris-claro);
}

.info-club h2 {
    color: var(--color-azul);
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.info-text h2 {
    color: var(--color-azul);
    font-size: 32px;
    margin-bottom: 20px;
}

.info-text p {
    color: var(--color-texto);
    margin-bottom: 20px;
    line-height: 1.8;
}

.club-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat {
    background-color: var(--color-blanco);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat h3 {
    color: var(--color-naranja);
    font-size: 32px;
    margin-bottom: 10px;
}

.stat p {
    color: var(--color-azul);
    margin: 0;
    font-weight: 500;
}

/* Info Contact */
.info-contact {
    background-color: var(--color-blanco);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.info-contact h3 {
    color: var(--color-azul);
    font-size: 24px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.contact-item i {
    color: var(--color-naranja);
    font-size: 20px;
    margin-top: 3px;
    min-width: 20px;
}

.contact-item p {
    color: var(--color-texto);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-gris);
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background-color: var(--color-azul);
    color: var(--color-blanco);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--color-naranja);
    transform: translateY(-3px);
}

/* ================================ */
/*     TORNEOS SECTION              */
/* ================================ */

.torneos-section {
    padding: 80px 20px;
    background-color: var(--color-blanco);
}

.torneos-section h2 {
    color: var(--color-azul);
    font-size: 36px;
    margin-bottom: 10px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--color-naranja);
    font-size: 16px;
    margin-bottom: 50px;
}

.torneos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.torneo-card {
    background-color: var(--color-blanco);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--color-naranja);
    display: flex;
    flex-direction: column;
}

.torneo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.status-proxima {
    border-left-color: var(--color-naranja);
}

.status-en_curso {
    border-left-color: #4CAF50;
}

.status-finalizado {
    border-left-color: var(--color-gris);
}

.torneo-header {
    background: linear-gradient(135deg, var(--color-azul) 0%, #004d80 100%);
    color: var(--color-blanco);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.torneo-header h3 {
    font-size: 18px;
    margin: 0;
    flex: 1;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.status-badge.proxima {
    background-color: rgba(255, 102, 0, 0.8);
    color: var(--color-blanco);
}

.status-badge.en_curso {
    background-color: rgba(76, 175, 80, 0.8);
    color: var(--color-blanco);
}

.status-badge.finalizado {
    background-color: rgba(200, 200, 200, 0.8);
    color: var(--color-gris-oscuro);
}

.torneo-body {
    padding: 20px;
    flex-grow: 1;
}

.torneo-info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.torneo-info-item i {
    color: var(--color-naranja);
    margin-top: 3px;
    min-width: 20px;
}

.torneo-info-item strong {
    display: block;
    color: var(--color-azul);
    font-size: 14px;
}

.torneo-info-item p {
    margin: 3px 0 0 0;
    font-size: 14px;
}

.torneo-description {
    font-size: 13px;
    color: var(--color-texto);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--color-gris);
}

.torneo-footer {
    padding: 15px 20px;
    background-color: var(--color-gris-claro);
    text-align: center;
}

.no-torneos {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-gris-oscuro);
    padding: 40px;
}

/* ================================ */
/*     SERVICIOS SECTION            */
/* ================================ */

.servicios-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--color-gris-claro) 0%, #E8F0F5 100%);
}

.servicios-section h2 {
    color: var(--color-azul);
    font-size: 36px;
    margin-bottom: 10px;
    text-align: center;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.servicio-card {
    background-color: var(--color-blanco);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.servicio-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--color-azul) 0%, #004d80 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-blanco);
}

.servicio-card h3 {
    color: var(--color-azul);
    font-size: 18px;
    margin-bottom: 15px;
}

.servicio-card p {
    color: var(--color-texto);
    font-size: 14px;
    line-height: 1.6;
}

/* ================================ */
/*     CONTACTO SECTION             */
/* ================================ */

.contacto-section {
    padding: 80px 20px;
    background-color: var(--color-blanco);
}

.contacto-section h2 {
    color: var(--color-azul);
    font-size: 36px;
    margin-bottom: 10px;
    text-align: center;
}

.contacto-content {
    max-width: 600px;
    margin: 50px auto 0;
    background-color: var(--color-gris-claro);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.contacto-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--color-azul);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--color-gris);
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-naranja);
    box-shadow: 0 0 5px rgba(255, 102, 0, 0.2);
}

.contacto-form .btn-primary {
    margin-top: 10px;
    width: 100%;
}

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

.footer {
    background: linear-gradient(135deg, var(--color-azul) 0%, #004d80 100%);
    color: var(--color-blanco);
    padding: 50px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--color-naranja);
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-section p {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--color-blanco);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--color-naranja);
    margin-left: 5px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: inline-flex;
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-blanco);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--color-naranja);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 102, 0, 0.3);
    font-size: 13px;
}

/* ================================ */
/*       RESPONSIVE DESIGN          */
/* ================================ */

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .info-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .club-stats {
        grid-template-columns: 1fr;
    }

    .torneos-grid {
        grid-template-columns: 1fr;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .torneo-header {
        flex-wrap: wrap;
    }

    .status-badge {
        margin-top: 10px;
    }

    .contacto-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo-section {
        flex: 1 100%;
        justify-content: center;
    }

    .menu-toggle {
        flex: 0 0 auto;
    }

    .logo {
        height: 50px;
    }

    .club-title h1 {
        font-size: 18px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .hero p {
        font-size: 16px;
    }

    .torneos-section h2,
    .servicios-section h2,
    .contacto-section h2 {
        font-size: 28px;
    }

    .torneo-header {
        flex-direction: column;
    }

    .status-badge {
        width: 100%;
        text-align: center;
    }
}

.torneo-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.torneo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* recorte inteligente */
    display: block;
    transition: transform 0.3s ease;
}

.torneo-card:hover .torneo-image img {
    transform: scale(1.05);
}

/* ================================ */
/*        ADMIN DASHBOARD           */
/* ================================ */

.admin-wrapper {
    background-color: var(--color-gris-claro);
    min-height: 100vh;
    padding: 40px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h2 {
    color: var(--color-azul);
    font-size: 28px;
}

/* ================================ */
/*        PANEL CARD                */
/* ================================ */

.admin-card {
    background-color: var(--color-blanco);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

/* ================================ */
/*        TABLA TORNEOS             */
/* ================================ */

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--color-azul);
    color: var(--color-blanco);
}

.admin-table th {
    padding: 14px;
    text-align: left;
    font-size: 14px;
}

.admin-table td {
    padding: 14px;
    border-bottom: 1px solid var(--color-gris);
    font-size: 14px;
}

.admin-table tbody tr:hover {
    background-color: rgba(0,0,0,0.03);
}

/* ================================ */
/*        BOTONES ADMIN             */
/* ================================ */

.btn-admin {
    background-color: var(--color-azul);
    color: var(--color-blanco);
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

@media (max-width:768px){
    .btn-admin{
        padding:10px 12px;
        font-size:14px;
    }
}

.btn-action-ver {
    background-color: rgb(105, 145, 31);
}

.btn-action-editar {
    background-color: #179c88;
}

.btn-action-eliminar {
    background-color: #a72d26;
}

.btn-admin:hover {
    background-color: #004d80;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

/* Administrar */
.btn-admin-info {
    background-color: var(--color-azul);
    color: var(--color-blanco);
    padding: 8px 14px;
    font-size: 13px;
}

.btn-admin-info:hover {
    background-color: #004d80;
}

/* Editar */
.btn-admin-edit {
    background-color: var(--color-naranja);
    color: var(--color-blanco);
}

.btn-admin-edit:hover {
    background-color: #FF8533;
}

/* Eliminar */
.btn-admin-delete {
    background-color: #d9534f;
    color: white;
}

.btn-admin-delete:hover {
    background-color: #c9302c;
}

/* ================================ */
/*        BOTON CREAR               */
/* ================================ */

.btn-create {
    background-color: var(--color-naranja);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-create:hover {
    background-color: #FF8533;
    transform: translateY(-2px);
}

/* ================================ */
/*        FORMULARIOS ADMIN         */
/* ================================ */

.admin-form {
    display: grid;
    gap: 18px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--color-gris);
    font-size: 14px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--color-naranja);
    box-shadow: 0 0 6px rgba(255,102,0,0.2);
}

/* ================================ */
/*        ACCIONES INLINE           */
/* ================================ */

.admin-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.torneo-info{
    flex:1;
}

.torneo-actions{
    flex-shrink:0;
}

/* LISTADO ADMIN TORNEOS */

.torneos-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.torneo-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#ffffff;
    padding:18px 22px;
    border-radius:10px;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
    transition:.2s ease;
}

.torneo-row:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.10);
}

.torneo-info h3{
    margin:0;
    font-size:20px;
    color:var(--color-azul);
}

.torneo-meta{
    margin-top:4px;
    font-size:14px;
    color:#666;
    display:flex;
    gap:18px;
}

.torneo-actions{
    display:flex;
    gap:8px;
}

.torneo-row:hover {
    transform: translateY(-2px);
    transition: 0.2s ease;
}

/* ================================ */
/*      DETALLE TORNEO              */
/* ================================ */

.torneo-detalle-section{
    padding:80px 20px;
    background:var(--color-gris-claro);
}

.torneo-detalle-card{
    display:grid;
    grid-template-columns: 1.2fr 1fr;
    gap:40px;
    background:white;
    border-radius:12px;
    padding:30px;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
    margin-bottom:30px;
}

.torneo-detalle-image{
    width:100%;
    border-radius:10px;
    overflow:hidden;
}

.torneo-detalle-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.torneo-detalle-info h3{
    color:var(--color-azul);
    margin-bottom:20px;
}

.torneo-descripcion-box{
    background:white;
    border-radius:12px;
    padding:30px;
    box-shadow:0 4px 12px rgba(0,0,0,.06);
}

.torneo-descripcion-box h3{
    color:var(--color-azul);
    margin-bottom:15px;
}

.torneo-descripcion-box p{
    line-height:1.8;
    color:var(--color-texto);
}

/* RESPONSIVE */

@media(max-width:900px){

    .torneo-detalle-card{
        grid-template-columns:1fr;
    }

}

.categorias-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:12px;
    margin-top:10px;
}

.categoria-check{
    display:flex;
    align-items:center;
    gap:10px;
    background:#f7f7f7;
    padding:12px;
    border-radius:8px;
    cursor:pointer;
    transition:.2s ease;
}

.categoria-check:hover{
    background:#ececec;
}

.categoria-admin{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px;
    border-bottom:1px solid #eee;
}

/* ============================= */
/*            MODAL              */
/* ============================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;

    /* centrado moderno */
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}

/* caja del modal */
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);

    animation: modalFade .25s ease;
}

/* animación suave */
@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* títulos */
.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.modal-content h4 {
    margin: 18px 0 8px;
    font-size: 15px;
    color: #555;
}

/* inputs */
.modal-content input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: .2s;
}

.modal-content input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.15);
}

/* botones */
.modal-content button {
    margin-top: 10px;
}

.modal-content button[type="button"] {
    background: #eee;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.modal-content button[type="button"]:hover {
    background: #ddd;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* opcional: evita salto raro del h3 */
.admin-section-header h3 {
    margin: 0;
}

.inscripciones-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inscripcion-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estado {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.estado.pendiente {
    background: #fff3cd;
    color: #856404;
}

.categoria {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #FFEB3B;
    color: #856404;

}

.empty {
    opacity: .6;
    font-style: italic;
}

/* ===================================== */
/*        ADMIN RESPONSIVE FIX           */
/* ===================================== */

/* Header acciones */
.admin-header-actions{
    display:flex;
    justify-content:flex-end;
    margin-bottom:15px;
    flex-wrap:wrap;
    gap:10px;
}

/* Botón volver */
.btn-back{
    background:#eee;
    padding:10px 14px;
    border-radius:6px;
    text-decoration:none;
    color:#333;
    font-weight:600;
}

/* ---------- GRID CATEGORIAS ---------- */

.categorias-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.categoria-check{
    display:flex;
    align-items:center;
    gap:8px;
    background:#f7f7f7;
    padding:10px;
    border-radius:6px;
    cursor:pointer;
}

/* ---------- PARTICIPANTES ---------- */

.admin-section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
}

.inscripciones-lista{
    display:flex;
    flex-direction:column;
    gap:12px;
}

/* ---------- MODAL ---------- */

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    display:none;
    justify-content:center;
    align-items:center;
    padding:20px;
    z-index:2000;
}

.modal-content{
    background:white;
    padding:25px;
    border-radius:10px;
    width:100%;
    max-width:500px;
    max-height:90vh;
    overflow-y:auto;
}

/* ===================================== */
/*        TABLET (<= 1024px)             */
/* ===================================== */

@media (max-width:1024px){

    .categorias-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

/* ===================================== */
/*        MOBILE (<= 768px)              */
/* ===================================== */

@media (max-width:768px){

    .admin-wrapper{
        padding:20px 10px;
    }

    .admin-card{
        padding:18px;
    }

    /* formulario más compacto */
    .admin-form{
        gap:14px;
    }

    .admin-form input,
    .admin-form select{
        font-size:16px; /* evita zoom iOS */
        width:100%;
    }

    /* títulos */
    .admin-card h2{
        font-size:22px;
    }

    /* header acciones vertical */
    .admin-header-actions{
        justify-content:flex-start;
    }

    /* categorías una columna */
    .categorias-grid{
        grid-template-columns:1fr;
    }

    /* sección participantes */
    .admin-section-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .btn-create{
        width:100%;
        text-align:center;
    }

}

/* ===================================== */
/*        SMALL MOBILE (<= 480px)        */
/* ===================================== */

@media (max-width:480px){

    .modal-content{
        padding:18px;
        border-radius:8px;
    }

    .modal-content h3{
        font-size:18px;
    }

    .modal-content input{
        width:100%;
    }

}

.categoria-bloque{
    margin-bottom:25px;
}

.categoria-titulo{
    background:#E3F2FD;
    padding:10px 14px;
    border-radius:8px;
    font-size:18px;
    font-weight:600;
    margin-bottom:12px;
    border-left:5px solid #1976D2;
}

/* ================================ */
/*     ADMIN TORNEOS RESPONSIVE     */
/* ================================ */

@media (max-width: 768px) {

    .torneo-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
    }

    .torneo-meta {
        flex-direction: column;
        gap: 4px;
    }

    .torneo-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .torneo-actions a {
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }

}

/* ============================= */
/*          FIXTURE              */
/* ============================= */

.fixture-tabs{
    display:flex;
    gap:10px;
    margin-bottom:20px;
}

.tab{
    padding:10px 18px;
    border:none;
    background:#eee;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
}

.tab.active{
    background:var(--color-azul);
    color:white;
}

.zona-card{
    margin-bottom:20px;
}

.match-card{
    background:white;
    border-radius:10px;
    padding:15px;
    margin-bottom:10px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
}

.match-info{
    display:flex;
    align-items:center;
    gap:15px;
    font-weight:600;
}

.pareja{
    min-width:180px;
}

.vs{
    font-weight:bold;
    color:var(--color-naranja);
}

.match-meta{
    font-size:13px;
    color:#666;
    display:flex;
    gap:15px;
}

.match-card.finalizado{
    border-left:5px solid #4CAF50;
}

.match-card.pendiente{
    border-left:5px solid var(--color-naranja);
}


/* CARD GENERAL */

.zona-card {
    width: 420px;
    background-image: url('../img/fondo-padel.jpg'); /* opcional */
    background-size: cover;
    padding: 20px;
    font-family: 'Arial Black', sans-serif;
    text-align: center;
}

/* HEADER */

.zona-header h1 {
    margin: 0;
    font-size: 20px;
    color: #1b1b1b;
    letter-spacing: 2px;
}

.zona-header h2 {
    margin: 5px 0 20px;
    font-size: 18px;
    color: #e6b100;
}

/* GRUPO */

.grupo-title {
    background: #e79b22;
    color: #1b1b1b;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    margin-bottom: 10px;
}

/* PAREJAS */

.parejas-box {
    margin-bottom: 15px;
}

.parejas-header,
.pareja-row {
    display: grid;
    grid-template-columns: 70px 1fr;
}

.parejas-header {
    background: #dcdcdc;
    font-weight: bold;
    padding: 8px;
}

.pareja-row {
    margin-top: 6px;
}

.numero {
    background: #2f4f7f;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nombre {
    background: #355c8a;
    color: white;
    font-size: 16px;
    padding: 14px;
}

/* DUELOS */

.duelos-header,
.duelo-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-top: 6px;
}

.duelos-header div {
    background: #e79b22;
    font-weight: bold;
    padding: 10px;
}

.duelo-row div {
    background: #355c8a;
    color: white;
    padding: 12px;
    font-size: 18px;
}

.duelo-row .hora {
    background: #e6e6e6;
    color: #1b1b1b;
    font-weight: bold;
}

/* ===============================
   CONTENEDOR GENERAL ZONAS
=================================*/

.fixture-container{
    display: grid;
    grid-template-columns: 1fr; /* SOLO UNA */
    gap: 60px;
    margin-top: 25px;
    justify-items: center; /* centra la card */
}

/* ===============================
   CARD ZONA
=================================*/

.zona-card{
    width: 100%;
    max-width: 900px;   /* tamaño tipo flyer */
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* ===============================
   TABLET
=================================*/

@media (max-width: 1100px)
{
    .fixture-container{
        grid-template-columns: 1fr;
    }
}

/* ===============================
   MOBILE
=================================*/

@media (max-width: 600px)
{
    .zona-card{
        border-radius: 6px;
    }

    .pareja-row{
        font-size: 14px;
    }

    .duelo-row{
        font-size: 13px;
    }

    .duelos-header,
    .duelo-row{
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.parejas-header,
.pareja-row{
    display: grid;
    grid-template-columns: 60px 1fr;
    align-items: center;
}

.duelos-header,
.duelo-row{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
}

/* ======================================
   FIXTURE — MOBILE COMPACT (365x667)
======================================*/

@media (max-width: 420px){

    /* contenedor */
    .fixture-container{
        gap:20px;
        padding:0;
    }

    /* card zona */
    .zona-card{
        max-width:100%;
        padding:12px;
        border-radius:8px;
    }

    /* HEADER */
    .zona-header h1{
        font-size:14px;
        letter-spacing:1px;
    }

    .zona-header h2{
        font-size:10px;
        margin-bottom:10px;
    }

    /* TITULO GRUPO */
    .grupo-title{
        font-size:10px;
        padding:6px;
    }

    /* ===== PAREJAS ===== */

    .numero{
        font-size:8px;
        height:40px;
    }

    .nombre{
        font-size:8px;
        padding:8px;
    }

    .parejas-header{
        font-size:8px;
        padding:6px;
    }

    /* ===== DUELOS ===== */

    .duelos-header div{
        font-size:12px;
        padding:6px;
    }

    .duelo-row div{
        font-size:13px;
        padding:8px 4px;
    }

    .duelo-row .hora{
        font-size:13px;
    }
}

.select-categoria {
    appearance: none; /* elimina estilo nativo */
    -webkit-appearance: none;
    -moz-appearance: none;

    padding: 10px 40px 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #333;

    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background-color: #fff;

    cursor: pointer;
    outline: none;

    transition: all 0.2s ease;

    background-image: url("data:image/svg+xml;utf8,<svg fill='%23666' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.select-categoria:hover {
    border-color: #bdbdbd;
}

.select-categoria:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.select-categoria {
    min-width: 200px;
}

.bracket {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 10px;
}

.bracket-round {
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.round-title {
    text-align: center;
    font-weight: bold;
    color: var(--color-azul);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.match {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    position: relative;
    transition: .2s ease;
}

.match:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.team {
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--color-gris-claro);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-gris-oscuro);
}

.team:last-child {
    margin-bottom: 0;
}

.team.winner {
    background: linear-gradient(
        135deg,
        var(--color-azul),
        #004d80
    );
    color: white;
}

.match-meta {
    text-align: center;
    font-size: 12px;
    margin-top: 8px;
    color: #777;
    font-weight: 500;
}

.match-data{
    display:flex;
    justify-content:space-between;
    gap:10px;
    margin-top:10px;
    font-size:13px;
}

.editable{
    background:var(--color-gris-claro);
    padding:6px 10px;
    border-radius:6px;
    cursor:pointer;
    transition:.2s;
    min-width:70px;
    text-align:center;
}

.editable:hover{
    background:rgba(255,102,0,.15);
    color:var(--color-azul);
    font-weight:600;
}

.edit-input{
    width:80px;
    padding:5px;
    border-radius:5px;
    border:1px solid var(--color-naranja);
    text-align:center;
}

/* ================================ */
/*            DUELOS                */
/* ================================ */

.duelos-box{
    margin-top:20px;
    border-radius:10px;
    overflow:hidden;
    background:white;
    box-shadow:0 4px 12px rgba(0,0,0,.06);
}

/* HEADER */
.duelos-header{
    display:grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    background:var(--color-azul);
    color:white;
    font-weight:600;
    font-size:14px;
    padding:14px 18px;
}

.duelos-header div{
    text-align:left;
}

/* FILAS */
.duelo-row{
    display:grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    padding:14px 18px;
    border-bottom:1px solid var(--color-gris);
    cursor:pointer;
    transition:all .2s ease;
    align-items:center;
    font-size:14px;
}

/* hover tipo app moderna */
.duelo-row:hover{
    background:rgba(255,102,0,0.06);
    transform:translateX(3px);
}

/* última fila sin borde */
.duelo-row:last-child{
    border-bottom:none;
}

/* columnas específicas */
.duelo-row .hora{
    font-weight:600;
    color:var(--color-azul);
}

.duelo-row .cancha{
    font-weight:600;
    color:var(--color-naranja);
}

/* ================================ */
/*           RESPONSIVE             */
/* ================================ */

@media(max-width:600px){

    .duelos-header{
        display:none; /* ocultamos encabezado */
    }

    .duelo-row{
        grid-template-columns:1fr;
        gap:6px;
        padding:16px;
        border-bottom:1px solid #eee;
    }

    .duelo-row div{
        display:flex;
        justify-content:space-between;
        font-size:13px;
    }

    .duelo-row div::before{
        font-weight:600;
        color:#777;
    }

    .duelo-row div:nth-child(1)::before{ content:"Duelo"; }
    .duelo-row div:nth-child(2)::before{ content:"Día"; }
    .duelo-row div:nth-child(3)::before{ content:"Hora"; }
    .duelo-row div:nth-child(4)::before{ content:"Cancha"; }
    .duelo-row div:nth-child(5)::before{ content:"Set"; }
}

.duelo-row:active{
    transform:scale(.98);
}

.sets {
    font-weight: bold;
    color: #2c3e50;
    margin-top: 2px;
    font-size: 0.9em;
}

.duelo-row .sets{
    text-align:center;
}

.match-extra{
    display:flex;
    justify-content:space-between;
    margin-top:8px;
    font-size:13px;
    color:#666;
}

.match-card.finalizado{
    border-left:4px solid #27ae60;
}

.match-card.pendiente{
    border-left:4px solid #f39c12;
}

.match-card.jugando{
    border-left:4px solid #2980b9;
}