:root {
  /* Mockup inspired color palette */
  --primary-color: #4a7fbd;
  /* Blue - Primary actions and branding */
  --secondary-color: #003366;
  /* Navy Blue - Text and headers */
  --accent-red: #c00000;
  /* Red - Important CTAs and highlights */
  --accent-green: #2e7d32;
  /* Green - Success states and positive actions */
  --text-color: #333333;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --gray-medium: #6c757d;
  --gray-light: #e5e5e5;
  --transition-fast: 0.3s ease;
  --transition-slow: 0.6s ease;
  --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 8px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
  font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1rem);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 20px);
}

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  background: var(--primary-color);
  padding: 15px 0;
  box-shadow: var(--shadow-soft);
  transition: padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  padding: 5px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

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

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

.logo {
    display: flex; 
    align-items: center; 
    text-decoration: none;
    gap: 12px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 650;
    color: var(--white);
    letter-spacing: 0.3px;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--gray-light);
    font-weight: 500;
    margin-top: 3px;
    line-height: 1.2;
    transition: opacity 0.3s ease;
}

/* Hide tagline when navbar is scrolled to save space */
.navbar.scrolled .brand-tagline {
    display: none;
}

/* Hide tagline and adjust site title size on very small screens */
@media (max-width: 576px) {
    .logo {
        font-size: 0.9rem;
        gap: 6px;
    }
    .logo img {
        height: 35px;
    }
    .brand-tagline {
        display: block;
        font-size: 0.65rem;
        white-space: normal;
        line-height: 1.1;
    }
}

.logo img {
  height: 50px;
  transition: transform var(--transition-fast), height 0.3s ease;
}

.navbar.scrolled .logo img {
  height: 40px;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-links > li > a {
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links > li > a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--white);
  transition: width var(--transition-fast);
}

.nav-links > li > a:hover {
  color: #f0f0f0;
}

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

.nav-links li {
  position: static; /* Required for absolute mega menu to span full width of the viewport */
}

/* Invisible bridge to prevent hover loss between nav item and mega menu */
.nav-item-dropdown:hover > a::before {
  content: '';
  position: absolute;
  top: 100%;
  left: -30px;
  right: -30px;
  height: 50px;
  background: transparent;
  z-index: 1000;
}

/* Mega Menu Styles */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-top: 1px solid var(--gray-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 999;
  padding: 30px 0;
  pointer-events: none;
}

.nav-item-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu-content {
  display: flex !important;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start;
}

.mega-menu-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mega-menu-col h3 {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 800;
  padding-bottom: 5px;
  align-self: flex-start;
}

.mega-menu-col a {
  color: #777 !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  padding: 10px 0;
  border-bottom: 1px solid #eaeaea;
  transition: color 0.2s ease, padding-left 0.2s ease !important;
  display: block;
}

.mega-menu-col:first-child a {
  color: #0f4c81 !important;
  font-weight: 700 !important;
}

.mega-menu-col a:last-child {
  border-bottom: none;
}

.mega-menu-col a::after {
  display: none !important; /* Disable underline from normal links */
}

.mega-menu-col a:hover {
  color: var(--primary-color) !important;
  padding-left: 5px;
}

.mega-menu-image-col {
  flex: 1.5;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  max-height: 250px;
  box-shadow: var(--shadow-soft);
}

.mega-menu-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.nav-item-dropdown:hover .mega-menu-image-col img {
  transform: scale(1.05); /* Slight zoom on hover */
}

.mega-menu-image-col .image-overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  text-shadow: 0 4px 15px rgba(0,0,0,0.6);
  font-family: 'Georgia', serif; /* Elegant serif for Selection */
  font-style: italic;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--secondary-color);
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  transition: transform var(--transition-fast);
  z-index: 1003;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

.menu-toggle:active {
  transform: scale(0.95);
}

/* Lang Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
}

.lang-switcher select {
  padding: 8px 30px 8px 12px;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  background: var(--white);
  color: var(--secondary-color);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23003366' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.lang-switcher select:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFFFFF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.lang-switcher select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 127, 189, 0.2);
}

/* Footer */
.footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 50px;
  overflow-x: hidden;
}

.footer .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h3,
.footer h4 {
  margin-bottom: 20px;
  color: var(--accent-color);
}

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

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #999;
}

/* Buttons - Enhanced with Modern Animations */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  min-height: 44px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Ripple Effect */
.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Shimmer Effect */
.btn::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotateZ(60deg) translate(-5em, 7.5em);
  z-index: -1;
}

.btn:hover::after {
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: rotateZ(60deg) translate(-5em, 7.5em);
  }

  100% {
    transform: rotateZ(60deg) translate(5em, -12em);
  }
}

.btn-primary,
.btn-blue {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3a6ba3 100%);
  color: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px rgba(74, 127, 189, 0.3);
  background-size: 140% 140%;
  background-position: 0 50%;
}

.btn-primary:hover,
.btn-blue:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 35px rgba(74, 127, 189, 0.45);
  background: linear-gradient(135deg, #3a6ba3 0%, var(--primary-color) 100%);
}

.btn-red {
  background: linear-gradient(135deg, var(--accent-red) 0%, #a00000 100%);
  color: var(--white);
  border-color: var(--accent-red);
  box-shadow: 0 10px 25px rgba(192, 0, 0, 0.3);
}

.btn-red:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 35px rgba(192, 0, 0, 0.45);
  background: linear-gradient(135deg, #a00000 0%, var(--accent-red) 100%);
}

.btn-white-outline {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 22px rgba(255, 255, 255, 0.15);
}

.btn-white-outline:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.35);
}

.btn-green {
  background: linear-gradient(135deg, var(--accent-green) 0%, #1e5a22 100%);
  color: var(--white);
  border-color: var(--accent-green);
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.3);
}

.btn-green:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 35px rgba(46, 125, 50, 0.45);
  background: linear-gradient(135deg, #1e5a22 0%, var(--accent-green) 100%);
}

.btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(74, 127, 189, 0.25),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.hero-cta .btn {
  padding: 16px 38px;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-slow) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Nos Atouts Banner */
.atouts-banner {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 0; /* Reduced from 10px */
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    z-index: 10;
    overflow: hidden; /* Prevent horizontal scrollbar on small screens */
}

.atouts-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.atouts-star {
    clip-path: polygon(50% 0%, 65% 30%, 100% 35%, 72% 58%, 80% 95%, 50% 75%, 20% 95%, 28% 58%, 0% 35%, 35% 30%);
    background: var(--primary-color);
    color: var(--white);
    width: 56px; /* Reduced from 85px */
    height: 56px; /* Reduced from 85px */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.45rem; /* Reduced from 0.65rem */
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    margin-right: 15px; /* Reduced from 20px */
    padding-top: 3px;
    position: relative;
    z-index: 2; /* keep star above sliding text */
}

/* Wrapper to clip the text exactly before it reaches the star */
.atouts-overflow-mask {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 24px; /* Reduced from 30px */
    display: flex;
    align-items: center;
}

.atouts-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 15px;
    color: transparent;
    font-size: 0.85rem; /* Reduced from 0.95rem */
    position: absolute; /* Needed for internal sliding */
    left: 0;
    white-space: nowrap;
    z-index: 1;
    /* Container slides left after the sequence finishes. 20s total duration. */
    animation: slideIntoStar 20s linear infinite;
}

@media (max-width: 768px) {
    .atouts-container {
        flex-wrap: nowrap; 
    }
    .atouts-star {
        margin-right: 10px;
        width: 45px; /* Reduced from 65px */
        height: 45px; /* Reduced from 65px */
        min-width: 45px;
        font-size: 0.4rem; /* Reduced from 0.5rem */
        padding-top: 2px;
    }
    .atouts-list {
        font-size: 0.75rem; /* Reduced from 0.8rem */
        gap: 10px;
    }
}

.blinking-text span {
    font-weight: 600;
    color: var(--white); /* Masked color matches white background */
}

/* Precise synchronization: 20s loop */
.blinking-text span:nth-child(1) { animation: colorBlink1 20s linear infinite; }
.blinking-text span:nth-child(2) { animation: colorBlink2 20s linear infinite; }
.blinking-text span:nth-child(3) { animation: colorBlink3 20s linear infinite; }
.blinking-text span:nth-child(4) { animation: colorBlink4 20s linear infinite; }
.blinking-text span:nth-child(5) { animation: colorBlink5 20s linear infinite; }
.blinking-text span:nth-child(6) { animation: colorBlink6 20s linear infinite; }

/* Each item is blue for its 8% slice. Then white until 48%. Then all show as text together for a long pause. */
@keyframes colorBlink1 {
    0%, 7% { color: var(--primary-color); }
    8%, 47% { color: var(--white); }
    48%, 100% { color: var(--text-color); }
}

@keyframes colorBlink2 {
    0%, 7% { color: var(--white); }
    8%, 15% { color: var(--primary-color); }
    16%, 47% { color: var(--white); }
    48%, 100% { color: var(--text-color); }
}

@keyframes colorBlink3 {
    0%, 15% { color: var(--white); }
    16%, 23% { color: var(--primary-color); }
    24%, 47% { color: var(--white); }
    48%, 100% { color: var(--text-color); }
}

@keyframes colorBlink4 {
    0%, 23% { color: var(--white); }
    24%, 31% { color: var(--primary-color); }
    32%, 47% { color: var(--white); }
    48%, 100% { color: var(--text-color); }
}

@keyframes colorBlink5 {
    0%, 31% { color: var(--white); }
    32%, 39% { color: var(--primary-color); }
    40%, 47% { color: var(--white); }
    48%, 100% { color: var(--text-color); }
}

@keyframes colorBlink6 {
    0%, 39% { color: var(--white); }
    40%, 47% { color: var(--primary-color); }
    48%, 100% { color: var(--text-color); }
}

/* 20s loop. 0-48% individual items blink. 48-60% explicit pause while all items visible. 60%-95% slide. 95%-100% reset. */
@keyframes slideIntoStar {
    0%, 65% { transform: translateX(0); opacity: 1; }
    95% { transform: translateX(-150%); opacity: 1; }
    96%, 100% { transform: translateX(50%); opacity: 0; }
}

/* Hero Section - Enhanced with Animations */
.hero {
  background: var(--secondary-color);
  background-image:
    linear-gradient(rgba(240, 235, 216, 0.15), rgba(240, 235, 216, 0.2)),
    url("/static/images/hero-bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white);
  padding: 100px 0 60px 0; /* Adjust top padding here (e.g. 10px, 30px, 50px) */
  overflow: hidden;
  overflow-x: hidden;
  position: relative;
}

/* Animated particles background */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.3), transparent);
  background-size: 200% 200%;
  animation: particleFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(10px, -10px);
  }

  66% {
    transform: translate(-10px, 10px);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 50px;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  max-width: 100%;
}

.hero-content h1 {
  font-size: clamp(1.8rem, 4vw + 1rem, 3rem);
  line-height: 1.2;
  margin: 20px 0;
  font-weight: 800;
  animation: fadeInUp 1s ease-out 0.3s both;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Button Variants */
.btn-red {
  background: var(--accent-red);
  color: var(--white);
  border-color: var(--accent-red);
}

.btn-red:hover {
  background: #a00000;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(192, 0, 0, 0.3);
}

/* Hero Search Box (Human style) */
.hero-search-box {
  background: transparent;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  text-align: left;
}

.search-form-container {
  background: #ffffff;
  padding: 15px 30px;
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.search-tabs {
  display: flex;
  margin-bottom: 0;
  border-bottom: 2px solid var(--gray-light);
  gap: 2px;
}

.search-tab {
  background: transparent;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 700;
  color: #eeeeee;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.search-tab.active {
  background: transparent;
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

.search-tab:hover:not(.active) {
  background: transparent;
  color: var(--accent-red);
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  width: 100%;
}

.form-row.compact-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
}

.hero-search-input, .hero-search-select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ececec;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #333;
  background: #ebebeb;
  transition: border-color 0.2s;
}

.hero-search-input::placeholder {
  font-style: italic;
  color: #555;
}

.hero-search-select {
  font-style: italic;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 14px;
}

.hero-search-input:focus, .hero-search-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 127, 189, 0.1);
}

.hero-search-btn {
  padding: 12px 35px;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 6px;
  display: inline-block;
}

.rounded-pill-btn {
  border-radius: 50px;
  background: var(--accent-red) !important;
  border-color: var(--accent-red) !important;
  letter-spacing: 0.5px;
  color: var(--white) !important;
  padding: 12px 40px;
}

.rounded-pill-btn:hover {
  background: #a00000 !important;
  border-color: #a00000 !important;
}

@media (max-width: 768px) {
  .search-tabs {
    flex-wrap: wrap;
  }
  .search-tab {
    flex: 1;
    padding: 10px 15px;
    font-size: 0.85rem;
    text-align: center;
  }
  .form-row.compact-row {
    grid-template-columns: 1fr;
  }
  .hero-search-btn {
    width: 100%;
    margin-top: 10px;
  }
}

.hero-tagline {
  font-size: clamp(1rem, 2vw + 0.5rem, 1.2rem);
  color: #b3d9ff;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.badge {
  display: inline-block;
  background: var(--primary-color);
  padding: 5px 15px;
  border-radius: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: bold;
  animation: fadeInUp 1s ease-out 0.1s both;
  box-shadow: 0 4px 15px rgba(74, 127, 189, 0.3);
}

/* Scrolling Text Animation - Enhanced */
.dynamic-text {
  background: rgba(0, 51, 102, 0.8);
  padding: 12px 20px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.7s both;
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 100%;
  width: 100%;
  white-space: nowrap;
}

.scrolling-text {
  display: inline-block;
  padding-left: 100%;
  animation: scrollText 12s linear infinite;
  font-weight: bold;
  font-size: 1.1rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(179, 217, 255, 0.5);
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.hero-cta {
  animation: fadeInUp 1s ease-out 0.9s both;
}

/* Globe Animation - Enhanced */
.globe-container {
  display: flex;
  justify-content: center;
  position: relative;
  animation: fadeIn 1.5s ease-out 0.5s both;
}

/* Mini Globe in Navbar */
.nav-globe-item {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 8px !important;
  pointer-events: none;
  list-style: none;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.nav-globe-container {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  position: relative;
}

.nav-globe-sphere {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background-color: #009f7a;
  background-image:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.6),
      transparent 55%
    ),
    url("/static/images/globe-texture.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  filter: drop-shadow(0 0 8px rgba(74, 127, 189, 0.35));
  animation: globeSpin 22s linear infinite;
  display: block;
}

.nav-globe-sphere .globe-land {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #009f7a;
  opacity: 0.95;
  mask-image: url("/static/images/globe-land-mask.png");
  mask-size: 200% 100%;
  mask-repeat: repeat-x;
  mask-position: 0 50%;
  -webkit-mask-image: url("/static/images/globe-land-mask.png");
  -webkit-mask-size: 200% 100%;
  -webkit-mask-repeat: repeat-x;
  -webkit-mask-position: 0 50%;
  animation: globeSpin 22s linear infinite;
  width: 42px;
  height: 42px;
}

.nav-globe-sphere::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.25),
    transparent 45%
  );
  mix-blend-mode: screen;
}

.nav-globe-sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -6px 0 12px rgba(0, 0, 0, 0.4);
}

/* Hide the navbar globe on mobile (where the nav collapses anyway) */
@media (max-width: 992px) {
  .nav-globe-item {
    display: none !important;
  }
}

/* Specific Section Header Colors */
.section-title.red-title {
  color: #C00000; /* Strict Red from Mockup */
}

.section-title.green-title {
  color: #00B050; /* Strict Green from Mockup */
}

.globe-sphere {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  background-color: #ffffff;
  background-image:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.6),
      transparent 55%
    ),
    url("/static/images/globe-texture.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  filter: drop-shadow(0 0 30px rgba(74, 127, 189, 0.45));
}

.globe-land {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #2e7d32;
  opacity: 0.95;
  mask-image: url("/static/images/globe-land-mask.png");
  mask-size: 200% 100%;
  mask-repeat: repeat-x;
  mask-position: 0 50%;
  -webkit-mask-image: url("/static/images/globe-land-mask.png");
  -webkit-mask-size: 200% 100%;
  -webkit-mask-repeat: repeat-x;
  -webkit-mask-position: 0 50%;
  animation: globeSpin 22s linear infinite;
}

.globe-sphere::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.25),
    transparent 45%
  );
  mix-blend-mode: screen;
}

.globe-sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -25px 0 40px rgba(0, 0, 0, 0.55);
}

@keyframes globeSpin {
  from {
    background-position: 0 50%;
  }

  to {
    background-position: -200% 50%;
  }
}

.hero-overlay-text {
  text-align: center;
  margin-top: -30px;
  font-style: italic;
  color: var(--accent-color);
}

/* House Showcase */
.house-showcase {
  padding: 90px 0;
  background: linear-gradient(160deg, #f7f3eb 0%, #eef5ff 100%);
  overflow-x: hidden;
}

.house-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 60px;
  align-items: center;
}

.house-content .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.house-content h2 {
  font-size: clamp(1.8rem, 3vw + 0.5rem, 2.4rem);
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.house-content p {
  color: var(--gray-medium);
  max-width: 520px;
}

.house-focus-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.house-focus-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  color: var(--secondary-color);
}

.house-focus-item .focus-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 0 6px rgba(192, 0, 0, 0.15);
}

.house-visual {
  position: relative;
  min-height: 360px;
}

.house-stage {
  width: min(360px, 80vw);
  height: 320px;
  margin: 0 auto;
  position: relative;
  perspective: 900px;
  animation: houseFloat 6s ease-in-out infinite;
  z-index: 1;
}

.house-model {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 220px;
  height: 160px;
  transform-style: preserve-3d;
  transform: translateZ(0) rotateX(12deg) rotateY(-25deg);
  animation: houseSpin 18s linear infinite;
}

.house-base {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 130px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%);
}

.house-base .face {
  position: absolute;
  background: linear-gradient(135deg, #f4eee4 0%, #eadfcf 100%);
  border: 2px solid rgba(0, 0, 0, 0.04);
}

.house-base .front,
.house-base .back {
  width: 220px;
  height: 130px;
}

.house-base .front {
  transform: translateZ(70px);
}

.house-base .back {
  transform: rotateY(180deg) translateZ(70px);
}

.house-base .left,
.house-base .right {
  width: 140px;
  height: 130px;
}

.house-base .left {
  transform: rotateY(-90deg) translateZ(110px);
  transform-origin: left;
  background: linear-gradient(135deg, #efe5d7 0%, #e0d2bf 100%);
}

.house-base .right {
  transform: rotateY(90deg) translateZ(110px);
  transform-origin: right;
  background: linear-gradient(135deg, #f7f1e7 0%, #e9dccb 100%);
}

.house-base .top {
  width: 220px;
  height: 140px;
  transform: rotateX(90deg) translateZ(65px);
  transform-origin: top;
  background: linear-gradient(135deg, #e8dfd4 0%, #d8cbbc 100%);
}

.house-roof {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 240px;
  height: 120px;
  transform: translateX(-50%) translateZ(70px);
  background: linear-gradient(135deg, #d4553e 0%, #b6402c 100%);
  clip-path: polygon(50% 0%, 100% 35%, 100% 100%, 0% 100%, 0% 35%);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

@keyframes houseSpin {
  from {
    transform: translateZ(0) rotateX(12deg) rotateY(-25deg);
  }

  to {
    transform: translateZ(0) rotateX(12deg) rotateY(335deg);
  }
}

@keyframes houseFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.house-focus {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--secondary-color);
  font-weight: 700;
  z-index: 2;
}

.house-focus .focus-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  position: relative;
}

.house-focus .focus-dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(74, 127, 189, 0.4);
  animation: focusPulse 2.4s ease-in-out infinite;
}

.house-focus .focus-label {
  background: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
}

.focus-sell {
  top: 30px;
  left: 5%;
}

.focus-buy {
  top: 55%;
  left: 0;
}

.focus-build {
  top: 20%;
  right: 0;
}

.focus-search {
  bottom: 5%;
  right: 10%;
}

@keyframes focusPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.3;
  }
}

/* Search Section - Enhanced */
.search-section {
  margin-top: -50px;
  position: relative;
  z-index: 10;
  animation: slideUp 1s ease-out 1.2s both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-card {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  transition: all var(--transition-fast);
}

.search-card:hover {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

.search-card h2 {
  margin-bottom: 25px;
  color: var(--primary-color);
  text-align: center;
  position: relative;
}

.search-card h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color),
    transparent
  );
  animation: expandWidth 2s ease-out;
}

@keyframes expandWidth {
  from {
    width: 0;
  }

  to {
    width: 60px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(12px, 2vw, 20px);
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: all var(--transition-fast);
  background: var(--white);
  font-size: 1rem;
  min-height: 44px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow:
    0 0 0 4px rgba(74, 127, 189, 0.1),
    0 4px 15px rgba(74, 127, 189, 0.15);
  transform: translateY(-2px);
}

/* Common Section - Enhanced */
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw + 0.5rem, 2.5rem);
  margin: 60px 0 40px;
  position: relative;
  padding-bottom: 15px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.section-title.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-title::after {
  content: "";
  position: absolute;
  width: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-red),
    var(--primary-color)
  );
  background-size: 200% auto;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: width 1s ease-out 0.3s;
  animation: gradientShift 3s ease infinite;
}

.section-title.revealed::after {
  width: 80px;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

/* News Cards - Enhanced */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 30px;
}

.news-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-fast);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.news-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.news-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.news-body {
  padding: 20px;
}

.news-date {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.85rem;
  display: inline-block;
  position: relative;
  padding-left: 20px;
}

.news-date::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.news-body h3 {
  transition: color var(--transition-fast);
}

.news-card:hover .news-body h3 {
  color: var(--primary-color);
}

/* Atouts Section - New Enhanced Styles */
.atouts-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  overflow-x: hidden;
}

.atouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.atout-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.atout-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Add staggered animation delays */
.atout-card:nth-child(1) {
  transition-delay: 0.1s;
}

.atout-card:nth-child(2) {
  transition-delay: 0.2s;
}

.atout-card:nth-child(3) {
  transition-delay: 0.3s;
}

.atout-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-red),
    var(--accent-green)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

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

.atout-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.atout-card i {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: inline-block;
  transition: all 0.4s ease;
}

.atout-card:hover i {
  transform: rotateY(360deg) scale(1.2);
  color: var(--accent-red);
}

.atout-card h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin: 0;
  transition: color var(--transition-fast);
}

.atout-card:hover h3 {
  color: var(--primary-color);
}

/* Company Photos Placeholder */
.company-photos {
  padding: 80px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
  overflow-x: hidden;
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-heading .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw + 0.5rem, 2.3rem);
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.section-heading p {
  color: var(--gray-medium);
}

.photo-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(16px, 2vw, 22px);
}

.photo-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

/* DPE & GES Badges */
.dpe-badges {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.dpe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 40px;
}

.dpe-A { background-color: #319834; }
.dpe-B { background-color: #33cc32; }
.dpe-C { background-color: #cbff33; color: #333; }
.dpe-D { background-color: #ffff00; color: #333; }
.dpe-E { background-color: #ffcb00; color: #333; }
.dpe-F { background-color: #fe9900; }
.dpe-G { background-color: #fe0000; }

.photo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 14px 16px;
  font-weight: 700;
  color: var(--secondary-color);
}

@media (max-width: 992px) {
  .photo-card img {
    height: 170px;
  }
}

@media (max-width: 576px) {
  .photo-card img {
    height: 150px;
  }
}

.photo-placeholder {
  min-height: 200px;
  border-radius: 18px;
  border: 2px dashed rgba(0, 51, 102, 0.25);
  background: linear-gradient(
    135deg,
    rgba(74, 127, 189, 0.08),
    rgba(255, 255, 255, 0.9)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 992px) {
  /* Navbar responsive */
  .navbar .container {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-container {
      order: 1;
      flex: 1;
  }

  .menu-toggle {
    display: block;
    order: 2;
    color: var(--white) !important;
    background: transparent;
  }

  .lang-switcher {
    display: none; /* Hide lang switcher on mobile for now to save space, or move into menu later */
  }

  .nav-links {
    order: 4;
    width: 100%;
    flex-direction: column;
    background: var(--white);
    padding: 10px;
    box-shadow: var(--shadow-strong);
    display: none;
    margin: 15px 0 0 0;
    border-radius: 12px;
    animation: slideDown 0.3s ease-out;
    box-sizing: border-box;
  }

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

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 4px 0; /* Reduced from 8px */
  }

  .nav-links > li > a,
  .nav-links a {
    display: block;
    padding: 8px 15px; /* Reduced from 12px 20px */
    min-height: 36px; /* Reduced from 44px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background var(--transition-fast);
    color: var(--secondary-color) !important; /* Fix invisible text */
    font-weight: 600;
  }

  .nav-links > li > a:hover,
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--light-bg);
    color: var(--primary-color) !important;
  }

  /* Completely hide mega menus on small screens to allow direct link clicks */
  .mega-menu {
    display: none !important;
  }

  /* Hero responsive */
  .hero {
    padding: 80px 0;
    background-attachment: scroll;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0;
    max-width: 100%;
  }

  .hero-content {
    max-width: 100%;
    padding: 0;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .dynamic-text {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* Hero CTA responsive */
  .hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .hero-cta a {
    width: 100%;
    max-width: 320px;
    margin: 0 !important;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: clamp(1.5rem, 5vw, 1.8rem);
  }

  .hero {
    padding: 60px 0;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
  }

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

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

  .lang-switcher select {
    padding: 6px 25px 6px 10px;
    font-size: 0.85rem;
  }

  .page-header {
    padding: 55px 0 35px;
  }

  .page-header h1 {
    font-size: 1.9rem;
  }

  .buy-hero-stats {
    gap: 10px;
  }

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

  .inline-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-filters input,
  .inline-filters select {
    width: 100%;
    min-width: 0;
  }

  .inline-filters .btn {
    width: 100%;
  }

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

  .span-12,
  .span-8,
  .span-6,
  .span-4,
  .full-span {
    grid-column: 1 / -1;
  }

  .search-section {
    margin-top: -30px;
  }

  .search-card {
    padding: 24px 18px;
  }

  .btn {
    font-size: 0.9rem;
    padding: 12px 24px;
  }

  /* Force proper text wrapping on mobile */
  .hero-content h1,
  .hero-tagline,
  .dynamic-text,
  .scrolling-text {
    max-width: 100%;
    word-wrap: break-word;
  }

  .scrolling-text {
    white-space: normal !important;
    animation: none;
    padding-left: 0;
  }
}

/* Properties Listing */
.listing-section {
  padding: 70px 0 90px;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 55%, #f7f3ef 100%);
  position: relative;
  overflow: hidden;
}

.page-header {
  padding: 70px 0 50px;
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%);
  text-align: center;
}

.page-header-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.hero-chips {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.sell-hero {
  background: linear-gradient(180deg, #fff3f1 0%, #ffffff 100%);
}

.build-hero {
  background: linear-gradient(180deg, #f1fff6 0%, #ffffff 100%);
}

.buy-hero {
  position: relative;
  overflow: hidden;
}

.buy-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(74, 127, 189, 0.16),
      transparent 45%
    ),
    radial-gradient(circle at 85% 30%, rgba(0, 177, 141, 0.2), transparent 40%);
  pointer-events: none;
}

.buy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 20% 80%,
    rgba(255, 255, 255, 0.65),
    transparent 40%
  );
  opacity: 0.8;
  pointer-events: none;
}

.buy-hero .container {
  position: relative;
  z-index: 1;
}

.buy-hero-stats {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  color: var(--secondary-color);
  font-weight: 600;
  border: 1px solid rgba(74, 127, 189, 0.18);
}

.stat-chip i {
  color: var(--primary-color);
}

.page-header h1 {
  font-size: 2.4rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-header p {
  color: var(--gray-medium);
}

.filters-bar {
  margin-bottom: 30px;
}

.filters-bar .inline-filters {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(74, 127, 189, 0.12);
}

.inline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.inline-filters input,
.inline-filters select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  min-width: 200px;
  background: #f9fbff;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.inline-filters input:focus,
.inline-filters select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 127, 189, 0.15);
}

.inline-filters .btn {
  min-width: 140px;
}

.advice-content {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.sell-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8f3f1 100%);
}

.sell-grid {
  gap: 40px;
}

.sell-section .advice-content {
  border: 1px solid rgba(192, 0, 0, 0.12);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.sell-section .advice-content ul li {
  background: #fff6f3;
  border-radius: 12px;
  padding: 10px 12px;
}

.sell-section .diagnostics-link .btn-outline {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.sell-section .diagnostics-link .btn-outline:hover {
  background: var(--accent-red);
  color: var(--white);
}

.advice-content h2 {
  margin-bottom: 12px;
  color: var(--secondary-color);
}

.advice-content ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 10px;
}

.advice-content li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600;
  color: var(--secondary-color);
}

.build-section {
  background: linear-gradient(180deg, #ffffff 0%, #eef9f1 100%);
}

.intro-build {
  max-width: 760px;
  margin: 0 auto 40px;
}

.build-section .search-card {
  border: 1px solid rgba(46, 125, 50, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.build-section .news-card {
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f4faf6 100%);
  border: 1px solid rgba(46, 125, 50, 0.12);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.build-section .news-card h3 {
  color: var(--secondary-color);
}

.advice-content li i {
  color: var(--accent-green);
  margin-top: 3px;
}

.diagnostics-link {
  margin-top: 20px;
}

.form-wrapper .search-card {
  border-radius: 20px;
  box-shadow: var(--shadow-strong);
}

.form-wrapper .search-card h2 {
  text-align: center;
}

.form-wrapper .search-card .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-wrapper .search-card textarea {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--gray-light);
  margin-top: 8px;
}

.form-wrapper .search-card .btn-block {
  border-radius: 999px;
}

.form-wrapper .search-card .form-group label {
  font-weight: 600;
  color: var(--secondary-color);
}

.form-wrapper .search-card .form-group input,
.form-wrapper .search-card .form-group select {
  padding: 12px;
  border-radius: 10px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
}

.property-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.property-card.property-card-3d {
  border: 1px solid rgba(0, 0, 0, 0.04);
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
}

.property-card .property-img {
  overflow: hidden;
}

.property-card .property-img img {
  transition: transform 0.4s ease;
}

.property-card:hover .property-img img {
  transform: scale(1.06);
}

.property-card .property-details {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.property-card .property-details h3 {
  margin: 4px 0 6px;
  color: var(--secondary-color);
}

.property-card .property-meta {
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.property-card .btn-outline {
  border-radius: 999px;
}

.property-card-3d {
  transform-style: preserve-3d;
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}

.property-card-3d:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-4deg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.property-card-3d .property-img {
  transform: translateZ(15px);
}

.property-card-3d .property-details {
  transform: translateZ(8px);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.property-img {
  position: relative;
  height: 160px;
}

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

.property-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.property-card:hover .property-img::after {
  opacity: 0.65;
}

.property-price {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 51, 102, 0.9);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  z-index: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.property-details {
  padding: 15px;
}

.property-cat {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(74, 127, 189, 0.12);
}

.property-details h3 {
  margin: 10px 0;
  font-size: 1.25rem;
}

.property-loc {
  color: var(--gray-medium);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.property-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.property-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f0f4fa;
  border-radius: 999px;
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.85rem;
}

.property-meta i {
  color: var(--primary-color);
}

.property-detail-card {
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-strong);
}

.property-detail-header h1 {
  font-size: 2.6rem;
  margin-bottom: 5px;
}

.property-location {
  color: var(--gray-medium);
  margin-bottom: 15px;
}

.property-detail-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  margin-top: 20px;
  align-items: start;
}

.property-detail-image img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.property-detail-info {
  font-size: 1rem;
  line-height: 1.6;
}

.property-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.property-meta-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--secondary-color);
  font-weight: 600;
}

.property-meta-list li::before {
  content: "•";
  margin-right: 6px;
  color: var(--primary-color);
}

@media (max-width: 900px) {
  .property-detail-body {
    grid-template-columns: 1fr;
  }
}

.btn-outline {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  text-align: center;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--secondary-color);
  color: var(--white);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 100px 0;
}

.content-section {
  padding: 60px 0;
}

.group-hero {
  padding: 100px 0;
}

.group-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.group-hero-title {
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 4vw + 0.8rem, 3.1rem);
}

.group-hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw + 0.6rem, 1.35rem);
  line-height: 1.6;
}

.group-mission-title {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.group-mission-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-medium);
}

.group-mission-text-spaced {
  margin-top: 20px;
}

.group-atout-spaced {
  margin-top: 20px;
}

.group-values {
  background: var(--light-bg);
  padding: 80px 0;
}

.group-recruit {
  padding: 80px 0;
}

.group-cta-card {
  background: var(--primary-color);
  padding: 60px;
  border-radius: var(--border-radius);
  text-align: center;
  color: var(--white);
}

.group-cta-title {
  margin-bottom: 20px;
  font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
}

.group-cta-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .group-hero {
    padding: 80px 0;
  }

  .group-values,
  .group-recruit {
    padding: 70px 0;
  }

  .group-cta-card {
    padding: 48px 40px;
  }
}

@media (max-width: 768px) {
  .group-hero {
    padding: 65px 0;
  }

  .group-mission-text {
    font-size: 1.02rem;
  }

  .group-cta-card {
    padding: 36px 26px;
  }

  .group-cta-text {
    font-size: 1.05rem;
  }
}

@media (max-width: 576px) {
  .group-hero {
    padding: 55px 0;
  }

  .group-hero-title {
    font-size: 1.9rem;
  }

  .group-hero-subtitle {
    font-size: 1rem;
  }

  .group-cta-card {
    padding: 28px 20px;
  }

  .group-cta-title {
    font-size: 1.7rem;
  }
}

/* Project Section */
.project-section {
  position: relative;
  background: linear-gradient(160deg, #f1f6ff 0%, #ffffff 60%, #f7f2eb 100%);
  overflow: hidden;
  overflow-x: hidden;
}

.project-section::before,
.project-section::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(74, 127, 189, 0.15),
    transparent 70%
  );
  pointer-events: none;
}

.project-section::before {
  top: -80px;
  left: -80px;
}

.project-section::after {
  bottom: -90px;
  right: -90px;
}

.project-intro {
  max-width: 680px;
  margin: 0 auto 30px;
  text-align: center;
  color: var(--gray-medium);
  font-size: 1.05rem;
}

.sitemap-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-strong);
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.sitemap-grid h3 {
  margin-bottom: 12px;
  color: var(--secondary-color);
}

.sitemap-grid ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.8;
}

.sitemap-grid a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.grid-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.news-card .btn-sm {
  padding: 8px 15px;
  font-size: 0.85rem;
  margin-top: 15px;
}

.mt-50 {
  margin-top: 50px;
}

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

.btn-block {
  width: 100%;
}

@media (max-width: 992px) {
  .grid-two-cols {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Image Placeholders */
.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: var(--light-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: var(--gray-medium);
  opacity: 0.5;
}

.property-img .img-placeholder {
  height: 220px;
}

.france-map-section {
  padding: 90px 0 0 0;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  overflow-x: hidden;
}

.france-map-card {
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-strong);
}

.gallery-section {
  padding: 70px 0 110px;
  background: #fdf7f1;
  overflow-x: hidden;
}

.showcase-header .eyebrow,
.gallery-text .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.showcase-header h2 {
  font-size: 2.3rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.showcase-header p {
  color: var(--gray-medium);
  line-height: 1.5;
}

.properties-map {
  margin-top: 30px;
  width: 100%;
  height: 360px;
  border-radius: 20px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  overflow: hidden;
}

.properties-map .leaflet-pane,
.properties-map .leaflet-tile-pane,
.properties-map .leaflet-tile,
.properties-map .leaflet-tile-container {
  filter: grayscale(1) brightness(1.4) sepia(1) hue-rotate(95deg) saturate(4.2) !important;
}

.properties-map .leaflet-control-container {
  display: none;
}

.leaflet-container .custom-green-marker {
  width: 22px;
  height: 22px;
  background: radial-gradient(
    circle at 30% 30%,
    #e5fff1 0%,
    #7ddf9f 35%,
    #1f7a3f 100%
  );
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  position: relative;
}

.leaflet-container .custom-green-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* --- Gallery Section --- */
.gallery-slider {
    background: #00b18d;
    border-radius: 30px;
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header text */
.gallery-text .eyebrow {
    display: inline-block;
    color: #2a2a2a;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.gallery-text h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.gallery-text p {
    margin: 5px 0 0;
    color: #1c1c1c;
    line-height: 1.5;
}

/* Gallery arrows / controls */
.gallery-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.gallery-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.gallery-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.gallery-arrow i {
    font-size: 1rem;
}

/* Scrollable cards */
.gallery-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 0 20px 10px 20px;
    margin: 0 -20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
}

/* Individual card */
.gallery-card {
    flex: 0 0 auto;
    /*min-width: 240px;*/
    width: 250px;
    /*max-width: 85vw;*/
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(6, 28, 39, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(6, 28, 39, 0.25);
}

/* Image and overlay */
.gallery-image {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #e4f4ff, #fefefe);
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-image:hover img {
    transform: scale(1.05);
}

/* Price overlay */
.gallery-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Card info */
.gallery-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-city {
    font-size: 0.85rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.gallery-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

.gallery-info h3 {
    font-size: 1.2rem;
    color: #222;
    margin: 0;
}

/* Indicators */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
}

.gallery-indicators span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: transform 0.25s ease, background 0.25s ease;
}

.gallery-indicators span.active {
    background: #fff;
    transform: scale(1.2);
}

/* Placeholder image for empty cards */
.img-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: #c0c0c0;
    background: linear-gradient(135deg, #f0f4f8, #ffffff);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .gallery-slider {
        padding: 30px;
        border-radius: 20px;
    }

    .gallery-card {
        min-width: 220px;
    }
}

@media (max-width: 480px) {
    .gallery-card {
        min-width: 200px;
    }

    .gallery-text h2 {
        font-size: 1.6rem;
    }

    .gallery-text p {
        font-size: 0.9rem;
    }

    .gallery-overlay {
        font-size: 0.85rem;
        padding: 0.2rem 0.5rem;
    }
}


/* ===== NEW COMPONENTS FROM MOCKUP ===== */

/* Service Pyramid - Enhanced */
.service-pyramid {
  max-width: 720px;
  margin: 40px auto 10px;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(6px);
}

.pyramid-level {
  text-align: center;
  padding: 22px;
  margin: 14px auto;
  border-radius: 18px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  animation: buildPyramid 0.8s ease-out backwards;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

@keyframes buildPyramid {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pyramid-level::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.pyramid-level:hover::before {
  width: 400px;
  height: 400px;
}

.pyramid-level:hover {
  transform: scale(1.05) translateY(-6px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  animation: pulse 1s ease-in-out infinite;
}

.pyramid-level i {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.project-cta {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.project-cta .btn {
  min-width: 240px;
  justify-content: center;
}

.pyramid-sell {
  background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
  width: 58%;
  animation-delay: 0.1s;
}

.pyramid-buy {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2f5f99 100%);
  width: 78%;
  animation-delay: 0.3s;
}

.pyramid-build {
  background: linear-gradient(135deg, var(--accent-green) 0%, #1b6a35 100%);
  width: 98%;
  animation-delay: 0.5s;
}

/* Floating CTA Button */
.floating-cta {
  position: fixed;
  bottom: clamp(20px, 3vh, 30px);
  right: clamp(15px, 3vw, 30px);
  z-index: 999;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
  font-size: clamp(0.85rem, 1.5vw, 0.98rem);
  padding: clamp(10px, 2vw, 14px) clamp(20px, 3vw, 32px);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Three Column Form Layout */
.three-col-form-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
}

.estimation-hero h1 {
  letter-spacing: 0.2em;
}

.estimation-section .form-column {
  border-radius: 18px;
}

.estimation-section .form-column h4 {
  margin: 20px 0 12px;
  font-size: 1.05rem;
  color: var(--secondary-color);
}

.estimation-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.estimation-grid .form-field,
.estimation-grid .checkbox-group,
.estimation-grid .form-section-title,
.estimation-grid .btn-block {
  margin: 0;
}

.estimation-grid .form-section-title {
  margin-top: 6px;
}

.span-12,
.full-span {
  grid-column: span 12;
}

.span-8 {
  grid-column: span 8;
}

.span-6 {
  grid-column: span 6;
}

.span-4 {
  grid-column: span 4;
}

.estimation-section .form-field input,
.estimation-section .form-field select,
.estimation-section .form-field textarea {
  padding: 12px;
  border-radius: 10px;
}

.estimation-section .btn-block {
  margin-top: 10px;
}

.form-column {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

/* Global responsive adjustments */
@media (max-width: 1200px) {
  .hero {
    padding: 70px 0;
  }

  .container {
    padding: 0 18px;
  }

  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 992px) {
  .navbar .container {
    flex-wrap: wrap;
    gap: 15px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: opacity var(--transition-fast);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
  }

  .lang-switcher {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .search-card,
  .sitemap-card,
  .gallery-slider {
    padding: 30px 25px;
  }

  .properties-grid {
    gap: 24px;
  }

  .property-card-3d:hover {
    transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
  }
}

@media (max-width: 768px) {
  .hero-content h1,
  .hero-tagline {
    text-align: center;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-visual {
    margin-top: 10px;
  }

  .lang-switcher {
    justify-content: center;
  }

  .search-section {
    margin-top: 0;
    padding-top: 20px;
  }

  .search-card {
    padding: 26px 20px;
  }

  .gallery-arrow {
    width: 42px;
    height: 42px;
  }

  .gallery-text h2 {
    font-size: 1.8rem;
    text-align: center;
  }

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

  .gallery-controls {
    justify-content: center;
  }

  .gallery-scroll {
    gap: 15px;
  }

  .property-detail-card {
    padding: 30px;
  }

  .sitemap-card {
    padding: 30px;
  }

  .property-img {
    height: 200px;
  }

  .property-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 0.95rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .nav-links {
    top: 60px;
  }

  .logo img {
    height: 44px;
  }

  .gallery-card {
    min-width: 200px;
  }

  .gallery-controls {
    justify-content: center;
  }

  .lang-switcher select {
    width: 100%;
  }

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

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

  .france-map-section,
  .gallery-section,
  .house-showcase {
    padding: 60px 0;
  }

  .properties-map {
    height: 240px;
    margin-top: 20px;
  }

  .france-map-card,
  .gallery-slider,
  .sitemap-card {
    margin: 15px;
    padding: 25px;
  }

  .grid-two-cols {
    gap: 30px;
  }

  .advice-content ul {
    padding-left: 0;
    list-style: none;
  }

  .advice-content li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .search-card textarea {
    width: 100%;
  }

  .property-card .property-details {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .form-wrapper .search-card .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .globe-sphere {
    width: 240px;
    height: 240px;
  }

  .hero {
    padding: 55px 0 70px;
  }

  .hero-cta a {
    width: 100%;
    max-width: 320px;
  }

  .house-showcase {
    padding: 70px 0;
  }

  .house-content h2 {
    font-size: 2rem;
    text-align: center;
  }

  .house-content p {
    text-align: center;
    margin: 0 auto;
  }

  .house-focus-list {
    grid-template-columns: 1fr;
  }

  .house-visual {
    min-height: 300px;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .focus-sell {
    left: 0;
  }

  .focus-buy {
    left: 5%;
  }

  .focus-build {
    right: 5%;
  }

  .focus-search {
    right: 0;
  }
}

@media (max-width: 576px) {
  .globe-sphere {
    width: 200px;
    height: 200px;
  }

  .house-model {
    width: 180px;
    height: 140px;
  }

  .house-base {
    width: 180px;
    height: 110px;
  }

  .house-base .front,
  .house-base .back {
    width: 180px;
    height: 110px;
  }

  .house-base .left,
  .house-base .right {
    width: 110px;
    height: 110px;
  }

  .house-base .left {
    transform: rotateY(-90deg) translateZ(90px);
  }

  .house-base .right {
    transform: rotateY(90deg) translateZ(90px);
  }

  .house-base .top {
    width: 180px;
    height: 110px;
    transform: rotateX(90deg) translateZ(55px);
  }

  .house-roof {
    width: 200px;
    height: 100px;
    top: 28px;
    transform: translateX(-50%) translateZ(60px);
  }

  .house-focus .focus-label {
    font-size: 0.8rem;
  }

  .photo-placeholder {
    min-height: 180px;
  }
}

.form-column h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.3rem;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary-color);
}

.form-column.red-theme h3 {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

.form-column.green-theme h3 {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

.form-field {
  margin-bottom: 15px;
}

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

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 127, 189, 0.1);
}

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

.checkbox-group label {
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

@media (max-width: 992px) {
  .three-col-form-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .estimation-section .form-column {
    padding: 26px 22px;
  }

  .estimation-section .form-column h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .estimation-hero {
    padding: 60px 0 !important;
  }

  .estimation-hero h1 {
    font-size: 1.9rem;
  }

  .estimation-hero p {
    font-size: 1rem !important;
    padding: 0 12px;
  }

  .estimation-section .form-column {
    padding: 22px 18px;
  }

  .estimation-section .form-column h3 {
    font-size: 1.15rem;
  }

  .estimation-section .form-field {
    margin-bottom: 12px;
  }

  .estimation-section .btn-block {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .estimation-hero h1 {
    letter-spacing: 0.15em;
  }

  .estimation-section .form-column {
    padding: 20px 16px;
  }

  /* Mobile Tab Adjustments - Vertical Stack */
  .tab-navigation {
    flex-direction: column;
    gap: 8px; /* Space between buttons */
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
    align-items: stretch; /* Ensure buttons stretch to full width */
    overflow-x: visible; /* Remove horizontal scroll logic */
  }

  .tab-navigation::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.9rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: var(--light-bg);
    white-space: normal; /* Allow wrapping if absolutely necessary */
    flex: none; /* Reset flex behavior */
  }
  
  .tab-btn.active {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-soft);
  }
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--gray-light);
}

.tab-btn {
  padding: 15px 30px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--gray-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap; /* Prevent wrapping on larger screens */
}

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

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* Category Buttons */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.category-btn {
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-btn:hover,
.category-btn.active {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* Partners Grid */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  align-items: center;
  margin: 40px 0;
}

.partner-logo {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.partner-logo:hover {
  transform: scale(1.05);
}

.partner-logo img {
  max-width: 100%;
  height: auto;
  max-height: 80px;
  object-fit: contain;
}

@media (max-width: 992px) {
  .project-intro {
    font-size: 1rem;
  }

  .service-pyramid {
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  .service-pyramid {
    padding: 24px 16px;
  }

  .pyramid-level {
    width: 100%;
    font-size: 1.1rem;
  }

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

  .project-cta .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* Global responsive refinements */
@media (max-width: 1200px) {
  .page-header h1 {
    font-size: 2.2rem;
  }

  .section-title,
  .section-heading h2 {
    font-size: 2.1rem;
  }

  .content-section {
    padding: 70px 0;
  }

  .listing-section {
    padding: 60px 0 80px;
  }

  .gallery-section {
    padding: 60px 0 90px;
  }
}

@media (max-width: 992px) {
  .container {
    padding: 0 18px;
  }

  .grid-two-cols {
    gap: 32px;
  }

  .hero-grid,
  .house-grid {
    gap: 32px;
  }

  .search-card,
  .form-column,
  .advice-content,
  .property-card,
  .news-card,
  .gallery-slider {
    border-radius: 18px;
  }

  .btn {
    padding: 12px 26px;
    font-size: 0.92rem;
  }

  .properties-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .footer .grid,
  .partners-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 0.96rem;
  }

  .page-header {
    padding: 55px 0 35px;
  }

  .page-header h1 {
    font-size: 1.9rem;
  }

  .page-header p,
  .section-heading p {
    max-width: 540px;
    margin: 0 auto;
  }

  .section-title,
  .section-heading h2 {
    font-size: 1.9rem;
  }

  .content-section,
  .company-photos,
  .house-showcase {
    padding: 60px 0;
  }

  .gallery-section,
  .france-map-section {
    padding: 55px 0 75px;
  }

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

  .footer-links ul {
    padding: 0;
  }

  .footer-links li {
    margin-bottom: 6px;
  }

  .photo-card figcaption {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 16px;
  }

  .page-header h1 {
    font-size: 1.7rem;
  }

  .section-title,
  .section-heading h2 {
    font-size: 1.7rem;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

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

  .gallery-scroll {
    gap: 14px;
    margin: 2px;
  }
}

/* Extra Small Devices (Portrait Phones, less than 480px) */
@media (max-width: 480px) {
  html {
    overflow-x: hidden;
  }

  body {
    font-size: 0.9rem;
  }

  .hero-content h1 {
    font-size: 1.6rem !important;
    line-height: 1.3;
  }

  .hero-tagline {
    font-size: 0.95rem !important;
  }

  .section-title {
    font-size: 1.6rem !important;
    margin: 40px 0 30px;
  }

  .navbar {
    padding: 10px 0;
  }

  .logo img {
    height: 40px;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 40px 0 50px;
  }

  .globe-sphere {
    width: 180px;
    height: 180px;
  }

  .dynamic-text {
    font-size: 0.85rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 10px 20px;
    letter-spacing: 0.3px;
  }

  .hero-cta .btn {
    padding: 12px 24px;
  }

  .property-card,
  .news-card,
  .atout-card {
    border-radius: 12px;
  }

  .search-card,
  .sitemap-card,
  .france-map-card {
    margin: 15px;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .atouts-grid,
  .news-grid,
  .properties-grid {
    gap: 16px;
  }

  .house-grid {
    gap: 30px;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 0.95rem;
  }

  .gallery-slider {
    padding: 24px 18px;
  }

  .gallery-text h2 {
    font-size: 1.5rem;
  }

  .gallery-card {
    min-width: 180px;
  }

  .properties-map {
    height: 220px;
    border-radius: 12px;
  }

  .house-stage {
    width: min(280px, 90vw);
    height: 260px;
  }

  .footer {
    padding: 40px 0 15px;
  }

  .footer .grid {
    gap: 24px;
  }

  .three-col-form-container {
    gap: 20px;
  }

  .form-column {
    padding: 24px 18px;
  }

  .form-column h3 {
    font-size: 1.1rem;
  }

  .pyramid-level {
    font-size: 1rem;
    padding: 16px;
  }

  .pyramid-level i {
    font-size: 1rem;
  }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 30px 0;
  }

  .hero-grid {
    gap: 20px;
  }

  .globe-container {
    display: none;
  }

  .floating-cta {
    bottom: 10px;
    right: 10px;
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* ========== GLOBAL TEXT WRAPPING & OVERFLOW FIXES ========== */
* {
  /* hyphens: auto; - Removed to prevent aggressiv word breaking */
  /* overflow-wrap: break-word; - Removed/Relaxed */
  /* word-break: break-word; - Removed/Relaxed */
  box-sizing: border-box; /* Re-affirm standard box-sizing just in case, though it's usually at the top */
}

/* Responsive fixes for scrolling text */
.dynamic-text {
  max-width: 100%;
  min-height: 46px; 
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center; 
  background: rgba(0, 51, 102, 0.8); /* Ensure dark background */
}

.scrolling-text {
  display: inline-block;
  padding-left: 0;
  white-space: nowrap !important;
  position: absolute;
  left: 0;
  top: 50%;
  width: auto;
  animation: scrollTextMobile 20s linear infinite;
  font-weight: bold;
  font-size: 1rem;
  color: #ffffff;
}

@keyframes scrollTextMobile {
  0% {
    transform: translate(100vw, -50%); /* Start completely off-screen right */
  }
  100% {
    transform: translate(-100%, -50%); /* Move completely off-screen left */
  }
}


@media (max-width: 768px) {
  [class*=\"grid\"],
  [class*=\"scroll\"],
  .hero-grid,
  .house-grid,
  .atouts-grid,
  .news-grid,
  .properties-grid,
  .photo-placeholder-grid,
  .sitemap-grid {
    overflow-x: hidden !important;
  }

  .container {
    max-width: 100vw;
  }
}

@media (max-width: 576px) {
  .globe-sphere {
    width: 160px !important;
    height: 160px !important;
  }

  .house-stage {
    width: min(280px, 90vw) !important;
    height: 220px;
  }

  .house-model {
    transform: scale(0.85);
  }
}
