@charset "UTF-8";
/* ============================================================
   anthropic-style.css
   Anthropic-inspired design system for The Cervantes Group
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Colors */
  --color-bg:          #faf9f5;
  --color-bg-subtle:   #e8e6dc;
  --color-bg-dark:     #141413;
  --color-text:        #141413;
  --color-text-light:  #faf9f5;
  --color-text-muted:  #6b6a65;
  --color-mid:         #b0aea5;
  --color-accent:      #F2771F;
  --color-accent-dark: #CC621B;
  --color-accent-hover:#e06a15;
  --color-blue:        #6a9bcc;
  --color-green:       #788c5d;
  --color-border:      #ddd8cc;
  --color-card-bg:     #ffffff;

  /* Typography */
  --font-heading: 'Poppins', 'Arial', sans-serif;
  --font-body:    'Lora', 'Georgia', serif;

  /* Spacing */
  --section-pad:     100px 0;
  --section-pad-sm:  60px 0;
  --container-width: 1200px;
  --container-pad:   0 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-base: 0.3s var(--ease-out);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  padding-top: 120px;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover {
  color: var(--color-accent-dark);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 24px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 20px; }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-bottom: 16px; }
h4 { font-size: 1.15rem; margin-bottom: 12px; font-weight: 500; }

p {
  margin-bottom: 16px;
  font-weight: 400;
}

.text-muted {
  color: var(--color-text-muted);
}

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

.grid-an {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

/* --- Section base --- */
.section {
  padding: var(--section-pad);
  scroll-margin-top: 120px;
}

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

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  scroll-margin-top: 120px;
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-text-light);
}

.section--dark a {
  color: var(--color-text-light);
}
.section--dark a:hover {
  color: var(--color-accent);
}

.section--accent {
  background-color: var(--color-accent);
  color: #fff;
}
.section--accent h1,
.section--accent h2,
.section--accent h3 {
  color: #fff;
}
.section--accent a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.section--accent a:hover {
  opacity: 0.85;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  display: block;
}

.section--dark .section-label {
  color: var(--color-mid);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-an {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 32px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.navbar-an.scrolled {
  background-color: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.navbar-an__logo {
  display: flex;
  align-items: center;
}

.navbar-an__logo img {
  height: 280px;
  width: auto;
  margin: -80px 0;
}

.navbar-an__links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.navbar-an__links > li {
  position: relative;
}

.navbar-an__links > li > a {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color var(--transition-base), color var(--transition-base), text-shadow var(--transition-base), box-shadow var(--transition-base);
}

.navbar-an__links > li:hover > a:not(.navbar-an__cta),
.navbar-an__links > li > a:hover:not(.navbar-an__cta) {
  background-color: rgba(0, 0, 0, 0.05);
  color: #000;
  text-shadow: 0.6px 0 0 currentColor;
}

.navbar-an__links > li > a.active:not(.navbar-an__cta) {
  color: #000;
  text-shadow: 0.6px 0 0 currentColor;
  box-shadow: 0 2px 0 currentColor;
  border-radius: 0;
}

/* Dropdown caret */
.nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  transition: transform var(--transition-base);
}

/* Dropdown menu */
.dropdown-an {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  list-style: none;
}

.dropdown-an::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.navbar-an__links > li:hover > .dropdown-an,
.navbar-an__links > li:focus-within > .dropdown-an {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.navbar-an__links > li:hover .nav-caret {
  transform: rotate(180deg);
}

.dropdown-an li a {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text);
  transition: background-color var(--transition-base);
}

.dropdown-an li a:hover {
  background-color: var(--color-bg-subtle);
  color: #000;
  text-shadow: 0.5px 0 0 currentColor;
}

/* CTA button in nav */
.navbar-an__cta {
  font-family: var(--font-heading) !important;
  font-size: 1.15rem !important;
  font-weight: 500 !important;
  background-color: var(--color-accent) !important;
  color: #fff !important;
  padding: 10px 24px !important;
  border-radius: 100px !important;
  transition: background-color var(--transition-base), transform var(--transition-base) !important;
}

.navbar-an__cta:hover {
  background-color: var(--color-bg-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
  text-shadow: 0.5px 0 0 currentColor;
}

.navbar-an__cta.active {
  background-color: var(--color-bg-dark) !important;
  color: #fff !important;
}

/* Mobile menu toggle */
.navbar-an__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

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

.navbar-an__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-an__toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-an__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #faf9f5 0%, #e8e6dc 40%, #d9d3c7 70%, #faf9f5 100%);
  background-size: 400% 400%;
  animation: heroGradient 15s ease infinite;
}

@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Decorative shapes */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
}
.hero::before {
  width: 600px;
  height: 600px;
  background: var(--color-accent);
  top: -200px;
  right: -150px;
}
.hero::after {
  width: 400px;
  height: 400px;
  background: var(--color-blue);
  bottom: -100px;
  left: -100px;
}

.hero__content {
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.hero__label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
  display: inline-block;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--color-text);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background-color: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background-color: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(242, 119, 31, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn--outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
  transform: translateY(-2px);
}

.btn--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}
.btn--dark:hover {
  background-color: #2a2a28;
  color: var(--color-text-light);
  transform: translateY(-2px);
}

.btn--white {
  background: #fff;
  color: var(--color-text);
}
.btn--white:hover {
  background: var(--color-bg);
  transform: translateY(-2px);
}

.btn--sm {
  font-size: 0.8125rem;
  padding: 8px 20px;
}

.btn-arrow {
  transition: transform var(--transition-base);
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}
/* ============================================================
   HERO — INNER PAGES  (hero-an)
   ============================================================ */
.hero-an {
  padding: 80px 0 40px;
  background: var(--color-bg);
  position: relative;
}

.hero-an--minimal {
  padding: 60px 0 36px;
}

.hero-an__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
  display: block;
}

.hero-an__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.hero-an__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0;
}

/* ============================================================
   LEGAL CONTENT PAGES  (legal-notice, privacy-policy)
   ============================================================ */
.legal-content {
  padding: 60px 0 100px;
}

.legal-content .container-an {
  max-width: 820px;
}

.legal-content__notice {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  background: rgba(242, 119, 31, 0.08);
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 40px;
  line-height: 1.7;
}

.legal-content__intro {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 24px;
}

.legal-content__intro a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
.legal-content__intro a:hover {
  color: var(--color-accent-dark);
}

.legal-content h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--color-text);
  margin-top: 56px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.legal-content h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  color: var(--color-text);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.legal-content p strong {
  color: var(--color-text);
  font-weight: 600;
}

.legal-content ol,
.legal-content ul {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text-muted);
  margin-left: 24px;
  margin-bottom: 20px;
}

.legal-content ol li,
.legal-content ul li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.legal-content a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-base);
}
.legal-content a:hover {
  color: var(--color-accent-dark);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding: 48px 0;
}

/* Custom scroll-triggered expansion for the CTA banner */
.cta-banner.scroll-expand {
  max-width: 80%;
  margin: 0 auto;
  border-radius: 40px;
  padding: 24px 0;
  transition: max-width 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              padding 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.cta-banner.scroll-expand.expanded {
  max-width: 100%;
  border-radius: 0;
  padding: 48px 0;
}

.cta-banner.scroll-expand .container-an {
  transform: scale(0.9);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.cta-banner.scroll-expand.expanded .container-an {
  transform: scale(1);
}

.cta-banner .container-an {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.cta-banner__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  text-align: center;
}

.cta-banner__contacts {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner__contacts a,
.cta-banner__contacts span {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.cta-banner__contacts a:hover {
  opacity: 0.85;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.service-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 32px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

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

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 24px;
}

.service-card__icon--consultancy {
  background-color: rgba(242,119,31,0.1);
  color: var(--color-accent);
}
.service-card__icon--managed {
  background-color: rgba(106,155,204,0.12);
  color: var(--color-blue);
}
.service-card__icon--cyber {
  background-color: rgba(120,140,93,0.12);
  color: var(--color-green);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.service-card__link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.service-card__link:hover {
  gap: 10px;
}

/* ============================================================
   JOIN / CTA SECTION
   ============================================================ */
.join-section {
  padding: var(--section-pad);
}

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

.join-grid__text h2 {
  margin-bottom: 20px;
}

.join-grid__text p {
  color: var(--color-text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.join-grid__image {
  border-radius: 20px;
  overflow: hidden;
}

.join-grid__image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.join-grid__image:hover img {
  transform: scale(1.03);
}

/* ============================================================
   ABOUT / FAST FACTS
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.culture-grid {
  grid-template-columns: 1.5fr 320px;
  align-items: center;
}

.profile-grid {
  grid-template-columns: 320px 1.5fr;
  align-items: start;
  gap: 64px;
}

.about-grid__text p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.facts-panel {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px;
}

.facts-panel h3 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.3rem;
}

.facts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.fact-item {
  text-align: center;
}

.fact-item__number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.fact-item__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.facts-certs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.facts-certs img {
  height: 50px;
  width: auto;
  opacity: 0.8;
  transition: opacity var(--transition-base);
}

.facts-certs img:hover {
  opacity: 1;
}

/* ============================================================
   LEADERSHIP
   ============================================================ */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 0;
}

.leader-card {
  display: flex;
  gap: 28px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.leader-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.leader-card__photo {
  width: 110px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.leader-card__info h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.leader-card__role {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: block;
}

.leader-card__info p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.leader-card__links {
  display: flex;
  gap: 16px;
}

.leader-card__links a {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ============================================================
   LOCATIONS
   ============================================================ */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.location-item {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-card-bg);
  transition: transform var(--transition-base);
}

.location-item:hover {
  transform: translateY(-3px);
}

.location-item h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.location-item p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.location-item a {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 20px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-mid);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-base), background var(--transition-base);
  outline: none;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255,255,255,0.12);
}

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

.contact-form .checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-mid);
}

.contact-form .checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.contact-info {
  padding-top: 16px;
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--color-accent);
}

.contact-info__text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
}

.contact-info__text a {
  color: var(--color-text-light);
}
.contact-info__text a:hover {
  color: var(--color-accent);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  transition: background var(--transition-base), transform var(--transition-base);
}

.social-link:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Alert messages */
.alert-an {
  padding: 16px 20px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert-an--success {
  background: rgba(120,140,93,0.15);
  color: var(--color-green);
  border: 1px solid rgba(120,140,93,0.3);
}

.alert-an--danger {
  background: rgba(220,60,60,0.12);
  color: #dc3c3c;
  border: 1px solid rgba(220,60,60,0.25);
}

/* ============================================================
   CONTACT (light-background overrides)
   When the contact section uses the default .section background
   instead of .section--dark, these styles adapt the form and
   social links for the light off-white background.
   ============================================================ */
#contact:not(.section--dark) .section-label {
  color: var(--color-text-muted);
}

#contact:not(.section--dark) h1 {
  color: var(--color-text);
}

#contact:not(.section--dark) .contact-form label {
  color: var(--color-text-muted);
}

#contact:not(.section--dark) .contact-form input[type="text"],
#contact:not(.section--dark) .contact-form input[type="email"],
#contact:not(.section--dark) .contact-form textarea {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

#contact:not(.section--dark) .contact-form input[type="text"]:focus,
#contact:not(.section--dark) .contact-form input[type="email"]:focus,
#contact:not(.section--dark) .contact-form textarea:focus {
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(242, 119, 31, 0.1);
}

#contact:not(.section--dark) .contact-form .checkbox-group {
  color: var(--color-text-muted);
}

#contact:not(.section--dark) .social-link {
  background: rgba(20, 20, 19, 0.06);
  color: var(--color-text);
}

#contact:not(.section--dark) .social-link:hover {
  background: var(--color-accent);
  color: #fff;
}

#contact:not(.section--dark) .social-link:hover img {
  filter: brightness(0) invert(1);
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer-an {
  background: var(--color-bg-dark);
  color: var(--color-mid);
  padding: 60px 0 30px;
}

.footer-an__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-an__brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-mid);
  margin-top: 16px;
  max-width: 280px;
}

.footer-an__col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.footer-an__col ul {
  list-style: none;
}

.footer-an__col ul li {
  margin-bottom: 10px;
}

.footer-an__col ul li a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-mid);
  transition: color var(--transition-base);
}

.footer-an__col ul li a:hover {
  color: var(--color-text-light);
}

.footer-an__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-an__copyright {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-mid);
}

.footer-an__legal {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 16px;
}

.footer-an__legal-separator {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-mid);
  margin: 0 10px;
}

.footer-an__legal a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-mid);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-an__legal a:hover {
  color: var(--color-text-light);
}

.footer-an__social {
  display: flex;
  gap: 12px;
}

.footer-an__social a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-mid);
  transition: all var(--transition-base);
}

.footer-an__social a:hover {
  background: var(--color-accent);
  color: #fff;
}

.footer-an__social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.scroll-top:hover {
  background: var(--color-accent-dark);
  transform: translateY(-3px);
}

.scroll-top.visible {
  display: flex;
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   LEGACY BOOTSTRAP COMPATIBILITY
   Pages like case-studies.html and contact.php still use
   Bootstrap grid classes but Bootstrap CSS is not loaded.
   ============================================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-pad);
  width: 100%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

[class*="col-sm-"] {
  padding: 0 15px;
  box-sizing: border-box;
  width: 100%;
}

@media (min-width: 768px) {
  .col-sm-3  { width: 25%;     flex: 0 0 25%; }
  .col-sm-4  { width: 33.333%; flex: 0 0 33.333%; }
  .col-sm-5  { width: 41.667%; flex: 0 0 41.667%; }
  .col-sm-6  { width: 50%;     flex: 0 0 50%; }
  .col-sm-9  { width: 75%;     flex: 0 0 75%; }
  .col-sm-offset-1 { margin-left: 8.333%; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .leadership-grid {
    grid-template-columns: 1fr;
  }
  .footer-an__grid {
    grid-template-columns: 1fr 1fr;
  }
  .locations-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  /* --- Body --- */
  body {
    padding-top: 100px;
    font-size: 16px;
  }

  /* --- Navbar --- */
  .navbar-an {
    padding: 0 16px;
    height: 100px;
  }

  .navbar-an__logo img {
    height: 170px;
    margin: -12px 0;
  }

  .navbar-an__toggle {
    display: flex;
  }

  .navbar-an__nav {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250,249,245,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    overflow-y: auto;
  }

  .navbar-an__nav.open {
    transform: translateX(0);
  }

  .navbar-an__links {
    flex-direction: column;
    gap: 0;
  }

  .navbar-an__links > li > a {
    padding: 14px 0;
    font-size: 1.3rem;
    width: 100%;
  }

  .dropdown-an {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 20px;
    min-width: auto;
    display: block;
  }

  .dropdown-an li a {
    padding: 10px 0;
    font-size: 0.9rem;
  }

  /* --- Hero --- */
  .hero {
    min-height: 80vh;
    padding: 80px 20px 60px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero-an {
    padding: 50px 0 30px;
  }

  .hero-an--minimal {
    padding: 40px 0 24px;
  }

  /* --- Sections --- */
  .section {
    padding: var(--section-pad-sm);
  }

  .services-grid,
  .grid-an,
  .profile-grid,
  .culture-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .join-grid__image {
    order: -1;
  }

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

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

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

  .cta-banner .container-an {
    flex-direction: column;
    text-align: center;
  }

  .cta-banner__contacts {
    justify-content: center;
  }

  /* --- Footer --- */
  .footer-an__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-an__brand {
    justify-content: center !important;
    text-align: center;
  }

  .footer-an__bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-an__social {
    justify-content: center;
  }

  /* --- Leadership --- */
  .leadership-grid {
    grid-template-columns: 1fr;
  }

  .leader-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  /* --- Floating images on service pages: stack on mobile --- */
  img[style*="float: right"],
  img[style*="float:right"] {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 24px !important;
  }



  /* --- Facts panel --- */
  .facts-panel {
    padding: 32px 20px;
  }

  .facts-row {
    gap: 24px;
  }

  .fact-item__number {
    font-size: 1.6rem;
  }

  /* --- CTA nav button --- */
  .navbar-an__cta {
    font-size: 1.0rem !important;
    padding: 8px 20px !important;
  }

  /* --- Inline grid overrides for cards with minmax --- */
  [style*="grid-template-columns: repeat(auto-fill, minmax(340px"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: repeat(auto-fill, minmax(300px"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: repeat(auto-fill, minmax(250px"] {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }

  /* --- Force sidebar layouts to stack (inline styles) --- */
  .grid-an[style*="grid-template-columns: 250px"],
  .grid-an[style*="grid-template-columns: 1fr 300px"] {
    grid-template-columns: 1fr !important;
  }

  .grid-an[style*="grid-template-columns: 1.5fr 320px"] {
    grid-template-columns: 1fr !important;
  }

  /* --- Sticky sidebars become horizontal nav on mobile --- */
  [style*="position: sticky; top: 100px"] {
    position: static !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  /* --- Body --- */
  body {
    padding-top: 90px;
  }

  /* --- Navbar --- */
  .navbar-an {
    height: 90px;
    padding: 0 12px;
  }

  .navbar-an__logo img {
    height: 150px;
    margin: -10px 0;
  }

  .navbar-an__nav {
    top: 90px;
  }

  /* --- Hero --- */
  .hero__title {
    font-size: 1.75rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* --- Facts --- */
  .facts-row {
    grid-template-columns: 1fr;
  }

  .fact-item__number[style*="font-size: 0.85rem"] {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  /* --- Specialization & expertise cards --- */
  [style*="grid-template-columns: repeat(auto-fill, minmax(250px"] {
    grid-template-columns: 1fr !important;
  }

  /* --- News cards --- */
  [style*="grid-template-columns: repeat(auto-fill, minmax(300px"] {
    grid-template-columns: 1fr !important;
  }



  /* --- Certification logos --- */
  [style*="gap: 32px; justify-content: center"] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  /* --- Container padding tighter on small phones --- */
  .container-an {
    padding: 0 16px;
  }

  /* --- Hero-an compact --- */
  .hero-an__title {
    font-size: 1.6rem !important;
  }

  /* --- Contact form inputs --- */
  input, textarea, select {
    font-size: 16px !important; /* prevents zoom on iOS */
  }

  /* --- Footer brand text: prevent overflow --- */
  .footer-an__brand span[style*="margin-left: 80px"] {
    margin-left: 0 !important;
    margin-top: -48px !important;
    text-align: center;
  }
}
