/* --- RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* --- VARIABLES DE COLOR BASADAS EN TU PALETA (image_0.png) --- */
:root {
    /* Colores exactos de tu paleta */
    --col-maroon: #59201C; /* Acento y botones (Swatch 1) */
    --col-pink: #EAE1E4;   /* Texto principal (Swatch 3) */
    --col-black: #111010;  /* Fondo principal (Swatch 4) */

    /* Colores derivados para la interfaz */
    --bg-body: var(--col-black); /* Swatch 4 */
    --bg-secondary: #1a1a1a; /* Tonalidad ligeramente más clara basada en Swatch 4 */
    --bg-card: #222222;      /* Fondo de tarjeta para profundidad basada en Swatch 4 */
    --text-main: var(--col-pink); /* Swatch 3 */
    --text-muted: #bab8ba;      /* Texto sutilmente atenuado basado en Swatch 3 */
    --accent: var(--col-maroon); /* Swatch 1 */
    --accent-hover: #7d2a23;   /* Tonalidad más oscura para el hover de acento */
    --border-color: rgba(234, 225, 228, 0.08); /* Bordes sutiles usando Swatch 3 con opacidad */
    --focus-color: rgba(89, 32, 28, 0.4);      /* Brillo de enfoque para inputs basado en Swatch 1 */
}

/* --- ESTILOS GENERALES --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* Selección de texto */
::selection {
    background-color: var(--accent);
    color: white;
}

/* --- CABECERA Y NAVEGACIÓN --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: rgba(17, 16, 16, 0.95); /* Swatch 4 con opacidad */
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none; /* Quita el subrayado del enlace */
}

.logo img {
    height: 20px; /* Ajusta este valor dependiendo de qué tan alto sea tu SVG */
    width: auto;
    transition: transform 0.3s ease;
}

/* Un pequeño efecto para que se sienta interactivo */
.logo:hover img {
    transform: scale(1.05); 
}

/* --- NAVEGACIÓN PRINCIPAL --- */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- MENÚ MÓVIL --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease-in-out;
}

/* Ocultar el menú en móviles por ahora para mantenerlo simple */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 60px; /* Justo debajo del header */
        left: -100%; /* Oculto fuera de la pantalla por defecto */
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: left 0.4s ease; /* Transición suave al abrir */
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        left: 0; /* Desliza el menú hacia adentro */
    }
}

/* --- HERO PARA PÁGINAS INTERNAS --- */
.page-hero {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
    font-size: 3rem;
    color: var(--text-main);
}

/* --- DETALLES DE SERVICIOS Y PROYECTOS --- */
.detail-section {
    padding: 80px 20px;
}

.detail-block {
    display: flex;
    gap: 40px;
    margin-bottom: 80px;
    align-items: center;
}

/* Alternar el orden en filas pares para mejor diseño */
.detail-block:nth-child(even) {
    flex-direction: row-reverse;
}

.detail-text {
    flex: 1;
}

.detail-text h2 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 2rem;
}

.detail-image {
    flex: 1;
}

.detail-image img {
    max-width: 500px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .detail-block, .detail-block:nth-child(even) {
        flex-direction: column;
    }
}

/* --- BOTONES --- */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Botón Principal (Marrón-Rojizo) */
.btn-primary {
    background-color: var(--accent);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-color);
}

/* Botón Secundario (Rosa Pálido) */
.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Botón de Contorno (Para la cabecera) */
.btn-outline {
    border: 1px solid var(--accent); /* Borde con el rojo/marrón */
    color: var(--text-main); /* Texto rosa pálido para contraste máximo */
    background-color: rgba(89, 32, 28, 0.1); /* Un fondo súper transparente del color de acento */
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--text-main); /* El texto sigue claro al pasar el mouse */
}

/* --- SECCIÓN HERO --- */
#hero {
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    background-color: var(--bg-body);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-main);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- SECCIÓN SERVICIOS (Tarjetas) --- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: var(--bg-card);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
}

/* --- SECCIÓN CASOS DE ÉXITO (Premier) --- */
#casos {
    background-color: var(--bg-secondary);
}

.caso-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.caso-texto h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.caso-texto h3 {
    color: var(--accent);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.caso-texto p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.caso-texto a,
.detail-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}


/* Imagen Mockup */
.caso-imagen img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* --- SECCIÓN EQUIPO --- */
.subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.grid-equipo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: start;
}

.rol {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100px;
}

.rol span {
    color: var(--accent);
    margin-bottom: 10px;
}

/* --- FOOTER Y CONTACTO --- */
footer {
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-body);
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.footer-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.footer-bottom {
    margin-top: 60px;
    color: #555555;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* --- CLASES PARA ANIMACIONES DE SCROLL --- */
.fade-in {
    opacity: 0;
    transform: translateY(40px); /* Empieza un poco más abajo */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0); /* Sube a su posición original */
}

/* --- FORMULARIO DE CONTACTO --- */
#contacto-form {
    text-align: center;
}

.form-container {
    background-color: var(--bg-card);
    padding: 50px 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-container h2 {
    color: var(--text-main);
    margin-bottom: 10px;
    text-align: center;
}

.form-container p {
    color: var(--text-muted);
    margin-bottom: 30px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Cambia el color del borde cuando el usuario está escribiendo */
.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--focus-color);
}

/* Estilo para las opciones del selector */
.input-group select option {
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* --- ADAPTACIÓN PARA DISPOSITIVOS MÓVILES --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .caso-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    header {
        padding: 20px;
    }
    .container {
        padding: 50px 20px;
    }
    .logo img {
        height: 14px;
    }
    .menu-toggle {
        display: flex;
    }
    /* Ocultamos el botón "Hablemos" en móvil para que no estorbe */
    header .btn-outline {
        display: none; 
    }
}