/* ==========================================
   DESIGN TOKENS (CSS VARIABLES)
   ========================================== */
:root {
  /* Colors */
  --color-primary: #0f4c81; /* Classic Blue - Thủy lợi */
  --color-primary-light: #3a75b0;
  --color-primary-dark: #0a3356;
  
  --color-secondary: #27ae60; /* Green - Môi trường */
  --color-secondary-light: #2ecc71;
  --color-secondary-dark: #219653;
  --color-secondary-text: #167342; /* green that clears 4.5:1 on white, for small text */
  
  --color-text-main: #333333;
  --color-text-muted: #666666;
  --color-text-light: #ffffff;
  
  --color-bg-main: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-dark: #1a1a1a;
  
  /* Typography */
  --font-family-primary: 'Inter', sans-serif;
  --font-family-heading: 'Roboto', sans-serif;
  
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 2rem;     /* 32px */
  --font-size-4xl: 2.5rem;   /* 40px */
  --font-size-5xl: 3.5rem;   /* 56px */
  
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 5rem;
  --spacing-section: 80px;
  
  /* Borders & Radius */
  --border-radius-sm: 2px;
  --border-radius-md: 4px;
  --border-radius-lg: 6px;
  --border-radius-pill: 4px;
  
  --border-color: #e0e0e0;
  
  /* Shadows - Flat Design hạn chế shadow */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-hover: none;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-Index */
  --z-index-nav: 1000;
  --z-index-overlay: 10;
  --z-index-modal: 2000;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Fixed navbar is 78px tall; keep anchored section headings clear of it. */
section[id] {
  scroll-margin-top: 90px;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--color-primary-light);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

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

/* ==========================================
   TYPOGRAPHY
   ========================================== */
.section-title h2 {
  font-size: var(--font-size-3xl);
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title .underline {
  height: 3px;
  width: 60px;
  background-color: var(--color-secondary);
  margin: 0 auto var(--spacing-xl);
  border-radius: var(--border-radius-pill);
}

.section-title .section-desc {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto var(--spacing-2xl);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  min-height: 44px;
  border-radius: var(--border-radius-pill);
  font-weight: var(--font-weight-medium);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-text-light);
  transform: none;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-light);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  color: var(--color-text-light);
  transform: none;
}

/* ==========================================
   LAYOUT SECTIONS
   ========================================== */
.section {
  padding: var(--spacing-section) 0;
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  z-index: var(--z-index-nav);
  padding: var(--spacing-md) 0;
  transition: all var(--transition-normal);
}

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

.logo a {
  display: flex;
  flex-direction: column;
  color: var(--color-primary-dark);
}

.logo-text {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: 1;
}

.logo-subtext {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-xl);
}

.nav-links a {
  color: var(--color-text-main);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--color-secondary);
  transition: width var(--transition-normal);
}

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

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

.hamburger {
  display: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--color-primary-dark);
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  /* Primary mobile control: keep the touch target at the 44px minimum. */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lang-switch-btn {
  background: none;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 5px 12px;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  transition: all var(--transition-normal);
  border-radius: var(--border-radius-sm);
}

.lang-switch-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  /* dvh tracks the collapsing mobile address bar; vh above is the fallback. */
  height: 100dvh;
  min-height: 600px;
  background-image: url('./assets/opt/hero-rach-chanh.jpg');
  background-image: image-set(
    url('./assets/opt/hero-rach-chanh.webp') type('image/webp'),
    url('./assets/opt/hero-rach-chanh.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Hero media layer: JS-driven bg + slice transition layer.
   Sits under .hero-overlay so the gradient still applies; without JS the
   .hero CSS background remains as the static fallback. */
.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-slices {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slice-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Each slice is a clip window; the inner img is stretched to the full hero
   width and offset so every slice shows its own column of the picture. */
.hero-slice {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
  will-change: transform;
}

.hero-slice img {
  position: absolute;
  top: 0;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(10, 51, 86, 0.8), rgba(39, 174, 96, 0.6));
  z-index: var(--z-index-overlay);
}

.hero-content {
  position: relative;
  z-index: calc(var(--z-index-overlay) + 1);
  color: var(--color-text-light);
}

.hero-title {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--spacing-md);
  animation: fadeInDown 1s ease;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-light);
  margin-bottom: var(--spacing-2xl);
  animation: fadeInUp 1s ease 0.3s;
  animation-fill-mode: both;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  animation: fadeInUp 1s ease 0.6s;
  animation-fill-mode: both;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-3xl);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.about-text p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-muted);
}

.about-features {
  margin-top: var(--spacing-xl);
}

.about-features li {
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: var(--font-weight-medium);
}

.about-features i {
  color: var(--color-secondary);
  font-size: var(--font-size-lg);
}

/* Lead-in for the featured-projects list: heavier than body copy, tighter spacing. */
.about-lead {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-main);
}

/* Project names reuse the check-list pattern but read as items, not achievements. */
.about-projects {
  margin-top: 0;
}

.about-projects li {
  font-weight: var(--font-weight-regular);
}

.about-projects i {
  color: var(--color-primary);
}

.about-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
}

.about-cta:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.about-cta i {
  transition: transform var(--transition-normal);
}

.about-cta:hover i {
  transform: translateX(4px);
}

.about-image-container {
  flex: 1;
  position: relative;
}

/* About Slider */
.about-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.about-slider__track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}

/* visibility keeps inactive slides out of the accessibility tree;
   pairing it with the opacity transition keeps the fade smooth. */
.about-slider__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.about-slider__slide.active {
  opacity: 1;
  visibility: visible;
}

.about-slider__slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.about-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-slider__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.about-slider__dots {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0;
  background-color: var(--color-bg-light);
}

/* The dot stays 10px visually; a transparent border grows the hit area to 44px.
   #6e7f93 clears the 3:1 non-text contrast bar on the #f8f9fa dots bar. */
.about-slider__dot {
  box-sizing: content-box;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #6e7f93;
  cursor: pointer;
  transition: background-color var(--transition-normal), transform var(--transition-normal);
  border: 17px solid transparent;
  background-clip: content-box;
}

.about-slider__dot.active {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

/* Prev/next arrows sit inside the track so top:50% centers on the image,
   not on the slider (which would include the dots bar). */
.about-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: rgba(10, 51, 86, 0.55);
  color: var(--color-text-light);
  font-size: var(--font-size-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-normal);
}

.about-slider__arrow:hover {
  background-color: rgba(10, 51, 86, 0.85);
}

.about-slider__arrow--prev {
  left: 12px;
}

.about-slider__arrow--next {
  right: 12px;
}

/* Badge hangs off the top-right corner: clear of the caption (bottom-left)
   and of the dots bar. */
.experience-badge {
  position: absolute;
  top: -20px;
  right: -20px;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  padding: var(--spacing-xl);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border: 4px solid var(--color-bg-main);
}

.experience-badge .years {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: 1;
}

.experience-badge .text {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  text-align: center;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.service-card {
  background-color: var(--color-bg-main);
  padding: var(--spacing-2xl) var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all var(--transition-normal);
  border-bottom: 3px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--color-bg-light);
  transition: height var(--transition-normal);
  z-index: 1;
}

.service-card:hover {
  transform: none;
  border-bottom-color: var(--color-secondary);
  background-color: var(--color-bg-light);
}

.service-card:hover::before {
  height: 100%;
}

.service-card > * {
  position: relative;
  z-index: 2;
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: var(--color-bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-xl);
  color: var(--color-primary);
  font-size: var(--font-size-3xl);
  transition: all var(--transition-normal);
}

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

.service-card h3 {
  margin-bottom: var(--spacing-md);
  color: var(--color-primary-dark);
}

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

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
}

.project-card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--color-bg-main);
  transition: all var(--transition-normal);
}

.project-card:hover {
  transform: none;
  border-color: var(--color-primary);
}

.project-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-img picture {
  display: block;
  width: 100%;
  height: 100%;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-info {
  padding: var(--spacing-xl);
}

.project-category {
  display: inline-block;
  font-size: var(--font-size-xs);
  color: var(--color-secondary-text);
  text-transform: uppercase;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-xs);
}

.project-info h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary-dark);
}

.project-info p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Footer Section */
.footer {
  background-color: var(--color-primary-dark);
  color: var(--color-text-light);
  padding-top: var(--spacing-3xl);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

/* Logo PNG is already transparent with a white oval — a white box behind it
   would show through the transparent corners and read as a rendering bug. */
.footer-logo-img {
  height: 50px;
  width: auto;
  margin-bottom: 10px;
}

.footer-logo h3 {
  font-size: var(--font-size-2xl);
  color: var(--color-text-light);
}

.footer-logo p {
  color: var(--color-secondary-light);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-md);
}

.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-xl);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-light);
  transition: all var(--transition-normal);
}

.social-links a:hover {
  background-color: var(--color-secondary);
  transform: translateY(-3px);
}

.footer h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--color-secondary);
}

.footer-links ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--color-secondary-light);
  padding-left: 5px;
}

.contact-list li {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: rgba(255, 255, 255, 0.7);
}

.contact-list i {
  color: var(--color-secondary-light);
  font-size: var(--font-size-lg);
  margin-top: 5px;
}

.contact-list a {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: var(--spacing-md) 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-sm);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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


/* ==========================================
   ORG CHART SECTION
   ========================================== */
.org-chart {
  overflow: hidden;
}

.org-top {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.org-line {
  width: 2px;
  height: 40px;
  background-color: var(--color-primary);
  margin: 0 auto;
}

.org-units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-top: 0;
}

.org-card {
  background-color: var(--color-bg-main);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--color-primary);
  padding: var(--spacing-xl);
  transition: all var(--transition-normal);
}

.org-card:hover {
  border-top-color: var(--color-secondary);
  background-color: var(--color-bg-light);
}

.org-card__icon {
  width: 50px;
  height: 50px;
  background-color: var(--color-bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
  font-size: var(--font-size-xl);
  transition: all var(--transition-normal);
}

.org-card:hover .org-card__icon {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.org-card h4 {
  font-size: var(--font-size-base);
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

/* Head card – override base card styles */
.org-card.org-card--head {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-2xl);
  border: none;
  border-top: none;
}

.org-card.org-card--head .org-card__icon {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-text-light);
  margin: 0 auto var(--spacing-md);
}

.org-card.org-card--head h3 {
  color: var(--color-text-light);
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-xs);
}

.org-card.org-card--head p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
}

.org-card.org-card--head:hover {
  background-color: var(--color-primary-dark);
  border-top: none;
}

.org-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-content {
  display: flex;
  gap: var(--spacing-2xl);
  align-items: flex-start;
}

.contact-info-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.contact-form-side {
  flex: 1.2;
}

.contact-info-card {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.contact-info-card i {
  color: var(--color-primary);
  font-size: var(--font-size-xl);
  margin-top: 4px;
}

.contact-info-card h4 {
  font-size: var(--font-size-base);
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-xs);
}

.contact-info-card p,
.contact-info-card a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.contact-info-card a:hover {
  color: var(--color-primary);
}

.contact-map iframe {
  width: 100%;
  border: 1px solid var(--border-color);
}

/* Form Styles */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  background-color: var(--color-bg-light);
  color: var(--color-text-main);
  transition: border-color var(--transition-normal);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
}

/* Keyboard focus must be visible on every interactive element, not just inputs. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

.form-row {
  display: flex;
  gap: var(--spacing-md);
}

.form-row .form-group {
  flex: 1;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: fit-content;
  padding: 12px 30px;
}

.form-status {
  padding: var(--spacing-md);
  text-align: center;
  font-weight: var(--font-weight-medium);
}

.form-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}


/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
  
  .experience-badge {
    top: -16px;
    right: 12px;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

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

  .contact-content {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.5rem;
    --spacing-section: 60px;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-bg-main);
    flex-direction: column;
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-md);
    gap: 0;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: var(--spacing-md) 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    flex-direction: column;
  }

  .org-units {
    grid-template-columns: 1fr;
  }

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

  .form-row {
    flex-direction: column;
  }

  .btn-submit {
    width: 100%;
  }

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

@media (max-width: 576px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
