/* ====== Variables de color y fuente ====== */
:root {
    --verde: #618B35;          /* Verde principal */
    --beige: #E3DDD1;          /* Beige para fondos */
    --verde-oscuro: #17371D;   /* Verde oscuro para textos y detalles */
    --fuente: 'Montserrat', sans-serif;  /* Fuente principal */
}

/* ====== Reset básico para evitar márgenes y paddings por defecto ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Para que padding y border no alteren el ancho total */
}

/* ====== Imágenes y videos responsivos ====== */
img, video {
    max-width: 100%;  /* No exceden el contenedor */
    height: auto;     /* Mantienen proporción */
}

/* ====== Control de ruptura de palabras en textos ====== */
p, h1, h2, h3, li {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto; /* Permite guiones automáticos en palabras largas */
}

/* ====== HTML: suaviza el scroll para anclas ====== */
html {
    scroll-behavior: smooth;
}

/* ====== Body: fuente, color y fondo con textura ====== */
body {
    font-family: var(--fuente);
    color: var(--beige);
    line-height: 1.6;
    background: 
        linear-gradient(135deg, var(--verde-oscuro) 0%, #2C5122 100%), /* degradado */
        url('https://www.transparenttextures.com/patterns/az-subtle.png') repeat; /* textura */
    background-blend-mode: overlay;  /* mezcla para dar efecto */
    background-attachment: fixed;    /* fondo fijo al hacer scroll */
}

/* ====== Contenedor principal centrado y con padding ====== */
.container {
    width: min(90%, 1000px);  /* máximo 1000px, mínimo 90% */
    margin-inline: auto;       /* centrado horizontal */
    padding-inline: 10px;      /* espacio interno lateral */
}

/* ====== Header sticky para que quede fijo con un top pequeño ====== */
header {
    position: sticky;
    top: 10px;       /* separa del top para no pegarse al borde */
    z-index: 1000;   /* sobre otros elementos */
    background: transparent; 
    padding: 10px 0;
}

/* ====== Barra de navegación con estilo y flex ====== */
nav {
    background-color: var(--beige);
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 30px;
    padding-left: 110px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ====== Lista de navegación en fila ====== */
nav ul.navbar {
    list-style: none; /* elimina viñetas */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 45px; /* espacio entre items */
    padding-left: 0;
    position: relative;
}

/* ====== Estilos de los enlaces del menú ====== */
nav ul.navbar li a {
    text-decoration: none;
    color: var(--verde-oscuro);
    font-weight: 600;
    transition: color 0.3s;
}

nav ul.navbar li a:hover {
    color: var(--verde);
}

/* Logo dentro del nav con tamaño fijo en altura */
.nav-logo {
    height: 140px;
    width: auto;
}

/* ====== Secciones principales con fondo beige, texto verde oscuro y sombra ====== */
section,
.welcome,
.services,
.recognitions,
.nosotros,
.contact-section {
    background-color: var(--beige);
    color: var(--verde-oscuro);
    padding: 60px 20px;
    margin: 30px auto;
    max-width: 1200px;
    border-radius: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* evita scroll horizontal */
}

/* Titulares h2 con color verde y centrados */
h2 {
    color: var(--verde);
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
}

/* Párrafos y listas con tamaño legible y color verde oscuro */
p, li {
    font-size: 1.1em;
    color: var(--verde-oscuro);
}

/* ====== Botones principales (call to action) ====== */
.cta-btn {
    background-color: var(--verde);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px;
    display: inline-block;
    transition: background-color 0.3s;
}

.cta-btn:hover {
    background-color: var(--verde-oscuro);
}

/* ====== Footer ====== */
footer {
    background-color: var(--beige);
    color: var(--verde-oscuro);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
    margin-top: 40px;
    border-radius: 0 0 15px 15px;
}

/* ====== Welcome (bienvenida) con tamaños de fuente aumentados y centrado ====== */
.welcome h2 {
    font-size: 2.4em;
    margin-bottom: 25px;
    font-weight: 700;
}

.welcome p {
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.welcome ul {
    list-style-type: none;
    max-width: 850px;
    margin: 0 auto;
    padding: 0;
}

.welcome ul li {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.4;
}

.welcome ul li strong {
    color: var(--verde);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

/* ====== Services (servicios) ====== */
.services h2,
.recognitions h2,
.contact-section h2 {
    font-size: 2.6em;
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

.service-item {
    margin-bottom: 30px;
}

.service-item h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
    border-left: 5px solid var(--verde);
    padding-left: 15px;
}

.service-item ul {
    list-style-type: disc;
    padding-left: 25px;
}

.service-item ul li {
    font-size: 1.15em;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* ====== Reconocimientos ====== */
.recognitions p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
}

.certificates-list {
    list-style-type: disc;
    padding-left: 30px;
    margin-bottom: 25px;
}

.certificates-list li {
    font-size: 1.15em;
    margin-bottom: 15px;
}

.certificates-list li strong {
    color: var(--verde);
}

/* ====== Nosotros (equipo) ====== */
.nosotros h2 {
    font-size: 2.4em;
    margin-bottom: 20px;
    font-weight: 700;
}

.nosotros p {
    font-size: 1.15em;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

/* Contenedor flex para la sección gerente (texto + foto) */
.gerente-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap; /* que baje en pantallas pequeñas */
}

.gerente-text {
    flex: 1;
    min-width: 250px; /* para que no se achique demasiado */
}

.gerente-img {
    width: 320px;
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    object-fit: cover;
    margin-top: 50px;
}

/* ====== Contacto ====== */
/* Contenedor columna */
.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Items del contacto en fila, centrados y con espacio */
.contact-items {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

/* Cada item con icono y texto */
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-item:hover {
    color: var(--verde);
}

/* Iconos SVG en contacto */
.contact-icon {
    width: 32px;
    height: 32px;
    stroke: var(--verde-oscuro);
    transition: stroke 0.3s;
}

.contact-item:hover .contact-icon {
    stroke: var(--verde);
}

/* ====== Botón hamburguesa para menú móvil ====== */
.menu-toggle {
    display: none; /* Oculto por defecto */
    background-color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    padding: 10px;
    width: 70px;
    height: 70px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.menu-toggle:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.menu-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ====== Responsive: para pantallas menores a 768px ====== */
@media (max-width: 768px) {

    /* Navegación cambia fondo y padding */
    nav {
        background: none;
        box-shadow: none;
        padding: 0;
    }

    /* Menú vertical oculto por defecto, se muestra al activarse */
    nav ul.navbar {
        flex-direction: column;
        display: none;
        gap: 20px;
        margin-top: 80px;
        background-color: var(--beige);
        border-radius: 10px;
        padding: 20px;
        position: fixed;
        top: 70px;
        left: 5%;
        right: 5%;
        box-shadow: 0 3px 8px rgba(0,0,0,0.1);
        z-index: 1050;
    }

    nav ul.navbar.active {
        display: flex;
    }

    /* Mostrar botón menú hamburguesa */
    .menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1100;
    }

    /* Ocultar item logo en móvil */
    .logo-item {
        display: none;
    }

    /* Logo más pequeño */
    .nav-logo {
        height: 60px;
    }

    /* Secciones con menos padding para móviles */
    section {
        padding: 40px 20px;
    }

    /* Flex de gerente cambia a columna y texto centrado */
    .gerente-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Imagen gerente más ancha en móvil */
    .gerente-img {
        width: 90%;
        margin-top: 20px;
    }

    /* Texto gerente ancho completo */
    .gerente-text {
        width: 100%;
    }

    /* Contacto en columna con menos espacio */
    .contact-items {
        flex-direction: column;
        gap: 25px;
    }
}

/* ====== Base navegación (más ajustes) ====== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

/* Menú toggle base oculto */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

/* Imagen del toggle (hamburguesa) */
.menu-toggle img.nav-logo-toggle {
    width: 48px;
    height: auto;
}

/* Versión móvil adicional para toggle y navbar */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .logo-item {
        display: none;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff; /* fondo claro para menú */
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        overflow: hidden;
        max-height: 0; /* oculto por defecto */
        transition: max-height 0.4s ease;
        z-index: 10;
        padding: 0 1rem;
    }

    .navbar.active {
        max-height: 500px; /* expande para mostrar items */
        padding: 1rem;
    }

    .navbar li {
        width: 100%;
        text-align: center;
    }

    .navbar a {
        display: block;
        padding: 0.5rem 0;
    }
}

/* Mostrar solo en móvil */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

/* ====== Evitar guiones en móviles, ajustar tamaño ====== */
@media (max-width: 768px) {
    body, 
    p, 
    li, 
    h1, 
    h2, 
    h3, 
    a {
        hyphens: none !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        word-wrap: normal !important;
        font-size: 80%; /* reducir fuente para mejor ajuste */
    }
}
