/* Importar fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Variables de color para fácil modificación */
:root {
    --color-primary: #64A626; /* Verde del logo */
    --color-secondary: #282828; /* Gris oscuro/Negro del logo */
    --color-background: #F5F5F5; /* Gris claro para el fondo */
    --color-text: #333; /* Color de texto general */
}

/* Estilos Generales y Reseteo */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Desplazamiento suave al hacer clic en enlaces */
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    background-color: var(--color-background);
    color: var(--color-text);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5em;
    color: var(--color-secondary);
}

p {
    margin-bottom: 15px;
}

/* Header y Navegación */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Botón de Llamada a la Acción (CTA) */
.cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #558B2F; /* Un verde un poco más oscuro */
}

/* Secciones y sus estilos */
.inicio {
    position: relative;
    height: 100vh; /* Ocupa el 100% de la altura de la ventana */
    padding: 0;
    overflow: hidden; /* Oculta cualquier parte de la imagen que se salga */
}

/* Contenedor del slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Cada item del slider (imagen y contenido) */
.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.active {
    opacity: 1; /* Hace visible el item activo */
}

/* La imagen dentro del slider */
.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta la imagen para cubrir el área sin distorsionarla */
    object-position: center; /* Centra la imagen */
}

/* Contenido sobre la imagen */
.slider-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff; /* Color del texto para que resalte sobre la imagen */
    background: rgba(0, 0, 0, 0.4); /* Un overlay semitransparente para que el texto se lea mejor */
}

/* Estilos de texto para el header */
.slider-content h1 {
    font-size: 3.5em;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.2); /* Fondo semi-transparente para el texto */
    display: inline-block; /* Ajusta el fondo al tamaño del texto */
    border-radius: 5px;
    letter-spacing: 2px;
}

.slider-content p {
    font-size: 1.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.2); /* Fondo semi-transparente para el texto */
    display: inline-block;
    border-radius: 5px;
}

.servicios {
    background-color: #fff;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.servicio-item {
    background-color: var(--color-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.portafolio {
    background-color: var(--color-background);
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.proyecto-item {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    cursor: pointer;
}

.proyecto-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.collab-tag {
    position: absolute;
    top: 10px;
    left: -5px; /* Mueve el cintillo un poco fuera del borde */
    background-color: var(--color-primary); /* El verde de tu logo */
    color: #fff;
    padding: 5px 15px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 0 5px 5px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transform: rotate(-4deg); /* Un poco de rotación para un efecto dinámico */
}

/* Estilos para justificar la descripción */
.descripcion-justificada {
    text-align: justify;
}

.quienes-somos {
    background-color: #fff;
}

.contacto {
    background-color: var(--color-background);
}

/* Estilos para los botones de contacto */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacio entre los botones */
    flex-wrap: wrap; /* Para que los botones pasen a la siguiente línea en móviles */
    margin-top: 40px;
}

.contact-buttons .cta-button {
    padding: 15px 30px;
    font-size: 1.1em;
}

.whatsapp-button {
    background-color: #25d366; /* Color de la marca WhatsApp */
}

.whatsapp-button:hover {
    background-color: #128c7e; /* Un verde más oscuro para el hover */
}

.email-button {
    background-color: var(--color-secondary); /* Color del logo */
}

.email-button:hover {
    background-color: #4a4a4a; /* Un gris más claro para el hover */
}

/* Footer */
.footer {
    background-color: var(--color-secondary);
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

/* Estilos para el botón de hamburguesa */
.menu-toggle {
    display: none; /* Oculto por defecto en desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-secondary);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Estilos para el menú móvil */
.nav-links {
    list-style: none;
    display: flex;
}

/* Reglas para el estado "abierto" del menú */
.nav-links.active {
    transform: translateY(0);
}

/* Estilos para los iconos de servicio */
.icon-servicio {
    font-size: 3rem; /* Tamaño del icono */
    color: var(--color-primary); /* El color verde de tu logo */
    margin-bottom: 1rem;
}

/* Media Queries para Responsive Design */
@media (max-width: 768px) {
    .inicio h1 {
        font-size: 2.5em;
    }

    .slider-content h1 {
        font-size: 2.5em; /* Tamaño de fuente para móviles */
        padding: 10px; /* Ajuste del padding */
    }

    h2 {
        font-size: 2em;
    }
    .servicios-grid, .proyectos-grid {
        grid-template-columns: 1fr;
    }
    .menu-toggle {
        display: flex; /* Muestra el botón de hamburguesa */
    }

    .nav-links {
        position: absolute;
        top: 60px; /* Asegúrate de que este valor sea el correcto para tu diseño */
        left: 0;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
    }

    /* Esta es la regla clave que controla si el menú se muestra */
    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-links li a {
        display: block;
        padding: 15px 0;
    }
}