/* ==========================================
   CASTILLO PLASCENCIA - MAIN STYLESHEET
   ========================================== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1a4a5e;
  --primary-color-dark: #143d4e;
  --secondary-color: #6b8f71;
  --accent-color: #798777;
  --light-bg: #f5f5f5;
  --white: #ffffff;
  --text-dark: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
}

/* Responsive picture helper */
.responsive-picture {
  display: block;
  overflow: hidden;
}
.responsive-picture img {
  width: 100%;
  height: auto;
  display: block;
}

/* Ensure icons font uses font-display: swap to avoid FOIT and improve FCP */
@font-face {
  font-family: "bootstrap-icons";
  src: url("/assets/fonts/bootstrap-icons.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Typography */
.font-serif {
  font-family: "Cormorant Garamond", serif;
}

.font-sans {
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
.heading {
  font-family: "Cormorant Garamond", serif;
  color: var(--primary-color);
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.header-main {
  background-color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: padding 220ms ease, background 220ms ease, transform 220ms ease,
    box-shadow 220ms ease;
}

/* Sticky / shrink states */
.header-main.is-sticky {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

.header-main.shrink {
  padding: 0.4rem 0;
}

.header-main.shrink .logo-img {
  transform: scale(0.86);
  transition: transform 220ms ease;
}

/* Hide on scroll down */
.header-main.hidden {
  transform: translateY(-120%);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 2000;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 220ms ease, transform 220ms ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.navbar {
  padding: 0;
}

.logo-img {
  height: 50px;
  width: auto;
}

.navbar-nav {
  gap: 0.5rem;
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

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

/* Header link underline + hover/active effects */
.navbar-nav .nav-link {
  position: relative;
  transition: color 0.22s ease, transform 0.18s ease, text-shadow 0.22s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  height: 3px;
  width: 60%;
  background: linear-gradient(90deg, var(--primary-color) 0%, #29b6b9 100%);
  border-radius: 3px;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2,0.9,0.2,1), opacity 0.28s;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.is-hover::after,
.navbar-nav .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.navbar-nav .nav-link:hover {
  transform: translateY(-3px);
  color: var(--primary-color-dark);
}

.navbar-nav .nav-link.active {
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 0px 10px 22px rgba(26,74,94,0.12);
}

/* match for language switch links */
.lang-link { position: relative; transition: color 0.22s ease, transform 0.18s ease; }
.lang-link::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%) scaleX(0); transform-origin: center; height: 2px; width: 60%; background: var(--primary-color); border-radius: 2px; opacity: 0; transition: transform 0.28s, opacity 0.28s; }
.lang-link:hover::after, .lang-link.active::after { transform: translateX(-50%) scaleX(1); opacity: 1; }
.lang-link.active { font-weight: 700; color: var(--primary-color); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.lang-link {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.lang-link.active,
.lang-link:hover {
  color: var(--primary-color);
  font-weight: 600;
}

.social-link {
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: opacity 0.3s;
}

.social-link:hover {
  opacity: 0.7;
}

/* ==========================================
   HERO SECTIONS
   ========================================== */

.hero-section {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--accent-color) 100%
  );
  padding: 4rem 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-section.hero-no-bg {
  background: none !important;
  color: var(--text-dark);
}

.hero-section.hero-no-bg::before {
  display: none;
}

.hero-section.hero-no-bg .hero-breadcrumb {
  color: var(--text-light);
  opacity: 1;
}

.hero-section.hero-no-bg .hero-title {
  color: var(--accent-color);
}

.hero-section.hero-gradient-bg {
  background: linear-gradient(90deg, #155263 0%, #798777 100%);
}

.hero-section.hero-gradient-bg .hero-title {
  color: var(--white) !important;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../icons/pattern.svg") repeat;
  opacity: 0.1;
}

.hero-breadcrumb {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.hero-breadcrumb a {
  color: var(--white);
  text-decoration: none;
}

.hero-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
  line-height: 1.8;
}

.hero-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: var(--white);
}

/* Area Hero Variant */
.hero-section.area-hero {
  background: var(--light-bg);
  padding: 1rem 0 2rem;
}

.hero-section.area-hero::before {
  display: none;
}

.hero-section.area-hero .container {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--accent-color) 100%
  );
  border-radius: 25px;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section.area-hero .container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../icons/pattern.svg") repeat;
  opacity: 0.05;
}

.hero-section.area-hero .hero-breadcrumb {
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.hero-section.area-hero .hero-title {
  color: var(--white);
  position: relative;
  z-index: 1;
}

.hero-section.area-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.hero-section.area-hero .hero-icon {
  position: relative;
  z-index: 1;
}

/* ==========================================
   HOME PAGE
   ========================================== */

.home-hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--light-bg);
}

.home-hero-bg {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%) scale(1.5);
  width: 40%;
  height: 80%;
  background: var(--accent-color);
  border-radius: 50%;
  z-index: 0;
}

/* Decorative blobs positioned inside hero */
.hero-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
  filter: blur(6px);
  transform-origin: center center;
}
.hero-deco.deco-blob-1 {
  width: 160px;
  height: 160px;
  right: 10%;
  top: 8%;
  background: linear-gradient(
    135deg,
    rgba(112, 163, 133, 0.95),
    rgba(137, 196, 164, 0.75)
  );
  border-radius: 48% 52% 54% 46% / 50% 48% 52% 50%;
}
.hero-deco.deco-blob-2 {
  width: 220px;
  height: 220px;
  right: 4%;
  bottom: -12%;
  background: linear-gradient(
    135deg,
    rgba(26, 74, 94, 0.12),
    rgba(121, 135, 119, 0.08)
  );
  border-radius: 40% 60% 55% 45% / 45% 60% 40% 55%;
}

/* Site loader styles (enhanced) */
#site-loader {
  transition: opacity 0.54s cubic-bezier(0.2, 0.9, 0.2, 1), visibility 0.2s;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  background: transparent;
}
#site-loader.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  /* fully opaque background to hide underlying build during navigation */
  background: linear-gradient(180deg, #1a4a5e, #143d4e);
}
#site-loader.cue {
  opacity: 1;
  pointer-events: none;
  visibility: visible;
  /* solid opaque background during cue (non-blocking) */
  background: linear-gradient(180deg, #1a4a5e, #143d4e);
  backdrop-filter: none;
}
#site-loader .loader-inner {
  transform: translateY(0);
}
#site-loader .loader-logo img {
  transform-origin: center center;
  display: block;
}
#site-loader .loader-progress {
  width: 220px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
#site-loader .loader-progress .bar {
  height: 6px;
  background: linear-gradient(90deg, #7db88f, #2a5568);
  width: 0%;
  border-radius: 999px;
}
@media (max-width: 720px) {
  #site-loader .loader-inner {
    padding: 1rem;
  }
  #site-loader .loader-text {
    font-size: 0.95rem;
  }
}
@media (max-width: 768px) {
  .hero-deco.deco-blob-1 {
    width: 100px;
    height: 100px;
    left: 6%;
    top: 6%;
  }
  .hero-deco.deco-blob-2 {
    width: 140px;
    height: 140px;
    right: 6%;
    bottom: -6%;
  }
}

/* Hero Slider Styles */

/* Advanced card hover styles (applies to many card-like components across the site) */
.card-adv {
  position: relative;
  overflow: visible;
  transition: transform 280ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 280ms cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform;
}
.card-adv:focus {
  outline: none;
}
.card-adv::before {
  /* subtle backdrop glow */
  content: "";
  position: absolute;
  left: -10px;
  top: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.02)
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
.card-adv:hover::before,
.card-adv:focus-within::before {
  opacity: 1;
}
.card-adv .card-media {
  transition: transform 520ms cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform;
}
.card-adv.is-hover {
  transform: translateY(-8px) rotateZ(0.01deg);
  box-shadow: 0 20px 40px rgba(11, 26, 38, 0.12),
    0 6px 16px rgba(11, 26, 38, 0.06);
}

/* shine effect removed — CSS stripped to avoid artifacts */
/* If a shine feature is reintroduced, styles should be added deliberately. */

/* ensure the backdrop glow doesn't get stuck when leaving */
.card-adv.is-leaving::before {
  opacity: 0 !important;
  transition: opacity 140ms ease;
}
/* hide overflow during hover/leave so shine doesn't create artifacts */
.card-adv.is-hover,
.card-adv.is-leaving {
  overflow: hidden;
}

/* Prevent AOS transform from conflicting with hover tilt/effects on card elements
   Keep AOS fade (opacity) but stop translate/transform on these cards to avoid layout shifts */
.card-adv[data-aos],
.team-card[data-aos],
.why-card[data-aos],
.service-item[data-aos],
.partner-logo[data-aos],
.cta-card[data-aos] {
  transform: none !important;
  transition: opacity 520ms ease !important;
}
.card-adv[data-aos].aos-animate {
  transform: none !important;
}

/* make sure small cards are graceful */
.card-adv.small {
  transform: none;
}

/* disable heavy interactions on touch and for reduced motion */
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .card-adv,
  .card-adv .card-media {
    transition: none !important;
  }
}

.home-hero-slider,
.nosotros-hero-slider {
  position: relative;
  z-index: 1;
  width: 50%;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  background-color: #0a1e3d;
  border-radius: 0 16px 16px 0;
  perspective: 1500px;
  transform-style: preserve-3d;
}

/* Compact features bar inside hero (small footprint, responsive) */
.hero-features {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.15rem;
  z-index: 2;
}
.hero-features .feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero-features .feature-pill i {
  font-size: 1.02rem;
  opacity: 0.95;
}
.hero-features .feature-pill span {
  display: inline-block;
}
.hero-features .feature-pill:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* small screens: allow scroll horizontally and keep small */
@media (max-width: 720px) {
  .hero-features {
    display: flex;
    overflow: auto;
    gap: 0.6rem;
    padding-bottom: 0.4rem;
  }
  .hero-features .feature-pill {
    flex: 0 0 auto;
    padding: 0.4rem 0.65rem;
    font-size: 0.86rem;
  }
}

.hero-swiper {
  aspect-ratio: 16/9;
  border-radius: 0 16px 16px 0;
  overflow: hidden;
}

.hero-swiper .swiper-slide {
  overflow: hidden;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-swiper .swiper-slide picture,
.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

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

.hero-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-pagination .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.hero-pagination .swiper-pagination-bullet-active {
  background: var(--white);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.home-hero-image {
  position: relative;
  z-index: 1;
  width: 50%;
  flex-shrink: 0;
}

.home-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 0 16px 16px 0;
  display: block;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 4rem;
  flex: 1;
}

.home-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 4.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--primary-color);
  line-height: 1.1;
  margin-bottom: 2rem;
}

.home-subtitle {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 520px;
}

.home-subtitle p {
  margin-bottom: 0.5rem;
}

.home-subtitle p:first-child {
  font-weight: 500;
  color: var(--text-dark);
}

/* ==========================================
   NOSOTROS PAGE
   ========================================== */

.nosotros-hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--light-bg);
}

.nosotros-hero-bg {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%) scale(1.5);
  width: 40%;
  height: 80%;
  background: var(--accent-color);
  border-radius: 50%;
  z-index: 0;
}

.nosotros-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 4rem;
  flex: 1;
}

.nosotros-section {
  padding: 4rem 0;
}

.nosotros-image-wrapper {
  position: relative;
}

.nosotros-image-wrapper::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 50px;
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  border-radius: 0 100px 0 0;
  z-index: 0;
}

.nosotros-image-wrapper img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.nosotros-content {
  padding-left: 3rem;
}

.nosotros-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 4rem;
  font-style: italic;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.nosotros-text {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Stats Section */
.stats-row {
  display: flex;
  gap: 0;
  margin-top: 3rem;
  padding: 0;
  border-top: none;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 60%;
  background: var(--secondary-color);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================
   EQUIPO PAGE
   ========================================== */

.equipo-section {
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

/* Círculos decorativos */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--secondary-color);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

.deco-circle-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -80px;
  animation: float 8s ease-in-out infinite;
}

.deco-circle-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: -60px;
  animation: float 10s ease-in-out infinite reverse;
}

.deco-circle-3 {
  width: 150px;
  height: 150px;
  top: 40%;
  right: 5%;
  animation: float 12s ease-in-out infinite;
  animation-delay: -3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-style: italic;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.team-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.team-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4; /* square */
  width: 100%;
  display: block;
}

.team-card-image img,
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 5; /* ensure overlay sits above image */
  pointer-events: auto;
}

.team-social-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s;
  z-index: 6;
  pointer-events: auto;
}

.team-social-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s;
}

.team-social-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

.team-card-content {
  padding: 1.5rem;
}

.team-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.team-card-position {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.team-card-specialty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--secondary-color);
}

.team-card-specialty i {
  font-size: 1rem;
}

.team-card-bio {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 1rem;
  line-height: 1.6;
}

.team-card-cta {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.team-card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(26, 74, 94, 0.08);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 220ms ease;
}

.team-card-more:hover {
  background: linear-gradient(180deg, #0a1e3d 0%, #155263 100%);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Team Detail Page */
.team-detail-section {
  padding: 2rem 0 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--primary-color);
}

.team-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.team-detail-image {
  position: relative;
  /* center image and allow natural proportions */
  width: 100%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem; /* give breathing space so ::before shows as a frame */
}

.team-detail-image::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 20px;
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  border-radius: 20px;
  z-index: 0;
}

.team-detail-image img,
.team-detail-photo {
  position: relative;
  z-index: 1;
  width: auto; /* keep intrinsic proportions */
  max-width: 100%;
  height: auto;
  max-height: 70vh; /* prevent extremely tall images from overflowing */
  object-fit: contain; /* ensure whole image is visible */
  border-radius: 16px; /* slightly smaller so the decorative bg peeks out */
  display: block;
}

.team-detail-content h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.team-detail-position {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.team-detail-specialty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.detail-section {
  margin-bottom: 2rem;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.detail-section-title i {
  font-size: 1.2rem;
}

.detail-section p {
  color: var(--text-light);
  line-height: 1.7;
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.detail-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
}

.contact-box {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.contact-box-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
}

.contact-item:hover {
  color: var(--primary-color);
}

.contact-item i {
  width: 20px;
  color: var(--secondary-color);
}

/* ==========================================
   AREAS DE PRACTICA PAGE
   ========================================== */

.areas-container {
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  /* allow 3D perspective for child cards */
  perspective: 1200px;
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.area-card {
  background: var(--accent-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden; /* contain the shine */
  will-change: transform;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  backface-visibility: hidden;
  transform-origin: center center;
  /* subtle default shadow so tilt is more visible */
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.area-card:nth-child(4n) {
  border-right: none;
}

.area-card:hover {
  background: var(--secondary-color);
  /* keep hover background but we animate other properties with JS */
}

.area-icon {
  width: 55px;
  height: 55px;
  background: transparent;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 1.25rem;
  /* make icon respond to z translations */
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
}

/* removed .card-shine: using 3D tilt & shadow only (no shine overlay) */
  transform: translateZ(1px);
}

.area-icon,
.area-title,
.area-description,
.area-link {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.area-icon {
  width: 55px;
  height: 55px;
  background: transparent;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 1.25rem;
}

.area-title {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
}

.area-description {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.area-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.85;
}

.area-link:hover {
  color: var(--white);
  opacity: 1;
}

/* Area Detail Page */
.area-detail-section {
  padding: 3rem 0 4rem;
  background: var(--light-bg);
}

.services-box {
  background: var(--primary-color);
  border-radius: 20px;
  padding: 2.5rem;
  color: var(--white);
}

.services-box-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
}

.service-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.service-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  margin-top: 2px;
}

.service-content h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.service-content p {
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.6;
  margin: 0;
}

/* Why Choose Section */
.why-section {
  padding: 3rem 0;
  text-align: center;
  background: var(--light-bg);
}

.why-wrapper {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem 2rem;
  border: 1px solid var(--border-color);
}

.why-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.why-divider {
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  margin: 1rem auto 3rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.why-card {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 2rem 1.5rem;
  border: none;
  box-shadow: none;
}

.why-card-icon {
  width: 45px;
  height: 45px;
  background: transparent;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.why-card-text {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================
   ALIANZAS PAGE
   ========================================== */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 4rem 0;
}

.benefit-card {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.benefit-icon {
  width: 60px;
  height: 60px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.benefit-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.benefit-text {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Partners Section */
.partners-section {
  padding: 4rem 0;
}

.partners-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  font-style: italic;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 0.5rem;
}

.partners-divider {
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
  margin: 1rem auto 3rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.partner-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.partner-header {
  background: var(--secondary-color);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.partner-info h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.partner-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.partner-logo {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.partner-body {
  padding: 1.5rem;
}

.partner-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.partner-specialties-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.partner-tag {
  background: var(--light-bg);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.partner-contact {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.partner-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.partner-contact-item i {
  width: 16px;
  color: var(--secondary-color);
}

.partner-cta {
  display: block;
  background: var(--secondary-color);
  color: var(--white);
  text-align: center;
  padding: 0.75rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 1rem;
  border-radius: 8px;
  transition: background 0.3s;
}

.partner-cta:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* ==========================================
   CTA SECTION
   ========================================== */

.cta-section-wrapper {
  padding: 2rem 0 4rem;
  background: var(--light-bg);
}

.cta-card {
  background: linear-gradient(180deg, #0a1e3d 0%, #155263 100%);
  border-radius: 16px;
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--white);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.cta-section {
  background: linear-gradient(180deg, #0a1e3d 0%, #155263 100%);
  padding: 4rem 0;
  text-align: center;
  color: var(--white);
  margin-top: 2rem;
}

.cta-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--white);
}

.cta-text {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 550px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.cta-button {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 0.875rem 2.5rem;
  border-radius: 8px;
  border: 2px solid var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

.cta-button:hover {
  background: var(--white);
  color: var(--primary-color);
}

/* ==========================================
   CONTACTO PAGE
   ========================================== */

.contacto-section {
  padding: 4rem 0;
  /* Base font size for contact page */
  font-size: 1rem;
  --contact-base: 1rem;
}

.contact-form-wrapper {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

.contact-form-wrapper h2 {
  color: var(--primary-color);
  font-size: 1.25rem; /* 1.25x base */
  margin-bottom: 1.25rem;
}

.contact-info-title {
  color: var(--primary-color);
  font-size: 1.125rem; /* 1.125x base */
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.contact-item .icon {
  color: var(--secondary-color);
  font-size: 1.45rem;
  min-width: 34px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 1rem; /* base */
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 6px 20px rgba(105, 128, 105, 0.08);
}

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

.btn-submit {
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.24s, transform 0.12s;
}

.btn-submit:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* full width CTA on small screens */
@media (max-width: 767px) {
  .btn-submit {
    width: 100%;
    display: block;
    padding: 1rem;
  }
  .contact-form-wrapper {
    padding: 1.5rem;
    border-radius: 14px;
  }
}

.offices-section {
  margin-top: 3rem;
}

.offices-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
}

.office-card {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.office-city {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.office-address {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

.contact-text {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.6;
}

.contact-link {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.18s;
}
.contact-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.social-links .social-icon {
  color: var(--secondary-color);
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, color 0.16s ease;
}
.social-links .social-icon:hover {
  transform: translateY(-3px);
  color: var(--primary-color);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer-main {
  background: var(--accent-color);
  color: var(--white);
  margin-top: auto;
}

.footer-item {
  color: var(--white);
}

.footer-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
}

.footer-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-value {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Footer links: white by default and underline on hover/focus */
.footer-main .footer-value {
  color: var(--white) !important;
  text-decoration: none;
}
.footer-main .footer-value:hover,
.footer-main .footer-value:focus {
  text-decoration: underline;
  color: var(--white);
}

.footer-credits {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.golden-link {
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
}

.golden-link:hover {
  text-decoration: underline;
  color: var(--white);
}

/* ==========================================
   UTILITIES
   ========================================== */

.bg-light-custom {
  background-color: var(--light-bg);
}

.bg-white {
  background-color: var(--white);
}

.text-primary-custom {
  color: var(--primary-color);
}

.text-secondary-custom {
  color: var(--secondary-color);
}

/* ==========================================
   BUTTON HOVER ENHANCEMENTS (JS + CSS)
   ========================================== */

/* Custom Cursor Styles */
:root {
  --cursor-dot-size: 8px;
  --cursor-ring-size: 36px;
  --cursor-color: rgba(26, 74, 94, 0.95); /* primary */
  --cursor-alpha: 0.12;
}

html,
body {
  cursor: none;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-dot-size);
  height: var(--cursor-dot-size);
  background: var(--cursor-color);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-ring-size);
  height: var(--cursor-ring-size);
  border-radius: 50%;
  border: 2px solid rgba(26, 74, 94, 0.12);
  transform: translate3d(-50%, -50%, 0) scale(1);
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: multiply;
  transition: transform 160ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 160ms ease;
  opacity: 1;
}

.cursor-ring--hover {
  transform: translate3d(-50%, -50%, 0) scale(1.45);
  border-color: rgba(26, 74, 94, 0.24);
}

.cursor-hidden {
  opacity: 0 !important;
}

/* Adaptive contrast: invert cursor for dark backgrounds or dark image areas */
body.cursor-contrast--light .cursor-dot {
  background: #fff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
}
body.cursor-contrast--light .cursor-ring {
  border-color: rgba(255, 255, 255, 0.22) !important;
  mix-blend-mode: normal !important;
}
body.cursor-contrast--light .cursor-ring--hover {
  border-color: rgba(255, 255, 255, 0.34) !important;
}

/* Keep previous button styles here (unchanged) */

/* Applied to primary interactive elements across the site */
.cta-button,
.area-link,
.partner-cta,
.team-social-btn {
  position: relative;
  display: inline-flex;
  gap: 0.5rem;
  overflow: hidden;
  z-index: 1;
  --btn-scale: 1;
  --btn-translate-x: 0px;
  --btn-translate-y: 0px;
  --btn-glow-opacity: 0;
  transition: transform 280ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 220ms ease, opacity 220ms ease;
  will-change: transform, opacity;
}

/* Decorative shining layer */
.cta-button::before,
.area-link::before,
.partner-cta::before,
.team-social-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 140%;
  height: 100%;
  transform: translateX(-30%) skewX(-15deg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.02) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: transform 450ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 320ms ease;
  mix-blend-mode: screen;
}

/* Accent glow */
.cta-button::after,
.area-link::after,
.partner-cta::after,
.team-social-btn::after {
  content: "";
  position: absolute;
  left: var(--mx, 50%);
  top: var(--my, 50%);
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, var(--btn-glow-opacity, 0.08)),
    transparent 45%
  );
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  opacity: 0;
}

/* Hover / active states */
.cta-button:hover::before,
.area-link:hover::before,
.partner-cta:hover::before,
.team-social-btn:hover::before {
  transform: translateX(0%);
  opacity: 1;
}

.cta-button:hover::after,
.area-link:hover::after,
.partner-cta:hover::after,
.team-social-btn:hover::after {
  opacity: 1;
}

.cta-button:active,
.area-link:active,
.partner-cta:active,
.team-social-btn:active {
  transform: translate3d(
      var(--btn-translate-x, 0px),
      var(--btn-translate-y, 0px),
      0
    )
    scale(calc(var(--btn-scale) - 0.02));
}

/* Focus accessibility */
.cta-button:focus,
.area-link:focus,
.partner-cta:focus,
.team-social-btn:focus {
  outline: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Ripple element */
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.9;
}

/* Smaller devices adjustments: be less intense */
@media (max-width: 480px) {
  .cta-button::before {
    opacity: 0.55;
    transform: translateX(-10%) skewX(-8deg);
  }
  .cta-button::after {
    width: 120px;
    height: 120px;
  }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1200px) {
  .home-title {
    font-size: 4rem;
  }

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

@media (max-width: 991px) {
  .home-hero {
    min-height: auto;
    padding: 0 0 3rem 0;
    flex-direction: column; /* stack slider and content like FIRMA */
  }

  .home-hero-bg {
    display: none;
  }

  .home-hero-image {
    padding-left: 0;
    width: 100%;
  }

  .home-hero-content {
    padding: 2rem 1.5rem; /* match FIRMA spacing */
    margin-top: 1.6rem;
    text-align: center;
    width: 100%;
  }

  .home-title {
    font-size: 3rem;
    text-align: center;
  }

  .home-subtitle {
    text-align: center;
    margin: 0 auto;
  }

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

  .team-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nosotros-hero {
    flex-direction: column;
    min-height: auto;
    padding-bottom: 3rem;
  }

  .nosotros-hero-bg {
    display: none;
  }

  .nosotros-hero-slider,
  .home-hero-slider {
    width: 100%;
  }

  .hero-swiper {
    border-radius: 0;
    aspect-ratio: 16/9;
    overflow: hidden;
  }

  .hero-swiper .swiper-slide {
    height: 100%;
  }

  .hero-swiper .swiper-slide img {
    height: 100%;
    width: auto;
    max-height: 100%;
    object-fit: cover;
    aspect-ratio: 16/9;
  }

  .nosotros-hero-content {
    padding: 2rem 1.5rem;
  }

  .nosotros-title {
    font-size: 2.5rem;
  }

  .nosotros-content {
    padding-left: 0;
    margin-top: 2rem;
  }

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

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

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

  .nav-extras {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .home-title {
    font-size: 2.5rem;
  }

  .section-title,
  .nosotros-title {
    font-size: 2.5rem;
  }

  .team-grid,
  .areas-grid,
  .benefits-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-item {
    flex: 0 0 45%;
    margin-bottom: 1rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .services-box {
    padding: 1.5rem;
  }
}

@media (max-width: 575px) {
  .footer-item {
    justify-content: center !important;
    margin-bottom: 1.5rem;
  }

  .footer-info {
    text-align: left;
  }
}
