/* assets/css/style.css - Versión Optimizada */

:root {
    --primary-color: #31553a;
    --secondary-color: #f57e20;
    --tertiary-color: #5ab651;
    --text-color: #333;
    --light-color: #f7f7f7;
    --white-color: #fff;
}

/* Estilos Generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--white-color);
    padding-top: 130px;
    line-height: 1.6;
}

/* Línea superior */
.top-line {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--tertiary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
}

/* Selector de idioma */
.language-selector-top {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1060;
}

.lang-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.lang-link:hover, .lang-link.active {
    color: var(--secondary-color);
}

.lang-separator {
    color: var(--primary-color);
    margin: 0 5px;
}

/* Encabezado y Navegación - OPTIMIZADO */
.navbar {
    background-color: var(--white-color) !important;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.navbar-top-content {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Logo */
.navbar-brand {
    height: 120px;
    width: auto;
    margin-right: 20px;
    position: relative;
    z-index: 1040;
}

.logo-image-static {
    height: 120px;
    width: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-image-static:hover {
    transform: scale(1.05);
}

/* Información de contacto */
.center-nav-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 15px;
    position: relative;
    z-index: 1030;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--primary-color);
    line-height: 1.2;
    font-weight: 500;
    margin-bottom: 5px;
    text-align: left;
}

.contact-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

/* Línea divisoria */
.lines-divider {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.line {
    width: 80%;
    height: 1px;
    background-color: var(--tertiary-color);
    margin-top: 5px;
    opacity: 0.7;
}

/* Menú de navegación */
.navbar-nav {
    align-items: center;
}

.nav-item {
    position: relative;
    margin: 0 0.5rem;
}

.nav-link {
    color: var(--primary-color) !important;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Animación de la línea */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--tertiary-color);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active::after {
    transform: scaleX(1);
    background-color: var(--secondary-color);
}

/* Carrusel */
.carousel-item img {
    height: 550px;
    width: 100%;
    object-fit: cover;
    object-position: center top;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
}

.carousel-caption h2 {
    color: var(--white-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.carousel-caption p {
    color: var(--white-color);
    font-size: 1.2rem;
}

/* Sección Quiénes Somos */
#quienes-somos {
    padding: 5rem 0;
}

#quienes-somos h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

#quienes-somos .lead {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 400;
}

#quienes-somos img {
    max-width: 100%;
    border: 5px solid var(--white-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Productos Section */
#productos {
    padding: 5rem 0;
    background-color: var(--light-color);
}

#productos h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

#productos .lead {
    color: var(--text-color);
    margin-bottom: 3rem;
}

/* Tarjetas de producto */
.product-card {
    background-color: var(--white-color);
    padding: 2rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.product-card img {
    height: 200px;
    object-fit: contain;
    transition: transform 0.4s ease;
    display: block;
    margin: 0 auto 1rem auto;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card h3 {
    margin-top: 1rem;
    color: var(--primary-color);
    text-align: center;
}

/* Contacto Section */
#contacto {
    padding: 5rem 0;
}

#contacto h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 700;
}

#contacto .lead {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.contact-details li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.contact-details i {
    font-size: 1.2rem;
    color: var(--secondary-color);
    width: 24px;
}

.contact-details a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--secondary-color);
}

/* Botón elegante */
.btn-elegant {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-elegant:hover {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Mapa */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    height: 350px;
    width: 100%;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    transition: transform 0.2s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float a {
    display: block;
    width: 60px;
    height: 60px;
}

.whatsapp-float img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Modal de WhatsApp */
.modal-content {
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    background-color: var(--white-color);
    padding: 2rem 1.5rem;
}

.list-group-item {
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.list-group-item:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 2rem 0;
}

footer p {
    margin: 0;
    color: var(--white-color);
}

.footer-link {
    color: var(--white-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Ajuste para scroll */
html {
    scroll-padding-top: 130px;
}

/* ===== MEJORAS RESPONSIVE - ACTUALIZADO ===== */
@media (max-width: 1200px) {
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-item {
        margin: 0 0.3rem;
    }
}

@media (max-width: 992px) {
    body {
        padding-top: 100px;
    }
    
    .language-selector-top {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 1060;
    }
    
    .navbar-top-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .navbar-brand {
        height: 80px;
        margin-right: 0;
        margin-bottom: 0;
        order: 2;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .logo-image-static {
        height: 80px;
    }
    
    .center-nav-content {
        display: none;
    }
    
    .navbar-toggler {
        order: 3;
        margin-left: auto;
        z-index: 1040;
        padding: 0.35rem 0.65rem;
        border: 1px solid rgba(49, 85, 58, 0.2);
        border-radius: 4px;
    }
    
    .navbar-collapse {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        background-color: var(--white-color);
        z-index: 1050;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        border-top: 3px solid var(--primary-color);
    }
    
    .nav-item {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        padding: 0.9rem 1rem !important;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        color: var(--primary-color) !important;
        font-weight: 600;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-link:hover {
        background-color: #f8f9fa;
        border-radius: 4px;
        padding-left: 1.5rem !important;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        background-color: transparent;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        color: var(--primary-color);
        border-bottom: 1px solid #f0f0f0;
    }
    
    .dropdown-item:hover {
        background-color: #f8f9fa;
        color: var(--secondary-color);
    }
    
    .carousel-item img {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 15px;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    html {
        scroll-padding-top: 100px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float a {
        width: 50px;
        height: 50px;
    }
    
    /* Información de contacto en el menú móvil */
    .mobile-contact-info {
        display: block;
        padding: 1rem;
        margin-top: 1rem;
        border-top: 1px solid #eee;
        background-color: #f9f9f9;
        border-radius: 4px;
    }
    
    .mobile-contact-info .contact-info {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        color: var(--text-color);
        line-height: 1.4;
    }
    
    .mobile-contact-info .contact-info:last-child {
        margin-bottom: 0;
    }
    
    .mobile-contact-info .contact-info a {
        color: var(--primary-color);
        text-decoration: none;
    }
    
    .mobile-contact-info .contact-info a:hover {
        color: var(--secondary-color);
        text-decoration: underline;
    }
}

/* Mejoras para tablets */
@media (max-width: 768px) {
    #quienes-somos .row {
        flex-direction: column-reverse;
    }
    
    #quienes-somos img {
        margin-bottom: 2rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
}

/* Mejoras para móviles */
@media (max-width: 576px) {
    .language-selector-top {
        top: 10px;
        right: 10px;
    }
    
    .lang-link {
        font-size: 0.8rem;
    }
    
    .navbar-brand {
        height: 70px;
    }
    
    .logo-image-static {
        height: 70px;
    }
    
    .navbar-collapse {
        top: 95px;
        max-height: calc(100vh - 95px);
    }
    
    .carousel-caption {
        padding: 10px;
    }
    
    .carousel-caption h2 {
        font-size: 1.2rem;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
    }
    
    .btn-elegant {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .nav-link {
        font-size: 1rem !important;
        padding: 0.8rem 1rem !important;
    }
}

/* Estilos para el modal de organigrama - ACTUALIZADO */
#organigramaModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

#organigramaModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: white;
    border-bottom: none;
    padding: 1.2rem 1.5rem;
}

#organigramaModal .modal-title {
    font-weight: 700;
    font-size: 1.5rem;
}

#organigramaModal .modal-body {
    padding: 1.5rem;
    text-align: center;
    background-color: var(--light-color);
}

.organigrama-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

#organigramaModal .modal-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
}

.btn-download-organigrama {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-download-organigrama:hover {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Asegurar buena visualización en dispositivos móviles */
@media (max-width: 768px) {
    #organigramaModal .modal-dialog {
        margin: 10px;
    }
    
    .organigrama-image {
        max-height: 60vh;
        width: auto;
    }
    
    #organigramaModal .modal-title {
        font-size: 1.2rem;
    }
}

/* ===== OPTIMIZACIÓN DEL LOGO - AGREGAR AL FINAL DEL ARCHIVO ===== */

/* Aumento del tamaño del logo en desktop */
.navbar-brand {
    height: 150px !important;
    margin-right: 25px !important;
}

.logo-image-static {
    height: 150px !important;
    transform: scale(1.1) !important;
    transform-origin: left center !important;
    transition: transform 0.3s ease !important; /* Aseguramos la transición */
}

/* Recuperamos el efecto de hover */
.logo-image-static:hover {
    transform: scale(1.15) !important; /* Aumentamos ligeramente el zoom en hover */
}

/* Ajuste del padding superior para compensar el logo más grande */
body {
    padding-top: 160px !important;
}

/* Ajuste del scroll padding */
html {
    scroll-padding-top: 160px !important;
}

/* Ajustes responsivos para tablets */
@media (max-width: 992px) {
    .navbar-brand {
        height: 100px !important;
        transform: translateX(-50%) !important;
    }
    
    .logo-image-static {
        height: 100px !important;
        transform: scale(1.05) !important;
    }
    
    .logo-image-static:hover {
        transform: scale(1.1) !important;
    }
    
    body {
        padding-top: 104px !important;
    }
    
    .navbar-collapse {
        top: 104px !important;
    }
    
    html {
        scroll-padding-top: 104px !important;
    }
}

/* Ajustes responsivos para móviles */
@media (max-width: 576px) {
    .navbar-brand {
        height: 85px !important;
    }
    
    .logo-image-static {
        height: 85px !important;
        transform: scale(1.05) !important;
    }
    
    .logo-image-static:hover {
        transform: scale(1.08) !important;
    }
    
    body {
        padding-top: 98px !important;
    }
    
    .navbar-collapse {
        top: 98px !important;
    }
    
    html {
        scroll-padding-top: 98px !important;
    }
}
/* =========================================================
   FIX MÓVIL – LOGO COMPLETO + EVITAR SUPERPOSICIÓN
   ========================================================= */
@media (max-width: 576px) {

  /* 1. Logo centrado y visible */
  .navbar-brand {
    position: relative !important;   /* necesario para left:50% */
    left: 50% !important;
    transform: translateX(-50%) !important;
    height: 70px !important;
    margin: 0 !important;            /* elimina offsets */
  }
  .logo-image-static {
    height: 70px !important;
    transform: none !important;      /* anula scale previo */
  }

  /* 2. Idiomas fuera del alcance del botón */
  .language-selector-top {
    position: absolute !important;
    top: 10px !important;
    right: 70px !important;          /* deja espacio para el toggler */
    z-index: 1060 !important;
  }

  /* 3. Hamburguesa a la derecha pero sin invadir */
  .navbar-toggler {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 1040 !important;
    padding: 0.35rem 0.65rem !important;
  }

  /* 4. Ajuste de altura general */
  body {
    padding-top: 90px !important;    /* compensa logo más grande */
  }
  .navbar-collapse {
    top: 90px !important;
  }
  html {
    scroll-padding-top: 90px !important;
  }
}
/* ========================================================= */