/* ============================================
   VARIABLES CORPORATIVAS
   ============================================ */
:root {
    --cafe-oscuro: #5d1a1a;
    --dorado: #8c6239;
}

/* ============================================
   BASE
   ============================================ */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    color: #333;
    padding-top: 73px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h2 {
    font-size: 1.2rem;
    border-bottom: none;
    margin-bottom: 20px;
}

/* ============================================
   HEADER + NAV
   ============================================ */
header {
    background-color: var(--dorado);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--dorado);
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

header img.logo { 
    height: 50px; 
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

nav ul li a.active {
    color: #87CEEB;
    border-bottom: 2px solid var(--dorado);
    padding-bottom: 3px;
}

/* ============================================
   HAMBURGER
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================
   CARRUSEL BANNER
   ============================================ */
.carousel-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
    line-height: 0;
}

.carousel-slide {
    display: none;
    line-height: 0;
    font-size: 0;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
    border: none;
    margin: 0;
    padding: 0;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    transition: all 0.3s ease;
    user-select: none;
    margin: 0 15px;
    outline: none;
    padding: 0;
}

.prev { left: 0; }
.next { right: 0; }

.prev:hover, .next:hover {
    background-color: rgba(255,255,255,0.35);
    border-color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.6);
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

@keyframes fade {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}

.fade { animation: fade 0.8s; }

/* ============================================
   CONTENEDOR GLOBAL
   ============================================ */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
}

/* ============================================
   NOSOTROS
   ============================================ */
.nosotros {
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.nosotros h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 30px;
}

.nosotros-content {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.nosotros-content img {
    width: 350px;
    max-width: 100%; 
    height: auto;
    border-radius: 2px;
    object-fit: cover; 
}

.texto-compromiso {
    flex: 1; 
}

.texto-compromiso h3 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* ✅ AQUÍ: fuera del media query para que aplique en desktop también */
.texto-compromiso p {
    text-align: justify;
    line-height: 1.8;
    margin-bottom: 16px;
}

.texto-compromiso strong {
    display: inline !important;
    font-weight: bold !important;
}

.texto-compromiso p:last-child strong {
    display: block !important;
    margin-top: 25px;
    font-size: 1.05rem;
    color: #222;
}

/* Estadísticas (Stats) */
.nosotros-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e0d5ca;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 36px;
}

.nosotros-stat {
    background: #fff;
    padding: 20px 16px;
    text-align: center;
}

.stat-num {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--cafe-oscuro);
    display: block;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-lbl {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #666;
}

/* ============================================
   MISIÓN
   ============================================ */
.mision-section { 
    padding: 40px 0; 
}

.mision-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}

.mision-img { 
    flex: 1; 
}

.mision-img img { 
    width: 100%; 
    border-radius: 4px; 
}

.mision-texto { 
    flex: 1.5; 
}

.mision-texto h2 {
    color: var(--cafe-oscuro);
    font-size: 24px;
    margin-bottom: 20px;
}

.mision-texto p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
}

.contacto-tel {
    font-size: 18px !important;
    margin-top: 20px;
}

/* ============================================
   SERVICIOS
   ============================================ */
.servicios-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.servicios-container h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 25px;
}

.servicios-content-wrapper {
    display: flex;
    justify-content: center;
}

.servicio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.servicio-item img {
    width: 150px;
    height: auto;
    margin-bottom: 15px;
}

.servicio-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--cafe-oscuro);
}

.servicio-item p {
    font-size: 0.9rem;
    line-height: 1.4;
}

.servicio-item:hover { 
    opacity: 0.85; 
    transition: opacity 0.2s ease; 
}

/* ============================================
   CLIENTES
   ============================================ */
.clientes-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.clientes h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 25px;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 30px;
    align-items: center;
    justify-items: center;
}

.cliente-item img {
    max-width: 180px;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.cliente-item img[src$=".svg"] {
    filter: none;
    opacity: 1;
}

.cliente-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ============================================
   CONTACTO
   ============================================ */
.contacto-principal {
    padding: 60px 0;
    background-color: #fff;
}

.contacto-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    padding: 0 20px;
    align-items: flex-start;
}

.contacto-col-formulario { 
    flex: 1; 
}

.contacto-col-formulario h2 {
    font-size: 1.4rem;
    font-style: italic;
    font-weight: bold;
    margin-bottom: 30px;
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row { 
    display: flex; 
    gap: 15px; 
}

#contactForm input,
#contactForm textarea {
    width: 100%;
    padding: 15px;
    border: none;
    background-color: #ececec;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-footer { 
    display: flex; 
    justify-content: flex-end; 
}

.btn-enviar {
    background-color: #fff;
    border: 2px solid var(--cafe-oscuro);
    color: var(--cafe-oscuro);
    padding: 10px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.contacto-col-mapa { 
    flex: 1; 
}

.titulo-ubicacion {
    text-align: right;
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.map-wrapper {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background-color: var(--dorado);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
    margin-top: auto;
}

/* ============================================
   WHATSAPP
   ============================================ */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    z-index: 1000;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}

.whatsapp-btn:hover { transform: scale(1.1); }
.whatsapp-btn svg { width: 100%; height: 100%; }

/* ============================================
   MEDIA QUERIES TABLET
   ============================================ */
@media (max-width: 900px) {
    .contacto-container { flex-direction: column; }
    .form-row { flex-direction: column; }
    .titulo-ubicacion { text-align: left; }
}

/* ============================================
   MEDIA QUERIES MOBILE
   ============================================ */
@media (max-width: 768px) {
    /* Header */
    header { padding: 10px 4%; }
    .hamburger { display: flex; }

    #nav-menu {
        display: none;
        position: absolute;
        top: 73px; 
        left: 0;
        width: 100%;
        background-color: var(--cafe-oscuro);
        border-top: 2px solid var(--dorado);
        z-index: 999;
    }

    #nav-menu.open { display: block; }

    #nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        margin: 0;
    }

    #nav-menu ul li a {
        display: block;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 15px;
    }

    #nav-menu ul li:last-child a { border-bottom: none; }

    /* Carrusel */
    .carousel-slide img { height: 200px; }

    .prev, .next {
        width: 34px;
        height: 34px;
        font-size: 14px;
        margin: 0 6px;
    }

    .carousel-dots { bottom: 8px; gap: 6px; }
    .dot { width: 8px; height: 8px; }

    /* General */
    h2 { font-size: 1.1rem; }
    .container { margin: 25px auto; padding: 0 15px; }

    /* Nosotros */
    .nosotros { padding: 0 15px; }
    .nosotros-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .nosotros-content img {
        max-width: 100%;
        height: auto; 
        display: block;
    }
    .texto-compromiso h3 { font-size: 1.2rem; }

    /* Servicios */
    .servicios-container { padding: 0 15px; }
    .servicios-content-wrapper { flex-direction: column; align-items: center; }
    .servicio-item { max-width: 100%; }

    /* Clientes */
    .clientes-container { padding: 0 15px; }
    .clientes-grid { grid-template-columns: repeat(2, 1fr); gap: 25px 15px; }
    .cliente-item img { max-width: 130px; }

    /* Misión */
    .mision-grid { flex-direction: column; }
    .mision-texto h2 { font-size: 1.3rem; }
    .mision-texto p { font-size: 0.95rem; }

    /* Contacto */
    .contacto-principal { padding: 30px 0 0; }
    .contacto-container { flex-direction: column; padding: 0; gap: 25px; }
    .contacto-col-formulario { padding: 0 15px; }
    .contacto-col-formulario h2 { font-size: 1.1rem; }
    #contactForm input, #contactForm textarea { padding: 12px; font-size: 0.95rem; }
    .btn-enviar { padding: 10px 30px; font-size: 1rem; }
    .contacto-col-mapa { width: 100%; padding: 0; }
    .titulo-ubicacion { padding: 0 15px; text-align: left; font-size: 1.2rem; }

    .map-wrapper {
        height: 300px;
        border-radius: 0;
        box-shadow: none;
        width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Footer y WhatsApp */
    footer { font-size: 12px; padding: 12px 15px; }
    .whatsapp-btn { width: 48px; height: 48px; bottom: 15px; right: 15px; }
}

/* ============================================
   PANTALLAS MUY PEQUEÑAS
   ============================================ */
@media (max-width: 380px) {
    .carousel-slide img { height: 160px; }
    .clientes-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 10px; }
    .cliente-item img { max-width: 110px; }
    .nosotros-content img { max-width: 260px; }
}