/* ==============================
   RESET + BASE
================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
    margin: auto;
}

body {
    font-family: var(--body-family);
    font-size: var(--body-size);
    line-height: var(--body-lh);
    font-weight: var(--body-weight);
    color: var(--black-normal);
}

h1 { 
    font-family: var(--h1-family); 
    font-size: var(--h1-size); 
    line-height: var(--h1-lh); 
    font-weight: var(--h1-weight); 
}


/* Ejemplo para usar la fuente secundaria (Instrument Serif) donde lo necesites */
.serif-text {
    font-family: var(--font-secondary);
    font-style: italic; /* Instrument Serif suele usarse mucho en itálica */
}

.caption {
    font-size: var(--caption-size);
    line-height: var(--caption-lh);
    font-weight: var(--caption-weight);
}


/* ==============================
   LAYOUT
================================ */

/* MODIFICADO: Header Sticky con transición de fondo */
header.main-header {
  position: sticky;
  top: 0;
  /* Fondo inicial transparente */
  background: transparent;
  z-index: 100; /* Z-index más alto para asegurar que quede sobre todo */
  padding: 16px 0; /* Un poco más de padding para que respire */
  transition: background-color 0.3s ease, padding 0.3s ease;
}

/* Clase que se añade con JS al hacer scroll */
header.main-header.scrolled-header {
  background-color: #100E0E; /* Color oscuro del body */
  padding: 8px 0; /* Se compacta un poco al hacer scroll */
  box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Sombra opcional para separar */
}


.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

section {
    padding: var(--space-xll) 0;
}

/* ==============================
   NAV
================================ */

nav ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  cursor: pointer; /* Asegura cursor de mano */
}

/* ==============================
   HERO
================================ */

.hero {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 1024px) {
  .hero {
    /*grid-template-columns: 1.1fr 0.9fr;*/
    align-items: center;
  }
}

.hero h1 {
    font-size: var(--fs-h2);
    line-height: var(--lh-tight);
    text-align: left;
}



.container.hero-content {
    position: relative;
}

/* ==============================
   BUTTON
================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  border: none;
  background: var(--color-black);
  color: var(--color-white);
  font-weight: 500;
  cursor: pointer;
  /*transition: background var(--duration-fast) var(--ease-standard);*/
}

.btn:hover {
  background: var(--color-gray-700);
}

/* ==============================
   CARDS (General Styles)
================================ */
/* Se eliminaron los estilos de .work-grid antiguos que estaban aquí */

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-medium) var(--ease-standard);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}



/* ==============================
   CAROUSEL
================================ */

.carousel {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: var(--space-lg);
  will-change: transform;
}

.carousel-track > * {
  min-width: 320px;
}



/* ==============================
   RESET + BASE (Duplicados eliminados para limpieza, manteniendo los esenciales)
================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    color: var(--white-normal);
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    background: #100E0E;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* ==============================
   UTILIDADES
================================ */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
  text-align: center;
  font-size:var(--h2-size);
}


.section-subtitle {
  text-align: center;
  max-width: 943px;
  margin: auto;
}


/* ==============================
   DARK WRAPPER (Header + Hero)
================================ */
.dark-wrapper {
    background-color: #050505;
    color: var(--color-white);
    position: relative;
    /*padding-bottom: 6rem;*/
    overflow: hidden;
}

.animation-viewport {
  max-width: min(1200px, 92%);
}

.animation-viewport h1.split-line {
    margin-bottom: 48px;
    text-align: left;
    padding: 0;
    margin: 0 0 24px 0;
}


section.hero-canvas {
    padding: 88px 0;
    padding-top: 160px; /* Ajuste para compensar el header fijo */
}




/* ==============================
   HEADER (Estilos internos)
================================ */
/* Eliminado el padding:0 del header global anterior para usar el nuevo sistema */

.header-flex {
  align-items: center;
  justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    float: left;
    padding: 0 0;
}

.header-actions {
    float: right;
}

.actions-head {
  padding: 0px 0 0px 0;
  display: block;
  float: right;
}

nav {
    float: left;
}
.actions-head nav {
    padding: 5px 32px;
    float: right;
}

.header-flex {
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 8px 0;
}




/* Navegación */
nav ul {
  display: flex;
  gap: var(--space-lg);
}

nav a {
  font-size: 16px;
  color: var(--white-normal); /* Corregido typo 'color: color:' */
}

nav a:hover {
    opacity: 1;
    color: var(--yellow-normal);
    text-decoration: underline;
}

.actions-head nav a:hover{
  color: var(--black-darker);
}

footer nav {
    float: none;
    padding: 24px;
    display: block;
    overflow: hidden;
}

footer nav p {
    float: left;
}


.btn-outline {
  border: 1px solid var(--white-normal);
  padding: 8px 24px;
  border-radius: 100px;
  font-size: 14px;
  /*transition: all 0.2s;*/
  color: var(--white-normal);
}

.btn-outline:hover {
  background: var(--black-darker);
  color: var(--white-normal);
  border-color: var(--yellow-normal);
}


header .btn-outline {
    border: 0px solid transparent;
    padding: 8px 24px;
    border-radius: 0;
    font-size: 14px;
    /* transition: all 0.2s; */
    color: var(--black-normal);
    background: var(--yellow-normal);
}

header .btn-outline:hover{
  background: var(--yellow-dark);
  color: var(--black-normal);
}





/* ==============================
   HERO SECTION
================================ */
.hero {
  padding-top: var(--space-xl);
  text-align: center;
}

.hero-title {
  font-size: clamp(40px, 6vw, 80px); /* Títulos grandes */
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hero-title span.block {
  display: block;
}

.hero .hero-media {
    position: absolute;
    right: 130px;
    top: 120px;
}

.hero-text-container p {
    max-width: 100%;
    margin: 0;
    text-align: left;
    font-size: 32px;
    font-weight: var(--fw-bold);
}

/* ==============================
   PERFIL PROFESIONAL (Frame 2343)
================================ */

.section-profile {
    padding: var(--space-xll) 0;
    background: transparent url(../assets/images/bg-perfil.jpg) center no-repeat;
    background-size: contain;
}

.hero-intro {
    width: min(1200px, 92%);
    margin: 0 auto;
    text-align: left;
    overflow: hidden;
}

/* --- Parte Superior: Avatar + Texto --- */
.profile-header {
    align-items: center;
    float: left;
    display: flex;
    gap: 24px;
}


.hero-intro .avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  /* Sombra suave para separar del fondo */
  border: none; /* Quitamos bordes previos si los había */
}

.intro-profile{
  max-width: 942px;
}

.bio-text p {
    /* font-size: 1.125rem; */
    /* line-height: 1.6; */
    margin: 0;
}

.bio-text strong, .agencies strong {
  color: var(--balck-darker);
  font-weight: var(--fw-bold);
}


.image-wrapper-profile {
  flex-shrink: 0;
  width: 363px;
  height: 420px;
}

.profile-pic {
    width: 100%;
    object-fit: cover;
    display: block;
    background: transparent;
}


.text-content {
    line-height: 1.4;
    margin-bottom: 32px;
}

.highlight {
  color: var(--yellow-normal);
  font-weight: bold;
}

/* Ajuste para que en celulares no se vea mal */
@media (max-width: 600px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
  }
}




/* --- Parte Inferior: Tags (Píldoras) --- */
.tags-wrapper {
    display: block;
    clear: both;
    margin: 0 auto;
}

.profile-header figure.avatar {
    float: left;
    margin-right: 24px;
    margin-bottom: 32px;
}


.tags {
    width: min(1200px, 92%);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 0;
    list-style: none;
    justify-content: flex-start;
    margin: 0;
}

.tags li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white-normal);
    padding: 0.5rem 1rem;
    white-space: nowrap;
    flex-wrap: wrap;
    width: auto;
    margin: 0;
    border-radius: 100px;
    border: 1px solid var(--gray-normal);
}


/* Ajuste de los iconos SVG */
.tags li svg {
  width: 18px;
  height: 18px;
  opacity: 0.7; /* Ligeramente más suaves que el texto */
}

/* --- Responsive (Móvil) --- */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column; /* Uno debajo del otro */
    text-align: center;
    gap: 1.5rem;
    max-width: 100%;
  }

  .tags {
    justify-content: center; /* Tags centrados en móvil */
  }
}



/* ==============================
   SECCIÓN AGENCIAS & MARQUEE
================================ */

.agencies {
    padding: var(--space-xl) 0;
    overflow: hidden;
    /*border-bottom: 1px solid var(--gray-light-active);
    border-top: 1px solid var(--gray-light-active);*/
}


.header-agencies {
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* Contenedor del Marquee */
.marquee-wrapper {
  width: 100%;
  display: flex;
  overflow: hidden;
  user-select: none;
  /* Máscara para que se desvanezca en los bordes (opcional) */
  /*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;
  flex-shrink: 0;
  gap: 0; /* El espacio lo manejamos con padding en los items */
  padding: 0;
  margin: 0;
  list-style: none;
  /* Ancho dinámico basado en contenido */
  width: max-content; 
}

/* Cada Grupo (Li) */
.agency-group {
    display: flex;
    align-items: center;
    padding: 0 4rem;
    gap: 3rem;
    background: var(--black-dark);
    padding: var(--space-xs) var(--space-sm);
    min-height: 80px;
    border-radius: 24px;
    margin-right: 24px;
}

/* Columna de la Agencia (Izquierda) */
.agency-info {
  display: flex;
  flex-direction: row;
  justify-content: center;
  min-width: 200px; /* Asegura que no se aplaste */
  gap: 24px;
}


.agency-info img{
  max-width: 165px;
  margin-left: 0;
  float: left;
}

.agency-info .caption {
    white-space: nowrap;
    color: var(--yellow-normal);
    text-align:left;
    display: block;
    width: 100%;
    float: left;
    line-height: 100%;
}

/* Fila de los Clientes (Derecha) */
.agency-clients {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.agency-clients img {
  height: 24px; /* Logos de clientes más pequeños */
  width: auto;
  max-width: 115px;
}



.agency-clients img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.volvo{
  width: 115px !important;
  height: auto !important;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
  .agency-group {
    padding: 0 2rem;
    gap: 1.5rem;
  }
  .agency-info .logo-main { height: 32px; }
  .agency-clients img { height: 20px; }
}



/* ==============================
   WORK / PORTFOLIO (MODIFICADO PARA STICKY LAYOUT)
================================ */
.work {
    padding: var(--space-2xl) 0;
}

/* Eliminado el margen inferior del h2 global en esta sección, lo manejará el wrapper */
.work h2.section-title {
    margin-bottom: 0;
    text-align: left; /* El título ahora va a la izquierda */
}

/* --- NUEVO LAYOUT GRID --- */
.work-layout {
  display: grid;
  /* Definimos 2 columnas: 1 fracción para el título, 2 para las tarjetas */
  grid-template-columns: 1fr 2fr; 
  gap: var(--space-xll); /* Espacio grande entre columnas */
  align-items: start; /* Crucial para que el sticky funcione bien */
  position: relative;
}

/* Wrapper del título que será STICKY */
.work-title-wrapper {
  position: sticky;
  /* Ajusta este valor según la altura de tu header + un poco de espacio */
  top: 120px; 
  height: fit-content; /* Importante: no debe ocupar toda la altura */
}

/* Wrapper de las tarjetas (Columna derecha) */
.work-cards-wrapper {
  display: flex;
  flex-direction: column;
  /* Espacio muy grande entre tarjetas según la referencia visual */
  gap: 120px; 
  padding-bottom: 120px; /* Espacio al final */
}


/* Estilos de la tarjeta individual */
.work-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    flex-direction: column;
    margin: 0;
    /* Asegura que ocupen el ancho de su columna */
    width: 100%; 
}

.work-card:hover {
  /*transform: translateY(-5px);*/
}

.container-img {
    max-height: 500px;
    overflow: hidden;
    border-radius: 16px; /* Bordes redondeados como en la imagen */
}

.work-card img {
  width: 100%;
  object-fit: cover;
}


/* Contenido de la tarjeta */
.card-content {
  /* Padding reducido arriba ya que hay mucho espacio entre cards */
  padding: var(--space-md) 0 var(--space-lg) 0; 
  display: flex;
  flex-direction: column;
}

.work-card h3 {
    text-align: left;
    margin: 0 0 var(--space-sm) 0;
    font-size: 2rem; /* Títulos más grandes */
}


.work-card p {
  margin-bottom: var(--space-md);
  margin-left: 0;
  font-size: 1.125rem;
  opacity: 0.8;
}


.link-arrow {
    font-weight: 500;
    font-size: 1rem;
    margin-top: auto;
    display: inline-block;
    text-align: left;
    margin: 0;
    color: var(--white-normal);
    text-decoration: underline;
}


/* --- RESPONSIVE WORK SECTION --- */
@media (max-width: 1024px) {
   .work-layout {
    grid-template-columns: 1fr; /* Vuelve a una sola columna */
    gap: var(--space-lg);
  }

  .work-title-wrapper {
    position: relative; /* Ya no es sticky en mobile/tablet */
    top: 0;
    margin-bottom: var(--space-md);
  }

  .work-cards-wrapper {
      gap: 64px; /* Menos espacio entre tarjetas en mobile */
  }
  
  .work h2.section-title {
    text-align: center; /* Título centrado de nuevo en mobile */
 }
}


/* ==============================
   SECCIÓN TESTIMONIOS
================================ */

.testimonials {
    padding: 0 0 var(--space-2xl) 0;
    overflow: hidden;
}


/* --- Estructura del Carrusel (Contenedor externo) --- */
.carousel-container {
  overflow: hidden; 
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0;
}

/* --- TARJETA (El cambio principal) --- */

.testimonial-card {
    flex: 0 0 calc(50% - 1rem);
    grid-template-columns: auto 1fr;
    gap: 1.5rem 24px;
    background-color: var(--gray-light);
    padding: 2rem 1.5rem;
    transition: transform 0.3s ease;
    justify-content: normal;
    align-content: start;
    background: var(--white-light);
    border-radius: 16px;
    min-height: 443px;
}

.testimonial-card .author-info {
    margin: 0;
    float: left;
}

.comillas {
    float: none;
    clear: both;
    margin: 0;
}

/* Columna Izquierda: Foto */
.card-col-left {
    flex-shrink: 0;
    vertical-align: top;
    box-sizing: revert;
    margin: 0;
}

.card-avatar {
  width: 80px; /* Tamaño más grande según imagen */
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%); /* Según diseño la foto es B/N */
}

.info-profile {
    overflow: hidden;
    margin-top: 32px;
    border-top: 1px solid var(--black-dark);
    padding-top: 24px;
    display: flex;
}

/* Columna Derecha: Textos */
.card-col-right {
    float: left;
    margin-right: 24px;
}

/* Bloque Nombre y Rol */
.author-info h3 {
    font-family: var(--font-secondary);
    margin: 0;
    color: var(--black-normal);
}

.author-info .role {
  font-size: var(--size-l);
  margin: 0.25rem 0 0 0;
  font-weight: 400;
  color: var(--black-normal);
  font-family: var(--font-primary);
}

/* Bloque Descriptor (Texto largo) */
.descriptor {
    margin-top: 24px;
    float: none;
    clear: both;
}

.descriptor p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    min-height: 179px;
    color: var(--black-normal);
}

/* --- Controles --- */
.carousel-controls {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: center;
  align-content: center;
  flex-wrap: nowrap;
  flex-direction: row;
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
  .testimonial-card {
    flex: 0 0 90%; /* En móvil una sola tarjeta */
    grid-template-columns: 1fr; /* Una sola columna vertical */
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .card-avatar {
    width: 64px;
    height: 64px;
  }
}

.control-btn {
  margin: 0;
  background: transparent;
  padding: 16px;
  border: 1px solid var(--gray-normal);
  border-radius: 100px;
  width: 56px;
  height: 56px;
}


/* ==============================
   CONTACT
================================ */
.contact {
    background: var(--white-normal);
    padding: var(--space-xll) 0;
    text-align: center;
    height: auto;
    overflow: hidden;
    border-radius: 48px 48px 0 0;
}

.contact h2 {
  text-align: center;
  color: var(--black-normal);
}

.contact-text {
  font-size: 1.25rem;
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}

.btn-primary {
    display: inline-block;
    background: var(--black-normal);
    color: var(--white-normal);
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-primary:hover {
  background:var(--yellow-normal-hover);
  color: var(--black-normal);
}

.contact h4 {
  text-align: center;
}



/* ==============================
   FOOTER
================================ */
footer {
 padding: 24px;
    font-size: 14px;
    color: #484848;
    background: #FDFDFD;
    border-top: 0;

}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .social-links {
  display: flex;
  gap: var(--space-md);
  float: right;
}

.social-links a {
  color: var(--color-black);
  font-weight: 500;
}

.brand-footer{
  margin: 0;
}
.brand-footer a, .brand-footer p {
    float: left;
    margin: 0;
}
.brand-footer a{
  margin-right: 24px;
}
.brand-footer p {
 padding: 9px 0;
 text-transform: uppercase;
 font-weight: 700;

}


svg.card-icon {
    width: 48px;
}

:root {
  --card-bg: #E0E0E0; /* El gris claro de tu Figma */
  --text-main: #1A1A1A;
  --text-muted: #4A4A4A;
  --radius: 12px; /* Ajuste suave para estética premium */
}

.container-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-content: center;
    padding: 0;
    width: 100%;
    clear: both;
    margin-bottom: 48px;
    align-items: start;
}

.card-bullet {
    min-height: 160px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.head-card-bullet {
    width: 100%;
    margin: 0;
}

.card-bullet:hover {
  /*transform: translateY(-5px);*/
}

.card-bullet .number {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 90%;
    text-align: left;
    margin: 0;
    font-family: var(--font-secondary);
    color: var(--black-darker);
    width: 44px;
    height: 44px;
    background: var(--yellow-normal);
    border-radius: 100%;
    line-height: 185%;
    text-align: center;
    vertical-align: baseline;
    display: block;
    margin-bottom: 16px;
}



/* Responsividad */
@media (max-width: 768px) {

  .container-cards {
    display: block;
    gap: 24px;
    justify-content: center;
    padding: 0;
    width: 100%;
    clear: both;
    margin-bottom: 48px;
    align-items: normal;
}

  .card-bullet {
    width: 100%;
    min-height: auto;
    margin-bottom: 24px;
  }
}







/* ==============================
   FOOTER
================================ */

footer {
    padding: var(--space-xll) 0;
    height: auto;
    background: var(--yellow-normal);
}

footer .container {
    height: auto;
    overflow: hidden;
}

.hero-title {
  font-size: var(--fs-h1);
  line-height: 1.05; /* 👈 CLAVE */
  font-weight: normal;
}

.hero-title .line {
  display: block;
}

.hero-title .mask {
  display: block;
  overflow: hidden;
}

.hero-title .text {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

a.logo-footer {
    display: block;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    height: auto;
}

nav {
    float: left;
}

a.download-cv {
  float: right;
}

.hero{
    translate: none;
    rotate: none;
    scale: none;
    transform: translate(0px, 0px);
    opacity: 1;
    /* width: 100%; */
    display: block !important;
    float: none;
}



@media (max-width: 600px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
  }
}


@media (max-width: 600px) {
  .logo {
      display: block;
      float: none;
      padding: 8px 0;
      margin: auto;
  }
  .logo img{
    max-width: 100%;
    height: auto;
    display: block;
    width: auto;
    margin: 0;
  }



  .actions-head {
    padding: 8px 0 8px 0;
    display: block;
    float: none;
    overflow: hidden;
  }
    .actions-head nav {
        padding: 9px 8px;
        float: left;
    }

    .animation-viewport h1.split-line {
        font-size: 32px;
        padding: 24px;
        line-height: 110%;
        margin: 0;
    }

    section.hero-canvas {
      padding: 48px 0;
      background: var(--yellow-normal);
      padding-top: 100px; /* Ajuste para móvil */
    }

    .hero-text-container p {
      font-size: 24px;
    }

    section, .work, .agencies, .testimonials, footer {
        padding: var(--space-sm) 0;
    }

    .contact h4 {
      float: none;
      width: 100%;
      text-align: left;
      color: var(--white-normal);
      font-weight: 700;
      font-size: 3rem;
      line-height: 126%;
    }

    .contact .btn-primary {
      float: none;
      background: var(--white-normal);
      color: var(--black-dark);
      margin: 0;
    }

    footer nav p {
     float: none;
        text-align: center;
        margin-bottom: 8px;
    }

    footer .social-links {
      display: flex;
      gap: var(--space-md);
      float: none;
    }
}


