/* ============================================================
   TABLE OF CONTENTS
   ============================================================
   1.  CSS Variables & Root Settings
   2.  Global Reset & Base Styles
   3.  Dark Mode Styles (All Together)
   4.  Header & Navigation (Desktop + Mobile)
   5.  Shared Components (Buttons)
   6.  Section Layouts
   7.  Slideshow Module
   8.  Logo Modules (Track, Grid, Items)
   9.  Forms & Contact
   10. Footer
   11. Responsive Media Queries (All Breakpoints)
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES & ROOT SETTINGS
   ============================================================ */
:root {
  --main-font: 'Cairo', sans-serif;
  --dark-blue: #283a5b;
  --primary-blue: #56a8d3;
  --white: #ffffff;
  --black: #000000;
  --stay-white: #ffffff;
  --stay-black: #000000;
  --error: #d70000;
  --items-visible: 7;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 115px;
}

/* ============================================================
   2. GLOBAL RESET & BASE STYLES
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--main-font);
}

body {
  background: var(--dark-blue);
  color: var(--black);
  padding-top: 115px;
  font-weight: 300;
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease, padding-top 0.3s ease;
  position: relative;
}

body.scrolled {
  padding-top: 70px;
}

main {
  background: var(--white);
}

.section-header,
.split-section,
.logo-section,
.contact-section {
  width: 100%;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 115px;
  background: linear-gradient(to bottom, var(--primary-blue) 45px, var(--dark-blue) 45px);
  z-index: 999;
  transition: height 0.3s ease, background 0.3s ease, background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.scrolled::before {
  height: 70px;
  background: var(--dark-blue);
}

::selection { 
  background: var(--primary-blue); 
}

::-moz-selection { 
  background: var(--primary-blue); 
}

main.custom-bg-page {
  background-image: url('../photos/contact/bg4.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--stay-white);
}

@media (max-width: 768px) {}

/* Global Transition Classes */
body, 
.section-header, 
.split-section, 
.logo-section, 
.contact-section, 
.site-footer,
.footer-contact p,
.navbar-overlay,
.contact-banner,
.contact-banner a,
.logo-item,
.split-logo-panel,
.site-header {
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.5s ease, 
              border-color 0.5s ease;
}

/* ============================================================
   3. DARK MODE STYLES (ALL TOGETHER)
   ============================================================ */

#dark-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 34px; 
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1001;
}

#dark-mode-toggle .cs-moon,
#dark-mode-toggle .cs-sun {
  position: absolute;
  width: 22px;
  height: 22px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

#dark-mode-toggle .cs-sun {
  transform: translateY(0);
  opacity: 1;
  filter: brightness(0) invert(1);
  transition-delay: 0.4s; 
}

#dark-mode-toggle .cs-moon {
  transform: translateY(40px);
  opacity: 0;
  transition-delay: 0s;
}

body.dark-mode #dark-mode-toggle .cs-sun {
  transform: translateY(40px);
  opacity: 0;
  transition-delay: 0s;
}

body.dark-mode #dark-mode-toggle .cs-moon {
  transform: translateY(0);
  opacity: 1;
  filter: brightness(0) invert(1);
  transition-delay: 0.4s; 
}

body.dark-mode {
  --white: #000000;
  --black: #ffffff;
  --dark-blue: #141d2f;
  --primary-blue: #56a8d3;
}

body.dark-mode .logo-item {
  background: var(--stay-black);
}

body.dark-mode .form-input, 
body.dark-mode .form-textarea {
  background-color: #282828;
  color: var(--black);
  border-color: var(--stay-black);
}

.logo-item, 
.logo-slide {
  position: relative;
}

/* For carousel/slide logos */
.logo-slide .logo-light,
.logo-slide .logo-dark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; 
  height: 120px; 
  object-fit: contain; 
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-slide .logo-light { opacity: 0.8; }
.logo-slide .logo-dark { opacity: 0; }
body.dark-mode .logo-slide .logo-light { opacity: 0; }
body.dark-mode .logo-slide .logo-dark { opacity: 0.8; }

/* For grid logos */
.logo-item .logo-light,
.logo-item .logo-dark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-item .logo-light { opacity: 1; }
.logo-item .logo-dark { opacity: 0; }
body.dark-mode .logo-item .logo-light { opacity: 0; }
body.dark-mode .logo-item .logo-dark { opacity: 1; }

/* ============================================================
   4. HEADER & NAVIGATION (DESKTOP + MOBILE)
   ============================================================ */

/* --- Contact Banner --- */
.contact-banner { 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background-color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  z-index: 1001;
  transition: transform 0.3s ease;
  transform: translateY(0);
}

body.scrolled .contact-banner {
  transform: translateY(-100%);
  pointer-events: none;
}

.contact-banner-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-banner a { 
  color: var(--black); 
  text-decoration: none; 
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.contact-banner a:hover { 
  color: var(--dark-blue); 
}

.contact-banner img { 
  width: 25px;
  height: 25px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 45px;
  left: 0;
  width: 100%;
  height: 70px;
  background: var(--dark-blue);
  z-index: 1000;
  transition: top 0.3s ease;
}

body.scrolled .site-header {
  top: 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 70px;
  position: relative;
}

.logo img {
  display: block;
  width: 180px;
  height: auto;
}

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

/* --- Desktop Navigation --- */
.navbar-desktop ul {
  display: flex;
  gap: 20px;
  list-style: none;
}

.navbar-desktop li {
  position: relative;
}

.navbar-desktop a {
  position: relative;
  display: block;
  color: var(--stay-white);
  text-decoration: none;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color 0.3s ease, color 0.5s ease;
  padding: 10px 15px;
  font-weight: 500;
}

.navbar-desktop a:hover,
.navbar-desktop a.active:hover {
  color: var(--primary-blue);
}

.navbar-desktop a.active {
  color: var(--primary-blue);
  font-weight: 600;
}

.navbar-desktop a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--primary-blue);
  transition: width 0.4s ease;
}

.navbar-desktop a:hover::after { 
  width: 100%; 
}

.navbar-desktop .dropdown {
  position: absolute;
  top: 58px;
  left: 0;
  display: none;
  background: var(--dark-blue);
  min-width: 260px;
  list-style: none;
  font-weight: 600;
}

.navbar-desktop .dropdown li a {
  padding: 12px 15px;
  font-size: 0.9rem;
}

.navbar-desktop .dropdown::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.navbar-desktop li:hover > ul {
  display: block;
  animation: dropdownFade 0.4s ease-out;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Navigation --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 2000;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--stay-white);
  transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.5s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--dark-blue);
  z-index: 990;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease;
  height: auto;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.navbar-overlay ul {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.navbar-overlay > ul > li {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.5s ease;
}

.mobile-nav-link-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-right: 5%; 
}

.navbar-overlay a {
  display: block;
  padding: 15px 30px;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--stay-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-grow: 1;
  transition: color 0.3s ease;
}

.dropdown-arrow-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: -10px; 
}

.arrow-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-icon::before,
.arrow-icon::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  background-color: var(--stay-white);
  transform-origin: center; 
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
}

.arrow-icon::before {
  left: 0;
  transform: rotate(45deg);
  border-radius: 0px 2px 2px 0px; 
}

.arrow-icon::after {
  right: 0;
  transform: rotate(-45deg);
  border-radius: 2px 0px 0px 2px;
}

.dropdown-arrow-toggle.active .arrow-icon::before {
  transform: rotate(-45deg);
  background-color: var(--primary-blue);
}

.dropdown-arrow-toggle.active .arrow-icon::after {
  transform: rotate(45deg);
  background-color: var(--primary-blue);
}

.dropdown-mobile {
  background-color: rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.5s ease-in-out, 
              opacity 0.4s ease-in-out,
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-mobile.open {
  max-height: 600px;
  opacity: 1;
  visibility: visible;
}

.dropdown-mobile li a {
  padding-left: 50px !important;
  font-size: 0.95rem;
  border-bottom: none;
  background: rgba(0, 0, 0, 0.05);
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

.navbar-overlay a.active,
.dropdown-mobile li a.active {
  color: var(--primary-blue) !important;
}

.has-dropdown-mobile:has(.dropdown-mobile a.active) .dropdown-link {
  color: var(--primary-blue);
}

.navbar-overlay ul li.center-text a { 
  text-align: center; 
  padding-left: 0; 
}

.navbar-overlay li.mobile-phone-item { 
  border-bottom: none; 
  padding-bottom: 15px; 
}

.navbar-overlay li.mobile-phone-item a { 
  font-weight: bold; 
  color: var(--primary-blue); 
}

/* ============================================================
   5. SHARED COMPONENTS (BUTTONS)
   ============================================================ */
.custom-nav-btn {
  display: inline-block;
  position: relative;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  z-index: 1;
  color: var(--white);
  background-color: var(--primary-blue);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-nav-btn:hover {
  background-color: var(--dark-blue);
  color: var(--primary-blue);
}

.custom-nav-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--primary-blue);
  transition: width 0.4s ease;
}

.custom-nav-btn:hover::after {
  width: 100%;
}

/* ============================================================
   6. SECTION LAYOUTS
   ============================================================ */
.section-header, 
.split-section, 
.logo-section, 
.contact-section, 
.site-footer {
  position: relative; 
  background: var(--white);
}

.section-header.dark { 
  background: var(--black); 
  color: var(--white); 
}

.bg-transparent {
  background: transparent !important;
}

.section-header {
  width: 100%;
  padding: 10px 20px;
}

.section-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(1.4rem, 4vw, 2.0rem);
  margin-bottom: 10px;
}

.section-header p {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.85;
  line-height: 1.6;
}

.section-header-inner:not(:has(p)) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header-inner:not(:has(p)) h1 { 
  margin-bottom: 0; 
}

.split-section { 
  width: 100%; 
  padding: 0;
}

.split-inner { 
  display: flex; 
  align-items: stretch; 
  gap: 0; 
}

.split-section.reverse .split-inner { 
  flex-direction: row-reverse; 
}

.split-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: clamp(48px, 6vw, 96px) clamp(32px, 6vw, 80px);
  width: 100%;
}

.split-text h2 {
  font-size: clamp(1.6rem, 4.8vw, 2.6rem);
  margin-bottom: 24px;
  max-width: 100%;
}

.split-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 100%;
}

.split-image {
  flex: 0 0 50%;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.split-inner[class*="grid-"] {
  --grid-cols: 4;
  --grid-gap: 8px;
  --grid-color: var(--white);
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: var(--grid-gap);
  background-color: var(--grid-color);
  border: var(--grid-gap) solid var(--grid-color);
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 3%; 
}

.split-inner[class*="grid-"] .split-image {
  flex: none;
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.split-inner.portrait-grid {
  --grid-cols: 4; 
  padding: 0 2%; 
  max-width: 2500px;
  margin: 0 auto;
}

.split-inner.portrait-grid .split-image {
  aspect-ratio: 2/3;
  border-radius: 0px;
}

/* ============================================================
   7. SLIDESHOW MODULE
   ============================================================ */
.images {
  height: clamp(400px, 60vh, 700px); 
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.images::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.slideshow-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slideshow-text {
  position: relative;
  z-index: 2;
  color: var(--stay-white);
  text-align: center;
}

.slideshow-text h1 { 
  font-size: clamp(1.4rem, 5vw, 2.5rem); 
  margin-bottom: 10px; 
}

.slideshow-text h2 { 
  font-size: clamp(0.9rem, 3.5vw, 1.5rem); 
}

/* ============================================================
   8. LOGO MODULES (TRACK, GRID, ITEMS)
   ============================================================ */

/* --- Logo Track (Carousel) --- */
.logo-section { 
  padding: 40px 0; 
  background: var(--white); 
  overflow: hidden;
}

.logo-track { 
  display: flex; 
  list-style: none; 
}

.logo-track.smooth { 
  transition: transform 0.5s ease-in-out; 
}

.logo-slide { 
  width: calc(100% / var(--items-visible)); 
  flex-shrink: 0; 
  display: flex; 
  justify-content: center;
  align-items: center;
  position: relative;
}

.logo-slide img { 
  width: 120px; 
  height: 120px; 
  object-fit: contain; 
  opacity: 0.8; 
}

/* --- Split Logo Panel --- */
.split-logo-panel {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 60px);
  background-color: var(--dark-blue);
}

/* --- Logo Grid --- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.logo-grid.four-logos {
  grid-template-columns: repeat(4, 1fr);
  max-width: 1000px;
}

/* --- Logo Item --- */
.logo-item {
  /* Padding-top hack for 1:1 ratio - more reliable than aspect-ratio in Safari grid */
  position: relative;
  padding-top: 100%;
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, 
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner wrapper fills the padded box and centers content */
.logo-item-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.logo-item img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

/* Optional hover effects (currently commented out) */
/* 
.logo-item img {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}
*/

/* ============================================================
   9. FORMS & CONTACT
   ============================================================ */
.contact-section {
  width: 100%;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.contact-intro > * + * { 
  margin-top: 1rem; 
}

.contact-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}

.contact-description { 
  color: var(--stay-white); 
}

.form-group-container {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.form-group { 
  display: flex; 
  flex-direction: column; 
}

.form-label { 
  margin-bottom: 0.5rem; 
}

.form-input, 
.form-textarea {
  padding: 0.5rem;
  border: 4px solid var(--dark-blue);
  width: 100%;
  border-radius: 0rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.5s ease,
              color 0.5s ease;
}

.form-input { 
  height: 2.5rem; 
}

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

.form-input::placeholder, 
.form-textarea:focus-visible { 
  color: var(--black); 
}

.form-input:focus-visible, 
.form-textarea:focus-visible {
  outline: 2px solid var(--dark-blue);
  outline-offset: 2px;
}

.form-submit {
  width: 100%;
  margin-top: 1.2rem;
  background-color: var(--dark-blue);
  color: var(--stay-white);
  padding: 13px 5px;
  border-radius: 0rem;
  border: none;
  cursor: pointer;
}

.form-submit:hover { 
  color: var(--primary-blue); 
}

.contact-info a { 
  color: var(--stay-white); 
  text-decoration: none; 
}

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

/* Form Validation */
.form-input.error,
.form-textarea.error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 2px rgba(224, 82, 82, 0.2);
}

.form-error-msg {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-error-msg.visible {
  display: block;
}

body.dark-mode .form-input.error,
body.dark-mode .form-textarea.error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

body.dark-mode .form-error-msg {
  color: var(--error);
  font-weight:800;
}


/* ============================================================
   10. FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark-blue);
  padding: 50px 30px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-col h2 {
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  color: var(--white);
}

.footer-col ul { 
  list-style: none; 
  padding: 0; 
}

.footer-col ul li { 
  border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
  transition: border-color 0.5s ease;
}

.site-footer a {
  display: inline-block;
  font-size: 15px;
  color: var(--stay-white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover, 
.footer-col h2:hover { 
  color: var(--primary-blue); 
}

.site-footer a.active { 
  color: var(--primary-blue); 
  font-weight: 600; 
}

.footer-col ul li a { 
  display: block; 
  padding: 8px 0; 
}

.footer-contact p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--stay-white);
}

.footer-contact a[href^="mailto"] {
  text-transform: none;
  letter-spacing: normal;
}


/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease,
              border-color 0.5s ease;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-section .split-text {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease,
              border-color 0.5s ease;
}

.fade-in-section.is-visible .split-text {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-section .split-image,
.fade-in-section .split-logo-panel {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease,
              border-color 0.5s ease;
}

.fade-in-section.is-visible .split-image,
.fade-in-section.is-visible .split-logo-panel {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-section .logo-item {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease,
              border-color 0.5s ease;
}

.fade-in-section.is-visible .logo-item {
  opacity: 1;
  transform: scale(1);
}

.fade-in-section.is-visible .logo-item:nth-child(1)  { transition-delay: 0.1s; }
.fade-in-section.is-visible .logo-item:nth-child(2)  { transition-delay: 0.15s; }
.fade-in-section.is-visible .logo-item:nth-child(3)  { transition-delay: 0.2s; }
.fade-in-section.is-visible .logo-item:nth-child(4)  { transition-delay: 0.25s; }
.fade-in-section.is-visible .logo-item:nth-child(5)  { transition-delay: 0.3s; }
.fade-in-section.is-visible .logo-item:nth-child(6)  { transition-delay: 0.35s; }
.fade-in-section.is-visible .logo-item:nth-child(7)  { transition-delay: 0.4s; }
.fade-in-section.is-visible .logo-item:nth-child(8)  { transition-delay: 0.45s; }
.fade-in-section.is-visible .logo-item:nth-child(9)  { transition-delay: 0.5s; }
.fade-in-section.is-visible .logo-item:nth-child(10) { transition-delay: 0.55s; }
.fade-in-section.is-visible .logo-item:nth-child(11) { transition-delay: 0.6s; }
.fade-in-section.is-visible .logo-item:nth-child(12) { transition-delay: 0.65s; }
.fade-in-section.is-visible .logo-item:nth-child(13) { transition-delay: 0.7s; }
.fade-in-section.is-visible .logo-item:nth-child(14) { transition-delay: 0.75s; }
.fade-in-section.is-visible .logo-item:nth-child(15) { transition-delay: 0.8s; }
.fade-in-section.is-visible .logo-item:nth-child(16) { transition-delay: 0.85s; }
.fade-in-section.is-visible .logo-item:nth-child(17) { transition-delay: 0.9s; }
.fade-in-section.is-visible .logo-item:nth-child(18) { transition-delay: 0.95s; }

.logo-section.fade-in-section .logo-slide {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease,
              border-color 0.5s ease;
}

.logo-section.fade-in-section.is-visible .logo-slide { opacity: 1; transform: translateY(0); }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(1) { transition-delay: 0.1s; }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(2) { transition-delay: 0.2s; }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(3) { transition-delay: 0.3s; }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(4) { transition-delay: 0.4s; }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(5) { transition-delay: 0.5s; }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(6) { transition-delay: 0.6s; }
.logo-section.fade-in-section.is-visible .logo-slide:nth-child(7) { transition-delay: 0.7s; }

/* ============================================================
   OPTIONAL ENHANCEMENTS
   ============================================================ */

.custom-nav-btn {
  transition: transform 0.3s ease, 
              background-color 0.3s ease, 
              color 0.3s ease,
              box-shadow 0.3s ease;
}

.custom-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(86, 168, 211, 0.3);
}

.custom-nav-btn:active {
  transform: translateY(0px);
}

.form-input,
.form-textarea {
  transition: transform 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.5s ease;
}

.form-input:focus,
.form-textarea:focus {
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(86, 168, 211, 0.15);
}

.form-submit {
  transition: transform 0.3s ease,
              background-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(175, 197, 208, 0.4);
}

.form-submit:active {
  transform: translateY(0px);
}

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

.slideshow-text {
  opacity: 0;
  animation: float 6s ease-in-out infinite, 
             fadeInSlideshow 1s ease-out 0.3s forwards;
}

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

.section-header-inner h2 {
  position: relative;
  display: inline-block;
}

.section-header-inner h2:after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary-blue);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.fade-in-section.is-visible .section-header-inner h2::after {
  width: 80%;
}

a {
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

.footer-col ul li {
  position: relative;
  overflow: hidden;
}

.footer-col ul li::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width 0.4s ease-in-out;
}

.footer-col ul li:hover::before {
  width: 100%;
}

/* ============================================================
   SCROLL PROGRESS INDICATOR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 115px;
  left: 0;
  height: 3px;
  background: var(--primary-blue);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease,
              top 0.3s ease,
              background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.scrolled .scroll-progress {
  top: 70px;
}

/* ============================================================
   11. RESPONSIVE MEDIA QUERIES (ALL BREAKPOINTS)
   ============================================================ */

@media (min-width: 2560px) {
  body {
    zoom: calc(1 + ((100vw - 2560px) / 5120));
  }
}

@media (min-width: 3840px) {
  body {
    zoom: 1.8;
  }
}

@media (max-width: 1900px) {}

@media (max-width: 1400px) {
  .logo-grid { 
    grid-template-columns: repeat(5, 1fr); 
  }

  .split-inner[class*="grid-"] {
    --grid-cols: 2;
    padding: 0 2%;
  }
}

@media (max-width: 1200px) {
  :root { 
    --items-visible: 4; 
  }

  .logo-grid { 
    grid-template-columns: repeat(4, 1fr); 
    max-width: 900px;
  }

  .logo-grid.four-logos { 
    max-width: 900px;
  }

  .images {
    height: clamp(300px, 50vh, 500px);
  }

  .split-inner {
    flex-direction: column !important;
    gap: 0;
  }
  
  .split-section.reverse .split-inner {
    flex-direction: column; 
  }

  .split-text {
    order: 2;
    padding: 40px 20px;
  }
  
  .split-text.center-on-mobile {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
  }
  
  .split-image, 
  .split-logo-panel {
    order: 1;
    width: 100%;
  }
  
  .split-section.mobile-text-first .split-text {
    order: 1;
  }
  
  .split-section.mobile-text-first .split-image,
  .split-section.mobile-text-first .split-logo-panel {
    order: 2;
  }
  
  .split-logo-panel {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 40px 20px;
  }

  .split-inner[class*="grid-"] {
    --grid-cols: 1;
  }
  
  .split-inner.portrait-grid {
    --grid-cols: 1;
  }
}

@media (max-width: 1100px) {
  .logo-grid { 
    grid-template-columns: repeat(4, 1fr); 
    max-width: 750px;
  }

  .logo-grid.four-logos { 
    max-width: 750px;
  }
}

@media (max-width: 900px) {
  .navbar-desktop { 
    display: none; 
  }
  
  .hamburger { 
    display: flex; 
  }
  
  .site-header .logo img { 
    width: 140px; 
  }
  
  .footer-container { 
    grid-template-columns: repeat(2, 1fr); 
  }

  .split-inner.portrait-grid {
    --grid-cols: 2;
  }
}

@media (min-width: 901px) {
  .hamburger, 
  .navbar-overlay { 
    display: none !important; 
  }
}

@media (max-width: 868px) {
  .logo-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 550px;
    margin: 0 auto;
    gap: 10px;
  }
  
  .logo-grid.four-logos { 
    max-width: 550px;
  }
}

@media (max-width: 768px) {
  :root { 
    --items-visible: 2; 
  }
  
  main.custom-bg-page {
    background-image: url('../photos/contact/bg4-mobile.jpg');
    background-size: cover;
    background-position: left;
    background-attachment: scroll;
  }
  
  .contact-banner {
    height: 40px;
    gap: 15px;
    padding: 0 10px;
  }
  
  .contact-banner-item {
    gap: 6px;
  }
  
  .contact-banner a {
    font-size: 0.8rem;
  }
  
  .contact-banner img {
    width: 14px;
    height: 14px;
  }
  
  .site-header {
    top: 40px;
  }
  
  body.scrolled .site-header {
    top: 0;
  }
  
  body {
    padding-top: 110px;
  }
  
  body.scrolled {
    padding-top: 70px;
  }
  
  .scroll-progress {
    top: 110px;
  }
  
  body.scrolled .scroll-progress {
    top: 70px;
  }
  
  body::before {
    height: 110px;
    background: linear-gradient(to bottom, var(--primary-blue) 40px, var(--dark-blue) 40px);
  }
  
  body.scrolled::before {
    height: 70px;
    background: var(--dark-blue);
  }
}

@media (max-width: 600px) {
  .split-inner.portrait-grid {
    --grid-cols: 1;
  }
}

@media (max-width: 500px) {
  .footer-container { 
    grid-template-columns: 1fr; 
  }
  
  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 300px;
  }
  
  .logo-grid.four-logos { 
    grid-template-columns: repeat(2, 1fr); 
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  /* Keep contact banner on one line on small screens */
  .contact-banner {
    flex-direction: row;
    flex-wrap: nowrap;
    height: 40px;
    padding: 0 8px;
    gap: 10px;
    justify-content: center;
  }

  .contact-banner-item {
    gap: 4px;
  }

  .contact-banner a {
    font-size: 0.72rem;
  }

  .contact-banner img {
    width: 13px;
    height: 13px;
  }

  .site-header {
    top: 40px;
  }

  body {
    padding-top: 110px;
  }

  body.scrolled .site-header {
    top: 0;
  }

  body.scrolled {
    padding-top: 70px;
  }

  .scroll-progress {
    top: 110px;
  }

  body.scrolled .scroll-progress {
    top: 70px;
  }

  body::before {
    height: 110px;
    background: linear-gradient(to bottom, var(--primary-blue) 40px, var(--dark-blue) 40px);
  }

  body.scrolled::before {
    height: 70px;
  }
}

@media (max-width: 390px) {
  :root { 
    --items-visible: 2; 
  }
}

/* ============================================================
   PRELOAD NO-TRANSITION HACK
   ============================================================ */
body.preload,
body.preload * {
  transition: none !important;
}

body.preload #navbar,
body.preload #footer {
  transition: opacity 0.4s ease-in-out !important;
}

/* ============================================================
   NAVBAR & FOOTER LOADING OPTIMIZATION
   ============================================================ */
#navbar,
#footer {
  transition: opacity 0.4s ease-in-out;
}