/* ================================================================
   ESTILOS GLOBALES Y VARIABLES
   ================================================================ */
:root {
    --primary-color: #1a1a1a;    
    --accent-color: #C00000;     
    --text-color: #333333;       
    --light-bg: #f9f9f9;        
    --white: #ffffff;
    --gray-muted: #666666;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ================================================================
   COMPONENTES (BOTONES Y ELEMENTOS COMUNES)
   ================================================================ */
.cta-button {
    background-color: var(--accent-color);
    color: var(--white) !important;
    padding: 14px 30px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 0, 0, 0.3);
}

.cta-button-alt {
    background-color: transparent;
    color: var(--white);
    padding: 13px 28px;
    border: 2px solid var(--white);
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.cta-button-alt:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* ================================================================
   NAVEGACIÓN
   ================================================================ */
#main-header {
    background: var(--white);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

#main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto !important;
    object-fit: contain;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-color);
}

/* ================================================================
   SECCIÓN HERO
   ================================================================ */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1578575437130-527eed3abbec?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.8rem;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    color: #e0e0e0;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ================================================================
   SECCIÓN SOBRE NOSOTROS (SIN IMAGEN)
   ================================================================ */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px auto 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.value-proposition {
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    border-left: 6px solid var(--accent-color);
}

.value-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.value-item:last-child { margin-bottom: 0; }

.value-item i {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.value-item h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.value-item p {
    font-size: 0.95rem;
    color: var(--gray-muted);
}

/* ================================================================
   SERVICIOS
   ================================================================ */
.services-section {
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 45px 30px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--gray-muted);
    font-size: 0.95rem;
}

/* ================================================================
   CARTA DE PRESENTACIÓN Y DOCUMENTOS
   ================================================================ */
.document-body-bg {
    background-color: #f0f2f5;
    padding-top: 140px;
}

.document-card {
    background: var(--white);
    max-width: 850px;
    margin: 0 auto 100px;
    padding: 70px 80px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border-radius: 4px;
}

.doc-header {
    text-align: center;
    margin-bottom: 50px;
}

.doc-header h2 { font-size: 2rem; margin-bottom: 10px; }
.doc-header .line { width: 50px; height: 3px; background: var(--accent-color); margin: 0 auto; }

.document-content p { margin-bottom: 20px; text-align: justify; }

.benefit-list {
    list-style: none;
    margin: 30px 0;
}

.benefit-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.benefit-list li i { color: var(--accent-color); margin-top: 5px; }

.signature {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
    background-color: var(--primary-color);
    color: #bbbbbb;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo { 
    height: 80px; 
    width: auto !important;
    object-fit: contain;
    margin-bottom: 20px; 
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: #bbbbbb; }
.footer-col a:hover { color: var(--accent-color); }

.contact-info p {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.contact-info i { color: var(--accent-color); margin-top: 4px; }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 992px) {
    .content-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .contact-info p { justify-content: center; }
    .hero-content h1 { font-size: 2.8rem; }
    .document-card { padding: 50px 30px; }
}

@media (max-width: 768px) {
    .main-nav { display: none; } 
    .hero-btns { flex-direction: column; }
}


/* ==================== SECCIÓN CONTACTO DIVIDIDA ==================== */
.split-contact-section {
    padding: 0;
    background-color: var(--light-bg);
}

.contact-container {
    display: flex;
    max-width: 100%;
    min-height: 80vh;
}

/* Panel Izquierdo */
.contact-info-panel {
    flex: 1;
    background-color: var(--primary-color); 
    color: var(--white);
    padding: 80px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 4px solid var(--accent-color); 
}

.contact-info-panel h2 { color: var(--white); font-size: 3rem; margin-bottom: 10px; }
.contact-info-panel .subtitle { font-weight: 600; font-size: 1.2rem; margin-bottom: 30px; color: #d0d0d0; }
.contact-info-panel p { color: #aaaaaa; margin-bottom: 40px; }

.direct-contact h3 { color: var(--white); font-size: 1.1rem; margin-top: 20px; margin-bottom: 5px; }
.phone-link, .email-link {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: underline;
    display: block;
    margin-bottom: 20px;
    transition: var(--transition);
}
.phone-link:hover, .email-link:hover { color: var(--accent-color); } 

.social-links { margin-top: 40px; display: flex; gap: 15px; }
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}
.social-links a:hover { 
    background-color: var(--accent-color); 
    color: var(--white);
    transform: scale(1.1); 
}

/* Panel Derecho: Blanco Formal */
.contact-form-panel {
    flex: 1.5;
    background-color: var(--white);
    padding: 80px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form-panel h3 { font-size: 2rem; margin-bottom: 15px; color: var(--primary-color); }
.contact-form-panel > p { color: var(--gray-muted); margin-bottom: 40px; }

/* (Estilo Material) */
.modern-form .form-row { display: flex; gap: 30px; }
.modern-form .input-group { position: relative; margin-bottom: 30px; width: 100%; }

.modern-form input, .modern-form textarea, .modern-form select {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid #ccc;
    outline: none;
    background: transparent;
    transition: border-color 0.3s;
    color: var(--text-color);
}

.modern-form input:focus, .modern-form textarea:focus, .modern-form select:focus { 
    border-bottom: 2px solid var(--accent-color); 
}

.modern-form label {
    position: absolute;
    top: 10px;
    left: 0;
    color: #999;
    pointer-events: none;
    transition: 0.3s ease all;
}

/* Texto flotante  */
.modern-form input:focus ~ label, .modern-form input:not(:placeholder-shown) ~ label,
.modern-form textarea:focus ~ label, .modern-form textarea:not(:placeholder-shown) ~ label {
    top: -15px;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.modern-form select { color: #555; padding-top: 15px; }

/* Botón y Loader */
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color); 
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}
.hidden { display: none !important; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.form-response { margin-top: 15px; font-weight: 600; }
.success-msg { color: #28a745; }
.error-msg { color: var(--accent-color); }

@media (max-width: 992px) {
    .contact-container { flex-direction: column; }
    .modern-form .form-row { flex-direction: column; gap: 0; }
    .contact-info-panel { border-right: none; border-bottom: 4px solid var(--accent-color); }
}


/* ==================== ESTILOS DEL CHATBOT ==================== */
.custom-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Open Sans', sans-serif;
}

.chat-toggle-btn {
    background-color: var(--accent-color); /* Rojo BIDCE */
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(192, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

.chat-window.hidden {
    opacity: 0;
    transform: scale(0.1);
    pointer-events: none;
}

.chat-header {
    background-color: var(--primary-color); /* Negro corporativo */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info { display: flex; flex-direction: column; }
.chat-header-info strong { font-size: 1.1rem; }
.chat-header-info span { font-size: 0.8rem; color: #4CAF50; /* Verde de "En línea" */ }

.close-chat-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message { max-width: 80%; padding: 10px 15px; border-radius: 15px; font-size: 0.95rem; line-height: 1.4; }
.bot-message { background: #e9ecef; color: #333; align-self: flex-start; border-bottom-left-radius: 2px; }
.user-message { background: var(--accent-color); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-input-area {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.chat-input-area input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 0.95rem;
    background: #f0f2f5;
    border-radius: 20px;
}

.chat-input-area button {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-left: 10px;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.2s;
}

.chat-input-area button:hover { transform: scale(1.1); }


/* ================================================================
   CLIENTES Y TESTIMONIOS
   ================================================================ */
.clients-section {
    background-color: var(--white);
    padding: 80px 0;
}

.testimonial-card {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    border-left: 6px solid var(--accent-color);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    text-align: center;
}

.quote-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #e0e0e0;
    opacity: 0.5;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.testimonial-company {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-read-letter {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--white);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-read-letter:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* ================================================================
   VENTANA EMERGENTE (MODAL ANIMADO) DE SERVICIOS
   ================================================================ */
.service-card { cursor: pointer; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    opacity: 1; visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%; max-width: 550px;
    padding: 40px;
    border-radius: 10px;
    position: relative;
    transform: translateY(-50px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote */
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute; top: 15px; right: 20px;
    font-size: 2rem; color: #aaa; cursor: pointer;
    border: none; background: transparent;
    transition: 0.2s;
}

.close-modal:hover { color: var(--accent-color); transform: scale(1.1); }

.modal-icon { font-size: 3.5rem; color: var(--accent-color); margin-bottom: 20px; }
.modal-title { margin-bottom: 15px; color: var(--primary-color); font-size: 1.8rem; }
.modal-text { color: var(--gray-muted); line-height: 1.7; font-size: 1rem; }

/* ================================================================
   VENTANA EMERGENTE PARA LECTOR PDF
   ================================================================ */
.pdf-modal-content {
    max-width: 900px !important; /* Más ancho para el documento */
    height: 85vh; /* Usa el 85% de la altura de la pantalla */
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.pdf-container {
    flex: 1; /* Toma todo el espacio disponible */
    width: 100%;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}
