/* ==========================================================================
   3DIAS - SISTEMA DE DISEÑO BASE
   ========================================================================== */

/* --- 1. VARIABLES & RESET --- */
:root {
    --c-text: #1A1A1A;     /* Negro suave */
    --c-sub: #444444;      /* Gris oscuro para subtítulos */
    --c-bg: #FDFDFD;       /* Fondo base (casi blanco) */
    --c-dot: #A3BDDF;      /* Trama: Azul agrisado */
    --c-accent: #00AEEF;   /* Cyan corporativo */
    --c-secondary: #35BEEF;/* Cyan secundario (Landings) */
    --c-red: #F04942;      /* Rojo alerta (Landings) */
    --c-border: #E0E0E0;   /* Gris para bordes */
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- 2. CONFIGURACIÓN GLOBAL (BODY & BACKGROUND) --- */
body {
    font-family: var(--font-main);
    background-color: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* Modificador para el Home (Bloquea scroll en desktop) */
body.page-home {
    height: 100vh;
    overflow: hidden;
    align-items: center;
}

/* Trama de fondo compartida */
.bg-pattern {
    position: fixed; /* Fixed es mejor para que no se corte al hacer scroll */
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-image:
        radial-gradient(var(--c-dot) 1.5px, transparent 1.5px),
        radial-gradient(var(--c-dot) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    opacity: 0.4;
}

/* --- 3. CONTENEDOR PRINCIPAL Y HEADER --- */
.container {
    width: 90%;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Layout específico del Home */
.page-home .container {
    max-width: 1200px;
    height: 90vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* Layout específico de las Landings */
.page-landing .container {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-bottom: 4rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--c-text);
}

/* Alineación de header en landings */
.page-landing header {
    align-items: center;
    padding-bottom: 1.5rem;
}

.logo-img { height: 48px; width: auto; display: block; }
.page-landing .logo-img { height: 32px; } /* Más sutil en interiores */

/* --- 4. TIPOGRAFÍA Y BOTONES COMPARTIDOS --- */
h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.page-home h1 { margin-bottom: 1.5rem; max-width: 900px; text-shadow: 2px 2px 0px var(--c-bg); }

h1 u {
    text-decoration: none;
    border-bottom: 4px solid var(--c-accent);
    padding-bottom: 2px;
}

.btn {
    background-color: var(--c-text);
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.2s;
    white-space: nowrap;
    display: inline-block;
}

.btn:hover { background-color: var(--c-accent); }

/* ==========================================================================
   MÓDULOS ESPECÍFICOS: HOME PAGE (index.html)
   ========================================================================== */
.tagline { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; line-height: 1.4; }
.page-home main { display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; }
.hero-text { margin-bottom: 4rem; }
.page-home h2 { font-size: 1.25rem; font-weight: 400; color: var(--c-sub); max-width: 680px; line-height: 1.4; background: rgba(253,253,253,0.3); }

/* Enlaces Recursos */
.resources-links { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.resource-link { color: var(--c-text); font-size: 0.95rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--c-accent); padding-bottom: 2px; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.5rem; }
.resource-link:hover { color: var(--c-accent); border-bottom-color: var(--c-text); opacity: 0.8; }
.resource-icon { width: 16px; height: 16px; fill: currentColor; }

/* Grilla Servicios Home */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.service-col h3 { font-size: 0.9rem; text-transform: uppercase; font-weight: 700; margin-bottom: 0.75rem; border-left: 3px solid var(--c-accent); padding-left: 0.75rem; }
.service-col p { font-size: 0.95rem; line-height: 1.4; color: var(--c-sub); }

/* --- ENLACES DE SERVICIOS (Grilla Home) --- */
a.service-col {
    text-decoration: none; /* Quita el subrayado por defecto */
    color: inherit; /* Hereda el color del texto base para no verse azul */
    display: block;
    transition: transform 0.2s ease;
    cursor: pointer;
}

/* Transición suave para el título en el hover */
a.service-col h3 {
    transition: color 0.2s ease;
}

/* EFECTO HOVER: Un micro-salto y subrayado cyan sutil en el título */
a.service-col:hover {
    transform: translateY(-2px);
}

a.service-col:hover h3 {
    color: var(--c-accent);
    text-decoration: underline;
    text-underline-offset: 4px; /* Separa el subrayado del texto */
}

/* Footer Home */
.page-home footer { border-top: 1px solid #ccc; padding-top: 1.5rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
.marquee-container { overflow: hidden; width: 100%; max-width: 600px; position: relative; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 3rem; width: max-content; animation: scroll 45s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.client-logo { height: 45px; width: auto; opacity: 0.8; filter: grayscale(100%); transition: all 0.3s; }
.client-logo:hover { opacity: 1; filter: grayscale(0%); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* CTA Home */
.cta-group { display: flex; align-items: center; gap: 2rem; }
.email { text-decoration: none; color: var(--c-text); font-weight: 700; font-size: 1rem; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.email:hover { border-color: var(--c-text); }
.page-home .btn { padding: 0.8rem 1.5rem; font-size: 0.85rem; }

/* ==========================================================================
   MÓDULOS ESPECÍFICOS: LANDING PAGES (auditoria.html, etc.)
   ========================================================================== */
.back-link { font-size: 0.85rem; font-weight: 700; color: var(--c-text); text-decoration: none; text-transform: uppercase; display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.2s; }
.back-link:hover { color: var(--c-accent); }

.service-header { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; margin-top: 1rem; }
.service-logo { width: 120px; height: 120px; background-color: #fff; border-radius: 50%; border: 1px solid var(--c-border); padding: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.intro-text { font-size: 1.25rem; color: var(--c-sub); line-height: 1.5; max-width: 800px; margin-top: -1rem; margin-left: 150px; background: rgba(253,253,253,0.5); }

/* Breakdown Técnico */
.technical-breakdown { display: flex; flex-direction: column; gap: 2rem; margin-top: 2rem; }
.layer-box { background-color: #fff; border: 1px solid var(--c-border); padding: 2rem; display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: flex-start; }
.layer-title h3 { font-size: 1.2rem; text-transform: uppercase; font-weight: 800; color: var(--c-text); margin-bottom: 0.5rem; }
.layer-title span { display: inline-block; font-size: 0.85rem; background-color: var(--c-secondary); padding: 2px 8px; border-radius: 4px; font-weight: 700; color: white; }
.layer-content p { font-size: 1rem; line-height: 1.5; color: var(--c-sub); margin-bottom: 1rem; }
.layer-content ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.layer-content li { font-size: 0.95rem; position: relative; padding-left: 1rem; color: var(--c-text); line-height: 120%; }
.layer-content li::before { content: "•"; color: var(--c-red); position: absolute; left: 0; font-weight: bold; }

/* Tiers */
.page-landing h2 { font-size: 1.5rem; font-weight: 800; margin-top: 2rem; border-bottom: 2px solid var(--c-text); padding-bottom: 0.5rem; }
.tiers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tier-card { border: 1px solid var(--c-border); padding: 1.5rem; background: rgba(253,253,253,0.8); display: flex; flex-direction: column; }
.tier-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.tier-card p { font-size: 0.95rem; color: var(--c-sub); line-height: 1.4; margin-bottom: 1rem; flex-grow: 1; }

/* CTA Final */
.cta-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--c-border); }
.cta-container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; }
.cta-img { width: 60px; }

/* ==========================================================================
   RESPONSIVE MOBILE
   ========================================================================== */
@media (max-width: 900px) {
    /* Libera el scroll en el Home en móviles */
    body.page-home { overflow: auto; height: auto; display: block; }
    .page-home .container { height: auto; padding: 2rem 1.5rem; width: 100%; display: block; }

    h1 { font-size: 2.5rem; }

    /* Home Mobile */
    .page-home header { flex-direction: column; gap: 1rem; }
    .tagline { text-align: left; }
    .resources-links { flex-direction: column; gap: 1rem; }
    .services { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; margin-top: 3rem; }
    .page-home footer { grid-template-columns: 1fr; gap: 2rem; display: flex; flex-direction: column; }
    .marquee-container { max-width: 100%; }
    .cta-group { flex-direction: column-reverse; align-items: center; gap: 1.5rem; width: 100%; }
    .email { font-size: 1rem; margin-top: 0.5rem; }

    /* Landings Mobile */
    .page-landing header { flex-direction: row; }
    .service-header { grid-template-columns: 1fr; text-align: left; }
    .service-logo { width: 80px; height: 80px; }
    .intro-text { margin-left: 0; }
    .layer-box { grid-template-columns: 1fr; gap: 1rem; }
    .layer-content ul { grid-template-columns: 1fr; }
    .tiers-grid { grid-template-columns: 1fr; }
    .cta-container { flex-direction: column; gap: 1.5rem; text-align: center; }

    .btn { width: 100%; text-align: center; }
}
