/* ==========================================================================
   NEXUS TR-ES — Sistema de Diseño Corporativo (Turquía - España)
   Paleta: Blanco Roto (#FAF8F5), Onyx (#161616), Amarillo Nexus (#FDDB88), Petróleo (#285E58)
   ========================================================================== */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Root Design Tokens --- */
:root {
  /* Color Palette extraída de logo_nexus.svg y blanco roto */
  --bg-main: #FAF8F5;          /* Blanco roto corporativo */
  --bg-surface: #FAF8F5;       /* Superficie clara */
  --bg-surface-alt: #FAF8F5;   /* Superficie clara secundaria */
  --bg-card: #FAF8F5;
  --bg-dark: #161616;          /* Onyx profundo del logo */
  --bg-dark-surface: #222222;  

  --color-primary: #161616;     /* Texto principal / Onyx */
  --color-secondary: #4A4A4A;   /* Texto secundario / Muted */
  --color-muted: #737373;       /* Desactivado / Muted light */
  
  --color-gold: #FDDB88;           /* Amarillo exacto del logo TR-ES */
  --color-gold-light: #FFE9A6;     /* Amarillo crema para fondos oscuros */
  --color-gold-dark: #285E58;      /* Petróleo accesible para texto e iconos */
  --color-gold-subtle: #FFF3D1;    /* Crema amarilla para etiquetas y superficies */

  --border-light: #E8E4DC;     /* Borde suave cálido */
  --border-focus: #FDDB88;
  
  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation / Shadows */
  --shadow-sm: 0 2px 8px rgba(22, 22, 22, 0.04);
  --shadow-md: 0 6px 24px rgba(22, 22, 22, 0.06);
  --shadow-lg: 0 16px 40px rgba(22, 22, 22, 0.09);
  --shadow-gold: 0 8px 25px rgba(253, 219, 136, 0.35);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  --header-height: 110px;
}

/* --- Base Reset & Box Sizing --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--color-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* --- Layout Containers --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background-color: var(--bg-surface-alt);
}

.section-dark {
  background-color: var(--bg-dark);
  color: #FFFFFF;
}

.section-dark h2, 
.section-dark h3, 
.section-dark h4 {
  color: #FFFFFF;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--color-gold-subtle);
  color: var(--color-gold-dark);
  border: 1px solid rgba(40, 94, 88, 0.22);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
  margin-bottom: 16px;
}

.section-tag svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.section-title {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-description {
  font-size: 1.125rem;
  color: var(--color-secondary);
  font-weight: 400;
}

.section-dark .section-description {
  color: #B0B0B0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: normal;
  max-width: 100%;
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #2D2D2D;
  border-color: #2D2D2D;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: #FDDB88;
  color: #161616;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: #F4CB5F;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(253, 219, 136, 0.5);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: rgba(22, 22, 22, 0.03);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background-color: transparent;
  color: var(--color-gold-dark);
  border: 1.5px solid var(--color-gold);
}

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

.btn-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
  transform: translateX(4px);
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-normal);
  background-color: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200, 196, 186, 0.6);
}

.header.scrolled {
  background-color: rgba(250, 248, 245, 0.99);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border-light);
}

.nav-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  height: 100%;
}

.header .logo-img {
  height: 72px;
}

.header .header-actions {
  position: static;
  flex-shrink: 0;
}

.header .brand-logo-link {
  flex-shrink: 0;
}

.header .nav-menu {
  gap: clamp(14px, 2vw, 32px);
}

.header .nav-link {
  white-space: nowrap;
}

.header .lang-switcher {
  margin-right: 0;
}

main > section {
  scroll-margin-top: var(--header-height);
}

.brand-logo-link {
  display: flex;
  align-items: center;
}

/* Logo Directo sin ningún tipo de contenedor o fondo cuadrado */
.logo-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.logo-img {
  height: 54px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.brand-logo-link:hover .logo-img {
  transform: scale(1.05);
}

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  line-height: 1.1;
}

.brand-name span {
  color: var(--color-gold-dark);
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--color-secondary);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
}

/* --- Language Switcher --- */
.lang-switcher {
  position: relative;
  margin-right: 16px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  background-color: transparent;
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.03em;
}

.lang-btn:hover {
  border-color: var(--color-gold-dark);
  background-color: rgba(253, 219, 136, 0.12);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 999;
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  text-align: left;
}

.lang-option:hover {
  background-color: rgba(253, 219, 136, 0.15);
  color: var(--color-primary);
}

.lang-option.active {
  background-color: rgba(253, 219, 136, 0.2);
  color: var(--color-primary);
  font-weight: 700;
}

.lang-flag {
  display: inline-block;
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.lang-code {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--color-gold-dark);
  background: rgba(253, 219, 136, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Nav Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background-color: var(--color-gold-dark);
  transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* --- Section 1: Inicio (Hero) --- */
.hero-section {
  padding-top: calc(var(--header-height) + 0px);
  padding-bottom: 80px;
  overflow: hidden;
}

/* --- Hero Image Banner --- */
.hero-image-banner {
  position: relative;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
  margin-bottom: 0;
}

.hero-image-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.hero-image-overlay {
  position: relative;
  min-height: inherit;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(22, 22, 22, 0.55) 0%,
    rgba(22, 22, 22, 0.30) 50%,
    rgba(22, 22, 22, 0.65) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hero-image-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #FFFFFF;
  text-align: center;
  font-kerning: none;
  letter-spacing: 0;
  line-height: 1.12;
  max-width: 900px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-image-title .highlight-gold {
  color: #FDDB88;
}

.hero-text-block {
  padding: 60px 0 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-gold-dark);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(253, 219, 136, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(253, 219, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(253, 219, 136, 0); }
}

.hero-badge-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 24px;
}

.hero-title .highlight-gold {
  color: var(--color-gold-dark);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

/* Vector Graphic Container for Hero */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vector-card-graphic {
  width: 100%;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.graphic-bg-pattern {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
}

.corridor-map-container {
  position: relative;
  width: 100%;
  height: auto;
}

/* --- Section 2: Sobre Nosotros --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text-content h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.about-text-content p {
  color: var(--color-secondary);
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.7;
}

/* --- Section 3: Servicios --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.service-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #FDDB88;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(253, 219, 136, 0.4);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-gold-dark);
  transition: all var(--transition-normal);
}

.service-card:hover .service-icon-box {
  background-color: var(--color-primary);
  color: var(--color-gold-light);
  border-color: var(--color-primary);
}

.service-icon-box svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.service-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.service-desc {
  font-size: 0.98rem;
  color: var(--color-secondary);
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-bullets {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-primary);
  line-height: 1.5;
}

.service-bullet-icon {
  width: 16px;
  height: 16px;
  color: var(--color-gold-dark);
  flex-shrink: 0;
  margin-top: 3px;
}

.service-bullet-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.service-action-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* --- Section 4: Proceso de Consultoría --- */
.process-wrapper {
  max-width: 1040px;
  margin: 0 auto;
}

.process-tabs-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  position: relative;
}

.process-tab-btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #FFFFFF;
  border: 2px solid var(--border-light);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  min-width: 170px;
}

.process-tab-btn.active {
  border-color: var(--color-gold-dark);
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.step-num-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-main);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.process-tab-btn.active .step-num-badge {
  background-color: var(--color-gold);
  color: #161616;
}

.step-title-short {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.process-tab-btn.active .step-title-short {
  color: #FFFFFF;
}

/* Process Display Card */
.process-content-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  min-height: 380px;
  transition: opacity var(--transition-normal);
}

.process-info-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.process-step-badge {
  background-color: var(--color-gold-subtle);
  color: var(--color-gold-dark);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
}

.process-timeframe {
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 600;
}

.process-card-title {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.process-card-desc {
  font-size: 1.05rem;
  color: var(--color-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

.process-deliverables-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.process-deliverables-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deliverable-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--color-primary);
}

.deliverable-icon {
  width: 18px;
  height: 18px;
  color: var(--color-gold-dark);
}

.deliverable-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.process-visual-box {
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.process-visual-icon {
  width: 72px;
  height: 72px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.process-visual-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* --- Section 5: Portfolio y Sectores --- */
.portfolio-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--color-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.active {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.portfolio-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.portfolio-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
}

.portfolio-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-smooth);
}

.portfolio-card:hover .portfolio-card-media img {
  transform: scale(1.025);
}

.portfolio-card-header {
  padding: 24px;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-sector-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  background-color: var(--color-gold-subtle);
  color: var(--color-gold-dark);
  border-radius: var(--radius-full);
}

.portfolio-corridor-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}

.portfolio-card-body {
  padding: 28px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.portfolio-project-desc {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.portfolio-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background-color: var(--bg-main);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.p-stat-item {
  display: flex;
  flex-direction: column;
}

.p-stat-val {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.p-stat-lbl {
  font-size: 0.75rem;
  color: var(--color-secondary);
}

.portfolio-detail-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  transition: gap var(--transition-fast);
}

.portfolio-card:hover .portfolio-detail-btn {
  gap: 12px;
}

/* --- Section 6: Contacto --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-intro-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.contact-intro-desc {
  font-size: 1.05rem;
  color: var(--color-secondary);
  line-height: 1.6;
}

.office-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.office-details li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.office-icon {
  width: 20px;
  height: 20px;
  color: var(--color-gold-dark);
  margin-top: 3px;
  flex-shrink: 0;
}

.office-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Trade Graphic Map Card */
.contact-map-graphic {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.contact-map-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Contact Form Box */
.contact-form-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--color-primary);
  background-color: var(--bg-main);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold-dark);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--color-gold-subtle);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.trade-flow-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-option {
  position: relative;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--bg-main);
  transition: all var(--transition-fast);
}

.radio-option input:checked + .radio-label {
  border-color: var(--color-gold-dark);
  background-color: var(--color-gold-subtle);
  color: var(--color-primary);
}

.form-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
}

/* --- Footer --- */
.footer {
  background-color: var(--bg-dark);
  color: #FFFFFF;
  padding: 80px 0 40px 0;
  border-top: 1px solid #282828;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand-col p {
  color: #A0A0A0;
  font-size: 0.95rem;
  margin-top: 20px;
  line-height: 1.6;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: #A0A0A0;
  font-size: 0.92rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-gold-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid #282828;
  font-size: 0.88rem;
  color: #888888;
}

/* --- Modal Components --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(22, 22, 22, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: background-color var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: #FAF8F5;
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.modal-header-tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--color-gold-subtle);
  color: var(--color-gold-dark);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.modal-body-text {
  font-size: 1.05rem;
  color: var(--color-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.modal-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--color-primary);
}

.modal-bullet-icon {
  width: 20px;
  height: 20px;
  color: var(--color-gold-dark);
  flex-shrink: 0;
  margin-top: 2px;
}

.modal-bullet-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.legal-modal-content {
  padding-right: 12px;
}

.legal-updated {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin: -6px 0 24px;
}

.legal-section + .legal-section {
  margin-top: 24px;
}

.legal-section h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.legal-section p {
  color: var(--color-secondary);
  line-height: 1.7;
}

.legal-section a {
  color: var(--color-gold-dark);
  font-weight: 600;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: var(--bg-dark);
  color: #FFFFFF;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid #FDDB88;
  transform: translateX(120%);
  transition: transform var(--transition-normal);
}

/* --- Footer logo background fix --- */
.footer-logo-bg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FAF8F5;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}

.footer-logo-bg .logo-img {
  height: 54px;
  width: auto;
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  width: 24px;
  height: 24px;
  color: var(--color-gold-light);
  flex-shrink: 0;
}

.toast-text {
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .process-content-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .header .mobile-toggle {
    display: flex;
  }

  .header .header-actions {
    gap: 16px;
  }

  .header .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-main);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    visibility: hidden;
  }

  .header .nav-menu.mobile-open {
    visibility: visible;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 88px;
  }

  .header {
    height: var(--header-height);
  }

  .header .nav-container {
    justify-content: space-between;
    padding-top: 0;
    padding-left: 12px;
    padding-right: 12px;
    gap: 6px;
  }

  .header .logo-img {
    height: 60px;
  }

  .header .header-actions {
    gap: 8px;
  }

  .logo-img {
    height: 44px;
  }

  .footer-logo-bg .logo-img {
    height: 44px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: #FAF8F5;
    flex-direction: column;
    padding: 32px 24px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    visibility: hidden;
    transition: transform var(--transition-normal);
  }

  .nav-menu.mobile-open {
    transform: translateY(0);
    visibility: visible;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .process-tabs-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .process-tab-btn {
    flex-direction: row;
    justify-content: flex-start;
  }

  .form-row,
  .trade-flow-selector {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* Flexible content keeps translated text and long actions inside their cards. */
.hero-grid > *, .about-grid > *, .services-grid > *,
.portfolio-grid > *, .contact-grid > *, .footer-grid > *,
.process-content-card > *, .form-row > *, .office-details li > * {
  min-width: 0;
}

.btn > span {
  min-width: 0;
}

.btn svg, .step-num-badge {
  flex-shrink: 0;
}

.process-tabs-nav, .process-info-header,
.portfolio-card-header, .about-graphic-box > div:first-child,
.footer-bottom > div:last-child {
  flex-wrap: wrap;
  gap: 16px;
}

.office-details, .footer-links, .service-card, .portfolio-card,
.process-content-card, .hero-image-title, .hero-pillars-container,
.about-graphic-box {
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  .header .nav-menu {
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  .hero-image-banner {
    min-height: 360px;
  }

  .section {
    padding: 64px 0;
  }

  .footer-bottom > div:last-child {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .portfolio-stats-row {
    grid-template-columns: 1fr;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .service-card, .process-content-card, .contact-form-card,
  .modal-card {
    padding: 24px 18px;
  }

  .about-graphic-box {
    padding: 24px 18px !important;
  }

  .btn {
    padding: 14px 18px;
  }

  .service-action-btn {
    align-self: stretch;
  }

  .section-title, .contact-intro-title {
    font-size: 2rem;
    overflow-wrap: anywhere;
  }
}
