/* ===================================================================
   MARKETING CONNECTION - HOJA DE ESTILOS PRINCIPAL (VERSIÓN FINAL Definitiva)
====================================================================== */

/* --- 1. VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-color: #0d47a1; /* Azul corporativo oscuro */
    --secondary-color: #1976d2; /* Azul corporativo medio */
    --accent-color-blue: #42a5f5; /* Azul claro para acentos y botones */
    --dark-bg: #0a2d5c; /* Fondo para secciones oscuras */
    --light-bg: #f0f8ff; /* Fondo para secciones claras */
    --text-color: #333; /* Color de texto principal */
    --light-text-color: #f4f4f4; /* Color de texto claro */
    --font-family: 'Poppins', sans-serif;
}

/* --- 2. RESETEO Y CONFIGURACIÓN BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font-family); line-height: 1.7; color: var(--text-color); background-color: #fff; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- 3. COMPONENTES REUTILIZABLES --- */
.section { padding: 100px 0; }
.section-bg-light { background-color: var(--light-bg); }
.section-bg-dark { background-color: var(--dark-bg); color: var(--light-text-color); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title span { color: var(--secondary-color); font-weight: 600; display: block; margin-bottom: 5px; text-transform: uppercase; font-size: 0.9rem; }
.section-title h2 { font-size: 2.8rem; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; line-height: 1.2; }
.section-title.text-light h2 { color: #fff; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background-color: var(--accent-color-blue); color: #fff; border-color: var(--accent-color-blue); }
.btn-primary:hover { background-color: transparent; color: var(--accent-color-blue); }
.btn-secondary { background-color: transparent; color: #fff; border-color: #fff; }
.btn-secondary:hover { background-color: #fff; color: var(--text-color); }
.btn:disabled { background-color: #999; border-color: #999; color: #fff; cursor: not-allowed; }
.btn-form { margin-top: 25px;}

/* --- 4. HEADER Y NAVEGACIÓN --- */
#main-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 20px 0; background-color: transparent; transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease; }
#main-header.scrolled { background-color: #ffffff; padding: 10px 0; box-shadow: 0 2px 15px rgba(0,0,0,0.1); }
#main-header nav { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 80px; width: auto; transition: height 0.4s ease; }
#main-header.scrolled .logo img { height: 65px; }
.logo-blue { display: none; }
.logo-white { display: block; }
#main-header.scrolled .logo-blue { display: block; }
#main-header.scrolled .logo-white { display: none; }
.nav-menu { list-style: none; display: flex; align-items: center; }
.nav-menu li { margin-left: 25px; }
.nav-menu a { color: #fff; text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
#main-header.scrolled .nav-menu a { color: var(--primary-color); }
.nav-menu a:not(.btn):hover, #main-header.scrolled .nav-menu a:not(.btn):hover { color: var(--accent-color-blue); }
.hamburger { display: none; cursor: pointer; z-index: 1001; }
.hamburger .bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: #fff; }
#main-header.scrolled .hamburger .bar { background-color: var(--primary-color); }

/* --- 5. ESTILOS DE SECCIONES --- */
#hero { height: 100vh; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--dark-bg) url('/images/hero-background.jpg') no-repeat center center/cover; z-index: -1; animation: zoom-in 20s ease-in-out infinite; }
.hero-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 45, 92, 0.7); }
@keyframes zoom-in { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.hero-content { z-index: 1; }
.hero-title { font-size: 4rem; font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.hero-title .highlight { color: var(--accent-color-blue); }
.hero-subtitle { font-size: 1.3rem; font-weight: 300; max-width: 700px; margin: 0 auto 30px; }
.hero-buttons .btn { margin: 0 10px; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.12); }
.service-card .service-img { width: 100%; height: 200px; object-fit: cover; }
.service-card h3 { padding: 20px 25px 5px; color: var(--primary-color); font-size: 1.4rem; }
.service-card p { padding: 0 25px 25px; font-size: 0.95rem; flex-grow: 1; }

.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.portfolio-item { border-radius: 10px; overflow: hidden; position: relative; cursor: pointer; }
.portfolio-item img { width: 100%; display: block; transition: transform 0.4s ease; }
.portfolio-item:hover img { transform: scale(1.1); }
.about-flex { display: flex; align-items: center; gap: 60px; }
.about-image, .about-content { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.about-content ul { list-style: none; margin: 20px 0 30px; }
.about-content ul li { padding-left: 30px; position: relative; margin-bottom: 15px; }
.about-content ul li::before { content: '✔'; color: var(--accent-color-blue); position: absolute; left: 0; font-weight: bold; }

.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; align-items: flex-start; }
.contact-form-wrapper input, .contact-form-wrapper textarea { width: 100%; padding: 15px; margin-bottom: 20px; border-radius: 5px; border: 1px solid #5574a1; background-color: #193a6c; color: #fff; font-family: var(--font-family); }
.contact-form-wrapper input::placeholder, .contact-form-wrapper textarea::placeholder { color: #b0c4de; }
.contact-details p { margin-bottom: 15px; }
.contact-details a { color: #fff; text-decoration: none; transition: color 0.3s ease; }
.contact-details a:hover { color: var(--accent-color-blue); }
#form-message { padding: 15px 20px; margin-top: 20px; border-radius: 5px; text-align: center; font-weight: 500; display: none; }
#form-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
#form-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

/* --- 6. FOOTER --- */
#main-footer { background-color: #051e3e; color: #a9b3c1; text-align: center; padding: 30px 0; font-size: 0.9rem; }
#main-footer a { color: #a9b3c1; text-decoration: none; }
#main-footer a:hover { color: #fff; }


/* --- 7. ESTILOS PARA EL SELECTOR DE IDIOMA --- */
.lang-switcher {
    margin-left: 25px;
    font-weight: 500;
    color: #fff; /* Hereda el color blanco inicial del menú */
    transition: color 0.3s ease;
}

/* El selector se vuelve oscuro cuando el header cambia al hacer scroll */
#main-header.scrolled .lang-switcher {
    color: var(--primary-color);
}

.lang-switcher a {
    color: inherit; /* Usa el color del contenedor padre (.lang-switcher) */
    text-decoration: none;
    opacity: 0.7; /* El idioma inactivo se ve ligeramente atenuado */
}

.lang-switcher a:hover {
    opacity: 1; /* Al pasar el mouse, el idioma se ve más nítido */
}

.lang-switcher .lang-active {
    font-weight: 700; /* El idioma activo está en negrita */
    opacity: 1;
}


/* --- 8. ESTILOS ADICIONALES PARA EL FORMULARIO (CAMPOS DE UBICACIÓN) --- */

/* Contenedor para la fila de 3 columnas */
.form-row {
    display: flex;
    gap: 20px; /* Espacio entre las columnas */
    margin-bottom: 20px;
}

/* Cada columna individual */
.form-group {
    flex: 1; /* Hace que cada columna ocupe el mismo espacio */
}

/* Estilos para que el <select> se vea igual que los <input> */
.contact-form-wrapper select {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #5574a1;
    background-color: #193a6c;
    color: #fff;
    font-family: var(--font-family);
    -webkit-appearance: none; /* Quita la flecha por defecto en algunos navegadores */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: .65em auto;
    cursor: pointer;
}

.contact-form-wrapper select option {
    background-color: var(--dark-bg);
}

/* --- 9. MEDIA QUERIES PARA DISEÑO RESPONSIVE --- */

@media (max-width: 992px) {
    .section-title h2 { font-size: 2.4rem; }
    .hero-title { font-size: 3.2rem; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .about-flex { flex-direction: column; }
    .about-image { margin-bottom: 40px; }
}

@media (max-width: 768px) {
    html { scroll-padding-top: 70px; }
    .section { padding: 80px 0; }
    
    .nav-menu { position: fixed; left: -100%; top: 0; flex-direction: column; justify-content: center; background-color: var(--dark-bg); width: 100%; height: 100vh; text-align: center; transition: left 0.3s ease; }
    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 25px 0; }
    .nav-menu .nav-btn { display: none; }
    .nav-menu a { color: #fff !important; font-size: 1.2rem; }
    
    .lang-switcher {
        margin-top: 20px;
        font-size: 1.2rem;
    }
    .hamburger { display: block; }
    
    /* CORRECCIÓN FINAL Y DEFINITIVA PARA LA "X" */
    .hamburger.active .bar {
        background-color: #fff !important; /* Se asegura que la X siempre sea blanca */
    }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-buttons { display: flex; flex-direction: column; align-items: center; gap: 15px; }
    .service-grid, .portfolio-grid, .contact-grid { grid-template-columns: 1fr; }
    .contact-grid { gap: 40px; }
    .contact-details { text-align: center; }
    .form-row {
        flex-direction: column; /* Cambia la dirección a vertical */
        gap: 0; /* Quitamos el espacio lateral */
    }
}