/**
 * @file
 * CIF Theme Styles - Replicating citiesinvestmentfacility.org
 */

/* ========== CSS VARIABLES ========== */
:root {
  --cif-orange: #FF6600;
  --cif-orange-dark: #cc5200;
  --cif-blue: #1a3a5c;
  --cif-blue-dark: #0d2840;
  --cif-blue-light: #2c5282;
  --cif-gray: #666666;
  --cif-gray-light: #f5f5f5;
  --cif-gray-border: #e0e0e0;
  --cif-white: #ffffff;
  --cif-black: #333333;
  --cif-font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--cif-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cif-black);
  background: var(--cif-white);
}

/* Prevent horizontal scrolling site-wide */
html, body {
  overflow-x: hidden;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ========== CONTAINER ========== */
.cif-container {
  width: 100%;
  //max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.cif-container--padded {
  padding: 0 20px;
}

/* ========== TOP BAR ========== */
.cif-topbar {
  background: var(--cif-white);
  border-bottom: 1px solid var(--cif-gray-border);
  padding: 8px 0;
}

.cif-topbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cif-topbar-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.cif-topbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cif-orange) !important;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cif-topbar-link:hover {
  color: var(--cif-orange-dark) !important;
}

.cif-topbar-link svg {
  width: 14px;
  height: 14px;
}

/* ========== NAVBAR ========== */
.cif-navbar {
  background: var(--cif-white);
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  /* Respect Drupal admin toolbar height when logged in. */
  top: var(--drupal-displace-offset-top, 0px);
  z-index: 1000;
}

.cif-navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Brand/Logo */
.cif-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.cif-logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.cif-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.cif-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--cif-black);
  letter-spacing: 0.5px;
}

.cif-brand-slogan {
  font-size: 9px;
  color: var(--cif-gray);
  margin-top: 2px;
  font-style: italic;
}

/* Navigation */
.cif-nav-wrapper {
  display: flex;
  align-items: center;
}

.cif-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cif-nav-item {
  position: relative;
}

.cif-nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
}

.cif-nav-orange {
  color: var(--cif-orange) !important;
}

.cif-nav-orange:hover {
  color: var(--cif-orange-dark) !important;
  background: rgba(255, 102, 0, 0.08);
}

.cif-nav-blue {
  color: var(--cif-blue) !important;
}

.cif-nav-blue:hover {
  color: var(--cif-blue-dark) !important;
  background: rgba(26, 58, 92, 0.08);
}

.cif-dropdown-arrow {
  font-size: 12px;
  margin-left: 6px;
  opacity: 0.8;
  position: relative;
  top: 1px;
}

/* Dropdown arrow for Drupal-rendered parent links (no inline span needed) */
.cif-nav-parent::after {
  content: ' ▾';
  font-size: 12px;
  opacity: 0.8;
  position: relative;
  top: 1px;
}

/* Dropdown */
.cif-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--cif-white);
  min-width: 200px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.cif-has-dropdown:hover .cif-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cif-dropdown li a {
  display: block;
  padding: 10px 20px;
  color: var(--cif-blue);
  font-size: 13px;
}

.cif-dropdown li a:hover {
  background: var(--cif-gray-light);
  color: var(--cif-blue-dark);
}

/* Mobile Menu Toggle */
.cif-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.cif-menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--cif-black);
  transition: all 0.3s ease;
}

/* ========== HERO SECTION ========== */
.cif-hero {
  position: relative;
  /* Use viewport-relative height for responsiveness */
  min-height: 90vh;
  height: auto;
  overflow: hidden;
}

.cif-hero-slider {
  position: relative;
  height: 100%;
}

.cif-hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.cif-hero-slide.active {
  opacity: 1;
}

.cif-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(13, 40, 64, 0.85) 0%, rgba(13, 40, 64, 0.55) 45%, rgba(13, 40, 64, 0.8) 100%);
}

.cif-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  /* Keep content vertically centered with flexible height */
  min-height: 90vh;
  height: auto;
  max-width: 700px;
}

/* ========== FULL-BLEED HERO (touch screen edges) ========== */
/* Make hero backgrounds span the full viewport width while keeping
   inner content centered and padded. This targets only hero sections. */
.cif-hero,
.cif-page-hero {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* hero stacking controlled by slide opacity and existing z-index rules */

/* Force slide backgrounds and images to cover area */
.cif-hero .cif-hero-slide {
  min-height: 90vh;
  background-repeat: no-repeat;
  background-size: cover !important;
  background-position: center !important;
}

.cif-hero .cif-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Keep hero inner content centered with comfortable padding */
.cif-hero .cif-hero-content,
.cif-page-hero .cif-page-hero-inner {
  padding-left: 20px;
  padding-right: 20px;
  margin: 0 auto;
  max-width: 1200px;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .cif-hero .cif-hero-content,
  .cif-page-hero .cif-page-hero-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.cif-hero-content h1 {
  color: var(--cif-white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.08;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  border-left: 4px solid rgba(77, 147, 255, 0.85);
  padding-left: 22px;
}

.cif-hero-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 10;
  pointer-events: none;
}

.cif-hero-prev,
.cif-hero-next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--cif-blue);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.cif-hero-prev:hover,
.cif-hero-next:hover {
  background: var(--cif-orange);
  color: var(--cif-white);
}

/* ========== STATISTICS SECTION ========== */
.cif-stats {
  padding: 60px 0;
  background: var(--cif-gray-light);
}

.cif-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
}

/* Responsive: adjust card basis to fit 3, 2, or 1 per row */
@media (max-width: 1200px) {
  .cif-stats-grid {
    /* 3 cards per row */
  }
}

@media (max-width: 768px) {
  .cif-stats-grid {
    /* 2 cards per row */
  }
}

@media (max-width: 480px) {
  .cif-stats-grid {
    /* 1 card per row */
  }
}

.cif-stat-card {
  background: var(--cif-white);
  padding: 36px 32px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(20, 40, 60, 0.06);
  text-align: center;
  flex: 0 0 calc(25% - 22.5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cif-stat-card.is-hidden {
  display: none;
}

.cif-stat-icon {
  font-size: 44px;
  margin-bottom: 18px;
}

.cif-stat-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: inline-block;
}

.cif-stat-card p {
  margin: 0;
  color: var(--cif-gray);
  font-size: 15px;
  line-height: 1.6;
}

.cif-stat-card strong {
  color: var(--cif-blue);
}

/* ========== INTRODUCTION SECTION ========== */
.cif-intro {
  padding: 80px 0;
  background: var(--cif-white);
}

.cif-intro-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: start;
}

.cif-intro-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.cif-section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--cif-black);
  margin-bottom: 30px;
  line-height: 1.3;
}

.cif-section-title.cif-center {
  text-align: center;
}

.cif-highlight {
  color: var(--cif-orange);
}

.cif-intro-text {
  max-width: 900px;
}

@media (max-width: 768px) {
  .cif-intro-body {
    grid-template-columns: 1fr;
  }
}

.cif-intro-text p {
  margin-bottom: 20px;
  color: var(--cif-gray);
  line-height: 1.8;
}

.cif-intro-text ul {
  margin: 20px 0;
  /* Important: prevent double bullets caused by the generic .cif-page-content ul
   * rule below (disc) + our custom li::before bullet. */
  padding-left: 0 !important;
  list-style: none !important;
}

.cif-intro-text li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--cif-gray);
  line-height: 1.7;
  list-style: none !important;
}

.cif-intro-text li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--cif-orange);
  font-weight: bold;
}

/* ========== COMPONENTS SECTION ========== */
.cif-components {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--cif-gray-light) 0%, #e8e8e8 100%);
}

.cif-section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: var(--cif-gray);
  font-size: 16px;
  line-height: 1.7;
}

.cif-components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.cif-component-card {
  background: var(--cif-white);
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cif-component-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.cif-component-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cif-icon-portal {
  background: linear-gradient(135deg, var(--cif-blue) 0%, var(--cif-blue-light) 100%);
}

.cif-icon-portal::after {
  content: "🌐";
  font-size: 35px;
}

.cif-icon-advisory {
  background: linear-gradient(135deg, var(--cif-orange) 0%, #ff9933 100%);
}

.cif-icon-advisory::after {
  content: "💡";
  font-size: 35px;
}

.cif-icon-vehicles {
  background: linear-gradient(135deg, #2c5282 0%, #4299e1 100%);
}

.cif-icon-vehicles::after {
  content: "🚀";
  font-size: 35px;
}

.cif-component-card h3 {
  font-size: 22px;
  color: var(--cif-blue);
  margin-bottom: 15px;
}

.cif-component-card p {
  color: var(--cif-gray);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 25px;
}

/* Buttons */
.cif-btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.cif-btn-orange {
  background: var(--cif-orange);
  color: var(--cif-white) !important;
}

.cif-btn-orange:hover {
  background: var(--cif-orange-dark);
  transform: translateY(-2px);
}

.cif-btn-blue {
  background: var(--cif-blue);
  color: var(--cif-white) !important;
}

.cif-btn-blue:hover {
  background: var(--cif-blue-dark);
  transform: translateY(-2px);
}

.cif-btn-large {
  padding: 16px 50px;
  font-size: 16px;
}

/* ========== HOW TO APPLY SECTION ========== */
.cif-apply {
  padding: 80px 0;
  background: var(--cif-white);
  text-align: center;
}

.cif-apply-content {
  max-width: 700px;
  margin: 0 auto;
}

.cif-apply-content p {
  color: var(--cif-gray);
  margin-bottom: 30px;
  line-height: 1.8;
}

/* Home page "How To Apply" block (node 6) */
.cif-how-to-apply {
  padding: 80px 0 110px;
  background: var(--cif-white);
  text-align: center;
}

.cif-how-to-apply .cif-apply-content {
  max-width: 760px;
  margin: 0 auto;
}

.cif-how-to-apply h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--cif-black);
}

.cif-how-to-apply p {
  color: var(--cif-gray);
  margin: 0 0 30px;
  line-height: 1.8;
}

/* ========== DISCLAIMER SECTION ========== */
.cif-disclaimer {
  padding: 50px 0;
  background: var(--cif-gray-light);
  border-top: 1px solid var(--cif-gray-border);
}

.cif-disclaimer h3 {
  font-size: 18px;
  color: var(--cif-blue);
  margin-bottom: 15px;
}

.cif-disclaimer p {
  font-size: 13px;
  color: var(--cif-gray);
  line-height: 1.7;
  margin-bottom: 15px;
}

/* ========== FOOTER ========== */
.cif-footer {
  position: relative;
  background: #0d2840;
  overflow: hidden;
}

/* Subtle background pattern */
.cif-footer::before,
.cif-footer::after {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 85% 35%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
  pointer-events: none;
}

.cif-footer-main {
  position: relative;
  z-index: 1;
  padding: 70px 0 45px;
}

.cif-footer-main-inner {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cif-footer-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cif-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.cif-footer-logo {
  width: 140px;
  height: auto;
  display: block;
}

.cif-footer-social {
  display: flex;
  gap: 16px;
}

.cif-social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

.cif-social-link:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

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

.cif-footer-right h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}

.cif-footer-right p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 14px;
}

.cif-footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 0;
}

.cif-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cif-footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.cif-footer-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
}

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

.cif-footer-copy {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .cif-footer-main-inner {
    grid-template-columns: 1fr;
    gap: 35px;
  }
}

/* ========== PAGE CONTENT (Non-front pages) ========== */
.cif-page-content {
  //padding: 50px 0;
  min-height: 60vh;
}

.cif-page-content .cif-container {
  padding: 0 20px;
}

/* Pages rendered outside .cif-page-content (e.g. newsletter pages) still
   need horizontal padding inside their hero and section containers. */
.cif-page-hero .cif-container,
.cif-acf-section .cif-container {
  padding-left: 20px;
  padding-right: 20px;
}

#block-cif-theme-content {
  padding: 0 !important;
}

/* Front page sections should be full-bleed (no extra padding wrapper). */
body.path-frontpage .cif-page-content {
  padding: 0;
}

/* ========== PAGE HERO (ACF page_header) ========== */
.cif-page-hero {
  position: relative;
  min-height: 280px;
  padding: 80px 0;
  background-size: cover;
  background-position: center;
  background-color: var(--cif-blue); /* Fallback if no image */
  color: var(--cif-white);
}

.cif-page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 58, 92, 0.75) 0%, rgba(26, 58, 92, 0.55) 50%, rgba(26, 58, 92, 0.7) 100%);
}

.cif-page-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
}

.cif-page-hero-title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .cif-page-hero {
    min-height: 200px;
    padding: 60px 0;
  }
  
  .cif-page-hero-title {
    font-size: 28px;
  }
}

/* ========== ACF FLEXIBLE CONTENT (basic) ========== */
.cif-acf-section {
  padding: 60px 0;
}

.cif-acf-cta_link {
  text-align: center;
}

.cif-acf-cta_link .cif-button {
  display: inline-block;
}

/* ========== LAYOUT VARIANTS ========== */
/* Left Image, Right Text */
.cif-acf-lirt > .cif-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: start;
}

.cif-acf-lirt .cif-acf-title {
  grid-column: 1 / -1;
}

/* Left Text, Right Image */
.cif-acf-ltri > .cif-container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.cif-acf-ltri .cif-acf-title {
  grid-column: 1 / -1;
}

/* Left Text, Right Text (two column) */
.cif-acf-ltrt > .cif-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.cif-acf-ltrt .cif-acf-title {
  grid-column: 1 / -1;
}

/* Make text divs sit properly in grid */
.cif-acf-ltrt .cif-acf-text {
  margin: 0;
  grid-column: auto;
}

.cif-acf-ltrt .cif-acf-text:first-of-type {
  grid-column: 1;
}

.cif-acf-ltrt .cif-acf-text:nth-of-type(3) {
  grid-column: 2;
}.cif-acf-ltrt .cif-acf-title {
  grid-column: 1 / -1;
}

.cif-acf-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  align-items: start;
}

.cif-acf-image {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* Keep Vision/Mission images (two_columns layout) nicely sized like the reference site. */
.cif-acf-two_columns .cif-acf-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.cif-acf-title {
  color: var(--cif-blue);
  margin: 0 0 15px;
  font-size: 26px;
}

.cif-acf-text {
  color: var(--cif-gray);
}

.cif-acf-cta {
  margin-top: 20px;
}

.cif-acf-carousel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

/* ========== BOX CAROUSEL (CIV How it Works) ========== */
.cif-box-carousel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: start;
}

.cif-box-carousel-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
}

.cif-box-carousel-text {
  color: var(--cif-gray);
  line-height: 1.8;
}

.cif-box-carousel-right {
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.cif-box-carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cif-gray-border);
  background: #f8f9fb;
}

.cif-box-carousel-prev,
.cif-box-carousel-next {
  background: none;
  border: none;
  color: var(--cif-blue);
  font-weight: 600;
  cursor: pointer;
}

.cif-box-carousel-prev:disabled,
.cif-box-carousel-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cif-box-carousel-indicator {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--cif-gray);
}

.cif-box-carousel-items {
  padding: 18px 20px 22px;
}

.cif-box-carousel-item {
  display: none;
}

.cif-box-carousel-item:first-child {
  display: block;
}

.cif-box-carousel-item h4 {
  margin: 0 0 10px;
  color: var(--cif-blue);
}

/* ========== JOIN BUTTON / CTA SECTION ========== */
.cif-acf-section.cif-acf-cta_link {
  background: linear-gradient(135deg, #0066cc 0%, #003d99 100%);
  padding: 40px 0;
  text-align: center;
}

.cif-cta-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 25px 35px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.cif-cta-button:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cif-cta-button svg {
  width: 28px;
  height: 28px;
  color: white;
  stroke-width: 2.5;
}

.cif-join-title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: white;
  margin: 0;
}

.cif-join-subtitle {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

@media (max-width: 768px) {
  .cif-acf-section.cif-acf-cta_link {
    padding: 30px 0;
  }

  .cif-cta-button {
    padding: 20px 28px;
    gap: 6px;
  }

  .cif-join-title {
    font-size: 16px;
  }

  .cif-join-subtitle {
    font-size: 13px;
  }

  .cif-cta-button svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .cif-acf-section.cif-acf-cta_link {
    padding: 20px 0;
  }

  .cif-cta-button {
    padding: 16px 22px;
    gap: 5px;
  }

  .cif-join-title {
    font-size: 14px;
  }

  .cif-join-subtitle {
    font-size: 12px;
  }

  .cif-cta-button svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 900px) {
  .cif-box-carousel {
    grid-template-columns: 1fr;
  }
}

/* ========== RESPONSIVE LAYOUT VARIANTS ========== */
@media (max-width: 768px) {
  /* Stack image and text vertically on mobile */
  .cif-acf-lirt > .cif-container,
  .cif-acf-ltri > .cif-container,
  .cif-acf-ltrt > .cif-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Stack carousel sections vertically */
  .cif-box-carousel {
    grid-template-columns: 1fr;
  }

  /* Reduce padding on smaller screens */
  .cif-acf-section {
    padding: 40px 0;
  }

  /* Adjust image sizes on mobile */
  .cif-acf-image {
    max-height: 250px;
  }

  /* Stack carousel controls vertically if needed */
  .cif-box-carousel-controls {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .cif-acf-section {
    padding: 30px 0;
  }

  .cif-box-carousel-items {
    padding: 15px 16px 18px;
  }

  .cif-box-carousel-item h4 {
    font-size: 16px;
  }

  .cif-box-carousel-prev,
  .cif-box-carousel-next {
    font-size: 14px;
    padding: 6px 12px;
  }
}

.cif-acf-carousel-item {
  background: var(--cif-white);
  border: 1px solid var(--cif-gray-border);
  border-radius: 6px;
  padding: 18px 20px;
  color: var(--cif-gray);
}

@media (max-width: 900px) {
  .cif-acf-carousel {
    grid-template-columns: 1fr;
  }
}

/* Enhanced (JS) slider for horizontal_text_carousel. */
.cif-acf-carousel.cif-acf-carousel--enhanced {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.cif-acf-carousel--enhanced .cif-acf-carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.cif-acf-carousel--enhanced .cif-acf-carousel-item {
  flex: 0 0 100%;
  border-radius: 10px;
  padding: 28px 30px;
  line-height: 1.8;
}

.cif-acf-carousel--enhanced .cif-acf-carousel-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
  z-index: 2;
}

.cif-acf-carousel--enhanced .cif-acf-carousel-prev,
.cif-acf-carousel--enhanced .cif-acf-carousel-next {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(26, 58, 92, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--cif-blue);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cif-acf-carousel--enhanced .cif-acf-carousel-prev:hover,
.cif-acf-carousel--enhanced .cif-acf-carousel-next:hover {
  border-color: rgba(26, 58, 92, 0.38);
  background: #ffffff;
}

.cif-acf-carousel--enhanced .cif-acf-carousel-indicator {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(13, 40, 64, 0.7);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.cif-acf-image-divider img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .cif-acf-two-col {
    grid-template-columns: 1fr;
  }
}

/* About > General uses the standard two-column layout (no vertical divider) */

/* ========== TIMELINE (About > General) ========== */
.cif-timeline {
  padding: 70px 0;
  background: var(--cif-white);
}

.cif-timeline-list {
  --cif-timeline-year-col: 240px;
  --cif-timeline-line-x: 270px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  padding: 10px 0;
}

.cif-timeline-list::before {
  content: "";
  position: absolute;
  left: var(--cif-timeline-line-x);
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(26, 58, 92, 0.2);
}

.cif-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--cif-timeline-year-col) 1fr;
  column-gap: 70px;
  row-gap: 10px;
  align-items: start;
}

.cif-timeline-year {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--cif-blue);
  margin: 0;
  padding-top: 4px;
}

.cif-timeline-item::before {
  content: "";
  position: absolute;
  left: var(--cif-timeline-line-x);
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--cif-white);
  border: 3px solid var(--cif-orange);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.cif-timeline-image {
  grid-column: 2;
}

.cif-timeline-desc {
  grid-column: 2;
  background: var(--cif-white);
  border: 1px solid var(--cif-gray-border);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 16px 18px 18px;
  color: var(--cif-gray);
}

.cif-timeline-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--cif-gray-border);
  border-bottom: 0;
  margin: 0;
  display: block;
}

@media (max-width: 768px) {
  .cif-timeline-list::before {
    display: none;
  }

  .cif-timeline-item {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .cif-timeline-item::before {
    display: none;
  }

  .cif-timeline-year {
    grid-column: 1;
    grid-row: auto;
    font-size: 20px;
  }

  .cif-timeline-image,
  .cif-timeline-desc {
    grid-column: 1;
  }
}

.cif-page-content h1 {
  color: var(--cif-blue);
  margin-bottom: 30px;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 1024px) {
  .cif-nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .cif-components-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .cif-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cif-menu-toggle {
    display: flex;
  }
  
  .cif-nav-wrapper {
    position: fixed;
    top: var(--drupal-displace-offset-top, 0px);
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--cif-white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    padding: 80px 20px 30px;
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }
  
  .cif-nav-wrapper.active {
    right: 0;
  }
  
  .cif-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  
  .cif-nav-item {
    border-bottom: 1px solid var(--cif-gray-border);
  }
  
  .cif-nav-link {
    padding: 15px 10px;
    font-size: 15px;
  }
  
  .cif-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 15px;
    display: none;
  }
  
  .cif-has-dropdown.active .cif-dropdown {
    display: block;
  }
  
  .cif-hero {
    height: 350px;
  }
  
  .cif-hero-content {
    height: 350px;
  }
  
  .cif-hero-content h1 {
    font-size: 28px;
    border-left-width: 3px;
    padding-left: 16px;
  }
  
  .cif-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .cif-section-title {
    font-size: 26px;
  }
  
  .cif-topbar-links {
    gap: 15px;
  }
  
  .cif-topbar-link {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .cif-brand-name {
    font-size: 12px;
  }
  
  .cif-logo {
    width: 45px;
    height: 45px;
  }
  
  .cif-hero-content h1 {
    font-size: 24px;
    border-left-width: 3px;
    padding-left: 14px;
  }
  
  .cif-component-card {
    padding: 30px 20px;
  }
}

/* ========== UTILITY CLASSES ========== */
.cif-hidden {
  display: none !important;
}

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

/* ========== ADMIN TOOLBAR OFFSET ========== */
body.toolbar-fixed .cif-navbar {
  top: var(--drupal-displace-offset-top, 0px);
}

body.toolbar-fixed.toolbar-tray-open .cif-navbar {
  top: var(--drupal-displace-offset-top, 0px);
}

/* ========== FIX TOOLBAR TRAY OVERLAY ========== */
/* Hide any overlay or backdrop that appears with toolbar */
.toolbar-tray-open {
  overflow: visible !important;
}

/* Ensure no element blocks interaction */
body::after,
body::before {
  display: none !important;
}

/* Hide off-canvas backdrops and overlays */
.off-canvas-overlay,
.dialog-off-canvas-overlay,
[data-drupal-offcanvas-overlay],
.ot-overlay-container,
.ot-overlay {
  display: none !important;
  pointer-events: none !important;
}

/* Make sure the page is fully clickable */
main,
.region,
.page-wrapper {
  pointer-events: auto !important;
  position: relative;
  z-index: 1 !important;
}

/* ========== HERO LINK (clickable slide title) ========== */
.cif-hero-content .cif-hero-link {
  color: var(--cif-white);
}

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

/* ========== WP/Understrap UTILITY CLASS SUPPORT (minimal) ========== */
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.text-white { color: #ffffff !important; }
.mt-5 { margin-top: 3rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.btn {
  display: inline-block;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}

.btn-footer-blue {
  background: var(--cif-blue);
}

.btn-footer-blue:hover {
  background: var(--cif-blue-dark);
}

.lead {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--cif-gray);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table td, table th {
  border: 1px solid var(--cif-gray-border);
  padding: 10px 12px;
  vertical-align: top;
}

table thead th {
  background: var(--cif-gray-light);
  color: var(--cif-blue);
}

/* Tables in migrated WP content are often used as "boxed bullet" lists on the
 * reference site. Restyle them to match the grey boxed pattern. */
.cif-acf-text table {
  border-collapse: separate;
  border-spacing: 0;
}

.cif-acf-text table td,
.cif-acf-text table th {
  border: none;
}

.cif-acf-text table thead th {
  background: var(--cif-blue);
  color: #ffffff;
  padding: 16px 18px;
  text-align: center;
}

.cif-acf-text table tbody td {
  padding: 18px 22px;
  border-left: 4px solid var(--cif-blue);
  background: #eef3f8;
}

.cif-acf-text table tbody tr:nth-child(even) td {
  background: #f6f9fc;
}

.cif-acf-text table tbody tr + tr td {
  border-top: 2px solid #ffffff;
}

/* Override Drupal default styles */
.cif-main a {
  color: var(--cif-orange);
}

.cif-main a:hover {
  color: var(--cif-orange-dark);
}

/* ========== ACTIVE MENU HIGHLIGHTING ========== */
.cif-nav-link.cif-nav-active {
  color: var(--cif-orange) !important;
}

.cif-dropdown a.cif-nav-active {
  color: var(--cif-orange) !important;
  background: rgba(255, 102, 0, 0.08);
}

/* Default color for parent nav links */
.cif-nav-link.cif-nav-parent {
  color: var(--cif-blue) !important;
}

.cif-nav-link.cif-nav-parent:hover,
.cif-nav-link.cif-nav-parent.cif-nav-active {
  color: var(--cif-orange) !important;
}

/* ========== GREY BOX STYLING (for Governance, How it Works, Get Involved, How to Apply) ========== */
.cif-grey-boxes {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cif-grey-box {
  padding: 20px 25px;
  border-left: 4px solid var(--cif-blue);
  background: linear-gradient(90deg, #f0f4f8 0%, #f8fafc 100%);
  margin-bottom: 2px;
  color: var(--cif-gray);
  line-height: 1.7;
  font-size: 15px;
}

.cif-grey-box:nth-child(odd) {
  background: linear-gradient(90deg, #e8eef4 0%, #f0f4f8 100%);
}

.cif-grey-box:nth-child(even) {
  background: linear-gradient(90deg, #f5f8fb 0%, #fafcfd 100%);
}

.cif-grey-box p {
  margin: 0;
}

.cif-grey-box-header {
  background: var(--cif-blue);
  color: white;
  padding: 15px 25px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
}

/* Two-column grey boxes */
.cif-grey-boxes-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .cif-grey-boxes-two-col {
    grid-template-columns: 1fr;
  }
}

.cif-grey-boxes-two-col .cif-grey-boxes-column {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cif-grey-boxes-two-col .cif-grey-boxes-column h3 {
  color: var(--cif-blue);
  font-size: 18px;
  margin-bottom: 15px;
}

/* ========== BLUE SEPARATOR LINE ========== */
.cif-blue-separator {
  width: 100%;
  height: 3px;
  background: var(--cif-blue);
  margin: 40px 0;
}

.cif-blue-separator-thin {
  width: 100%;
  height: 2px;
  background: var(--cif-blue);
  margin: 30px 0;
}

/* ========== BROCHURE DOWNLOAD SECTION ========== */
.cif-brochure-section {
  padding: 40px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
}

.cif-brochure-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(26, 58, 92, 0.05) 100%);
}

.cif-brochure-title {
  font-size: 24px;
  font-style: italic;
  color: var(--cif-blue);
  margin-bottom: 25px;
}

.cif-brochure-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cif-brochure-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--cif-blue);
  color: white !important;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.cif-brochure-btn:hover {
  background: var(--cif-blue-dark);
  transform: translateY(-2px);
  color: white !important;
}

/* ========== PILLAR CARDS (Structure page) ========== */
.cif-pillars-section {
  padding: 60px 0;
}

.cif-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 900px) {
  .cif-pillars-grid {
    grid-template-columns: 1fr;
  }
}

.cif-pillar-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px 25px;
  text-align: center;
  transition: transform 0.3s ease;
}

.cif-pillar-card:hover {
  transform: translateY(-5px);
}

.cif-pillar-logo {
  margin-bottom: 20px;
}

.cif-pillar-logo img {
  max-width: 180px;
  height: auto;
}

.cif-pillar-text {
  color: var(--cif-gray);
  font-size: 14px;
  line-height: 1.7;
  text-align: justify;
}

.cif-pillar-partner {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--cif-gray-border);
}

.cif-pillar-partner img {
  max-width: 100px;
  height: auto;
}

/* ========== STRUCTURE PAGE LOGO ========== */
.cif-structure-logo {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 30px;
}

.cif-structure-logo img {
  max-width: 150px;
  height: auto;
}

.cif-structure-logo .cif-structure-text {
  flex: 1;
}

.cif-structure-logo .cif-structure-text h2 {
  color: var(--cif-blue);
  margin: 0 0 15px;
  font-size: 28px;
}

/* Structure page header in node content uses .cif-structure-header + img.cif-structure-logo */
.cif-structure-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

img.cif-structure-logo {
  display: block;
  width: 100px;
  max-width: 100px !important;
  height: auto;
  margin: 0 !important;
}

/* ========== IMAGE SIZING FIXES ========== */
.cif-acf-image,
.cif-page-content img {
  max-width: 100%;
  height: auto;
}

/* Default image sizing for content pages (prevents huge, edge-to-edge images). */
.cif-page-content img.cif-acf-image {
  max-width: 720px;
}

/* Limit large images */
.cif-page-content img[src*="EMIF"],
.cif-page-content img[src*="emif"] {
  max-width: 140px !important;
}

/* Center images by default */
.cif-acf-section img,
.cif-page-content .cif-acf-section img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Limit page content images for better sizing */
.cif-page-content .cif-acf-section img:not(.cif-pillar-logo img):not(.cif-structure-logo img) {
  max-width: 800px;
}

/* ========== SPACE AFTER HOW TO APPLY ========== */
.cif-apply-section,
section.cif-acf-section:last-child {
  margin-bottom: 60px;
}

body.path-frontpage .cif-page-content {
  padding-bottom: 60px;
}

body.path-frontpage section:last-of-type {
  margin-bottom: 60px;
}

/* ========== CIF SECRETARIAT PAGE ========== */
.cif-secretariat-section {
  padding: 40px 0;
}

.cif-secretariat-intro {
  text-align: center;
  margin-bottom: 40px;
}

.cif-secretariat-intro h2 {
  color: var(--cif-blue);
  font-size: 32px;
  margin-bottom: 15px;
}

.cif-secretariat-intro p {
  color: var(--cif-gray);
  font-size: 16px;
}

.cif-secretariat-member {
  background: var(--cif-blue);
  color: white;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
}

.cif-secretariat-member-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cif-secretariat-member-header h3 {
  color: white;
  font-size: 22px;
  margin: 0 0 5px;
}

.cif-secretariat-member-header .cif-role {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.cif-secretariat-member-content {
  padding: 25px 30px;
  background: rgba(255, 255, 255, 0.05);
}

.cif-secretariat-member-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 15px;
}

.cif-secretariat-member-content p:last-child {
  margin-bottom: 0;
}

/* ========== SUBMIT PROJECT BUTTON ========== */
.cif-submit-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--cif-blue);
  color: white !important;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 5px;
  transition: all 0.3s ease;
  text-decoration: none !important;
  margin-top: 30px;
}

.cif-submit-project-btn:hover {
  background: var(--cif-blue-dark);
  transform: translateY(-2px);
  color: white !important;
}

/* ========== STATS SCROLLER ========== */
.cif-stats-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.cif-stats-prev,
.cif-stats-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--cif-gray-border);
  background: white;
  color: var(--cif-blue);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cif-stats-prev:hover,
.cif-stats-next:hover {
  border-color: var(--cif-blue);
  background: var(--cif-blue);
  color: white;
}

.cif-stats-prev:disabled,
.cif-stats-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cif-stats-indicator {
  font-size: 14px;
  color: var(--cif-gray);
  font-weight: 500;
}

.cif-stats-scroller {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

/* ========== DOT INDICATOR FOR TIMELINE ========== */
.cif-dot-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.cif-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cif-gray-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cif-dot.active {
  background: var(--cif-orange);
}

/* ========== COPYRIGHT CAPTION FOR IMAGES ========== */
.cif-image-caption {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--cif-gray);
  font-style: italic;
  margin-top: 5px;
  padding-right: 5px;
}

.cif-image-with-caption {
  display: inline-block;
  max-width: 100%;
}

.cif-image-with-caption img {
  display: block;
  max-width: 100%;
}

/* ========== CAROUSEL FONT CONSISTENCY ========== */
.cif-acf-carousel-item,
.cif-acf-carousel-item * {
  font-family: var(--cif-font) !important;
  font-size: 15px;
  line-height: 1.8;
}

.cif-acf-carousel-item p,
.cif-acf-carousel-item span,
.cif-acf-carousel-item em,
.cif-acf-carousel-item strong {
  font-family: var(--cif-font) !important;
}

/* ========== CAROUSEL BORDER FIX ========== */
.cif-acf-carousel--enhanced {
  border: 2px solid var(--cif-gray-border);
}

/* ========== TWITTER/X ICON FIX ========== */
.cif-social-link svg {
  width: 18px;
  height: 18px;
}

.cif-social-link[aria-label*="Twitter"] svg,
.cif-social-link[aria-label*="X"] svg {
  width: 16px;
  height: 16px;
}

/* ========== BULLET LIST STYLING ========== */
.cif-bullet-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.cif-bullet-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  color: var(--cif-gray);
  line-height: 1.7;
}

.cif-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--cif-orange);
  font-size: 18px;
  font-weight: bold;
}

/* Default bullet styling for content lists */
.cif-acf-text ul,
.cif-page-content ul:not(.cif-nav):not(.cif-dropdown):not(.cif-footer-links) {
  list-style: disc;
  padding-left: 25px;
  margin: 15px 0;
}

.cif-acf-text ul li,
.cif-page-content ul:not(.cif-nav):not(.cif-dropdown):not(.cif-footer-links) li {
  margin-bottom: 8px;
  color: var(--cif-gray);
  line-height: 1.7;
}

/* ========== COMPONENTS SECTION (Homepage) ========== */
.cif-components-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--cif-gray-light) 0%, #e8e8e8 100%);
}

.cif-components-section .cif-section-title {
  text-align: center;
  margin-bottom: 20px;
}

.cif-components-section .cif-section-subtitle {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
}

/* Component card with logo images */
.cif-component-card .cif-component-logo {
  margin-bottom: 20px;
}

.cif-component-card .cif-component-logo img {
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.cif-component-card .cif-component-text {
  color: var(--cif-gray);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;
}

.cif-component-card .cif-component-link a {
  color: var(--cif-orange);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

.cif-component-card .cif-component-link a:hover {
  color: var(--cif-orange-dark);
}

/* ========== MEDIA CENTRE ========== */
.cif-media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.cif-media-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--cif-gray-border);
  background: #ffffff;
  color: var(--cif-blue);
  font-weight: 600;
  font-size: 13px;
}

.cif-media-tab:hover {
  border-color: rgba(26, 58, 92, 0.35);
  color: var(--cif-blue-dark);
}

.cif-media-tab.is-active {
  background: var(--cif-blue);
  border-color: var(--cif-blue);
  color: #ffffff;
}

.cif-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.cif-media-card {
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}

.cif-media-card-image {
  display: block;
  background: #eef3f8;
}

.cif-media-card-image img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.cif-media-card-body {
  padding: 18px 20px;
  min-width: 0;
}

.cif-media-card-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.cif-media-card-title a {
  color: var(--cif-blue);
}

.cif-media-card-title a:hover {
  color: var(--cif-orange);
}

.cif-media-card-excerpt {
  margin: 10px 0 0;
  color: var(--cif-gray);
  font-size: 14px;
  line-height: 1.6;
}

.cif-media-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.cif-date {
  display: inline-block;
  color: var(--cif-gray);
  font-size: 13px;
}

.cif-more-link {
  text-align: center;
  margin-top: 24px;
}

.cif-newsletter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cif-newsletter-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cif-newsletter-card img {
  width: 100%;
  height: auto;
  display: block;
}

.cif-newsletter-card h4 {
  margin: 12px 14px 16px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--cif-blue);
}

.cif-publication-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 10px;
  padding: 20px;
  margin-top: 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cif-publication-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.cif-publication-actions {
  margin-top: 12px;
}

.cif-archive-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cif-archive-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.cif-archive-card--no-image {
  background: #f3f6f9;
}

.cif-archive-card--no-image::before {
  content: '';
  display: block;
  height: 200px;
  background: linear-gradient(135deg, #e7edf3, #f7f9fb);
}

.cif-archive-card h4 {
  margin: 12px 14px 16px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--cif-blue);
}

/* ========== PUBLICATION LISTING ========== */
.cif-publications-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.cif-publication-card-image {
  flex-shrink: 0;
  width: 220px;
}

.cif-publication-card-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.cif-publication-card-body {
  flex: 1;
}

.cif-publication-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cif-blue);
  margin: 0 0 10px;
}

.cif-publication-card-desc {
  font-size: 14px;
  color: var(--cif-gray);
  line-height: 1.65;
  margin: 10px 0;
}

.cif-publication-card-actions {
  margin-top: 14px;
}

.cif-publication-card {
  display: flex;
  flex-direction: row;
  gap: 22px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ========== MEDIA CENTRE LANDING ========== */
.cif-mc-section {
  padding: 50px 0;
}

.cif-mc-section--alt {
  background: #f3f6f9;
}

.cif-mc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.cif-mc-section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--cif-blue);
  margin: 0;
}

.cif-publication-featured {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--cif-gray-border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cif-publication-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.cif-publication-featured-body h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--cif-blue);
  margin: 0 0 12px;
}

.cif-publication-featured-body p {
  color: var(--cif-gray);
  font-size: 15px;
  line-height: 1.65;
}

.cif-publication-featured-actions {
  margin-top: 16px;
}

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

  .cif-media-card {
    grid-template-columns: 1fr;
  }

  .cif-media-card-image img {
    max-height: 260px;
  }

  .cif-newsletter-grid {
    grid-template-columns: 1fr;
  }

  .cif-publication-card {
    flex-direction: column;
  }

  .cif-publication-card-image {
    width: 100%;
  }

  .cif-publication-featured {
    grid-template-columns: 1fr;
  }

  .cif-mc-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ========== HOMEPAGE SECTIONS ========== */
.cif-hero-intro {
  background: linear-gradient(135deg, var(--cif-blue) 0%, var(--cif-blue-dark) 100%);
  color: var(--cif-white);
  padding: 60px 20px;
  margin-bottom: 60px;
  border-radius: 4px;
}

.cif-hero-intro h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  max-width: 900px;
}

.cif-hero-intro p {
  font-size: 16px;
  line-height: 1.8;
  max-width: 900px;
  margin-bottom: 15px;
}

.cif-hero-intro ul {
  list-style: disc;
  padding-left: 20px;
  max-width: 900px;
}

.cif-hero-intro li {
  margin-bottom: 10px;
}

/* ========== COMPONENTS SECTION ========== */
.cif-components-section {
  margin-bottom: 80px;
}

.cif-components-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--cif-blue);
  margin-bottom: 50px;
  text-align: center;
}

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

.cif-component-card {
  background: var(--cif-white);
  border: 1px solid var(--cif-gray-border);
  padding: 30px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cif-component-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.cif-component-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--cif-blue);
  margin: 0 0 15px 0;
}

.cif-component-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cif-gray);
  flex-grow: 1;
  margin-bottom: 20px;
}

.cif-component-card .cif-button {
  align-self: flex-start;
}

/* ========== APPLY SECTION ========== */
.cif-apply-section {
  background: var(--cif-gray-light);
  padding: 60px 20px;
  border-radius: 4px;
  text-align: center;
}

.cif-apply-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--cif-blue);
  margin-bottom: 20px;
}

.cif-apply-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--cif-gray);
  max-width: 700px;
  margin: 0 auto 30px;
}

.cif-apply-section .cif-button {
  margin: 0 10px;
  display: inline-block;
}

/* ========== BUTTONS ========== */
.cif-button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--cif-orange);
  color: var(--cif-white);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 2px solid var(--cif-orange);
}

.cif-button:hover {
  background: var(--cif-orange-dark);
  border-color: var(--cif-orange-dark);
  color: var(--cif-white);
}

.cif-button-primary {
  background: var(--cif-blue);
  border-color: var(--cif-blue);
}

.cif-button-primary:hover {
  background: var(--cif-blue-dark);
  border-color: var(--cif-blue-dark);
}

/* ========== ACTIVE NAVIGATION LINK ========== */
.cif-nav-link.cif-nav-active {
  color: var(--cif-orange) !important;
  font-weight: 700;
  background: rgba(255, 102, 0, 0.1);
}

.cif-dropdown a.cif-nav-active {
  color: var(--cif-orange) !important;
  font-weight: 700;
  background: rgba(255, 102, 0, 0.08);
}

/* ========== BREADCRUMB STYLING ========== */
.breadcrumb {
  display: flex;
  list-style: none;
  padding: 15px 0;
  font-size: 13px;
  margin-bottom: 30px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: " / ";
  margin: 0 8px;
  color: var(--cif-gray);
}

.breadcrumb a {
  color: var(--cif-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--cif-orange);
  text-decoration: underline;
}

.breadcrumb .is-active {
  color: var(--cif-gray);
  font-weight: 600;
}

/* ========== ACF CAROUSEL ========== */
.cif-acf-carousel {
  position: relative;
  margin: 20px 0;
}

.cif-acf-carousel--enhanced {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.cif-acf-carousel-track {
  display: flex;
  overflow: hidden;
  flex: 1;
  transition: transform 0.4s ease;
}

.cif-acf-carousel-item {
  flex: 0 0 100%;
  padding: 20px;
  background: var(--cif-white);
  border: 1px solid var(--cif-gray-border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.cif-acf-carousel-item h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--cif-blue);
  margin: 0 0 15px 0;
}

.cif-acf-carousel-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cif-gray);
  margin: 0;
  flex-grow: 1;
}

.cif-acf-carousel-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.cif-acf-carousel-prev,
.cif-acf-carousel-next {
  width: 40px;
  height: 40px;
  border: 1px solid var(--cif-gray-border);
  background: var(--cif-white);
  color: var(--cif-blue);
  font-size: 24px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  line-height: 1;
}

.cif-acf-carousel-prev:hover:not(:disabled),
.cif-acf-carousel-next:hover:not(:disabled) {
  background: var(--cif-orange);
  color: var(--cif-white);
  border-color: var(--cif-orange);
}

.cif-acf-carousel-prev:disabled,
.cif-acf-carousel-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cif-acf-carousel-indicator {
  text-align: center;
  font-size: 12px;
  color: var(--cif-gray);
  font-weight: 500;
  white-space: nowrap;
}

/* ========== MEDIA CENTRE STYLING ========== */
.cif-media-section {
  margin-bottom: 60px;
}

.cif-media-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--cif-blue);
  margin-bottom: 30px;
}

.cif-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.cif-media-card {
  background: var(--cif-white);
  border: 1px solid var(--cif-gray-border);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cif-media-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.cif-media-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--cif-gray-light);
}

.cif-media-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cif-media-card-content {
  padding: 25px;
}

.cif-media-card-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--cif-blue);
  margin: 0 0 15px 0;
}

.cif-media-card-content p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cif-gray);
  margin: 0 0 15px 0;
}

.cif-media-card-meta {
  font-size: 12px;
  color: var(--cif-orange);
  font-weight: 500;
}

/* ========== TABLE STYLING WITH GREY BACKGROUND ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--cif-white);
}

table thead {
  background: var(--cif-gray-light);
}

table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: var(--cif-blue);
  border-bottom: 2px solid var(--cif-gray-border);
  font-size: 14px;
}

table td {
  padding: 15px;
  border-bottom: 1px solid var(--cif-gray-border);
  font-size: 14px;
  color: var(--cif-black);
}

table tbody tr:nth-child(even) {
  background: rgba(245, 245, 245, 0.5);
}

table tbody tr:hover {
  background: var(--cif-gray-light);
}

/* ========== STATS SCROLLER ========== */
.cif-stats-scroller {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 10px 0;
}

.cif-stats-scroller .cif-stat-card {
  flex: 0 0 calc(50% - 10px);
}

.cif-stats-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.cif-stats-prev,
.cif-stats-next {
  width: 36px;
  height: 36px;
  border: 1px solid var(--cif-gray-border);
  background: var(--cif-white);
  color: var(--cif-blue);
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cif-stats-prev:hover:not(:disabled),
.cif-stats-next:hover:not(:disabled) {
  background: var(--cif-orange);
  color: var(--cif-white);
  border-color: var(--cif-orange);
}

.cif-stats-prev:disabled,
.cif-stats-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cif-stats-indicator {
  font-size: 12px;
  color: var(--cif-gray);
  font-weight: 500;
  min-width: 50px;
  text-align: center;
}

/* ========== HERO NAVIGATION BUTTONS ========== */
.cif-hero-prev,
.cif-hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  color: var(--cif-white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 4px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cif-hero-prev:hover,
.cif-hero-next:hover {
  background: rgba(255, 102, 0, 0.8);
}

.cif-hero-prev {
  left: 20px;
}

.cif-hero-next {
  right: 20px;
}

/* ========== HEADER SCROLL EFFECT ========== */
.cif-navbar.scrolled {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ========== HOMEPAGE RESPONSIVE ========== */
@media (max-width: 768px) {
  .cif-hero-intro {
    padding: 40px 20px;
    margin-bottom: 40px;
  }

  .cif-hero-intro h1 {
    font-size: 24px;
  }

  .cif-components-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cif-apply-section {
    padding: 40px 20px;
  }

  .cif-apply-section h2 {
    font-size: 22px;
  }
}

/* ========== WEBFORM STYLES ========== */
.webform-submission-form {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  background: var(--cif-white);
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Webform page wrapper */
.path-webform .region-content {
  padding: 60px 20px;
  background: var(--cif-gray-light);
  min-height: 80vh;
}

.path-webform .block-page-title-block {
  text-align: center;
  margin-bottom: 10px;
}

.path-webform .block-page-title-block h1 {
  color: var(--cif-blue);
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 10px 0;
}

/* Webform header markup */
.webform-submission-form .js-form-type-webform-markup {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--cif-gray-border);
}

.webform-submission-form .js-form-type-webform-markup h2 {
  color: var(--cif-blue);
  font-size: 28px;
  margin-bottom: 15px;
}

.webform-submission-form .js-form-type-webform-markup p {
  color: var(--cif-gray);
  font-size: 16px;
  line-height: 1.6;
}

/* Form items */
.webform-submission-form .form-item {
  margin-bottom: 24px;
}

.webform-submission-form label {
  display: block;
  font-weight: 600;
  color: var(--cif-blue);
  margin-bottom: 8px;
  font-size: 14px;
}

.webform-submission-form label.form-required::after {
  content: " *";
  color: var(--cif-orange);
}

/* Text inputs, selects, textareas */
.webform-submission-form input[type="text"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="tel"],
.webform-submission-form input[type="url"],
.webform-submission-form input[type="number"],
.webform-submission-form select,
.webform-submission-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cif-gray-border);
  border-radius: 6px;
  font-size: 16px;
  font-family: var(--cif-font);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: var(--cif-white);
}

.webform-submission-form input[type="text"]:focus,
.webform-submission-form input[type="email"]:focus,
.webform-submission-form input[type="tel"]:focus,
.webform-submission-form input[type="url"]:focus,
.webform-submission-form input[type="number"]:focus,
.webform-submission-form select:focus,
.webform-submission-form textarea:focus {
  outline: none;
  border-color: var(--cif-orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
}

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

.webform-submission-form select {
  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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Checkboxes and radios */
.webform-submission-form fieldset {
  border: 2px solid var(--cif-gray-border);
  border-radius: 6px;
  padding: 20px;
  margin: 0 0 24px 0;
  background: #fafafa;
}

.webform-submission-form fieldset legend {
  font-weight: 600;
  color: var(--cif-blue);
  font-size: 14px;
  padding: 0 10px;
}

.webform-submission-form .form-checkboxes,
.webform-submission-form .form-radios {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.webform-submission-form .form-type-checkbox,
.webform-submission-form .form-type-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}

.webform-submission-form input[type="checkbox"],
.webform-submission-form input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0 0;
  accent-color: var(--cif-orange);
  cursor: pointer;
  flex-shrink: 0;
}

.webform-submission-form .form-type-checkbox label,
.webform-submission-form .form-type-radio label {
  font-weight: 400;
  color: var(--cif-black);
  margin: 0;
  cursor: pointer;
  line-height: 1.4;
}

/* Country select (if using country element) */
.webform-submission-form .form-item-country-9 select {
  background-color: var(--cif-white);
}

/* Submit button */
.webform-submission-form .form-actions {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--cif-gray-border);
}

.webform-submission-form .webform-button--submit,
.webform-submission-form .form-submit {
  display: inline-block;
  width: 100%;
  padding: 16px 32px;
  background: var(--cif-orange);
  color: var(--cif-white);
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.webform-submission-form .webform-button--submit:hover,
.webform-submission-form .form-submit:hover {
  background: var(--cif-orange-dark);
  transform: translateY(-2px);
}

.webform-submission-form .webform-button--submit:active,
.webform-submission-form .form-submit:active {
  transform: translateY(0);
}

/* CAPTCHA styling */
.webform-submission-form .captcha {
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

.webform-submission-form .g-recaptcha {
  transform-origin: center;
}

/* Error messages */
.webform-submission-form .form-item--error input,
.webform-submission-form .form-item--error select,
.webform-submission-form .form-item--error textarea {
  border-color: #dc3545;
}

.webform-submission-form .form-item--error-message {
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
}

/* Confirmation message */
.webform-confirmation {
  max-width: 600px;
  margin: 60px auto;
  padding: 60px 40px;
  background: var(--cif-white);
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.webform-confirmation__message {
  font-size: 18px;
  color: var(--cif-gray);
  line-height: 1.6;
}

.webform-confirmation__back {
  margin-top: 30px;
}

.webform-confirmation__back a {
  display: inline-block;
  padding: 12px 30px;
  background: var(--cif-blue);
  color: var(--cif-white);
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.webform-confirmation__back a:hover {
  background: var(--cif-blue-dark);
  color: var(--cif-white);
}

/* Webform responsive */
@media (max-width: 768px) {
  .webform-submission-form {
    padding: 30px 20px;
    margin: 0 15px;
  }

  .path-webform .region-content {
    padding: 40px 10px;
  }

  .path-webform .block-page-title-block h1 {
    font-size: 28px;
  }

  .webform-submission-form .js-form-type-webform-markup h2 {
    font-size: 22px;
  }

  .webform-submission-form fieldset {
    padding: 15px;
  }

  .webform-submission-form .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
  }
}
