/* ===== AquaKem — Home (Index) | Cooling Water Treatment Style ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Cooling-style ISO palette */
    --bg:           #ffffff;
    --fg:           #333333;
    --surface:      #f0f7ff;
    --surface-2:    #e8f4ff;
    --line:         rgba(0, 123, 255, 0.15);
    --muted:        #666666;
    --brand:        #007BFF;
    --brand-deep:   #0056c7;
    --brand-bright: #3399FF;
    --accent:       #FFC000;
    --accent-deep:  #e6ac00;
    --max:          1320px;
    --display:      Arial, Helvetica, sans-serif;
    --sans:         "Inter", system-ui, sans-serif;
    --mono:         "JetBrains Mono", ui-monospace, monospace;

    /* Legacy aliases kept so JS / inline styles still work */
    --blue-primary:    var(--brand);
    --blue-secondary:  var(--brand-bright);
    --color-gold:      var(--accent);
    --color-light-bg:  var(--bg);
    --color-white:     #ffffff;
    --color-text-dark: var(--fg);
    --color-text-grey: var(--muted);
}

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
ul, ol { list-style: none; }
em { font-style: normal; color: var(--accent); }

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.08;
}
h1 { font-size: clamp(2.25rem, 4.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* ===== Eyebrow / Divider ===== */
.eyebrow {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
.divider-line {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--accent);
    vertical-align: middle;
    margin-right: 12px;
}

/* ===== Section base ===== */
.section { padding: 6rem 0; border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .section { padding: 8rem 0; } }
.section.alt { background: var(--surface); }
.section-head { margin-bottom: 3.5rem; text-align: left; }
.section-head h2 { color: var(--brand-deep); max-width: 42rem; }

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex; align-items: center; gap: .6rem;
    background: var(--accent); color: #ffffff;
    padding: .75rem 1.4rem; border-radius: 50px; font-weight: 500;
    font-size: .9rem;
    border: none; cursor: pointer;
    transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }

/* ===== 1. HERO ===== */
.hero.split-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 60%, #003f9e 100%);
    padding: 0;
    min-height: auto;
    margin-top: 65px;
    display: flex;
    align-items: center;
}

.hero-slider {
    position: relative;
    width: 100%;
    min-height:900px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(100%);
    transition: all 1s ease;
    display: flex;
    align-items: center;
}
.slide.active { opacity: 1; transform: translateX(0); }
.slide.exit-left { transform: translateX(-100%); opacity: 0; }

.hero-inner {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    min-height: auto;
    padding: 7rem 1.5rem 4rem;
}

@media (min-width: 1024px) {
    .hero-inner {
        grid-template-columns: 7fr 5fr;
        gap: 4rem;
        padding: 8rem 2.5rem 6rem;
    }

    .hero-slider {
    position: relative;
    width: 100%;
    min-height:100vh;
    overflow: hidden;
    }
}

.hero-text { display: flex; flex-direction: column; }
.hero-text h3 {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: rgba(255,255,255,.85);
    letter-spacing: .02em;
}
.hero-text h1 {
    color: #fff;
    margin: .5rem 0 1.25rem;
}
.hero-text h1 em { color: var(--accent); font-family: var(--display); }
.hero-text h2 {
    font-family: var(--sans);
    font-size: 1.125rem;
    font-weight: 400;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
    max-width: 36rem;
    letter-spacing: 0;
}
.hero-text p {
    margin-top: 1rem;
    font-size: 1.05rem;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
    max-width: 36rem;
}

.hero-image {
    position: relative;
    min-height: 460px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.45);
    background-color: rgba(255,255,255,0.05);
}
.hero-image-tag {
    position: absolute;
    left: 16px; bottom: 16px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--brand-deep);
    background: rgba(255,255,255,0.92);
    padding: 6px 10px;
    border-radius: 4px;
    backdrop-filter: blur(6px);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 1rem;
    pointer-events: none;
}
.slider-controls button {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background .25s, border-color .25s;
    pointer-events: auto;
}
.slider-controls button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Slider Dots */
.dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background .25s, transform .25s;
}
.dots button.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ===== 2. ABOUT ===== */
.about-section { background: var(--bg); color: var(--fg); text-align: left; }
.about-title h2 {
    color: var(--brand-deep);
    margin-top: .25rem;
}

.about-container.overview {
    display: grid;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 1024px) {
    .about-container.overview {
        grid-template-columns: 6fr 5fr;
        gap: 4rem;
    }
}

.about-container .copy p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 1.25rem;
    max-width: 38rem;
    text-align: left;
}
.about-container .copy b { color: var(--brand-deep); font-weight: 600; }

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    align-items: start;
}

.about-images img {
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

/* الصورة الأولى */
.about-images img:first-child {
    width: 200px;
    height: 400px;
}

/* الصورة الثانية */
.about-images img:last-child {
    width: 200px;
    height: 400px;
    margin-top: 60px;
}
.about-images .img-wrap {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,123,255,.08);
}
.about-img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    border-radius: 0;
}

/* ===== 3. ABOUT INLINE STATS (no boxes, no borders) ===== */
.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem 4rem;
    margin-top: 2.5rem;
    padding: 0;
    background: none;
    border: none;
}
.about-stat {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.about-stat-value {
    font-family: var(--display);
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    font-weight: 400;
    line-height: 1;
    color: var(--brand-deep);
    letter-spacing: -0.03em;
}
.about-stat-label {
    font-family: var(--sans);
    font-size: .95rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .02em;
}

/* ===== ROI SECTION - Isolated from components.js ===== */

.aq-roi-section {
  --aq-roi-bg: #ffffff;
  --aq-roi-fg: #333333;
  --aq-roi-surface: #f0f7ff;
  --aq-roi-line: rgba(0, 123, 255, 0.15);
  --aq-roi-muted: #666666;
  --aq-roi-brand: #007BFF;
  --aq-roi-brand-deep: #0056c7;
  --aq-roi-accent: #FFC000;
  --aq-roi-sans: "Inter", system-ui, sans-serif;
  --aq-roi-mono: "JetBrains Mono", ui-monospace, monospace;
  --aq-roi-display: Arial, Helvetica, sans-serif;

  padding: 5rem 1.5rem;
  background: var(--aq-roi-bg);
  color: var(--aq-roi-fg);
  font-family: var(--aq-roi-sans);
  position: relative;
  z-index: 1;
}

.aq-roi-container {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Sidebar */
.aq-roi-sidebar {
  background: linear-gradient(180deg, var(--aq-roi-brand), var(--aq-roi-brand-deep));
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aq-roi-mode-btn {
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  font: 500 13px var(--aq-roi-sans);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  text-align: center;
}

.aq-roi-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.aq-roi-mode-btn.is-active {
  color: var(--aq-roi-brand-deep);
  background: var(--aq-roi-accent);
  font-weight: 600;
}

/* Frame */
.aq-roi-frame {
  background: #ffffff;
  border: 1px solid var(--aq-roi-line);
  border-top: 3px solid var(--aq-roi-accent);
  border-radius: 18px;
  padding: 3rem 2.5rem 6.5rem;
  box-shadow: 0 8px 30px rgba(0, 123, 255, 0.08);
  text-align: center;
  position: relative;
  min-height: 420px;

  /* مهم جداً حتى لا يتم قص القوائم */
  overflow: visible;
}

.aq-roi-title {
  font-family: var(--aq-roi-mono);
  color: var(--aq-roi-muted);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.aq-roi-big-number {
  font-family: var(--aq-roi-display);
  color: var(--aq-roi-brand-deep);
  margin: 0.5rem 0 1.25rem;
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: 0;
  line-height: 1.08;
  word-break: break-word;
}

.aq-roi-unit {
  color: var(--aq-roi-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Controls */
.aq-roi-controls {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  justify-content: center;

  /* أعلى من الهيدر والمكونات الأخرى */
  z-index: 9999;
}

.aq-roi-controls.is-hidden {
  display: none;
}

.aq-roi-select {
  position: relative;
  display: inline-block;
}

.aq-roi-select-btn {
  border: 1px solid var(--aq-roi-line);
  color: var(--aq-roi-brand-deep);
  background: #ffffff;
  padding: 10px 28px;
  border-radius: 50px;
  font: 500 13px var(--aq-roi-sans);
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 140px;
}

.aq-roi-select-btn:hover {
  background: var(--aq-roi-accent);
  color: #ffffff;
  border-color: var(--aq-roi-accent);
}

/* القائمة مخفية بدون استعمال open/closed */
.aq-roi-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--aq-roi-line);
  border-radius: 12px;
  min-width: 160px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.12);
  z-index: 10000;
  overflow: hidden;
}

/* الفتح يتم عبر data attribute وليس class open */
.aq-roi-select[data-aq-roi-expanded="true"] .aq-roi-menu {
  display: flex;
  flex-direction: column;
}

.aq-roi-menu button {
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid var(--aq-roi-line);
  color: var(--aq-roi-brand-deep);
  font: 500 13px var(--aq-roi-sans);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.aq-roi-menu button:last-child {
  border-bottom: none;
}

.aq-roi-menu button:hover {
  background: var(--aq-roi-surface);
  color: var(--aq-roi-brand);
}

/* Responsive */
@media (max-width: 900px) {
  .aq-roi-container {
    grid-template-columns: 1fr;
  }

  .aq-roi-sidebar {
    flex-direction: row;
    padding: 1rem;
  }

  .aq-roi-mode-btn {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .aq-roi-section {
    padding: 3.5rem 1rem;
  }

  .aq-roi-frame {
    padding: 2.25rem 1rem 8rem;
    min-height: 420px;
  }

  .aq-roi-controls {
    width: calc(100% - 2rem);
    flex-direction: column;
    gap: 10px;
    bottom: 20px;
  }

  .aq-roi-select,
  .aq-roi-select-btn {
    width: 100%;
  }

  .aq-roi-menu {
    width: 100%;
  }
}

/* ===== 5. SOLUTIONS ===== */
.services-section { background: var(--bg); color: var(--fg); }
.services-title h2 { color: var(--brand-deep); margin-top: .25rem; }

.carousel-wrapper { position: relative; }

.services-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-items: stretch;
}

.services-horizontal-card.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--brand);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.06);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.services-horizontal-card.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 123, 255, 0.14);
    border-top-color: var(--accent);
}

.services-card-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.services-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: .75rem;
    flex: 1;
}

.services-card-content .tag {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .22em;
    color: var(--accent-deep);
    background: var(--surface);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.services-card-title {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--brand-deep);
    letter-spacing: -0.01em;
    margin: 0;
}

.services-card-text {
    font-family: var(--sans);
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.services-card-link {
    margin-top: .5rem;
}

/* ===== 6. CLIENTS ===== */
.referenc-section { background: var(--surface); }
.referenc-title h2 { color: var(--brand-deep); margin-top: .25rem; }

.logo-slider {
    overflow: hidden;
    width: 100%;
    padding: 1rem 0;
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.logo-track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 3rem;
}
.logo-track img {
    height: 56px;
    flex-shrink: 0;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter .3s, opacity .3s, transform .3s;
}
.logo-track img:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.08);
}
/* ================================================================
   FULL RESPONSIVE PACK — Phone / Tablet / Laptop / Large Desktop
   ================================================================ */

/* ---- Large Desktop (1440px+) ---- */
@media (min-width: 1440px) {
    .container { max-width: 1400px; }
    .hero-slider { min-height: 100vh; }
    .hero-inner { padding: 9rem 3rem 7rem; gap: 5rem; }
    .about-container.overview { gap: 5rem; }
    .services-carousel { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
    .aq-roi-container { grid-template-columns: 300px 1fr; }
}

/* ---- Ultra-wide Desktop (1920px+) ---- */
@media (min-width: 1920px) {
    :root { --max: 1800px; }
    .container { max-width: 1800px; padding: 0 3rem; }
    h1 { font-size: clamp(2.25rem, 3.6vw, 5.25rem); }
    h2 { font-size: clamp(1.75rem, 3vw, 3.25rem); }
    .hero-slider { min-height: 92vh; }
    .hero-inner { padding: 8rem 3rem 6rem; gap: 6rem; }
    .hero-image { min-height: 640px; }
    .about-container.overview { gap: 6rem; }
    .about-img { height: 520px; }
    .services-carousel { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
    .aq-roi-container { max-width: 1800px; grid-template-columns: 320px 1fr; }
    .logo-track img { height: 64px; }
}

/* ---- Tablet (768px – 1023px) ---- */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-inner { grid-template-columns: 1fr; padding: 6rem 2rem 3rem; }
    .hero-image { min-height: 360px; margin-top: 1.5rem; }
    .about-container.overview { grid-template-columns: 1fr; gap: 2.5rem; }
    .about-images { grid-template-columns: 1fr 1fr; max-width: 460px; margin: 0 auto; }
    .services-carousel { grid-template-columns: repeat(2, 1fr); }
    .aq-roi-container { grid-template-columns: 1fr; }
    .section { padding: 5rem 0; }
}

/* ---- Large Phone / Small Tablet (481px – 767px) ---- */
@media (max-width: 767px) {
    .container { padding: 0 1.25rem; }
    .section { padding: 4rem 0; }
    .hero.split-hero { margin-top: 56px; }
    .hero-slider { min-height: 720px; }
    .hero-inner { grid-template-columns: 1fr; padding: 5rem 1.25rem 3rem; gap: 2rem; }
    .hero-text h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .hero-text h2 { font-size: 1rem; }
    .hero-image { min-height: 260px; }
    .about-container.overview { grid-template-columns: 1fr; }
    .about-images { grid-template-columns: 1fr 1fr; gap: 8px; }
    .about-images img:first-child,
    .about-images img:last-child { width: 100%; height: 220px; margin-top: 0; }
    .about-stats { gap: 1.5rem 2rem; }
    .about-stat-value { font-size: clamp(1.75rem, 8vw, 2.25rem); }
    .services-carousel { grid-template-columns: 1fr; }
    .aq-roi-container { grid-template-columns: 1fr; gap: 1rem; }
    .aq-roi-frame { padding: 2rem 1.25rem 7rem; }
    .logo-track img { height: 40px; }
}

/* ---- Small Phone (max 480px) ---- */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    h1 { font-size: clamp(1.75rem, 9vw, 2.25rem); }
    h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
    .section { padding: 3rem 0; }
    .section-head { margin-bottom: 2rem; }
    .hero-slider { min-height: 640px; }
    .hero-inner { padding: 4rem 1rem 2.5rem; }
    .hero-text h3 { font-size: .875rem; }
    .btn-primary { padding: .65rem 1.1rem; font-size: .8rem; }
    .about-images { grid-template-columns: 1fr; }
    .about-images img:first-child,
    .about-images img:last-child { width: 100%; height: 240px; }
    .about-stats { flex-direction: column; gap: 1.25rem; }
    .services-card-content { padding: 1.25rem; }
    .aq-roi-big-number { font-size: clamp(28px, 9vw, 44px); }
    .aq-roi-frame { padding: 1.75rem 1rem 8rem; min-height: 380px; }
    .slider-controls button { width: 36px; height: 36px; font-size: 15px; }
}