/* ===== NOSOTROS PREMIUM (REDISEÑADO Y PEGADO A LOS BORDES) ===== */
#nosotros {
    padding: 50px 10px;
    margin: 0;
    background-image:
        linear-gradient(rgba(247,247,247,0.85), rgba(255,255,255,0.85)),
        url("../images/fondos/fondo-servicios.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* Título */
#nosotros h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 40px;
    color: #0f2e1f;
    position: relative;
}

#nosotros h2::after {
    content: "";
    width: 80px;
    height: 4px;
    background: #00A651;
    display: block;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Layout */
.nosotros-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: auto;
    align-items: flex-start;
    padding: 0 20px;
    flex-wrap: wrap;
}

/* Texto */
.nosotros-text {
    flex: 1;
    min-width: 300px;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out 0.2s;
}

.nosotros-text h3 {
    color: #00A651;
    margin-bottom: 10px;
}

.nosotros-text p {
    margin-bottom: 20px;
}

/* Botón estilo moderno */
#vision-btn {
    background: #00A651;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

#vision-btn:hover {
    background: #007f3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Panel derecho (Imagen + Valores + Logros + Testimonios) */
.nosotros-panel {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.nosotros-image:hover img {
    transform: scale(1.08);
}

/*  ANIMACIÓN AL HACER SCROLL */
#nosotros.show .nosotros-text {
    opacity: 1;
    transform: translateY(0);
}

#nosotros.show .nosotros-image {
    opacity: 1;
    transform: scale(1);
}

/* ===== VALORES ===== */
.valores-container {
    display: flex;
    justify-content: space-between; /* sin espacio extra */
    flex-wrap: nowrap;              /* NO bajar a otra fila */
    gap: 10px;
    width: 100%;
}

.valor-card {
    background: #fff;
    flex: 0 0 calc(25% - 8px); /* 4 exactos */
    padding: 20px 12px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}


.valor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.valor-card h3 {
    color: #00A651;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.valor-card p {
    color: #444;
    font-size: 15px;
    line-height: 1.5;
}

/* ===== LOGROS / COUNTERS ===== */
.logros-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.logro-card {
    flex: 1 1 150px;
    background: #f0f0f0;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    text-align: center;
}

.logro-card p {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

#clientes-counter {
    font-size: 2.5rem;
    color: #00A651;
    font-weight: 700;
}
.counter {
    font-size: 2.5rem;
    color: #00A651;
    font-weight: 700;
}
/* ===== TESTIMONIOS ===== */
.testimonios-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    overflow: hidden; /* evita que los testimonios sobresalgan */
}

/* Cada testimonial */
.testimonial {
    opacity: 0;               /* invisible por defecto */
    position: absolute;       /* apilados uno encima de otro */
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 30px 25px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: opacity 1s ease; /* fade suave */
}

/* Testimonial activo */
.testimonial.active {
    opacity: 1;
    position: relative;  /* se mantiene visible en flujo normal */
}

/* Texto */
.testimonial p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

/* Nombre */
.testimonial h4 {
    color: #00A651;
    font-weight: 600;
    font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .testimonial {
        padding: 20px 15px;
        font-size: 15px;
    }

    .testimonial p {
        font-size: 15px;
    }

    .testimonial h4 {
        font-size: 13px;
    }
}
/* ===== MODAL TESTIMONIO ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.modal-content h3 {
    margin-bottom: 15px;
    text-align: center;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.modal-content textarea {
    resize: none;
    height: 100px;
}

.modal-content button {
    width: 100%;
    padding: 10px;
    background: #00A651;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

.modal-content button:hover {
    background: #007f3a;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== TOAST MENSAJE ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2ecc71;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 1000;
    font-size: 14px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* ===== BOTONES CARRUSEL TESTIMONIOS ===== */
.testimonios-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* Botones */
.testimonios-container button.prev,
.testimonios-container button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #00A651;
    border: none;
    color: #fff;
    font-size: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover */
.testimonios-container button.prev:hover,
.testimonios-container button.next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Posición izquierda / derecha relativa al contenedor */
.testimonios-container button.prev {
    left: 10px; /* ahora siempre visible */
}

.testimonios-container button.next {
    right: 10px; /* ahora siempre visible */
}

/* ===== RESPONSIVE CARRUSEL ===== */
@media (max-width: 900px) {
    .testimonios-container button.prev,
    .testimonios-container button.next {
        width: 35px;
        height: 35px;
        font-size: 18px;
        line-height: 35px;
    }
}

@media (max-width: 600px) {
    .testimonios-container button.prev,
    .testimonios-container button.next {
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
    }
}

/* Botón Agregar Testimonio */
#add-testimonial-btn {
    background: #00A651;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

#add-testimonial-btn:hover {
    background: #007f3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Botón reacción clientes */
#react-btn {
    background: #00A651;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    margin-top: 5px;
    transition: all 0.2s ease;
}

#react-btn:hover {
    transform: scale(1.2);
}
/* ===== CARD NOSOTROS ===== */
.nosotros-card {
    background: #ffffff;
    padding: 25px 22px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

/* Texto más pequeño y técnico */
.nosotros-card h3 {
    font-size: 1rem;
    color: #00A651;
    margin-bottom: 8px;
}

.nosotros-card p {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #444;
    margin-bottom: 14px;
}

/* Ajuste botón dentro del card */
.nosotros-card #vision-btn {
    margin-top: 10px;
    padding: 8px 20px;
    font-size: 0.75rem;
}
/* ===== CARD NOSOTROS A LA IZQUIERDA ===== */
.nosotros-text {
    display: flex;
    justify-content: flex-start;   
}

.nosotros-card {
    max-width: 420px;              
    margin-right: auto;          
}
/* ===== NOSOTROS PEGADO AL BORDE IZQUIERDO ===== */
.nosotros-container {
    padding-left: 5px; 
    padding-right: 5px;
}


/* ===== RESPONSIVE ===== */

/* Laptop / Tablets grandes */
@media (max-width: 1024px) {
    .profesionales-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets / pantallas medianas */
@media (max-width: 900px) {
    /* Contenedor principal */
    .nosotros-container {
        flex-direction: column;
        gap: 25px;
    }

    /* Panel derecho (imagen + valores + logros + testimonios) arriba */
    .nosotros-panel {
        order: -1;
    }

    /* Título y texto */
    #nosotros h2 {
        font-size: 2.1rem;
    }
    .nosotros-text {
        font-size: 16px;
        opacity: 1 !important;
        transform: none !important;
    }

    /* Profesionales */
    .profesionales-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Valores y logros */
    .valores-container, .logros-container {
        flex-direction: column;
        align-items: center;
    }

    .valor-card, .logro-card {
        flex: 1 1 100%;
    }

    /* Testimonios */
    .testimonios-container {
        max-width: 100%;
    }
}

/* Móviles / pantallas pequeñas */
@media (max-width: 600px) {
    /* Profesionales */
    .profesionales-grid {
        grid-template-columns: 1fr;
    }
    .profesionales-title {
        font-size: 1.8rem;
    }

    /* Contadores */
    .counter {
        font-size: 2rem;
    }

    /* Panel derecho */
    .nosotros-panel {
        gap: 20px;
    }

    /* Valores y logros */
    .valores-container, .logros-container {
        gap: 15px;
    }

    .valor-card, .logro-card {
        padding: 15px 10px;
    }

    /* Botones */
    #vision-btn, #add-testimonial-btn {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    /* Testimonios */
    .testimonial {
        padding: 20px 15px;
        font-size: 15px;
    }

    .testimonios-container button.prev,
    .testimonios-container button.next {
        left: -20px;
        right: -20px;
        padding: 8px 12px;
        font-size: 18px;
    }
}
