/* ============ TOKENS ============ */

:root {
    --cream: #FFFFFF;
    --cream-alt: #F6F5F2;
    --ink: #111111;
    --ink-soft: #6B6862;
    --gold: #B08D4F;
    --gold-hover: #8C6D3A;
    --gold-light: #E3D9C2;
    --brown-deep: #1A1A1A;
    --white: #FFFFFF;
    --whatsapp: #25D366;
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --container: 1180px;
    --radius: 10px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { font-family: var(--font-body); color: var(--ink); background: var(--cream-alt); line-height: 1.65; -webkit-font-smoothing: antialiased; }
  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease-smooth); }
  ul { list-style: none; }
  h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 400; letter-spacing: -0.01em; }
  p { text-align: justify; text-align-last: left; hyphens: auto; }
  
  .section-container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
  .section-container-services { max-width: 1450px; }
  
  .eyebrow {
    display: inline-block; font-size: 1.15rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--gold-hover); font-weight: 600; margin-bottom: 14px;
  }
  
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; border-radius: 4px; font-weight: 600; font-size: 0.95rem;
    transition: all 0.4s var(--ease-smooth); cursor: pointer; border: 1px solid transparent;
  }
  .btn-gold { background: var(--gold); color: var(--white); }
  .btn-gold:hover { background: var(--gold-hover); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(176,141,79,0.28); }
  .btn-ghost { border-color: var(--ink); color: var(--ink); }
  .btn-ghost:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }
  
  /* ============ SEAL (elemento de firma) ============ */
  .seal {
    display: inline-block; width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid var(--gold); position: relative; margin-bottom: 18px;
  }
  .seal::before {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 6px; height: 6px; background: var(--gold); border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .seal-lg { width: 46px; height: 46px; }
  .seal-lg::before { width: 8px; height: 8px; }
  .seal-xl { width: 90px; height: 90px; border-width: 2px; margin-bottom: 0; }
  .seal-xl::before { width: 14px; height: 14px; }
  
  /* ============ NAVBAR ============ */
  .navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 12px 0; color: var(--cream);
    background: var(--brown-deep);
    transition: background 0.4s var(--ease-smooth), backdrop-filter 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth), border-color 0.4s var(--ease-smooth);
  }
  .navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.18); }

  /* Navbar totalmente transparente en el hero de home; al hacer scroll pasa a un vidrio claro */
  .navbar-home { background: transparent; }
  .navbar-home.scrolled {
    background: rgba(26,26,26,0.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.08); color: var(--cream);
  }

  .nav-container { width: 100%; padding: 0 max(0px, calc((100vw - 1180px) / 2)) 0 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .nav-container-home { padding-left: 81px; }

  .logo { display: flex; align-items: center; gap: 10px; position: relative; }
  .logo-img { height: 38px; width: auto; display: block; border-radius: 6px; }
  .logo-img-scrolled { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.4s var(--ease-smooth); }
  .navbar.scrolled .logo-img-default { opacity: 0; }
  .navbar.scrolled .logo-img-scrolled { opacity: 1; }
  .navbar-home.scrolled .logo-img-default { opacity: 1; }
  .navbar-home.scrolled .logo-img-scrolled { opacity: 0; }

  .nav-links { display: flex; align-items: center; gap: 32px; justify-content: flex-end; }
  .lang-switch { display: flex; align-items: center; }
  .lang-toggle {
    width: 34px; height: 28px; padding: 0; border-radius: 5px; border: 1px solid rgba(255,255,255,0.35);
    background: transparent; color: var(--cream); font-family: var(--font-body); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.02em; line-height: 1; cursor: pointer;
    transition: background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth), color 0.25s var(--ease-smooth), transform 0.2s ease;
  }
  .lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
  .lang-toggle:active { transform: scale(0.92); }
  .navbar:not(.navbar-home) .lang-toggle { border-color: var(--gold-light); color: var(--cream); }
  .navbar-home.scrolled .lang-toggle:hover, .navbar:not(.navbar-home) .lang-toggle:hover { border-color: var(--gold); color: var(--gold-hover); }
  .nav-links > li > a { position: relative; font-size: 0.95rem; font-weight: 500; padding-bottom: 4px; color: var(--cream); }
  .nav-links > li > a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
    transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-smooth);
  }
  .nav-links > li > a:hover { color: var(--gold); }
  .nav-links > li > a:hover::after { transform: scaleX(1); }

  .nav-dropdown { position: relative; }
  .dropdown-toggle { background: none; border: none; cursor: pointer; font: inherit; font-size: 0.95rem; font-weight: 500; display: flex; align-items: center; gap: 4px; color: var(--cream); transition: color 0.3s var(--ease-smooth); }
  .dropdown-toggle:hover { color: var(--gold); }
  .chevron { font-size: 0.7rem; transition: transform 0.3s var(--ease-smooth); }

  .dropdown-menu {
    position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%) translateY(-8px);
    background: var(--cream-alt); border: 1px solid var(--gold-light); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(17,17,17,0.10);
    min-width: 190px; padding: 8px; opacity: 0; visibility: hidden; transition: all 0.35s var(--ease-smooth);
  }
  .nav-dropdown:hover .dropdown-menu, .nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
  .nav-dropdown:hover .chevron, .nav-dropdown.open .chevron { transform: rotate(180deg); }
  .dropdown-menu li a { display: block; padding: 10px 14px; border-radius: 6px; font-size: 0.9rem; color: var(--ink); transition: background 0.25s var(--ease-smooth); }
  .dropdown-menu li a:hover { background: var(--cream-alt); }

  .nav-cta { flex-shrink: 0; }

  .hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
  .hamburger span { width: 24px; height: 2px; background: var(--cream); transition: all 0.25s ease; }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  
  /* ============ HERO (home, slideshow full-bleed) ============ */
  .hero-full { position: relative; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: var(--brown-deep); }
  .hero-bg { position: absolute; inset: 0; z-index: 0; }
  .hero-bg-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0; transform: scale(1.06);
    transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .hero-bg-slide.is-active { opacity: 1; animation: heroKenBurns 7s ease-in-out forwards; }
  @keyframes heroKenBurns { from { transform: scale(1.06); } to { transform: scale(1); } }
  .hero-full::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background:
      linear-gradient(to top, rgba(26,26,26,0.94) 0%, rgba(26,26,26,0.6) 32%, rgba(26,26,26,0) 65%);
  }
  .hero-content { position: relative; z-index: 2; padding: 0 96px; margin-bottom: 48px; max-width: 640px; }
  .hero-content h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 3.4vw, 3.7rem); line-height: 1.08; margin: 0 0 14px; color: var(--white); white-space: nowrap; }
  .hero-content h1 em { font-style: normal; font-weight: 400; }
  .hero-content h1 .hero-amp { font-family: var(--font-body); font-style: normal; font-weight: 400; color: var(--gold); }
  .hero-sub { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 28px; }
  .hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
  .hero-actions .btn { padding: 9px 30px; font-size: 0.9rem; }
  .hero-actions .btn-ghost { border-color: var(--white); color: var(--white); }
  .hero-actions .btn-ghost:hover { background: var(--white); color: var(--ink); }
  .hero-stats { position: relative; z-index: 2; display: flex; gap: 56px; flex-wrap: wrap; width: 100%; padding: 0 96px 72px; }
  .stat { display: flex; flex-direction: column; }
  .stat-number { font-family: var(--font-display); font-size: 2.4rem; color: var(--white); font-weight: 500; }
  .stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin-top: 4px; }

  /* ============ MISIÓN / VALORES (nosotros.html) ============ */
  .mission-section {
    position: relative; overflow: hidden; border-top: none;
    background: url('images/people/mision-final2.png') center/cover no-repeat;
    background-attachment: fixed;
  }
  @media (max-width: 900px) {
    .mission-section { background-attachment: scroll; }
  }
  .mission-section::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(160deg, rgba(26,26,26,0.74) 0%, rgba(26,26,26,0.6) 100%);
  }
  .mission-section .section-container { position: relative; z-index: 1; }
  .mission-section .eyebrow { color: var(--gold-light); }
  .mission-section h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-top: 14px; max-width: 760px; line-height: 1.35; }
  .mission-values {
    color: rgba(255,255,255,0.8); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
    margin-top: 28px;
  }

  /* ============ MOSAICO (home: Servicios / Nosotros / Equipo / Boletín / Únete / Contacto) ============ */
  .section.mosaic-section { border-top: none; padding-bottom: 70px; }
  .mosaic-section .section-container { max-width: 1400px; }
  .mosaic-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 36px; }
  .mosaic-tile { position: relative; border-radius: var(--radius); }

  /* Servicios: video + texto, tile grande */
  .mosaic-servicios {
    grid-column: span 7; background: var(--cream-alt); border: 1px solid var(--gold-light);
    overflow: hidden; display: flex; flex-direction: column;
  }
  .mosaic-visual { aspect-ratio: 16/7; overflow: hidden; }
  .mosaic-visual video { width: 100%; height: 100%; object-fit: cover; display: block; }
  .mosaic-body { padding: 48px 52px 52px; }
  .mosaic-body h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
  .mosaic-body p { color: var(--ink-soft); font-size: 1.08rem; margin: 18px 0 26px; }

  /* Nosotros: panel oscuro con "1965" de fondo, desalineado hacia abajo */
  .mosaic-nosotros {
    grid-column: span 5; margin-top: 64px; overflow: hidden;
    background:
      linear-gradient(150deg, rgba(61,51,32,0.88) 0%, rgba(36,28,16,0.93) 100%),
      url('images/tres.png') center/cover no-repeat;
    padding: 52px 46px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 420px;
  }
  .mosaic-nosotros .eyebrow { color: var(--gold-light); }
  .mosaic-nosotros h2 { color: var(--white); font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
  .mosaic-nosotros p { color: rgba(255,255,255,0.75); font-size: 1.02rem; margin: 16px 0 24px; }
  .mosaic-nosotros .teaser-link { color: var(--gold-light); }
  .mosaic-nosotros .teaser-link:hover { color: var(--gold); }
  .mosaic-watermark {
    position: absolute; top: -30px; right: -14px; z-index: 0; pointer-events: none; user-select: none;
    font-family: var(--font-display); font-size: 12rem; font-weight: 400; line-height: 1; opacity: 0.55;
    color: var(--white);
  }

  /* Equipo: tarjeta clara con texto y avatares en fila */
  .mosaic-equipo {
    grid-column: span 12; background: var(--cream-alt); border: 1px solid var(--gold-light);
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
    padding: 52px 56px;
  }
  .mosaic-equipo-text { max-width: 640px; }
  .mosaic-equipo-text .eyebrow { color: var(--gold-hover); }
  .mosaic-equipo-text h2 { color: var(--ink); font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-top: 12px; line-height: 1.35; }
  .mosaic-equipo-text p { color: var(--ink-soft); margin: 16px 0 22px; }
  .mosaic-equipo-text .teaser-link { color: var(--gold-hover); }
  .mosaic-equipo-text .teaser-link:hover { color: var(--gold); }
  .equipo-avatars { display: flex; flex-shrink: 0; }
  .avatar-stack { display: flex; align-items: center; }
  .avatar-circle {
    width: 122px; height: 122px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    border: 3px solid var(--cream-alt); box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    margin-left: -28px; background: var(--gold-light);
    display: flex; align-items: center; justify-content: center;
  }
  .avatar-circle:first-child { margin-left: 0; }
  .avatar-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .avatar-circle.avatar-more {
    background: var(--cream); border-color: var(--gold);
    color: var(--gold-hover); font-family: var(--font-body); font-weight: 700; font-size: 1.05rem;
  }

  /* Boletín / Únete: tarjetas asimétricas, ligeramente inclinadas */
  .mosaic-card {
    background: var(--cream-alt); border: 1px solid var(--gold-light); padding: 44px 40px;
    display: flex; flex-direction: column;
  }
  .mosaic-card h3 { font-size: 1.4rem; }
  .mosaic-card p { color: var(--ink-soft); font-size: 1.02rem; margin: 16px 0 22px; }
  .mosaic-boletin { grid-column: span 5; }
  .mosaic-unete { grid-column: span 7; }

  /* Contacto: banner oscuro de cierre, ancho completo */
  .mosaic-contacto {
    grid-column: span 12; padding: 72px 60px;
    background:
      linear-gradient(150deg, rgba(36,28,16,0.88) 0%, rgba(20,15,8,0.93) 100%),
      url('images/puerto-sa.png') center/cover no-repeat;
    display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  }
  .mosaic-contacto .eyebrow { color: var(--gold-light); }
  .mosaic-contacto h2 { color: var(--white); font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
  .mosaic-contacto p { color: rgba(255,255,255,0.75); font-size: 1.08rem; max-width: 520px; margin: 18px 0 28px; }

  /* ============ HISTORIA (timeline horizontal animado) ============ */
  .timeline-section { text-align: center; }
  .section.timeline-section { padding: 24px 0 90px; border-top: none; }
  .timeline-h { position: relative; max-width: 1360px; margin: 56px auto 0; padding: 0 90px; }
  .timeline-h-line { position: absolute; top: 8px; left: 90px; right: 90px; height: 2px; background: var(--gold-light); }
  .timeline-h-progress {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: var(--gold); transition: width 2.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .timeline-h-points { position: relative; display: flex; justify-content: space-between; }
  .timeline-h-point { display: flex; flex-direction: column; align-items: center; width: 340px; text-align: center; }
  .timeline-h-dot {
    width: 18px; height: 18px; border-radius: 50%; background: var(--cream-alt);
    border: 2px solid var(--gold); margin-bottom: 18px;
    transition: background 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
  }
  .timeline-h-point.active .timeline-h-dot { background: var(--gold); transform: scale(1.15); }
  .timeline-h-year { font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-hover); }
  .timeline-h-point p { font-size: 0.9rem; color: var(--ink-soft); margin-top: 8px; }

  /* ============ PAGE HERO (subpáginas) ============ */
  .page-hero { padding: 160px 0 80px; background: var(--cream-alt); }
  .page-hero-tight { padding-bottom: 40px; }
  .page-hero-content { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
  .page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 16px; }
  .page-hero h1 .amp { font-family: 'Times New Roman', Times, serif; font-style: normal; font-weight: 400; }
  .page-hero .intro { max-width: 620px; color: var(--ink-soft); font-size: 1.05rem; }
  .page-hero .intro-wide { max-width: 820px; }

  /* Modal grande de área de práctica (servicios.html) */
  .modal-box.modal-box-service { max-width: 1100px; padding: 48px; }
  .modal-box-service .modal-header { margin-bottom: 24px; }
  .modal-box-service .modal-header h2 { font-size: 1.9rem; margin-bottom: 0; }
  .service-modal-intro { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 32px; }
  .section.alt.service-details-section { padding: 60px 0; background: #D3D0C9; }
  .service-list-heading {
    font-family: var(--font-body); font-size: 1.1rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold-hover); font-weight: 700; margin-bottom: 17px;
  }
  .service-list { display: flex; flex-direction: column; gap: 10px; }
  .service-list li {
    position: relative; padding-left: 24px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55;
  }
  .service-list li::before {
    content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px;
    border-radius: 50%; background: var(--gold);
  }

  /* Página individual de área de práctica (mercantil.html, etc.) */
  .service-hero {
    position: relative; height: 100vh; min-height: 560px; overflow: hidden;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    background-attachment: fixed; background-color: var(--brown-deep);
    display: flex; align-items: flex-end;
  }
  .service-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(17,17,17,0.5) 0%, rgba(17,17,17,0.88) 100%);
  }
  .service-hero-content { position: relative; z-index: 1; max-width: 720px; padding: 0 96px 80px; }
  .service-hero-content .eyebrow { color: var(--gold-light); }
  .service-hero-content h1 { color: var(--white); font-size: clamp(2.1rem, 4vw, 3.4rem); margin: 10px 0 20px; }
  .service-hero-content h1 .amp { font-family: 'Times New Roman', Times, serif; font-style: normal; font-weight: 400; }
  .service-hero-content p { color: rgba(255,255,255,0.88); font-size: 1.08rem; line-height: 1.65; }

  /* ============ SECTIONS ============ */
  .section { padding: 130px 0; border-top: 1px solid var(--gold-light); }
  .section:first-of-type { border-top: none; }
  .page-hero + .section { padding-top: 8px; }
  .section-tight-bottom { padding-bottom: 40px; }
  .section-tight { padding-top: 56px; padding-bottom: 56px; }
  .section.alt { background: var(--cream-alt); }
  .section-head { max-width: 620px; margin-bottom: 64px; }
  #contacto .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
  .section-sub { color: var(--ink-soft); font-size: 1rem; }
  
  /* Servicios (grid completo) */
  .services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .service-card {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 132px; padding: 24px 28px; border-radius: 14px; overflow: hidden;
    background-color: var(--brown-deep); background-size: cover; background-position: center;
    color: var(--white); text-decoration: none; cursor: pointer; border: none; text-align: center;
    font-family: inherit; width: 100%;
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
  }
  .service-card::before {
    content: ""; position: absolute; inset: 0;
    background: rgba(13,13,13,0.55);
    transition: background 0.4s var(--ease-smooth);
  }
  .service-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.25); }
  .service-card:hover::before { background: rgba(13,13,13,0.68); }
  .service-card h3 {
    position: relative; z-index: 1; color: var(--white); font-family: var(--font-body);
    font-size: 1.1rem; font-weight: 600; line-height: 1.25; text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  }
  /* Teasers (home: servicios / equipo) */
  .teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .teaser-visual {
    aspect-ratio: 4/3; border-radius: var(--radius); background: var(--cream-alt);
    border: 1px solid var(--gold-light); display: flex; align-items: center; justify-content: center;
    overflow: hidden;
  }
  .teaser-visual-photo { padding: 0; }
  .teaser-visual-photo img, .teaser-visual-photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
  .teaser-visual-wide { aspect-ratio: 16/9; }
  .teaser-visual-noborder { border: none; }
  .teaser-visual-small { max-width: 80%; margin: 0 auto; }
  .section-tight-bottom .teaser-grid { align-items: stretch; grid-template-columns: 1.4fr 1fr; }
  .section-tight-bottom .teaser-image { margin-left: -32px; }
  .section-tight-bottom .teaser-visual { aspect-ratio: auto; height: calc(100% - 24px); position: relative; }
  .img-bounce-up { animation: bounceUp 2.4s ease-in-out infinite; }
  @keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
  }
  .teaser-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
  .teaser-text p { color: var(--ink-soft); margin-bottom: 24px; }
  .teaser-link { position: relative; display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; font-weight: 600; color: var(--gold-hover); padding-bottom: 3px; }
  .teaser-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-smooth);
  }
  .teaser-link:hover { color: var(--gold); }
  .teaser-link:hover::after { transform: scaleX(1); }

  /* Boletín */
  .boletin-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
  .boletin-filter {
    font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
    background: var(--cream-alt); border: 1px solid var(--gold-light); border-radius: 999px;
    padding: 8px 18px; cursor: pointer; transition: all 0.3s var(--ease-smooth);
  }
  .boletin-filter:hover { border-color: var(--gold); color: var(--ink); }
  .boletin-filter.is-active { background: var(--gold); border-color: var(--gold); color: var(--white); }
  .boletin-empty { color: var(--ink-soft); text-align: center; padding: 40px 0; }

  /* Carrusel de boletines: tarjetas tipo "poster" con la 1a página del PDF de fondo.
     Se ven 3 tarjetas a la vez, centradas, con las flechas separadas (no pegadas). */
  .boletin-carousel-wrap { display: flex; align-items: center; gap: 20px; }
  .boletin-carousel {
    display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x proximity;
    padding: 4px 0 12px; scrollbar-width: none; flex: 1 1 auto; min-width: 0;
  }
  .boletin-carousel::-webkit-scrollbar { display: none; }
  .boletin-card {
    position: relative; flex: 0 0 calc((100% - 48px) / 3); aspect-ratio: 3 / 4.4; overflow: hidden;
    display: block; background: linear-gradient(160deg, var(--brown-deep) 0%, #3a2f22 100%);
    scroll-snap-align: start; transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
    animation: cardRise 0.7s var(--ease-smooth) both;
  }
  .boletin-card:nth-child(2) { animation-delay: 90ms; }
  .boletin-card:nth-child(3) { animation-delay: 180ms; }
  .boletin-card:nth-child(4) { animation-delay: 270ms; }
  .boletin-card:nth-child(n+5) { animation-delay: 360ms; }
  .boletin-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(17,17,17,0.22); }
  @keyframes cardRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  .boletin-card-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.5s var(--ease-smooth);
  }
  .boletin-card-canvas.is-loaded { opacity: 1; }
  .boletin-card-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 22px; background: linear-gradient(180deg, rgba(17,17,17,0.15) 0%, rgba(17,17,17,0.45) 25%, rgba(17,17,17,0.88) 55%, rgba(17,17,17,0.96) 100%);
  }
  .boletin-card-area { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
  .boletin-card-title {
    font-size: 1.05rem; line-height: 1.3; color: var(--white); margin-top: 8px; text-align: left;
    text-shadow: 0 1px 10px rgba(0,0,0,0.5);
  }
  .boletin-card-date { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.85); margin-top: 10px; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
  .boletin-arrow {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-light); background: var(--cream);
    color: var(--ink); font-size: 1.1rem; cursor: pointer; transition: all 0.3s var(--ease-smooth);
    display: flex; align-items: center; justify-content: center;
  }
  .boletin-arrow:hover { border-color: var(--gold); background: var(--gold); color: var(--white); }
  .boletin-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
  .boletin-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--gold-light); cursor: pointer; padding: 0; transition: background 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth); }
  .boletin-dot.is-active { background: var(--gold); transform: scale(1.3); }

  /* Equipo (cards con foto + popup) */
  .team-filters { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; border-bottom: 1px solid var(--gold-light); }
  .team-filter {
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft);
    background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0;
    padding: 0 2px 12px; cursor: pointer; transition: all 0.3s var(--ease-smooth);
  }
  .team-filter:hover { color: var(--ink); }
  .team-filter.is-active { color: var(--gold-hover); border-bottom-color: var(--gold); }
  .partners-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .partners-grid > .partner-card:last-child:nth-child(3n+1) { grid-column: 2; }
  .partner-card[hidden] { display: none; }
  .partner-card { display: flex; flex-direction: column; background: var(--cream-alt); border: 1px solid var(--gold-light); border-radius: var(--radius); overflow: hidden; transition: transform 0.45s var(--ease-smooth), box-shadow 0.45s var(--ease-smooth), border-color 0.3s var(--ease-smooth); }
  .partner-card:hover { border-color: var(--gold); transform: translateY(-6px); box-shadow: 0 24px 48px rgba(17,17,17,0.06); }
  .partner-photo { position: relative; aspect-ratio: 3/4; background: var(--cream-alt); overflow: hidden; min-height: 0; flex-shrink: 0; }
  .partner-photo img { width: 100%; height: 100%; object-fit: cover; }
  .partner-info { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
  .partner-name-row { display: flex; flex-direction: column; gap: 4px; }
  .partner-name-row h3 { font-size: 1.1rem; font-style: normal; font-weight: 500; }
  .partner-tag { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-hover); font-weight: 600; }
  .partner-bio { color: var(--ink-soft); font-size: 0.9rem; flex: 1; }
  .partner-link { align-self: flex-start; background: none; border: none; padding: 0; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: var(--gold-hover); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; transition: color 0.3s var(--ease-smooth); }
  .partner-link:hover { color: var(--gold); }
  .partner-link-soon { color: var(--ink-soft); font-size: 0.85rem; font-weight: 500; }
  .partners-contact-note { margin-top: 48px; color: var(--ink-soft); }
  .partners-contact-note a { color: var(--gold-hover); font-weight: 600; }
  .partners-contact-note a:hover { color: var(--gold); }

  /* Modal (ficha de socio) */
  .modal-overlay { position: fixed; inset: 0; background: rgba(17,17,17,0.6); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease-smooth); overflow-y: auto; }
  .modal-overlay-service { align-items: flex-start; padding-top: 85px; }
  .modal-overlay.open { opacity: 1; visibility: visible; }
  .modal-box { background: var(--cream-alt); border: 1px solid var(--gold-light); border-radius: var(--radius); width: 100%; max-width: 640px; max-height: 85vh; overflow-y: auto; padding: 36px; position: relative; box-shadow: 0 30px 70px rgba(0,0,0,0.2); transform: translateY(16px) scale(0.98); transition: transform 0.4s var(--ease-smooth); }
  .modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
  .modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--white); font-size: 1.3rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); transition: all 0.3s var(--ease-smooth); }
  .modal-close:hover { background: var(--gold-light); }
  .modal-header { display: flex; gap: 20px; align-items: center; margin-bottom: 26px; padding-right: 36px; }
  .modal-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--gold-light); }
  .modal-header h2 { font-size: 1.4rem; margin-bottom: 8px; }
  .modal-section { margin-bottom: 22px; }
  .modal-section:last-child { margin-bottom: 0; }
  .modal-section h4 { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-hover); font-weight: 700; margin-bottom: 10px; }
  .modal-section ul { padding-left: 18px; }
  .modal-section li { list-style: disc; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 8px; text-align: justify; text-align-last: left; hyphens: auto; }
  .modal-section li:last-child { margin-bottom: 0; }
  .modal-section p { color: var(--ink-soft); font-size: 0.9rem; }
  .modal-section a { color: var(--ink-soft); font-weight: 400; }
  body.modal-open { overflow: hidden; }

  /* Contacto / Únete a Nosotros (formulario + info) */
  #contacto {
    position: relative; overflow: hidden; border-top: none;
    padding-top: 105px;
  }
  #contacto::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url('images/puerto-sa.png') center/cover no-repeat;
    background-attachment: fixed;
    filter: grayscale(1);
  }
  @media (max-width: 900px) {
    #contacto::before { background-attachment: scroll; }
  }
  #contacto::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(160deg, rgba(26,26,26,0.8) 0%, rgba(26,26,26,0.7) 100%);
  }
  #contacto .section-container { position: relative; z-index: 1; }
  #contacto .eyebrow { color: var(--gold-light); }
  #contacto .section-head h2 { color: var(--white); }
  #contacto .contact-details h3 { color: var(--gold-light); }
  #contacto .contact-details p { color: rgba(255,255,255,0.85); }
  #contacto .contact-details a { color: var(--gold-light); }
  #contacto .contact-details a:hover { color: var(--gold); }
  #contacto .contact-details a.contact-email { color: rgba(255,255,255,0.85); }
  #contacto .contact-details a.contact-email:hover { color: rgba(255,255,255,0.85); }
  #contacto .social-emojis img { filter: brightness(0) invert(1); }
  #contacto .form-row label { color: var(--white); font-weight: 700; }

  .contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
  .contact-form-wrap { background: none; border: none; padding: 0; }

  /* Únete a Nosotros (formulario horizontal, ancho completo) */
  .apply-form-wrap { background: var(--cream-alt); padding: 56px; border-radius: var(--radius); border: 1px solid var(--gold-light); }
  .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 28px; }
  .form-row-full { margin-top: 4px; }
  .form-row { margin-bottom: 20px; }
  .form-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--ink-soft); }
  .label-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
  .form-row input, .form-row textarea, .form-row select {
    width: 100%; padding: 13px 16px; border: 1px solid var(--gold-light); border-radius: 6px;
    font-family: var(--font-body); font-size: 0.95rem; line-height: 1.4; background: var(--white); color: var(--ink); resize: vertical;
    transition: border-color 0.3s var(--ease-smooth);
  }
  .form-row input:not([type="file"]), .form-row select { height: 48px; }
  .form-row select {
    cursor: pointer; -webkit-appearance: none; appearance: none; padding-right: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235A5249' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 8 10 13 15 8'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
  }
  .form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--gold); }
  .form-row input[type="file"] { padding: 10px 14px; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }
  .form-row input[type="file"]::file-selector-button,
  .form-row input[type="file"]::-webkit-file-upload-button {
    margin-right: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--gold);
    background: var(--cream-alt); color: var(--ink); font-family: var(--font-body); font-weight: 600;
    font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease;
  }
  .form-row input[type="file"]:hover::file-selector-button,
  .form-row input[type="file"]:hover::-webkit-file-upload-button { background: var(--gold-light); }
  .field-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 8px; }
  .form-submit { width: 100%; margin-top: 6px; }
  .form-status { margin-top: 14px; font-size: 0.9rem; color: var(--ink-soft); }
  .form-status.success { color: #4b7a4b; }
  .form-status.error { color: #a3453b; }
  .hidden-field { display: none; }
  
  .contact-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; aspect-ratio: 4/3; }
  .contact-image img { width: 100%; height: 100%; object-fit: cover; }
  .contact-info-noimg { background: var(--cream-alt); border: 1px solid var(--gold-light); border-radius: var(--radius); padding: 40px; }
  .contact-info-noimg .seal { margin-bottom: 24px; }
  .contact-details h3 { font-size: 1.3rem; margin-top: 20px; margin-bottom: 8px; color: var(--gold-hover); }
  .contact-details h3:first-child { margin-top: 0; }
  .contact-details p { color: var(--ink-soft); font-size: 0.95rem; }
  .contact-details a { color: var(--gold-hover); font-weight: 600; }
  .contact-details a:hover { color: var(--gold); }
  .contact-details a.contact-email { color: var(--ink-soft); font-weight: 400; }
  .contact-details a.contact-email:hover { color: var(--ink-soft); }
  
  .social-emojis { display: flex; gap: 16px; margin-top: 4px; }
  .social-emojis a { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
  .social-emojis a:hover { opacity: 0.7; transform: translateY(-3px); }
  .social-emojis img { width: 20px; height: 20px; display: block; }
  
  /* ============ FOOTER ============ */
  .site-footer { background: var(--brown-deep); color: var(--cream); padding-top: 36px; }
  .footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .site-footer .logo-img { height: 42px; border-radius: 4px; margin-left: -18px; }
  .footer-brand .logo { margin-left: -16px; }
  .footer-col h4 { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 10px; }
  .footer-col ul { display: grid; grid-template-columns: auto auto; column-gap: 24px; row-gap: 4px; justify-content: start; }
  .footer-col ul li { margin-bottom: 0; }
  .footer-col ul li a { color: rgba(255,255,255,0.75); font-size: 0.85rem; line-height: 1.25; display: inline-block; }
  .footer-col ul li a:hover { color: var(--gold-light); }
  .footer-col p { color: rgba(255,255,255,0.75); font-size: 0.85rem; }
  .site-footer .social-emojis { gap: 14px; margin-top: 0; }
  .site-footer .social-emojis a { width: 20px; height: 20px; }
  .site-footer .social-emojis a:hover { opacity: 0.7; }
  .site-footer .social-emojis img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
  .footer-bottom { padding: 14px 32px; text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.5); }
  
  /* ============ RESPONSIVE ============ */
  @media (max-width: 968px) {
    .nav-container { padding-right: 24px; }
    .nav-container-home { padding-left: 24px; }
    .section { padding: 72px 0; }
    .section.service-details-section { padding: 46px 0; }
    .page-hero { padding: 130px 0 56px; }
    .page-hero-content { padding: 0 24px; }
    .page-hero-img { min-height: 340px; }
    #contacto { padding-top: 130px; }
    .section-container { padding: 0 24px; }
    .boletin-arrow { display: none; }
    .boletin-carousel-wrap { gap: 0; }
    .boletin-card { flex-basis: 260px; }
    .section-head { margin-bottom: 40px; }

    .nav-links, .nav-cta { display: none; }
    .hamburger { display: flex; }
    .navbar.mobile-open .nav-links { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream-alt); border-top: 1px solid var(--gold-light); padding: 20px 32px; gap: 4px; box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
    .navbar.mobile-open .nav-links > li { width: 100%; padding: 10px 0; }
    .navbar.mobile-open .nav-links > li > a { color: var(--ink); }
    .navbar.mobile-open .dropdown-toggle { color: var(--ink); }
    .navbar.mobile-open .nav-cta { display: inline-flex; margin: 12px 0; }
    .navbar.mobile-open .lang-switch { justify-content: center; padding-top: 6px; }
    .navbar.mobile-open .lang-toggle { border-color: var(--gold-light); color: var(--ink); }
    .lang-toggle { width: 40px; height: 32px; font-size: 0.82rem; }
    .navbar.mobile-open .dropdown-menu { position: static; transform: none; box-shadow: none; opacity: 1; visibility: visible; display: none; margin-top: 8px; }
    .navbar.mobile-open .nav-dropdown.open .dropdown-menu { display: block; }
  
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .partners-grid > .partner-card:last-child:nth-child(3n+1) { grid-column: auto; }
    .nosotros-grid, .contact-grid, .teaser-grid, .partners-grid, .mission-grid, .boletin-grid { grid-template-columns: 1fr; }
    .section-tight-bottom .teaser-grid { grid-template-columns: 1fr; align-items: stretch; }
    .section-tight-bottom .teaser-image { margin-left: 0; }
    .section-tight-bottom .teaser-visual { aspect-ratio: 4/3; height: auto; }
    .mosaic-grid { grid-template-columns: 1fr; }
    .mosaic-servicios, .mosaic-nosotros, .mosaic-equipo, .mosaic-boletin, .mosaic-unete, .mosaic-contacto {
      grid-column: span 1; margin-top: 0; transform: none;
    }
    .mosaic-equipo { flex-direction: column; align-items: flex-start; padding: 36px 28px; gap: 28px; }
    .mosaic-contacto { align-items: flex-start; text-align: left; padding: 44px 28px; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .apply-form-wrap { padding: 32px; }

    .hero-content { padding: 0 32px; margin-bottom: 32px; max-width: 100%; }
    .hero-content h1 { white-space: normal; font-size: clamp(1.8rem, 6vw, 2.6rem); }
    .hero-stats { padding: 0 32px 48px; gap: 32px; }

    .service-hero { background-attachment: scroll; }
    .service-hero-content { padding: 0 32px 56px; max-width: 100%; }

    .timeline-h { padding: 0 16px; }
    .timeline-h-line { display: none; }
    .timeline-h-points { flex-direction: column; align-items: center; gap: 32px; }
    .timeline-h-point { width: 100%; max-width: 320px; }
  }

  @media (max-width: 600px) {
    .section { padding: 56px 0; }
    .section.service-details-section { padding: 34px 0; }
    .section-container { padding: 0 20px; }
    .page-hero { padding: 120px 0 40px; }
    .page-hero-content { padding: 0 20px; }
    .page-hero-img { min-height: 280px; padding: 100px 20px 32px; }
    .service-detail-container { padding: 0 20px; }
    .service-detail-cta { flex-direction: column; align-items: flex-start; }
    .nav-container { padding-right: 16px; }
    .nav-container-home { padding-left: 16px; }
    .hero-content { padding: 0 20px; }
    .hero-stats { padding: 0 20px 40px; gap: 24px; }
    .service-hero-content { padding: 0 20px 40px; }
    .service-hero-content h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
    .hero-stats .stat-number { font-size: 1.9rem; }
    .contact-info-noimg { padding: 24px; }
    .boletin-card { padding: 24px; }
    .timeline-h { margin-top: 32px; }

    .services-grid { grid-template-columns: 1fr; }
    .footer-top {
      grid-template-columns: 1fr 1fr;
      gap: 28px 20px;
      padding-bottom: 32px;
    }
    .footer-brand {
      grid-column: 1 / -1;
      display: flex;
      justify-content: center;
    }
    .footer-brand .logo { margin-left: 0; }
    .site-footer .logo-img { margin-left: 0; }
    .footer-col ul { grid-template-columns: 1fr; row-gap: 8px; }
    .footer-col:nth-of-type(2) { grid-column: 1; grid-row: 2 / span 2; padding-left: 24px; }
    .footer-col:nth-of-type(3) { grid-column: 2; grid-row: 2; }
    .footer-col:nth-of-type(4) { grid-column: 2; grid-row: 3; }
    .footer-bottom { padding: 14px 20px; }
    .modal-box { padding: 26px; }
    .modal-box-service { padding: 26px; }
    .modal-overlay-service { padding-top: 24px; align-items: center; }
    .modal-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .form-grid { grid-template-columns: 1fr; }
    .apply-form-wrap { padding: 24px; }

    .mosaic-watermark { display: none; }
    .mosaic-equipo { padding: 28px 20px; }
    .avatar-circle { width: 70px; height: 70px; margin-left: -18px; border-width: 3px; }
    .avatar-circle.avatar-more { font-size: 0.9rem; }
  }
  
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
  }