/* ========================================
   EXPERTISES PAGE (expertises.css)
======================================== */

/* --- HERO SECTION --- */
.expertises-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-color: var(--navy-dark);
  overflow: hidden;
  padding: 80px 0;
}

.expertises-hero .hero-background {
  position: absolute;
  inset: 0;
  background-image: url("../images/placeholders/expertises/expertises-hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.expertises-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 29, 38, 0.95) 0%, rgba(9, 29, 38, 0.82) 50%, rgba(9, 29, 38, 0.40) 100%);
  z-index: 2;
}

.expertises-hero .hero-container,
.expertises-hero .container {
  position: relative;
  z-index: 3;
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.expertises-hero .hero-text { max-width: 1000px; }
.expertises-hero h1 { 
  font-family: var(--font-heading);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin: 0 0 20px 0;
  max-width: none; 
  white-space: normal; 
}

.expertises-hero .hero-description { 
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 30px;
}

.expertises-hero .hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.expertises-hero .hero-actions a[href*="#"] {
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}
.expertises-hero .hero-actions a[href*="#"]:hover { opacity: 0.8; }

/* --- SECTION 2: INTRO / APPROACH SECTION --- */
.expertise-intro-section, 
.service-intro {
  padding: 100px 0;
  background: var(--white);
}

.expertise-intro-grid,
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.intro-heading .section-kicker,
.section-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--terracotta);
  margin-bottom: 12px;
}

.intro-heading h2 {
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.intro-content-body .intro-lead {
  color: var(--navy);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 20px;
}

.intro-content-body p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.intro-content-body .text-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.text-link:hover { color: var(--terracotta); }

/* --- SECTION 4: OVERVIEW CARDS (Alternating Grid) --- */
.expertise-overview {
  padding: 40px 0 110px;
  background: var(--white);
}

.expertise-overview .section-heading { margin-bottom: 60px; }
.expertise-overview .section-heading h2 {
  margin-top: 12px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
}

.expertise-overview-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  margin-bottom: 30px;
  background: #faf9f7;
  overflow: hidden;
  border-radius: 4px;
}

.expertise-overview-card.reverse { direction: rtl; }
.expertise-overview-card.reverse > * { direction: ltr; }

.expertise-overview-image {
  min-height: 520px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e9e6e0;
}

/* Specific Image Mapping */
.travaux-publics-overview-image { background-image: url("../images/placeholders/expertises/travaux-publics.jpg"); }
.eau-forage-solaire-overview-image { background-image: url("../images/placeholders/expertises/eau-forage-solaire.jpg"); }
.agriculture-overview-image { background-image: url("../images/placeholders/expertises/agriculture.jpg"); }
.construction-overview-image { background-image: url("../images/placeholders/expertises/construction.jpg"); }
.piscines-overview-image { background-image: url("../images/placeholders/expertises/piscines.jpg"); }

.expertise-overview-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.expertise-overview-content h3 {
  margin: 12px 0 18px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.15;
}

.expertise-overview-content > p {
  max-width: 540px;
  margin: 0;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.75;
}

.expertise-overview-content ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  max-width: 540px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
}

.expertise-overview-content li { 
  position: relative; 
  padding-left: 16px; 
  color: var(--navy); 
  font-size: 13px;
  font-weight: 500;
}
.expertise-overview-content li::before { content: "—"; position: absolute; left: 0; color: var(--terracotta); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1000px) {
  .expertise-intro-grid,
  .intro-grid { 
    grid-template-columns: 1fr; 
    gap: 40px; 
  }
  .expertise-overview-card, 
  .expertise-overview-card.reverse { 
    grid-template-columns: 1fr; 
    direction: ltr; 
  }
  .expertise-overview-image { min-height: 380px; }
  .expertise-overview-content { padding: 50px 35px; }
}

@media (max-width: 800px) {
  .expertises-hero { min-height: 440px; padding: 60px 0; }
  .expertise-intro-section, 
  .service-intro { padding: 70px 0; }
  .expertise-overview { padding: 30px 0 70px; }
  .expertise-overview-image { min-height: 300px; }
  .expertise-overview-content { padding: 40px 24px; }
  .expertise-overview-content ul { grid-template-columns: 1fr; }
}

/* ==========================================================
   TARGETED FIXES: MOBILE MENU INTERACTIVITY & SECTIONS 2 & 4
========================================================== */

/* Force iOS touch responsiveness and ensure the menu container sits above everything */
@media (max-width: 991px) {
  .site-header {
    position: relative;
    z-index: 9999;
  }
  
  .menu-toggle,
  .hamburger-btn,
  .mobile-menu-btn {
    position: relative;
    z-index: 10000;
    pointer-events: auto !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Ensure the navigation container actually displays when toggled via class */
  .main-nav,
  .nav-menu,
  .nav-container {
    pointer-events: auto;
  }
  
  /* Fallback visibility states for common mobile menu class toggles */
  .main-nav.active,
  .main-nav.open,
  .main-nav.mobile-open,
  .nav-menu.active,
  .nav-menu.open,
  .nav-menu.mobile-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* SECTION 2: Clean Alignment Fix */
.expertise-intro-section, 
.service-intro {
  padding: 80px 0;
  background: var(--white);
  width: 100%;
}

.expertise-intro-grid,
.intro-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (min-width: 992px) {
  .expertise-intro-grid,
  .intro-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
  }
}

/* SECTION 4: Grid Card Flow Fix */
.expertise-overview-card {
  display: flex;
  flex-direction: column;
  background: #faf9f7;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: 6px;
}

@media (min-width: 992px) {
  .expertise-overview-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
  }
  .expertise-overview-card.reverse {
    direction: rtl;
  }
  .expertise-overview-card.reverse > * {
    direction: ltr;
  }
}

.expertise-overview-image {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center;
}

@media (min-width: 992px) {
  .expertise-overview-image {
    height: 100%;
    min-height: 500px;
  }
}

.expertise-overview-content {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 992px) {
  .expertise-overview-content {
    padding: 60px;
  }
}
/* --- SECTION 5: INTEGRATION / BOTTOM BANNER --- */
.expertise-integration {
  padding: 100px 0;
  background-color: var(--navy-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.expertise-integration .complex-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.expertise-integration .section-kicker {
  color: var(--terracotta);
}

.expertise-integration h2 {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  margin: 12px 0 20px 0;
}

.expertise-integration p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.expertise-integration .integration-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.expertise-integration .integration-link:hover {
  opacity: 0.8;
}

.expertise-integration .complex-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.expertise-integration .complex-stat {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.expertise-integration .complex-stat:hover {
  background: rgba(255, 255, 255, 0.07);
}

.expertise-integration .complex-stat span {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--terracotta);
  line-height: 1;
}

.expertise-integration .complex-stat p {
  margin: 0;
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
}

/* --- RESPONSIVE ADJUSTMENTS FOR INTEGRATION SECTION --- */
@media (max-width: 991px) {
  .expertise-integration {
    padding: 70px 0;
  }
  .expertise-integration .complex-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}