@media (max-width: 768px) {
    .container {
        padding: 1em;
    }
    
    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin-bottom: 10px;
    }

    .hero .hero-slider img {
        height: 60vh;
    }

    .description, .rules {
        padding: 20px;
    }

    .social-media {
        flex-direction: column;
        gap: 10px;
    }

    .social-item img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .description h3, .rules h3, .h8 {
        font-size: 1.5rem;
    }

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

/* Asegura que el padding y el borde no causen desbordamiento */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #cfd9df, #e2ebf0);
    background-attachment: fixed;
    color: #333;
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Redes sociales */
.social-media {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-item img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.social-item img:hover {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.social-item p {
    font-size: 14px;
    color: #444;
    text-align: center;
    margin-top: 5px;
}

/* Cabecera */
header {
    background-color: #333;
    color: #fff;
    padding: 1.5em 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

header nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

header nav ul li {
    display: inline;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s ease, transform 0.3s ease;
}

header nav ul li a:hover {
    color: #ff6f61;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    text-align: center;
    color: white;
}

.hero .hero-slider {
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.hero .hero-slider img {
    width: 100%;
    height: 80vh;
    object-fit: cover;
    filter: brightness(70%) contrast(110%) sepia(10%) hue-rotate(5deg);
    transition: transform 0.5s ease;
}

.hero .hero-slider img:hover {
    transform: scale(1.02);
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.hero .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Descripción */
.description {
    padding: 40px 0;
    background-color: #f9f9f9;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.description h3 {
    font-size: 2.2rem;
    color: #111010;
    font-weight: 700;
    margin-bottom: 20px;
}

.h8 {
    font-size: 2.2rem;
    color: #111010;
    font-weight: 700;
}

.description p {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: #555;
    font-size: 1.1rem;
}

/* Galería */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery div {
    box-sizing: border-box;
}

.gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery img:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close:hover {
    color: #ff6f61;
    transform: rotate(90deg);
    cursor: pointer;
}

/* Reglas */
.rules {
    background-color: #fff;
    padding: 30px;
    margin-top: 40px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.rules h3 {
    font-size: 2.2rem;
    color: #100f0f;
    font-weight: 700;
    margin-bottom: 20px;
}

.rules p {
    max-width: 900px;
    margin: 10px auto;
    line-height: 1.7;
    font-size: 1rem;
    color: #555;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}
