/* ============================================
   VIRTUS Comisarios de Averías - Styles v3
   Mobile-First | Responsive | Accessible
   ============================================ */

/* --- Google Fonts --- */
@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');

/* --- CSS Custom Properties --- */
:root {
  --navy: #0A2540;
  --navy-light: #1E3E62;
  --navy-dark: #031222;
  --green: #8ABE3B;
  --green-dark: #709C2A;
  --green-light: #F1F8E9;
  --gray-900: #0F172A;
  --gray-800: #1E293B;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-400: #94A3B8;
  --gray-200: #E2E8F0;
  --gray-100: #F8FAFC;
  --white: #FFFFFF;
  --bg: #F8FAFC;
  --bg-alt: #F1F5F9;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.05);
  --shadow-lg: 0 10px 30px rgba(10, 37, 64, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container: 1200px;
  --header-h: 70px;
  --header-h-desktop: 80px;
  --touch-target: 44px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

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

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  color: var(--green-dark);
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font-heading);
  min-height: var(--touch-target);
  user-select: none;
}

.btn--primary {
  background: var(--green);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 190, 59, 0.4);
}

.btn--small {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 6px;
}

.btn--gallery {
  background: var(--navy);
  color: var(--white);
}

.btn--gallery:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.btn-text {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}

.btn-text:hover {
  color: var(--green-dark);
  gap: 8px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 10px rgba(10, 37, 64, 0.05);
  z-index: 1000;
  transition: background var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo img {
  width: 120px;
  height: auto;
  display: block;
}

/* Hamburger toggle */
.header__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  z-index: 1001;
}

.header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.header__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__toggle.open span:nth-child(2) {
  opacity: 0;
}

.header__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.header__nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(10, 37, 64, 0.4);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.header__nav.open {
  display: block;
  opacity: 1;
}

.header__nav ul {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--white);
  padding: calc(var(--header-h) + 24px) 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition);
  box-shadow: -10px 0 30px rgba(10, 37, 64, 0.15);
}

.header__nav.open ul {
  transform: translateX(0);
}

.header__nav a {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--green-dark);
  background: var(--green-light);
  padding-left: 20px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
  z-index: 1002;
}

.lang-dropdown__btn {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 6px 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.lang-dropdown__btn:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.lang-dropdown__icon {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.lang-dropdown__btn[aria-expanded="true"] .lang-dropdown__icon {
  transform: rotate(180deg);
}

.lang-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(10, 37, 64, 0.05);
  display: none;
  min-width: 110px;
  padding: 4px;
}

.lang-dropdown__menu.open {
  display: block;
  animation: slideDown 0.2s ease-out;
}

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

.lang-dropdown__menu button {
  width: 100%;
  background: none;
  border: none;
  padding: 8px 12px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition);
}

.lang-dropdown__menu button:hover {
  background: var(--green-light);
  color: var(--green-dark);
}

/* ============================================
   MAIN
   ============================================ */
.main {
  margin-top: var(--header-h);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 60px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 40px;
}

.section__header h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.section__header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--green);
  border-radius: 2px;
  margin: 16px auto 0;
}

.section__subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
}

.hero__carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero__slide.active {
  opacity: 1;
}

.hero__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.hero__btn:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-50%) scale(1.05);
}

.hero__btn--prev { left: 16px; }
.hero__btn--next { right: 16px; }

.hero__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition);
}

.hero__dots span.active {
  background: var(--green);
  transform: scale(1.2);
}

.hero__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 5;
  background: linear-gradient(to right, rgba(10, 37, 64, 0.8) 0%, rgba(10, 37, 64, 0.2) 100%);
}

.hero__content .container {
  color: var(--white);
}

.hero__content h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero__content p {
  font-size: clamp(16px, 2.5vw, 20px);
  max-width: 650px;
  margin-bottom: 36px;
  opacity: 0.9;
  line-height: 1.5;
}

/* ============================================
   QUICKLINKS - TRABAJA CON VIRTUS
   ============================================ */
.section--quicklinks {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.quicklinks__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.quicklinks__card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quicklinks__card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.quicklinks__card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quicklinks__card-icon svg {
  width: 24px;
  height: 24px;
}

.quicklinks__card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.quicklinks__card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============================================
   QUIÉNES SOMOS
   ============================================ */
#quienes {
  background: var(--white);
}

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

.quienes__text p {
  margin-bottom: 20px;
  color: var(--gray-600);
  font-size: 16px;
  line-height: 1.7;
}

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

.quienes__text p strong {
  color: var(--navy);
}

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

.quienes__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 380px;
  transition: transform 0.6s ease;
}

.quienes__image:hover img {
  transform: scale(1.03);
}

/* ============================================
   SERVICIOS
   ============================================ */
#servicios {
  background: var(--bg);
}

/* Services Banner */
.services-banner {
  position: relative;
  border-radius: var(--radius);
  height: 140px;
  overflow: hidden;
  background-image: url('assets/img/hero/06.jpg');
  background-size: cover;
  background-position: center;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.services-banner__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 37, 64, 0.7);
}

.services-banner__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.services-banner__content h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 3.5vw, 28px);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 1px;
}

.servicios__intro {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 32px;
  font-weight: 500;
}

.servicios__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.servicio-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 37, 64, 0.02);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
}

.servicio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--green);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

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

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

.servicio-card__icon {
  width: 48px;
  height: 48px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.servicio-card__icon svg {
  width: 24px;
  height: 24px;
}

.servicio-card h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.servicio-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.servicio-card .btn {
  margin-top: auto;
  align-self: flex-start;
  width: 100%;
}

.servicios__footer {
  margin-top: 48px;
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  box-shadow: var(--shadow);
}

.servicios__footer p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-600);
}

/* ============================================
   PROCEDIMIENTO SUB-SECTION (TIMELINE)
   ============================================ */
.procedimiento-sub {
  margin-top: 64px;
  border-top: 1px solid var(--gray-200);
  padding-top: 48px;
}

.procedimiento-sub__title {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 36px;
  text-align: center;
}

.procedimiento-sub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.procedimiento-sub__steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-sub {
  display: flex;
  gap: 20px;
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.step-sub:hover {
  transform: translateX(4px);
  border-color: var(--green);
}

.step-sub__num {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.step-sub__text h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 6px;
}

.step-sub__text p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
}

.procedimiento-sub__visual {
  display: none;
}

/* ============================================
   ASESORAMIENTO
   ============================================ */
.section--asesoramiento {
  background: var(--white);
}

.asesoramiento__banner {
  position: relative;
  border-radius: var(--radius);
  height: 140px;
  overflow: hidden;
  background-image: url('assets/img/hero/04.jpg');
  background-size: cover;
  background-position: center;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.asesoramiento__banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 37, 64, 0.7);
}

.asesoramiento__banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.asesoramiento__banner-content h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 3.5vw, 28px);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 1px;
}

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

.asesoramiento__text p {
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.7;
}

.asesoramiento__bullets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.asesoramiento__bullets li {
  display: flex;
  gap: 12px;
}

.bullet-icon {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 3px;
}

.bullet-icon svg {
  width: 20px;
  height: 20px;
}

.asesoramiento__bullets strong {
  color: var(--navy);
  font-weight: 600;
}

.asesoramiento__bullets span {
  font-size: 14px;
  color: var(--gray-600);
}

.asesoramiento__callout {
  background: var(--green-light);
  padding: 24px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--green);
  margin-bottom: 20px;
}

.asesoramiento__callout h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 8px;
}

.asesoramiento__callout p {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 16px;
}

.asesoramiento__callout .btn {
  min-height: auto;
  padding: 8px 16px;
  font-size: 13px;
}

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

.asesoramiento__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 380px;
}

/* FAQ Accordion */
.faq__section {
  margin-top: 60px;
  border-top: 1px solid var(--gray-200);
  padding-top: 48px;
}

.faq__title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--navy);
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.faq__accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--bg);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.faq__item.active {
  background: var(--white);
  border-color: var(--green);
}

.faq__question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 24px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  outline: none;
}

.faq__icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: var(--navy);
  transition: transform var(--transition);
  border-radius: 2px;
}

/* Horizontal line */
.faq__icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
}

/* Vertical line */
.faq__icon::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 16px;
}

.faq__item.active .faq__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq__item.active .faq__icon::before {
  transform: rotate(180deg);
  background: var(--green-dark);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq__item.active .faq__answer {
  max-height: 300px;
}

.faq__answer p {
  padding: 0 24px 18px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============================================
   ÁREAS DE ACTUACIÓN
   ============================================ */
.section--areas {
  background: var(--bg);
}

.areas__tabs {
  max-width: 900px;
  margin: 0 auto;
}

.areas__tab-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: 12px;
}

.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-400);
  cursor: pointer;
  padding: 8px 16px;
  position: relative;
  transition: all var(--transition);
}

.tab-btn:hover {
  color: var(--navy);
}

.tab-btn.active {
  color: var(--green-dark);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green);
}

.areas__tab-content {
  display: none;
}

.areas__tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

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

.areas__visual {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-spain-svg-container,
.map-world-svg-container {
  width: 100%;
  max-width: 500px;
  color: var(--gray-200);
}

.map-svg {
  width: 100%;
  height: auto;
}

.map-node {
  cursor: pointer;
  transition: all var(--transition);
}

.map-node text {
  opacity: 0;
  transition: opacity var(--transition);
}

.map-node:hover text {
  opacity: 1;
}

.ping {
  animation: pulse 2s infinite;
  transform-origin: center;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.areas__text h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.areas__text p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 24px;
}

.ports-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.port-badge,
.flag-badge {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.port-badge:hover,
.flag-badge:hover {
  border-color: var(--green);
  background: var(--green-light);
  transform: translateY(-1px);
}

.countries-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.region-group h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   CONTACTO
   ============================================ */
#contacto {
  background: var(--white);
}

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

.contacto__card-info {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  height: 100%;
  box-shadow: var(--shadow-lg);
}

.contacto__card-info h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 32px;
}

.contacto__details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacto__details li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.6;
}

.contacto__details svg {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 3px;
}

.contacto__details span {
  color: rgba(255, 255, 255, 0.85);
}

.contacto__details a {
  color: var(--green);
  font-weight: 600;
}

.contacto__details a:hover {
  color: var(--white);
}

/* Form Container */
.contacto__form-container {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px 32px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}

.contacto__form-container h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 0.5px;
}

.contacto__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--navy);
  outline: none;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(138, 190, 59, 0.15);
}

.btn--submit {
  background: var(--green);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}

.btn--submit:hover {
  background: var(--green-dark);
  box-shadow: 0 4px 15px rgba(138, 190, 59, 0.3);
}

.btn--submit:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

.form-feedback {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 12px;
}

.form-feedback.info {
  background: var(--bg-alt);
  color: var(--navy-light);
  border-left: 3px solid var(--navy);
}

.form-feedback.success {
  background: #E8F5E9;
  color: #2E7D32;
  border-left: 3px solid #4CAF50;
  animation: pulseSuccess 0.5s ease-out;
}

.form-feedback.error {
  background: #FFEBEE;
  color: #C62828;
  border-left: 3px solid #F44336;
}

@keyframes pulseSuccess {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy-dark);
  color: var(--gray-400);
  padding: 30px 0;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer__credit a {
  color: var(--green);
  text-decoration: underline;
}

.footer__credit a:hover {
  color: var(--white);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  touch-action: none;
}

.lightbox.open {
  display: block;
}

.lightbox__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 37, 64, 0.95);
}

.lightbox__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 60px;
}

.lightbox__img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 32px;
  color: var(--white);
  cursor: pointer;
  width: var(--touch-target);
  height: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
  z-index: 10;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 20px;
}

.lightbox__nav--next {
  right: 20px;
}

.lightbox__counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 16px;
  border-radius: 20px;
}

/* ============================================
   RESPONSIVE - TABLETS
   ============================================ */
@media (min-width: 640px) {
  .section {
    padding: 80px 0;
  }

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

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

  .procedimiento-sub__grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
  }

  .procedimiento-sub__visual {
    display: block;
  }

  .procedimiento-sub__img-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
  }

  .procedimiento-sub__img-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 360px;
  }

  .procedimiento-sub__badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--green);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow);
  }

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

/* ============================================
   RESPONSIVE - TABLETS LANDSCAPE / SMALL DESKTOP
   ============================================ */
@media (min-width: 768px) {
  :root {
    --header-h: var(--header-h-desktop);
  }

  .header__logo img {
    width: 140px;
  }

  .header__toggle {
    display: none;
  }

  .header__nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    display: block !important;
    opacity: 1 !important;
    z-index: auto;
  }

  .header__nav ul {
    position: static;
    width: auto;
    height: auto;
    background: none;
    padding: 0;
    flex-direction: row;
    gap: 4px;
    transform: none;
    box-shadow: none;
    overflow: visible;
  }

  .header__nav a {
    min-height: auto;
    padding: 8px 16px;
    font-size: 14px;
  }

  .header__nav a:hover,
  .header__nav a.active {
    padding-left: 16px;
  }

  .lang-dropdown {
    margin-left: 12px;
  }

  .quienes__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .quicklinks__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .servicios__list {
    grid-template-columns: repeat(3, 1fr);
  }

  .asesoramiento__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .areas__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .contacto__grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 1024px) {
  .section {
    padding: 100px 0;
  }

  .header__logo img {
    width: 160px;
  }

  .header__nav a {
    padding: 8px 20px;
    font-size: 15px;
  }
}

/* ============================================
   MOBILE RESPONSIVENESS OPTIMIZATIONS
   ============================================ */
@media (max-width: 767px) {
  /* Hero area optimization */
  .hero__content {
    background: linear-gradient(to bottom, rgba(10, 37, 64, 0.6) 0%, rgba(10, 37, 64, 0.9) 100%);
    text-align: center;
    align-items: center;
    padding-bottom: 40px;
  }
  
  .hero__content h1 {
    font-size: clamp(26px, 5.5vw, 36px);
  }
  
  .hero__content p {
    font-size: clamp(14px, 3vw, 16px);
    margin-bottom: 24px;
    padding: 0 10px;
  }

  /* Form touch target & text input zooming prevention */
  .form-group input,
  .form-group textarea,
  .btn--submit {
    min-height: 48px;
    font-size: 16px; /* Prevents auto-zoom on iOS safari */
  }

  /* Areas of Action reverse stack for easier interaction */
  .areas__grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
  }

  .areas__visual {
    padding: 10px;
  }

  /* Quicklinks & service list layouts */
  .quicklinks__grid,
  .servicios__list {
    gap: 16px;
  }
  
  .quicklinks__card,
  .servicio-card {
    padding: 24px;
  }
  
  .procedimiento-sub__grid {
    gap: 24px;
  }

  .step-sub {
    padding: 16px;
    gap: 12px;
  }

  .step-sub__num {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* Contact layout padding */
  .contacto__card-info,
  .contacto__form-container {
    padding: 28px 20px;
  }
}

/* Accessibility enhancements for touch targets */
button, 
a, 
.tab-btn, 
.faq__question {
  min-height: 44px;
  outline-offset: 4px;
}

