/* Variables de color */
:root {
    --primary-color: #E44D26; /* Naranja intenso para acción */
    --secondary-color: #333333; /* Gris oscuro para texto principal */
    --accent-color: #F7C04A; /* Dorado o amarillo para detalles */
    --text-light: #f4f4f4; /* Texto claro sobre fondos oscuros */
    --bg-dark: #222222; /* Fondo oscuro principal */
    --bg-light: #ebebeb; /* Fondo claro para secciones */
    --hover-effect: #CC3D1E; /* Tono más oscuro de primary para hover */
}

/* Fuentes */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: #fff;
}

h1, h2, h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 1em;
}

h1 {
    font-size: 3.5em;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

h2 {
    font-size: 2.5em;
    color: var(--primary-color);
}

h3 {
    font-size: 1.8em;
    color: var(--secondary-color);
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
}

.btn:hover {
    background-color: var(--hover-effect);
    transform: translateY(-2px);
}

/* Header - Hero Section */
.hero {
    background: url('../IMAGEN/gym.jpg') no-repeat center center/cover;
    color: var(--text-light);
    text-align: center;
    padding: 150px 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay oscuro para mejor legibilidad del texto */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Navbar */
.navbar {
    background-color: var(--bg-dark);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.navbar ul li {
    margin: 0 20px;
}

.navbar ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.navbar ul li a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Secciones generales */
.section {
    padding: 80px 0;
    text-align: center;
}

.section.bg-light {
    background-color: var(--bg-light);
}

/* Misión y Visión */
.mission-vision {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.mission-vision .card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    flex: 1;
    min-width: 300px;
    text-align: left;
    transition: transform 0.3s ease;
}

.mission-vision .card:hover {
    transform: translateY(-5px);
}

.mission-vision .card h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    overflow: hidden; /* Para el efecto de zoom en la imagen */
    position: relative;
}

.service-item img {
    max-width: 100%;
    height: 200px; /* Altura fija para uniformidad */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.service-item:hover img {
    transform: scale(1.05); /* Zoom en hover */
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px; /* Altura fija para uniformidad */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
}

.gallery-item:hover img {
    transform: scale(1.1); /* Zoom en hover */
}

.gallery-item:hover .overlay {
    opacity: 1; /* Mostrar overlay en hover */
}

/* Formulario de Contacto */
.contact-form {
    max-width: 700px;
    margin: 40px auto 0;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--secondary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: calc(100% - 20px); /* Ajuste para padding */
    padding: 12px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(228, 77, 38, 0.3);
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: auto;
    padding: 12px 30px;
    display: block;
    margin: 0 auto;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    display: none; /* Oculto por defecto, mostrado por JS */
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Botón de WhatsApp flotante */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* Verde WhatsApp */
    color: white;
    border-radius: 50px; /* Forma de píldora */
    padding: 10px 20px;
    display: flex; /* Para alinear icono y texto */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none; /* Quitar subrayado de enlace */
    border: 2px solid #fff; /* Borde blanco para destacarlo */
    animation: pulse 2s infinite; /* Animación de pulsación */
}

.whatsapp-btn:hover {
    transform: scale(1.1); /* Ligeramente más grande al pasar el ratón */
    background-color: #1DA851; /* Un verde un poco más oscuro en hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Sombra más pronunciada en hover */
}

.whatsapp-btn img {
    width: 30px;
    height: 30px;
    margin-right: 8px; /* Espacio entre icono y texto */
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4)); /* Sombra para el icono */
}

.whatsapp-btn span {
    font-weight: bold;
    font-size: 1.1em; /* Texto un poco más grande */
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Sombra para el texto */
}

/* Animación de pulsación */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }

    .hero {
        padding: 100px 20px;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar ul li {
        margin: 10px 0;
    }

    .mission-vision {
        flex-direction: column;
        align-items: center;
    }

    .mission-vision .card {
        min-width: unset;
        width: 90%;
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 18px; /* Ajuste de padding en móvil */
        border: 1px solid #fff; /* Borde más sutil en móvil */
    }

    .whatsapp-btn img {
        width: 25px;
        height: 25px;
        margin-right: 6px;
    }

    .whatsapp-btn span {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
    }

    .hero p {
        font-size: 1.2em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .section {
        padding: 50px 0;
    }

    .whatsapp-btn {
        padding: 8px 15px;
    }
    .whatsapp-btn img {
        width: 22px;
        height: 22px;
        margin-right: 5px;
    }
    .whatsapp-btn span {
        font-size: 0.9em;
    }
}