/* --- General Styles --- */
:root {
    --primary-color: #FF5722; /* Naranja vibrante para acciones principales */
    --secondary-color: #00BCD4; /* Azul aguamarina para acentos */
    --dark-color: #212121; /* Negro para fondos y texto principal */
    --light-color: #F0F0F0; /* Gris muy claro para secciones de fondo */
    --text-color: #424242; /* Gris oscuro para el texto general */
    --white-color: #FFFFFF; /* Blanco puro */
    --green-color: #4CAF50; /* Verde para éxito o destacar */

    --border-radius: 5px;
    --transition-speed: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: #E64A19; /* Tonalidad más oscura del naranja */
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    transition: background var(--transition-speed);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin: 5px; /* Espacio entre botones */
}

.btn:hover {
    background: #E64A19; /* Naranja más oscuro */
}

.btn-secondary {
    background: var(--secondary-color); /* Azul aguamarina */
}

.btn-secondary:hover {
    background: #0097A7; /* Azul aguamarina más oscuro */
}

section {
    padding: 60px 0;
    text-align: center;
}

section:nth-of-type(even) {
    background-color: var(--light-color);
}

/* --- Header --- */
.main-header {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white-color);
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 10px;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    margin-left: 25px;
}

.navbar ul li a {
    color: var(--white-color);
    font-weight: 400;
    padding: 5px 0;
    transition: color var(--transition-speed);
    position: relative;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color); /* Naranja */
    bottom: -5px;
    left: 0;
    transition: width var(--transition-speed);
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
    width: 100%;
}

.navbar ul li a:hover {
    color: var(--primary-color); /* Naranja */
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--white-color);
    cursor: pointer;
}

/* --- Sección Hero --- */
#hero {
    background: url('../img/hero-principal.jpg') no-repeat center center/cover;
    color: var(--white-color);
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay oscuro */
    z-index: -1;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--white-color);
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Sección Sobre Nosotros --- */
#about .about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    text-align: left;
}

#about .about-img {
    max-width: 100%;
    flex: 1;
    min-width: 300px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    height: auto;
}

#about .about-text {
    flex: 2;
    min-width: 300px;
}

/* --- Sección Servicios (Ahora para Servicios de Gym) --- */
#services .service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

#services .service-item {
    background: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex; /* Usar flexbox */
    flex-direction: column; /* Apilar contenido verticalmente */
    align-items: center; /* Centrar ítems horizontalmente */
    justify-content: space-between; /* Espacio entre contenido y la imagen al final */
    min-height: 400px; /* Asegura una altura mínima para todas las tarjetas */
}

#services .service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

#services .service-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

#services .service-item h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

#services .service-item p {
    flex-grow: 1; /* Permite que el párrafo ocupe el espacio restante */
    margin-bottom: 20px; /* Espacio antes de la imagen */
}

.service-icon-img {
    width: 100%; /* Ajusta el ancho de la imagen al contenedor */
    height: 180px; /* Altura fija para las imágenes decorativas de servicio */
    object-fit: cover; /* **Recorta la imagen para cubrir el área sin distorsionar** */
    border-radius: var(--border-radius);
    margin-top: auto; /* Empuja la imagen al final del contenedor flex */
    display: block; /* Asegura que no haya espacios extra debajo */
}


/* --- Sección Contacto --- */
#contact .contact-form {
    max-width: 600px;
    margin: 40px auto 0;
    background: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: left;
}

#contact .contact-form .form-group {
    margin-bottom: 20px;
}

#contact .contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-color);
}

#contact .contact-form input[type="text"],
#contact .contact-form input[type="email"],
#contact .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

#contact .contact-form input[type="text"]:focus,
#contact .contact-form input[type="email"]:focus,
#contact .contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

#contact .contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

#contact .contact-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

/* --- Footer --- */
.main-footer {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.main-footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: left;
    margin-bottom: 30px;
}

.main-footer .footer-section {
    flex: 1;
    min-width: 250px;
    margin: 0 15px 20px;
}

.main-footer .footer-section h3 {
    color: var(--secondary-color); /* Azul aguamarina */
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.main-footer .footer-section p,
.main-footer .footer-section ul {
    font-size: 0.95rem;
    color: #ccc;
}

.main-footer .footer-section ul {
    list-style: none;
}

.main-footer .footer-section ul li {
    margin-bottom: 8px;
}

.main-footer .footer-section ul li a {
    color: #ccc;
    transition: color var(--transition-speed);
}

.main-footer .footer-section ul li a:hover {
    color: var(--primary-color); /* Naranja */
}

.main-footer .social-icons a {
    color: var(--white-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color var(--transition-speed);
}

.main-footer .social-icons a:hover {
    color: var(--primary-color); /* Naranja */
}

.main-footer .copyright {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #aaa;
    border-top: 1px solid #444;
    padding-top: 20px;
}

/* --- Botón de WhatsApp flotante --- */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--green-color); /* Verde WhatsApp */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform var(--transition-speed);
}

.whatsapp-button:hover {
    transform: scale(1.1);
    background-color: #388E3C; /* Verde más oscuro */
}

/* --- Diseño Adaptativo (Responsive) --- */
@media (max-width: 768px) {
    .navbar {
        display: none;
        width: 100%;
        text-align: center;
        background: var(--dark-color);
    }

    .navbar.active {
        display: block;
    }

    .navbar ul {
        flex-direction: column;
        padding: 10px 0;
    }

    .navbar ul li {
        margin: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero p {
        font-size: 1rem;
    }

    #about .about-content {
        flex-direction: column;
        text-align: center;
    }

    #about .about-img {
        max-width: 80%;
    }

    #services .service-grid {
        grid-template-columns: 1fr;
    }

    .main-footer .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .main-footer .footer-section {
        text-align: center;
        margin: 0 0 30px;
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        align-self: flex-end;
    }

    #hero h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    #contact .contact-form {
        padding: 20px;
    }
}