/* --- Global Styles & Variables --- */
:root {
    --background-dark: #111111;
    --background-section: #1A1A1A;
    --text-light: #ffffff;
    --text-muted: #8C8C8C;
    --font-primary: 'Articulat', sans-serif;
    --font-bold: 'Articulat_Bold', sans-serif;
    --circle-blue: #0639BC;
    --gap-size: 20px;
    --gallery-image-spacing: 40px;
}

/* --- General body style --- */
body {
    font-family: var(--font-primary);
    background-color: var(--background-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-bold);
    color: var(--text-light);
}

a {
    color: var(--text-light);
    text-decoration: none;
}

a:hover {
    color: var(--text-muted);
}

section { /* Estilo general para todas las secciones */
    padding: 8vh 8vw;
    background-color: var(--background-section); /* Color de fondo por defecto para secciones */
    box-sizing: border-box;
    width: 100%;
}

/* --- Header --- */
.header-esencial {
    position: fixed; top: 0; left: 0; z-index: 202; width: 100%; display: flex;
    justify-content: space-between; align-items: center; height: 90px; padding: 0 5vw;
    background-color: var(--background-section); transition: background-color 0.3s ease;
    box-sizing: border-box;
}
.header-esencial .logo_a img { height: 35px; width: auto; display: block; }

/* Navegación Principal de Escritorio */
.main-nav {
    display: flex;
    gap: 40px;
}
.main-nav-link {
    font-family: var(--font-primary); font-size: 13px; font-weight: 500;
    text-decoration: none; color: var(--text-light); text-transform: uppercase;
    letter-spacing: 0.5px; padding: 0; transition: color 0.2s ease;
}
.main-nav-link:hover, .main-nav-link.active { color: var(--text-muted); }

/* --- Mobile Menu Styles --- */
#menu_red_div {
    position: fixed; top: 0; right: -110vw; height: 100vh; width: 100%;
    background-color: var(--background-section); z-index: 203;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 30px; transition: right 0.4s ease-in-out; overflow-y: auto;
    box-sizing: border-box; padding: 20px;
}
#menu_red_div.open { right: 0; }
.mobile-nav-link {
    font-family: var(--font-primary); font-size: 22px; font-weight: 500;
    text-decoration: none; color: var(--text-light); padding: 10px 20px;
    transition: color 0.2s ease; text-transform: uppercase;
}
.mobile-nav-link:hover, .mobile-nav-link.active { color: var(--text-muted); }

.menu-toggle-button {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: none; /* Oculto por defecto, se muestra en media query */
    z-index: 204;
    position: relative;
}
.menu-toggle-button svg { height: 28px; width: 28px; fill: var(--text-light); display: block; }
#menu_res_close_btn { position: absolute; top: 30px; right: 5vw; z-index: 204; }


/* --- Keyframes para animación de círculos --- */
@keyframes formCircle {
    0% { transform: scale(0.3); opacity: 0; visibility: hidden; }
    60% { transform: scale(1.1); opacity: 0.9; visibility: visible; }
    100% { transform: scale(1); opacity: 1; visibility: visible; }
}

/* --- Hero Section (#hero en index.php) --- */
#hero { /* Esta sección tiene su propio fondo y padding a través de la ID */
    min-height: 500px; height: 80vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding-top: 90px; box-sizing: border-box;
    background-image: url('./img/hola.png');
    background-size: cover; background-position: center; background-repeat: no-repeat; width: 100%;
    /* No necesita el padding general de 'section' si ya tiene el suyo */
    padding-left: 5vw; padding-right: 5vw; /* Añadido para consistencia con otras secciones si es necesario */
}
#hero .hero-question-text {
    font-family: var(--font-primary); font-size: clamp(20px, 3.5vw, 32px); color: var(--text-light);
    line-height: 1.8; text-align: center; max-width: 800px; padding: 0 20px;
}
.highlight-circle {
    display: inline-block; border: 2px solid var(--circle-blue); border-radius: 20px;
    padding: 1px 10px; margin: 0 2px; cursor: pointer; transition: background-color 0.3s ease, border-color 0.3s ease;
    opacity: 0; transform: scale(0.3); transform-origin: center; visibility: hidden;
}
.hero-question-text > .highlight-circle {
    animation-name: formCircle; animation-duration: 0.6s; animation-timing-function: ease-out; animation-fill-mode: forwards;
}
.hero-question-text > .highlight-circle:nth-of-type(1) { animation-delay: 0.3s; }
.hero-question-text > .highlight-circle:nth-of-type(2) { animation-delay: 0.5s; }
.hero-question-text > .highlight-circle:nth-of-type(3) { animation-delay: 0.7s; }
.hero-question-text > .highlight-circle:nth-of-type(4) { animation-delay: 0.9s; }
.hero-question-text > .highlight-circle:nth-of-type(5) { animation-delay: 1.1s; }
.hero-question-text > .highlight-circle:nth-of-type(6) { animation-delay: 1.3s; }
.highlight-circle:hover { background-color: rgba(52, 152, 219, 0.2); border-color: #5dade2; }

/* --- Secciones Intro, About, Process, CTA (s1, s3, s4, s5) --- */
/* Estas secciones usarán el padding y background general de 'section' a menos que se anule */
#s1 { text-align: center; } /* padding y bg de 'section' */
#s1 h2 { font-family: var(--font-primary); font-size: 14px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
#s1 h3 { font-family: var(--font-bold); font-size: clamp(24px, 4vw, 36px); color: var(--text-light); line-height: 1.3; text-transform: uppercase; margin: 0 auto; max-width: 600px; }

#s3 { background-color: var(--background-dark); /* Anula el bg de 'section' */ }
#s3 h4 { display: flex; align-items: center; gap: 15px; font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin-bottom: 30px; }
#s3 h4 div { height: 1px; width: 50px; background-color: var(--text-light); border: none; }
#s3 p { font-family: var(--font-primary); font-size: clamp(16px, 2vw, 18px); line-height: 1.7; color: var(--text-muted); max-width: 700px; }
#s3 p strong { font-family: var(--font-bold); font-weight: normal; color: var(--text-light); }

#s4 { text-align: center; /* padding y bg de 'section' */ }
#s4 h4 { display: none; }
#s4 .process1 .row { display: flex; justify-content: center; gap: 5vw; flex-wrap: wrap; }
#s4 .process1 .process-col { width: auto; padding: 0 15px; text-align: center; }
#s4 .process-heading { font-family: var(--font-bold); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin: 0; }
#s4 .divider-container, #s4 .process-text, #s4 .process2, #s4 .circlewhite, #s4 .circlewhitebig { display: none; }

#s5 { background-color: var(--background-dark); text-align: center; /* Anula bg de 'section' */ }
#s5 h2 { font-family: var(--font-bold); font-size: clamp(30px, 5vw, 50px); line-height: 1.2; margin: 0 0 20px 0; }
#s5 h2 strong { font-family: inherit; }
#s5 a { font-family: var(--font-primary); font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
#s5 a:hover { color: var(--text-light); }

/* --- Footer --- */
/* footer#s6 usa el bg y padding general de 'section' */
footer#s6 ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* align-items: center; <-- ELIMINADO: para que se alinee a la izquierda por defecto */
    /* Los elementos <li> se alinearán al inicio (izquierda) del <ul>. */
    /* El <ul> está dentro de footer#s6, que ya tiene padding general (8vw o 5vw en móvil), creando la sangría. */
}
.footer-link {
    font-family: var(--font-primary);
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}
.footer-link:hover { color: var(--text-muted); }

/* --- ESTILOS CUADRÍCULA DE PROYECTOS (Usados en #s2 y #work-portfolio) --- */
#s2 { /* Esta es la sección de proyectos en el Home. Usa el padding y bg de 'section' */
    text-align: center; /* Para centrar título y botón "More Work" */
}
#s2 h2 { /* Título "Proyectos Que Hablan Por Sí Mismos" */
    margin-bottom: 15px;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}
#s2 .intro-text { /* Párrafo introductorio de la sección de proyectos */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    color: var(--text-muted);
    line-height: 1.6;
}

#project-grid-container {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-size); padding: 20px 0; grid-auto-flow: dense;
    text-align: left; /* Para que el texto dentro de los overlays esté alineado a la izquierda si es necesario */
}
.project-item {
    display: block; position: relative; overflow: hidden; background-size: cover; background-position: center center;
    background-repeat: no-repeat; min-height: 300px; margin-bottom: 0;
}
.project-item .overlay {
    position: absolute; top: 0; bottom: 0; left: 0; right: 0; height: 100%; width: 100%; opacity: 0;
    transition: opacity .2s ease; background-color: rgba(26, 26, 26, 0.85); color: var(--text-light);
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    padding: 15px; box-sizing: border-box;
}
.project-item:hover .overlay { opacity: 1; }
.project-item .overlay .text { font-family: var(--font-bold); font-size: 18px; text-transform: uppercase; line-height: 1.2; }
.project-item .overlay .subtext { font-family: var(--font-primary); font-size: 13px; text-transform: uppercase; color: var(--text-muted); margin-top: 5px; }
.project-item-large { grid-column: span 2; min-height: 450px; }
.project-item-small { grid-column: span 1; min-height: 450px; }
.project-item-small-half { grid-column: span 1; min-height: calc( (450px - var(--gap-size)) / 2 ); }

/* More Work Button (#s2) */
#s2 .buttondiv { text-align: center; padding: 4vh 0 0 0; /* Solo padding top, ya que es el final de #s2 */ }
#s2 .buttondiv a.underline {
    font-family: var(--font-primary); font-size: 14px; color: var(--text-light); text-transform: uppercase;
    letter-spacing: 1px; position: relative; padding-bottom: 5px; display: inline-flex; align-items: center; text-decoration: none;
}
#s2 .buttondiv a.underline::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
    background-color: var(--text-light); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
#s2 .buttondiv a.underline:hover::after { transform: scaleX(1); }
#s2 .buttondiv a.underline span { font-family: inherit; }
#s2 .buttondiv a.underline svg {
    height: 1em; width: auto; margin-left: 8px; fill: none; stroke: var(--text-light); stroke-width: 1;
    transition: transform 0.3s ease;
}
#s2 .buttondiv a.underline:hover svg { transform: translateX(5px); }

/* --- ESTILOS PÁGINAS work.php y proyecto.php --- */
#work-portfolio { padding-top: 120px; background-color: var(--background-dark); min-height: calc(100vh - 90px); }
.project-detail-header { padding-top: 120px; padding-bottom: 40px; background-color: var(--background-dark); text-align: center; }
.project-detail-header h1 { font-size: clamp(32px, 6vw, 60px); margin-bottom: 5px; color: var(--text-light); }
.project-detail-header h2 { font-size: clamp(16px, 3vw, 22px); color: var(--text-muted); font-family: var(--font-primary); font-weight: normal; text-transform: uppercase; letter-spacing: 1px; }
.project-main-image img { width: 100%; height: auto; display: block; max-height: 80vh; object-fit: cover; }
.project-content { padding: 8vh 8vw; background-color: var(--background-section); }
.project-description { max-width: 800px; margin: 0 auto 40px auto; font-size: 1.1em; line-height: 1.7; color: var(--text-muted); }
.project-gallery { margin-top: 40px; max-width: 1200px; margin-left: auto; margin-right: auto; }
.project-gallery img { width: 100%; height: auto; display: block; margin-bottom: var(--gallery-image-spacing); }
.project-info-block { margin-top: 50px; border-top: 1px solid var(--text-muted); padding-top: 30px; max-width: 800px; margin-left: auto; margin-right: auto; font-size: 0.9em; color: var(--text-muted); line-height: 1.6; }
.project-info-block strong { color: var(--text-light); display: block; margin-bottom: 5px; font-family: var(--font-bold); font-size: 1.1em; }
.project-info-block p { margin-bottom: 1.5em; }
.page-title { text-align: center; margin-bottom: 40px; font-size: clamp(28px, 5vw, 45px); text-transform: uppercase; color: var(--text-light); }

/* --- Estilos para la Nueva Sección de Servicios Revisada (ACTIVA) --- */
#nuestros-servicios-revisado {
    background-color: var(--background-dark); /* Fondo oscuro como en la imagen de referencia */
    /* padding y color de 'section' global o específicos si son diferentes */
}
#nuestros-servicios-revisado .container-fluid-servicios { /* Contenedor interno si lo tienes en el HTML */
  max-width: 1100px; /* O el ancho que desees */
  margin-left: auto;
  margin-right: auto;
}
#nuestros-servicios-revisado .titulo-servicios-contenedor {
  display: flex;
  align-items: center;
  margin-bottom: 50px; /* Espacio antes de la cuadrícula de servicios */
}
#nuestros-servicios-revisado .titulo-servicios-linea {
  font-family: var(--font-primary);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  padding-right: 20px;
}
#nuestros-servicios-revisado .titulo-servicios-contenedor::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background-color: var(--text-muted); /* Color de la línea */
}
#nuestros-servicios-revisado .services-grid-revisado {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Tres columnas */
  row-gap: 40px; /* Espacio vertical entre las filas de servicios */
  column-gap: 0; /* Sin espacio horizontal adicional entre columnas, el borde hará la separación */
  margin-bottom: 50px; /* Espacio después de la cuadrícula antes de la descripción */
}
#nuestros-servicios-revisado .service-item-revisado {
  padding-left: 25px;
  padding-right: 25px;
  padding-top: 15px; /* Espacio para el contenido, si es necesario */
  padding-bottom: 15px; /* Espacio para el contenido, si es necesario */
  /* Los bordes se aplican selectivamente abajo */
}
#nuestros-servicios-revisado .service-item-revisado h3 {
  font-family: var(--font-bold);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-light);
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}
#nuestros-servicios-revisado .service-item-revisado p {
  font-family: var(--font-primary);
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0;
}
/* Líneas Verticales para la cuadrícula de servicios */
#nuestros-servicios-revisado .service-item-revisado:nth-child(3n+1),
#nuestros-servicios-revisado .service-item-revisado:nth-child(3n+2) {
  border-right: 1px solid var(--text-muted);
}
#nuestros-servicios-revisado .descripcion-servicios-revisado {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50px; /* Espacio antes del botón CTA */
  text-align: left;
}
#nuestros-servicios-revisado .descripcion-servicios-revisado p {
  font-family: var(--font-primary);
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}
#nuestros-servicios-revisado .descripcion-servicios-revisado p:last-child {
  margin-bottom: 0;
}
#nuestros-servicios-revisado .services-cta-container-revisado {
  text-align: center;
}
#nuestros-servicios-revisado .btn-explora-servicios {
  display: inline-block;
  padding: 12px 30px;
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid var(--text-muted);
  border-radius: 0;
  font-family: var(--font-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
#nuestros-servicios-revisado .btn-explora-servicios:hover {
  background-color: var(--text-light);
  color: var(--background-dark);
  border-color: var(--text-light);
}

/* --- Estilos para la Sección de Logos de Clientes (ACTIVA) --- */
/* Asume que en HTML tienes <section id="nuestros-clientes" class="client-logos-section"> */
#nuestros-clientes.client-logos-section { /* Mayor especificidad */
  background-color: var(--background-dark); /* Fondo oscuro como en la imagen */
  /* padding y color ya heredados de 'section' o puedes especificarlos */
  width: 100%;
  box-sizing: border-box;
}
#nuestros-clientes .container-fluid-clientes {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%; /* Para que use el espacio dentro de los paddings de la sección */
}
#nuestros-clientes .section-title-clientes { /* Si decides usar un título */
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#nuestros-clientes .client-logos-grid {
  display: grid;
  /* Base para desktop (ej. 6 columnas) */
  grid-template-columns: repeat(6, 1fr);
  gap: 30px 20px; /* Ajusta el gap para desktop */
  align-items: center;
  justify-items: center;
}
#nuestros-clientes .client-logo-item {
  display: flex;
  justify-content: center;
  align-items: center;
}
#nuestros-clientes .client-logo-item img {
  max-width: 100%;
  max-height: 50px; /* Altura base para desktop */
  width: auto;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
#nuestros-clientes .client-logo-item img:hover {
  opacity: 1;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    section { padding: 6vh 5vw; }
    .header-esencial { height: 70px; padding: 0 5vw; }
    .header-esencial .logo_a img { height: 20px; }
    .main-nav { display: none !important; }
    .menu-toggle-button { display: block !important; }
    #hero { min-height: 400px; height: 70vh; padding-top: 70px; justify-content: flex-start; }
    #hero .hero-question-text { font-size: 18px; line-height: 2; }
    .highlight-circle { padding: 0px 8px; margin-bottom: 5px; }

    #project-grid-container { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .project-item-large, .project-item-small, .project-item-small-half { grid-column: span 1; min-height: 300px; }
    .project-item-small-half { min-height: calc( (300px - 15px) / 2 ); }
    #s3 p { font-size: 15px; }
    #s4 .process1 .row { flex-direction: column; align-items: center; gap: 20px; }
    #s5 h2 { font-size: clamp(24px, 8vw, 32px); }
    footer#s6 { padding: 6vh 5vw; } /* Se mantiene el padding general de la sección para el footer */
    .footer-link { font-size: 12px; }
    #work-portfolio, .project-detail-header, .project-content { padding-top: 100px; }
    #work-portfolio { min-height: calc(100vh - 70px); }
    .page-title { margin-bottom: 30px; }
    .project-gallery { max-width: 90%; }
    .project-gallery img { margin-bottom: calc(var(--gallery-image-spacing) * 0.75); }

    /* Responsive para Servicios Revisada */
    #nuestros-servicios-revisado .services-grid-revisado {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
        column-gap: 20px; /* Añade un pequeño gap si el borde no es suficiente */
    }
    /* Si los items con border-right necesitan ajuste de padding en 2 columnas: */
    #nuestros-servicios-revisado .service-item-revisado:nth-child(3n+1),
    #nuestros-servicios-revisado .service-item-revisado:nth-child(3n+2) {
        /* Mantener el border-right */
    }
    #nuestros-servicios-revisado .service-item-revisado:nth-child(2n+1) { /* Para 2 columnas, los impares tienen borde */
       /* border-right: 1px solid var(--text-muted);  <-- Si cambias a este, ajusta el de arriba */
    }
    #nuestros-servicios-revisado .service-item-revisado:nth-child(2n) {
       /* border-right: none; <-- Si cambias a este, ajusta el de arriba */
    }


    /* Responsive para Logos de Clientes */
    #nuestros-clientes .client-logos-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas */
        gap: 25px 15px;
    }
    #nuestros-clientes .client-logo-item img {
        max-height: 45px;
    }
}

@media (max-width: 767px) { /* Cambiado de 576px para un punto de quiebre más común */
    /* Responsive para Servicios Revisada */
    #nuestros-servicios-revisado .services-grid-revisado {
        grid-template-columns: 1fr; /* 1 columna */
    }
    #nuestros-servicios-revisado .service-item-revisado:nth-child(3n+1),
    #nuestros-servicios-revisado .service-item-revisado:nth-child(3n+2) {
        border-right: none; /* Sin borde derecho en una sola columna */
    }
    #nuestros-servicios-revisado .service-item-revisado {
        padding-left: 15px; /* Menos padding en móvil */
        padding-right: 15px;
    }


    #project-grid-container { grid-template-columns: 1fr; gap: 15px; }
    .project-item-large, .project-item-small, .project-item-small-half { min-height: 280px; }
    .project-gallery { max-width: 100%; }
    .project-gallery img { margin-bottom: calc(var(--gallery-image-spacing) * 0.6); }
    #hero .hero-question-text { font-size: 16px; line-height: 2.2; }

    /* Responsive para Logos de Clientes */
    #nuestros-clientes .client-logos-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas */
        gap: 20px 10px;
    }
    #nuestros-clientes .client-logo-item img {
        max-height: 40px;
    }
}

@media (max-width: 479px) { /* Nuevo punto de quiebre para móviles más pequeños */
    #nuestros-clientes .client-logos-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
        gap: 20px 10px;
    }
    #nuestros-clientes .client-logo-item img {
        max-height: 35px;
    }
}


/* --- Badge SOTD --- */
.sotd_badge { position: fixed; left: 0; z-index: 99; height: 100px; bottom: 20px; opacity: 0.7; transition: opacity 0.3s ease; }
.sotd_badge:hover { opacity: 1; }
@media (min-width: 993px) { .sotd_badge { bottom: 40%; height: 120px; } }