/* 
 * reglament.css - Torneig d'Any Nou
 * Estilos para la página de reglamento
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #42A8E8 0%, #1565C0 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* ===== HEADER ===== */
header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.header-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #000;
}

.header-content h3 {
    font-size: 1.3em;
    opacity: 0.9;
    font-weight: 300;
}

.club-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.club-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.club-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.club-info h1 {
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #000;
}

/* ===== NAVEGACIÓN - 10 ELEMENTOS ===== */
.navbar {
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 2px solid transparent;
    white-space: nowrap;
}

.nav-link:hover,
.nav-item.active .nav-link {
    background: rgba(255,255,255,0.9);
    color: #42A8E8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.nav-link i {
    font-size: 1.1em;
    min-width: 16px;
    text-align: center;
}

.nav-link span {
    font-weight: 600;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== TÍTULO PRINCIPAL Y TEXTO INTRODUCTORIO ===== */
.main-title {
    font-size: 3em;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, rgba(66, 168, 232, 0.9), rgba(21, 101, 192, 0.9));
    border-radius: 20px;
    padding: 30px;
    margin: 30px auto 20px;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 3px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.intro-text {
    font-size: 1.3em;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto 40px;
    max-width: 800px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* ===== HEADER DEL REGLAMENTO ESTILO INFOGRÁFICO ===== */
.regulation-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.9));
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 2px solid rgba(66, 168, 232, 0.3);
}

.header-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.reg-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: 3px solid rgba(66, 168, 232, 0.5);
}

.header-title h1 {
    font-size: 3.5em;
    color: #1565C0;
    margin-bottom: 5px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.header-title h2 {
    font-size: 2em;
    color: #42A8E8;
    font-weight: 600;
    font-style: italic;
}

/* ===== GRID DE REGLAS ESTILO INFOGRÁFICO ===== */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* ===== BLOQUES DE REGLAS ===== */
.rule-block {
    background: white;
    border-radius: 20px;
    padding: 30px;
    color: #333;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    border: 2px solid #42A8E8;
}

.rule-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(66, 168, 232, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.rule-block:hover::before {
    opacity: 1;
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.rule-block:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

/* ===== ICONOS DE LAS REGLAS ===== */
.rule-icon {
    background: #42A8E8;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid #2979b3;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(66, 168, 232, 0.3);
}

/* ESTILOS PARA LAS IMÁGENES DENTRO DE LOS ICONOS */
.rule-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.rule-block:hover .rule-icon img {
    transform: scale(1.1);
}

.rule-icon i {
    font-size: 2.5em;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ===== TÍTULOS DE LAS REGLAS ===== */
.rule-block h3 {
    font-size: 1.5em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1565C0;
    text-shadow: none;
}

/* ===== CONTENIDO DE LAS REGLAS ===== */
.rule-content {
    font-size: 1em;
    line-height: 1.6;
    text-align: left;
    color: #555;
}

.rule-content p {
    margin-bottom: 15px;
    text-shadow: none;
}

.rule-content p:last-child {
    margin-bottom: 0;
}

/* ===== ESTILOS PARA LISTAS DENTRO DE RULE-CONTENT ===== */
.rule-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.rule-content ul li {
    padding-left: 25px;
    margin-bottom: 12px;
    position: relative;
    line-height: 1.6;
}

.rule-content ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #42A8E8;
    font-weight: bold;
    font-size: 1.2em;
}

.rule-content ul li:last-child {
    margin-bottom: 0;
}

/* ===== TODOS LOS BLOQUES CON FONDO BLANCO ===== */
.temps-joc,
.arbitres,
.temps-morts,
.normes-alineacio,
.tirs-lliures,
.regla-24,
.triples,
.faltes-equip,
.empat,
.samarreta {
    background: white;
    border: 2px solid #42A8E8;
}

/* ===== SECCIÓN DE NORMATIVA DE INSTALACIONES ===== */
.installations-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.95));
    border-radius: 25px;
    padding: 40px;
    margin-top: 50px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border: 3px solid #42A8E8;
    position: relative;
    overflow: hidden;
}

.installations-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #42A8E8, #1565C0, #42A8E8);
}

.installations-section h2 {
    font-size: 2.2em;
    color: #1565C0;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.installations-section h2 i {
    color: #42A8E8;
    margin-right: 15px;
    font-size: 1.1em;
}

.installations-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid rgba(66, 168, 232, 0.3);
}

.installations-content ul {
    list-style: none;
    padding: 0;
}

.installations-content ul li {
    padding: 20px;
    margin-bottom: 15px;
    background: rgba(66, 168, 232, 0.05);
    border-left: 4px solid #42A8E8;
    border-radius: 10px;
    font-size: 1.05em;
    line-height: 1.6;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.installations-content ul li:last-child {
    margin-bottom: 0;
}

.installations-content ul li:hover {
    background: rgba(66, 168, 232, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(66, 168, 232, 0.2);
}

.installations-content ul li i {
    color: #42A8E8;
    font-size: 1.5em;
    min-width: 25px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ===== FOOTER ===== */
footer {
    background: rgba(0,0,0,0.3);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    backdrop-filter: blur(10px);
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delays escalonados para la animación */
.rule-block:nth-child(1) { animation-delay: 0.1s; }
.rule-block:nth-child(2) { animation-delay: 0.2s; }
.rule-block:nth-child(3) { animation-delay: 0.3s; }
.rule-block:nth-child(4) { animation-delay: 0.4s; }
.rule-block:nth-child(5) { animation-delay: 0.5s; }
.rule-block:nth-child(6) { animation-delay: 0.6s; }
.rule-block:nth-child(7) { animation-delay: 0.7s; }
.rule-block:nth-child(8) { animation-delay: 0.8s; }

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets grandes (1024px - 1200px) */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 10px;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .rules-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
    
    .rule-block {
        padding: 25px;
    }
    
    .header-title h1 {
        font-size: 3em;
    }
    
    .header-title h2 {
        font-size: 1.8em;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .header-content h1 {
        font-size: 2.5em;
    }
    
    .club-info h1 {
        font-size: 2em;
    }
    
    .club-logo {
        width: 70px;
        height: 70px;
    }
    
    .nav-menu {
        gap: 8px;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .rules-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .rule-block {
        padding: 20px;
    }
    
    .rule-icon {
        width: 70px;
        height: 70px;
    }
    
    .rule-icon img {
        width: 50px;
        height: 50px;
    }
    
    .rule-icon i {
        font-size: 2em;
    }
    
    .header-title h1 {
        font-size: 2.5em;
    }
    
    .header-title h2 {
        font-size: 1.5em;
    }
}

/* Móviles y tablets pequeños (768px y menos) */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2em;
    }
    
    .header-content h3 {
        font-size: 1.1em;
    }

    .club-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .club-logo {
        width: 60px;
        height: 60px;
    }
    
    .club-info h1 {
        font-size: 1.8em;
    }

    /* NAVBAR RESPONSIVE - GRID PARA 10 ELEMENTOS */
    .nav-menu {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 10px !important;
        justify-content: center;
        align-items: center;
    }
    
    .nav-link {
        padding: 12px 8px !important;
        font-size: 13px !important;
        justify-content: center !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        min-height: 65px !important;
        align-items: center !important;
    }
    
    .nav-link i {
        font-size: 1.2em !important;
        min-width: auto !important;
    }
    
    .nav-link span {
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
    }
    
    .container {
        padding: 30px 15px;
    }
    
    .main-title {
        font-size: 2em;
        padding: 20px;
        margin: 20px auto 15px;
    }
    
    .intro-text {
        font-size: 1.1em;
        padding: 15px;
        margin: 15px auto 30px;
    }
    
    .regulation-header {
        padding: 25px;
    }
    
    .header-logos {
        gap: 20px;
    }
    
    .reg-logo {
        width: 80px;
        height: 80px;
    }
    
    .header-title h1 {
        font-size: 2em;
    }
    
    .header-title h2 {
        font-size: 1.3em;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rule-block {
        padding: 20px;
    }
    
    .rule-icon {
        width: 60px;
        height: 60px;
    }
    
    .rule-icon img {
        width: 45px;
        height: 45px;
    }
    
    .rule-icon i {
        font-size: 1.8em;
    }
    
    .rule-block h3 {
        font-size: 1.3em;
    }
    
    .rule-content {
        font-size: 0.95em;
    }
    
    .installations-section {
        padding: 25px;
        margin-top: 40px;
    }
    
    .installations-section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .installations-content {
        padding: 20px;
    }
    
    .installations-content ul li {
        padding: 15px;
        font-size: 1em;
        flex-direction: column;
        gap: 10px;
    }
    
    .installations-content ul li i {
        font-size: 1.3em;
    }
}

/* Móviles pequeños (480px y menos) */
@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.6em;
    }
    
    .header-content h3 {
        font-size: 1em;
    }
    
    .club-info h1 {
        font-size: 1.5em;
    }
    
    .club-logo {
        width: 50px;
        height: 50px;
    }
    
    .nav-container {
        padding: 0 8px;
    }
    
    .nav-menu {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 5px !important;
    }
    
    .nav-link {
        padding: 10px 6px !important;
        font-size: 12px !important;
        min-height: 60px !important;
    }
    
    .nav-link span {
        font-size: 11px !important;
    }
    
    .nav-link i {
        font-size: 1.1em !important;
    }
    
    .main-title {
        font-size: 1.6em;
        padding: 15px;
    }
    
    .intro-text {
        font-size: 1em;
        padding: 12px;
    }
    
    .regulation-header {
        padding: 20px;
    }
    
    .header-logos {
        flex-direction: column;
        gap: 15px;
    }
    
    .reg-logo {
        width: 70px;
        height: 70px;
    }
    
    .header-title h1 {
        font-size: 1.8em;
    }
    
    .header-title h2 {
        font-size: 1.2em;
    }
    
    .rule-block {
        padding: 18px;
    }
    
    .rule-icon {
        width: 50px;
        height: 50px;
    }
    
    .rule-icon img {
        width: 35px;
        height: 35px;
    }
    
    .rule-icon i {
        font-size: 1.5em;
    }
    
    .rule-block h3 {
        font-size: 1.2em;
    }
    
    .rule-content {
        font-size: 0.9em;
    }
    
    .installations-section {
        padding: 20px;
        border-radius: 20px;
    }
    
    .installations-section h2 {
        font-size: 1.5em;
    }
    
    .installations-section h2 i {
        display: block;
        margin: 0 auto 10px;
    }
    
    .installations-content {
        padding: 15px;
    }
    
    .installations-content ul li {
        padding: 12px;
        font-size: 0.95em;
    }
}

/* Móviles muy pequeños (360px y menos) */
@media (max-width: 360px) {
    .header-content h1 {
        font-size: 1.4em;
    }
    
    .club-info h1 {
        font-size: 1.3em;
    }
    
    .club-logo {
        width: 45px;
        height: 45px;
    }
    
    .nav-menu {
        gap: 6px !important;
        padding: 0 3px !important;
    }
    
    .nav-link {
        padding: 8px 4px !important;
        font-size: 11px !important;
        min-height: 55px !important;
    }
    
    .nav-link span {
        font-size: 10px !important;
    }
    
    .nav-link i {
        font-size: 1em !important;
    }
    
    .main-title {
        font-size: 1.4em;
        padding: 12px;
    }
    
    .intro-text {
        font-size: 0.95em;
        padding: 10px;
    }
    
    .rule-block {
        padding: 15px;
    }
    
    .rule-content {
        font-size: 0.85em;
    }
    
    .installations-section h2 {
        font-size: 1.3em;
    }
    
    .installations-content ul li {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .club-logo:hover,
    .rule-block:hover {
        transform: none;
    }
    
    .nav-link:hover {
        transform: none;
    }
    
    .rule-block::before {
        display: none;
    }
    
    .installations-content ul li:hover {
        transform: none;
    }
}

/* Efectos de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .club-logo,
    .rule-block {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .rule-block::before {
        display: none;
    }
    
    .installations-content ul li:hover {
        transform: none;
    }
}