/* =========================================
   REGLAMENTO MMRC 2026 - VERSIÓN FINAL PRO
   ========================================= */

/* --- 1. VARIABLES DE MARCA --- */
:root {
    --brand-blue: #003399;
    --brand-dark-blue: #001f5c;
    --brand-yellow: #FFD100;
    --brand-red: #D91F26;
    
    --text-dark: #222;
    --text-grey: #555;
    --bg-body: #f4f6f9;
    --card-shadow: 0 15px 35px rgba(0, 31, 92, 0.1);
}

/* --- 2. BASE & TIPOGRAFÍA --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden; /* Evita scroll horizontal */
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, .cat-head {
    font-family: 'Knewave', system-ui;
    text-transform: uppercase;
}

strong { color: var(--brand-blue); font-weight: 800; }
img { max-width: 100%; height: auto; display: block; }

/* --- 3. NAVBAR --- */
#main-header {
    background: var(--brand-dark-blue);
    padding: 15px 0;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo img { height: 50px; width: auto; }

.nav-list { display: flex; gap: 30px; align-items: center; list-style: none; }
.nav-link { 
    color: white; font-weight: 700; font-size: 0.9rem; text-decoration: none; 
    transition: 0.3s; letter-spacing: 1px;
}
.nav-link:hover { color: var(--brand-yellow); }

.btn-nav {
    background: var(--brand-yellow); color: var(--brand-dark-blue);
    padding: 10px 25px; border-radius: 50px; 
    box-shadow: 0 5px 15px rgba(255, 209, 0, 0.3);
    font-weight: bold;
}
.btn-nav:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(255, 209, 0, 0.5); 
    background: white; 
}

.hamburger { display: none; background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; }

/* --- 4. HERO SECTION --- */
.reglamento-hero {
    background: linear-gradient(135deg, rgba(0, 31, 92, 0.9), rgba(217, 31, 38, 0.8)), 
                url('img/522404690_17875665006385829_1812920147107171071_n.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 160px 0 100px;
    color: white;
    text-align: center;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 40px;
}

.reglamento-hero h1 {
    font-size: 3.5rem; 
    color: var(--brand-yellow);
    margin-bottom: 10px;
    text-shadow: 0 5px 20px rgba(0,0,0,0.4);
    letter-spacing: 2px;
    line-height: 1.1;
}
.reglamento-hero p { font-size: 1.2rem; font-weight: 300; letter-spacing: 1px; padding: 0 10px; }

/* --- 5. INTRODUCCIÓN --- */
.content-container {
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.intro-text {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    margin-top: -80px;
    position: relative;
    z-index: 2;
    border-top: 5px solid var(--brand-red);
}
.intro-text p { margin-bottom: 20px; font-size: 1rem; color: #444; text-align: justify; }

/* --- 6. GRID DE CATEGORÍAS (ESTILO ACTUALIZADO Y LIMPIO) --- */
.section-title {
    text-align: center;
    font-size: 3.5rem; /* Más grande como la imagen */
    color: var(--brand-dark-blue);
    margin: 50px 0 40px;
    display: block;
    letter-spacing: 2px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
    width: 100%;
}

.cat-card {
    background: white;
    border-radius: 20px; /* Bordes más redondeados */
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s ease;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.cat-card:hover { transform: translateY(-10px); }

.cat-head {
    padding: 25px 10px;
    text-align: center;
    font-size: 3rem; /* Título grande */
    line-height: 1;
    position: relative;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Colores de Fondo de Tarjetas */
.bg-y { 
    background: var(--brand-yellow); 
    color: var(--brand-dark-blue); 
}
.bg-b { 
    background: var(--brand-blue); 
    color: white; 
}
.bg-r { 
    background: var(--brand-red); 
    color: white; 
}

/* Cuerpo de la Tarjeta */
.cat-body { 
    padding: 30px 25px; 
    flex: 1; 
    background: white;
}

.cat-body ul { 
    list-style: none; 
    padding: 0;
}

/* ITEM DE LISTA (Corrección de alineación) */
.cat-body li {
    display: grid; 
    grid-template-columns: 25px 1fr; /* Columna icono fija, columna texto flexible */
    gap: 10px;
    align-items: start; /* Alinea arriba para evitar desorden */
    
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
    font-size: 0.95rem;
    color: #444;
}

.cat-body li:last-child { border-bottom: none; }

/* Icono Check */
.cat-body li::before {
    content: '\f058'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--brand-dark-blue);
    font-size: 1.1rem;
    margin-top: 3px;
}

/* Títulos dentro de la lista (ej: Abierta:) */
.cat-body strong {
    display: block; /* Pone el título en su propia línea o bloque */
    color: var(--brand-dark-blue);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

/* --- 7. ARTÍCULOS --- */
.articles-list {
    position: relative;
    padding-left: 20px;
    width: 100%;
}
.articles-list::before {
    content: '';
    position: absolute; top: 0; left: 45px; width: 2px; height: 100%;
    background: #e0e0e0;
    z-index: 0;
}

.article-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    border-left: 5px solid transparent;
    transition: 0.3s;
}
.article-item:hover { border-left-color: var(--brand-yellow); transform: translateX(5px); }

.art-badge {
    background: var(--brand-dark-blue);
    color: var(--brand-yellow);
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    font-family: 'Knewave', system-ui;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 31, 92, 0.3);
    border: 3px solid white;
}

.art-content { flex: 1; min-width: 0; }
.art-content h3 {
    color: var(--brand-red);
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: flex; align-items: center; gap: 10px;
    line-height: 1.2;
}

/* Fix del Articulo 14 (Email largo) */
.art-content p { 
    color: #555; 
    text-align: justify; 
    font-size: 0.95rem;
    
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* --- 8. CAJA LEGAL --- */
.legal-box {
    background: #151515;
    background-image: radial-gradient(#222 1px, transparent 1px);
    background-size: 20px 20px;
    color: #ccc;
    padding: 40px;
    border-radius: 20px;
    margin-top: 60px;
    border: 1px solid #333;
}
.legal-box h3 {
    color: white; border-bottom: 2px solid var(--brand-yellow);
    padding-bottom: 10px; margin-bottom: 20px; font-size: 1.4rem; display: inline-block;
}
.legal-box p { margin-bottom: 30px; font-size: 0.9rem; text-align: justify; color: #aaa; }

.btn-back-container { text-align: center; margin: 60px 0; }
.btn-back {
    display: inline-block;
    background: var(--brand-red); color: white;
    padding: 15px 40px; border-radius: 50px;
    font-weight: 800; text-transform: uppercase;
    font-family: 'Knewave', system-ui; font-size: 1.2rem;
    box-shadow: 0 10px 25px rgba(217, 31, 38, 0.3);
    transition: 0.3s;
}
.btn-back:hover { background: var(--brand-yellow); color: var(--brand-dark-blue); transform: translateY(-5px); }


/* =========================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================= */

@media (max-width: 768px) {
    .hamburger { display: block; z-index: 1001; }

    .nav-list {
        position: fixed; top: 0; right: -100%;
        width: 85%; height: 100vh;
        background: var(--brand-dark-blue);
        flex-direction: column; justify-content: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        visibility: hidden; opacity: 0;
    }
    .nav-list.open { right: 0; visibility: visible; opacity: 1; }

    .reglamento-hero h1 { font-size: 2.2rem; }
    .intro-text { padding: 30px; margin-top: -40px; }
    .section-title { font-size: 2.5rem; }

    .articles-list { padding-left: 0; }
    .articles-list::before { display: none; }
    
    .article-item { 
        flex-direction: column; 
        gap: 15px; 
        padding: 25px; 
        align-items: center; 
        text-align: center;
    }
    
    .art-badge { width: 50px; height: 50px; font-size: 1.2rem; margin-bottom: 5px; }
    .art-content h3 { justify-content: center; }
    .art-content p { text-align: left; }
    
    .cat-card:hover { transform: none; }
    .cat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .container, .content-container { padding: 0 15px; }
    .logo img { height: 40px; }
    .reglamento-hero { padding: 140px 0 80px; }
    .reglamento-hero h1 { font-size: 1.8rem; letter-spacing: 1px; }
    
    .intro-text { padding: 20px; }
    .intro-text p { font-size: 0.9rem; }
    
    .section-title { font-size: 2rem; margin: 40px 0 20px; }
    
    .cat-head { padding: 15px; font-size: 2.5rem; }
    .cat-body { padding: 15px; }
    .cat-body li { font-size: 0.85rem; }

    .article-item { padding: 20px 15px; }
    .art-content h3 { font-size: 1.1rem; flex-direction: column; gap: 5px; }
    .art-content p { font-size: 0.9rem; text-align: left; }

    .legal-box { padding: 25px 15px; }
    .legal-box h3 { font-size: 1.2rem; }
    
    .btn-back { padding: 12px 30px; font-size: 1rem; width: 100%; text-align: center; }
}