* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 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: #4CAF50;
    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;
}

/* ===== GRID DE NORMATIVAS ESTILO INFOGRÁFICO ===== */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* ===== BLOQUES DE NORMATIVAS ===== */
.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 #4CAF50;
}

.rule-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(76, 175, 80, 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 NORMATIVAS */
.rule-icon {
    background: #4CAF50;
    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 #388E3C;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 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);
}

.rule-block:hover .rule-icon i {
    transform: scale(1.1);
}

/* TÍTULOS DE LAS NORMATIVAS */
.rule-block h3 {
    font-size: 1.5em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2E7D32;
    text-shadow: none;
}

/* CONTENIDO DE LAS NORMATIVAS */
.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;
}

/* ===== TODOS LOS BLOQUES CON FONDO BLANCO ===== */
.escalfament,
.acces-pistes,
.estraments,
.us-vestidors,
.informacio,
.objectes-personals,
.pilotos-equipament,
.samarreta-especial,
.classificacio-empat,
.servei-fisioportpia,
.respecte-installacions {
    background: white;
    border: 2px solid #4CAF50;
}

/* 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; }
.rule-block:nth-child(9) { animation-delay: 0.9s; }
.rule-block:nth-child(10) { animation-delay: 1.0s; }
.rule-block:nth-child(11) { animation-delay: 1.1s; }

/* ===== 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;
    }
}

/* 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;
    }
}

/* 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;
    }
    
    .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;
    }
}

/* 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;
    }
    
    .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;
    }
}

/* 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;
    }
    
    .rule-block {
        padding: 15px;
    }
    
    .rule-content {
        font-size: 0.85em;
    }
}

/* 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;
    }
}

/* 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;
    }
}