/* ========================================================================
   TyL Modelos Replicables — Complete Redesign
   Modern, conversion-optimized landing page
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #0d233e;
  --primary-light: #1a3a5c;
  --primary-dark: #08182b;
  --accent: #B92024;
  --accent-hover: #9e1b1f;
  --accent-light: rgba(185,32,36,0.1);
  --light-blue: #cad5e4;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #D9D9D9;
  --gray-400: #adb5bd;
  --gray-500: #6c757d;
  --gray-600: #495057;
  --text: #1a1a2e;
  --text-light: #3a3a3a;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --section-gap: clamp(30px, 4vw, 60px);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

p, li, span, td, th, label, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.section-padding {
  padding: var(--section-gap) 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }

/* ---------------------------------------- Typography ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: clamp(1rem, 2vw, 1.2rem); }

.section-subtitle {
  color: var(--text-light);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  max-width: 600px;
  margin: 12px auto 0;
}

/* ---------------------------------------- Buttons ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(185,32,36,0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(185,32,36,0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-hero {
  padding: 16px 48px;
  font-size: 1.1rem;
  border-radius: 50px;
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  transition: all var(--transition);
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  background: var(--accent);
  color: var(--white);
}

/* ---------------------------------------- HEADER ---------------------------------------- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
}

#header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
  padding: 10px 0;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  height: clamp(40px, 5vw, 50px);
  width: auto;
  transition: all var(--transition);
  flex-shrink: 0;
}

#header-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

#header-nav .nav-link {
  padding: 6px 10px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

#header-nav .nav-link:hover,
#header-nav .nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

#header.scrolled #header-nav .nav-link {
  color: var(--primary);
}

#header.scrolled #header-nav .nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

.btn-nav-cta {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-left: 4px;
}

.btn-nav-cta:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(185,32,36,0.3);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 300;
  position: relative;
}

.hamburger::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background-color: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

#header.scrolled .hamburger span {
  background-color: var(--primary);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--white);
  min-width: 280px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  overflow-y: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  animation: fadeInDown 0.25s ease;
  border: 1px solid rgba(0,0,0,0.06);
}

.dropdown.active {
  display: block;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown a {
  display: block;
  padding: 14px 22px;
  color: var(--primary-light);
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.2s;
  font-size: 0.85rem;
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a:hover,
.dropdown a.active {
  background: var(--accent-light);
  padding-left: 28px;
  color: var(--accent);
}

/* ---------------------------------------- HERO ---------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image: url(pics/img1.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 clamp(20px, 4vw, 40px);
  max-width: 900px;
  animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  margin-bottom: 36px;
  text-shadow: 0 2px 15px rgba(0,0,0,0.2);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------- Hero Divider ---------------------------------------- */
.hero-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  z-index: 3;
}

.hero-divider-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--accent);
  z-index: 1;
}

.hero-divider-logo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(50%);
  z-index: 10;
  width: clamp(80px, 10vw, 110px);
  height: clamp(80px, 10vw, 110px);
  border-radius: var(--radius-full);
  border: 4px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 0 0 10px var(--white);
  flex-shrink: 0;
}

/* ---------------------------------------- Sections - Shared ---------------------------------------- */
.section-header {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 60px);
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  max-width: 650px;
  margin: 0 auto;
}

/* ---------------------------------------- Quiénes Somos ---------------------------------------- */
#qs {
  padding: clamp(40px, 6vw, 80px) 0;
  background: var(--white);
}

#qs .qs-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

#qs .qs-content p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.8;
  color: var(--text-light);
}

/* ---------------------------------------- PMV ---------------------------------------- */
#pmv {
  padding: var(--section-gap) 0;
  background: var(--gray-50);
}

.pmv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.pmv-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pmv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.pmv-card:hover::before {
  transform: scaleX(1);
}

.pmv-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pmv-card .pmv-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.pmv-card .pmv-icon span {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.pmv-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.pmv-card p {
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  color: var(--text-light);
  line-height: 1.7;
}

/* ---------------------------------------- Franquicia ---------------------------------------- */
#frnqc {
  padding: var(--section-gap) 0;
  background: var(--gray-50);
}

#frnqc .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.frnqc-text h2 {
  margin-bottom: 20px;
}

.frnqc-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.frnqc-text h3 {
  color: var(--accent);
  margin: 24px 0 12px;
}

.frnqc-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.frnqc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.frnqc-image:hover img {
  transform: scale(1.05);
}

/* ---------------------------------------- Actores ---------------------------------------- */
#actores {
  padding: var(--section-gap) 0;
}

.actores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.actor-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 35px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
}

.actor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.actor-card .actor-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--gray-300);
}

.actor-card h3 {
  margin-bottom: 12px;
  color: var(--primary);
}

.actor-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  text-align: justify;
}

.actor-card.franquiciante {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.actor-card.franquiciante .actor-img {
  order: -1;
}

.actor-card.franquiciante h3 {
  width: 100%;
  text-align: right;
}

.actor-card.franquiciante p {
  text-align: justify;
  width: 100%;
}

/* ---------------------------------------- Contrato ---------------------------------------- */
#contrato {
  padding: var(--section-gap) 0;
  background: var(--gray-50);
}

.contrato-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3vw, 40px);
}

.contrato-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: stretch;
}

.contrato-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contrato-image img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.contrato-image:hover img {
  transform: scale(1.05);
}

.contrato-text h2 {
  margin-bottom: 20px;
}

.contrato-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
  text-align: justify;
  text-align-last: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.contrato-text p:last-child {
  margin-bottom: 0;
}

.contrato-text-full {
  padding-top: clamp(20px, 2vw, 32px);
}

.contrato-text-full p {
  color: var(--text-light);
  line-height: 1.8;
  text-align: justify;
  text-align-last: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.contrato-text-full strong {
  color: var(--primary);
}

/* ---------------------------------------- Know How ---------------------------------------- */
#knowhow {
  padding: var(--section-gap) 0;
}

#knowhow .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.knowhow-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.knowhow-image img {
  width: 100%;
  transition: transform 0.5s ease;
}

.knowhow-image:hover img {
  transform: scale(1.05);
}

.knowhow-text h2 {
  margin-bottom: 20px;
}

.knowhow-text p {
  color: var(--text-light);
  line-height: 1.8;
  text-align: justify;
}

/* ---------------------------------------- Ventajas ---------------------------------------- */
#ventajas {
  padding: var(--section-gap) 0;
  background: var(--primary);
  color: var(--white);
}

#ventajas .section-header h2 {
  color: var(--white);
}

#ventajas .section-header p {
  color: rgba(255,255,255,0.7);
}

.ventajas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.ventaja-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.ventaja-item:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.ventaja-item .ventaja-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 16px;
  background: url('pics/ventajasRed.png') center/contain no-repeat;
}

.ventaja-item span {
  display: block;
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  font-weight: 500;
  color: rgba(255,255,255,0.95);
  line-height: 1.4;
}

/* ---------------------------------------- 7 Pilares ---------------------------------------- */
#pilares {
  padding: var(--section-gap) 0;
}

.pilares-cards {
  display: flex;
  gap: 10px;
  height: 420px;
  margin: 40px auto 0;
  max-width: 1100px;
  overflow: hidden;
}

.pilar-card {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.pilar-card:hover,
.pilar-card.active {
  flex: 3;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45);
}

.pilar-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,35,62,0.92) 0%,
    rgba(13,35,62,0.55) 40%,
    rgba(13,35,62,0.15) 100%
  );
  transition: background 0.5s ease;
  z-index: 1;
}

.pilar-card:hover .pilar-card-overlay,
.pilar-card.active .pilar-card-overlay {
  background: linear-gradient(
    to top,
    rgba(13,35,62,0.88) 0%,
    rgba(13,35,62,0.40) 50%,
    rgba(13,35,62,0.10) 100%
  );
}

.pilar-card-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 2;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.pilar-card-number {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  opacity: 0.9;
  transition: transform 0.4s ease, font-size 0.4s ease;
}

.pilar-card:hover .pilar-card-number,
.pilar-card.active .pilar-card-number {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}

.pilar-card h3 {
  color: var(--white);
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 1px 2px 8px rgba(0,0,0,0.5);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease 0.1s;
}

.pilar-card:hover h3,
.pilar-card.active h3 {
  max-height: 120px;
  opacity: 1;
}

/* ---------------------------------------- Propuesta ---------------------------------------- */
#propuesta {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 80px;
}

#propuesta .propuesta-half-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-image: url(pics/propuesta.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

#propuesta .propuesta-half-color {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: var(--light-blue);
}

#propuesta .container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: clamp(10px, 2vw, 20px) clamp(16px, 4vw, 40px);
}

#propuesta .propuesta-content {
  width: 50%;
  padding-left: clamp(24px, 3vw, 48px);
}

#propuesta h2 {
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

#propuesta ul {
  list-style: none;
  padding: 0;
}

#propuesta li {
  position: relative;
  padding: 3px 0 3px 28px;
  font-size: clamp(0.78rem, 1.1vw, 0.85rem);
  color: var(--text-light);
  line-height: 1.35;
  border-bottom: none;
}

#propuesta li:last-child {
  border-bottom: none;
}

#propuesta li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: var(--radius-full);
  opacity: 0.8;
}

#propuesta li::after {
  content: '✓';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

/* ---------------------------------------- Timeline ---------------------------------------- */
#np {
  padding: var(--section-gap) 0;
  background: var(--white);
}

#np .container {
  max-width: 1000px;
}

.np-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 8px;
}

.np-subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 60px;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--gray-300), var(--accent));
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.15s; }
.timeline-item:nth-child(4) { animation-delay: 0.2s; }
.timeline-item:nth-child(5) { animation-delay: 0.25s; }
.timeline-item:nth-child(6) { animation-delay: 0.3s; }
.timeline-item:nth-child(7) { animation-delay: 0.35s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.tl-content {
  width: calc(50% - 70px);
}

.timeline-item.right {
  justify-content: flex-start;
}

.timeline-item.right .tl-content {
  text-align: right;
  padding-right: 24px;
}

.timeline-item.right .tl-content::after {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(50% - 70px + 46px);
  width: 24px;
  height: 4px;
  background: var(--gray-300);
  transform: translateY(-50%);
  border-radius: 2px;
}

.timeline-item.left {
  justify-content: flex-end;
}

.timeline-item.left .tl-content {
  text-align: left;
  padding-left: 24px;
}

.timeline-item.left .tl-content::before {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(50% - 70px + 46px);
  width: 24px;
  height: 4px;
  background: var(--gray-300);
  transform: translateY(-50%);
  border-radius: 2px;
}

.tl-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 4px solid var(--gray-300);
  z-index: 2;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.timeline-item:hover .tl-dot {
  transform: translate(-50%, -50%) scale(1.2);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(185,32,36,0.15);
}

.tl-content p {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  color: var(--text-light);
  line-height: 1.7;
}

/* ---------------------------------------- Imagen Flotante ---------------------------------------- */
#imagenflotante {
  padding: 40px 0;
  text-align: center;
}

#imagenflotante .imgF {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------- Por qué elegirnos ---------------------------------------- */
#pe {
  padding: var(--section-gap) 0;
  background: var(--gray-50);
}

.pe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.pe-stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pe-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.pe-stat-card:hover::before {
  transform: scaleX(1);
}

.pe-stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pe-stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.pe-stat-label {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pe-stat-detail {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: var(--text-light);
  line-height: 1.6;
}

.pe-footer {
  text-align: center;
  max-width: 700px;
  margin: 40px auto 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 0 20px;
}

/* ---------------------------------------- Formulario ---------------------------------------- */
#formulario {
  padding: var(--section-gap) 0;
  background-color: var(--gray-300);
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 24px;
  font-size: 0.85rem;
}

#formulario .form-card {
  background: var(--white);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 50px);
  max-width: 750px;
  margin: 40px auto 0;
  box-shadow: var(--shadow-md);
}

#formulario h2 {
  text-align: center;
  margin-bottom: 8px;
}

#formulario .form-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-group .radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 4px;
}

.form-group .radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: all var(--transition);
  outline: none;
  background: var(--white);
  color: var(--text);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13,35,62,0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
  color: var(--gray-400);
  font-size: 0.8rem;
}

input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-400);
  border-radius: var(--radius-full);
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  background: var(--white);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185,32,36,0.15);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--white);
}

input[type="submit"] {
  width: 100%;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  border: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  font-family: var(--font);
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(185,32,36,0.3);
}

input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(185,32,36,0.4);
}

input[type="submit"]:active {
  transform: translateY(0);
}

/* ---------------------------------------- Footer ---------------------------------------- */
#footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 30px;
}

#footer .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.7);
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  transition: color 0.3s ease;
  font-size: 0.85rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-col .footer-quote {
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.footer-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-icon-lg {
  width: 24px;
  height: 20px;
  flex-shrink: 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ---------------------------------------- Responsive ---------------------------------------- */
@media (max-width: 1024px) {
  #frnqc .container,
  #knowhow .container {
    grid-template-columns: 1fr;
  }

  .contrato-card-inner {
    grid-template-columns: 1fr;
  }

  .frnqc-image { order: -1; max-height: 300px; }
  .frnqc-image img { height: 300px; min-height: 0; }

  .contrato-card .contrato-image { max-height: 300px; }
  .contrato-card .contrato-image img { height: auto; min-height: 0; max-height: 300px; }

  .knowhow-image { max-height: 300px; }
  .knowhow-image img { height: 300px; min-height: 0; }

  #propuesta .propuesta-half-image { display: none; }
  #propuesta .propuesta-half-color { width: 100%; }
  #propuesta .propuesta-content { width: 100%; }

  #footer .container {
    grid-template-columns: repeat(2, 1fr);
  }

  .pmv-card:hover { transform: none; }
  .actor-card:hover { transform: none; }
  .pe-stat-card:hover { transform: none; }
  .stat-item:hover { transform: none; }
  .ventaja-item:hover { transform: none; }

  .timeline-item { opacity: 1; transform: none; animation: none; }
}

@media (max-width: 900px) {
  #header-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  #hero {
    min-height: 85vh;
    min-height: 85dvh;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  #header .container {
    padding: 0 16px;
  }

  .header-logo {
    height: 36px;
  }

  .pmv-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .actores-grid {
    grid-template-columns: 1fr;
  }

  .ventajas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .ventaja-item {
    padding: 20px 16px;
  }

  .pe-stats {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .pe-stat-card {
    padding: 30px 24px;
  }

  .pilares-cards {
    height: 320px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .pilar-card {
    scroll-snap-align: start;
    min-width: 140px;
    flex: 0 0 140px;
  }

  .pilar-card h3 {
    font-size: 0.85rem;
  }

  .pilar-card-number {
    font-size: 1.2rem;
  }

  .timeline-line { left: 24px; }
  .timeline-item { margin-bottom: 40px; opacity: 1; transform: none; animation: none; }
  .timeline-item.right, .timeline-item.left { justify-content: flex-end; padding-left: 60px; }
  .tl-content { width: 100%; text-align: left !important; padding: 0 0 0 24px !important; }
  .timeline-item.right .tl-content::after,
  .timeline-item.left .tl-content::before { display: none; }
  .tl-content::before { content: ''; position: absolute; top: 50%; left: -22px; width: 22px; height: 4px; background: var(--gray-300); transform: translateY(-50%); border-radius: 2px; }
  .tl-dot { left: 24px; }

  #np { padding: 60px 0; }
  .np-subtitle { margin-bottom: 40px; }
  .tl-content p { font-size: 0.88rem; }

  #footer .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  #formulario {
    font-size: 0.8rem;
  }
  #formulario .form-card {
    padding: 20px;
    margin: 10px 0;
  }

  #imagenflotante .imgF {
    border-radius: 0;
  }

  .btn-hero {
    padding: 14px 36px;
    font-size: 1rem;
  }

  .contrato-card-inner {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .ventajas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ventaja-item {
    padding: 16px 12px;
  }

  .ventaja-item .ventaja-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }

  .ventaja-item span {
    font-size: 0.78rem;
  }

  .pe-stat-card {
    padding: 24px 18px;
  }

  .pilares-cards {
    flex-direction: column;
    height: auto;
    gap: 8px;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .pilar-card {
    min-height: 160px;
    flex: none;
    min-width: 0;
    scroll-snap-align: none;
  }

  .pilar-card:hover,
  .pilar-card.active {
    flex: none;
  }

  .pilar-card h3 {
    max-height: none;
    opacity: 1;
    font-size: 0.85rem;
  }

  .pilar-card-number {
    font-size: 1.2rem;
  }

  .pilar-card-content {
    padding: 20px 16px;
    top: auto;
    bottom: 0;
    transform: none;
    align-items: flex-start;
    text-align: left;
    justify-content: flex-end;
  }

  .section-header h2 {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
  }

  #propuesta li {
    padding: 3px 0 3px 24px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  #propuesta li::before {
    width: 12px;
    height: 12px;
  }
}

@media (min-width: 901px) {
  .hamburger { display: none; }

  #header-nav {
    display: flex;
  }

  .dropdown { display: none !important; }
}

/* ---------------------------------------- Animations ---------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------- Reduced Motion ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-content { animation: none; opacity: 1; transform: none; }
  .timeline-item { opacity: 1; transform: none; animation: none; }
  .fade-in { opacity: 1; transform: none; }
  .pmv-card:hover { transform: none; }
  .actor-card:hover { transform: none; }
  .pe-stat-card:hover { transform: none; }
  .stat-item:hover { transform: none; }
  .ventaja-item:hover { transform: none; }
  .btn-hero:hover { transform: none; }
  .btn-primary:hover { transform: none; }
  .btn-outline:hover { transform: none; }
  input[type="submit"]:hover { transform: none; }
  .pilar-card { transition: none; }
  .pilar-card h3 { transition: none; }
}
