@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* CSI Control Services International - Modern UI Theme */

:root {
  /* Colors - Sleek Forest Green, Charcoal Grey, and Clean White Scheme */
  --green: #1b4332;           /* Deep corporate forest green */
  --green-light: #2d6a4f;     /* Rich emerald green for hover & accents */
  --green-accent: #40916c;    /* Vibrant accent green for borders & highlights */
  --green-soft: #e8f5e9;      /* Smooth light green backdrop for pill/active items */
  --green-glow: rgba(45, 106, 79, 0.12);

  --text: #212529;            /* Luxurious dark grey/black for optimal readability */
  --text-muted: #5c677d;      /* Muted charcoal grey for subtext and body text */
  --border: #e2e8f0;          /* Crisp light grey borders for elements */
  
  --bg: #f8f9fa;              /* Modern off-white body backdrop */
  --grey-bg: #f8f9fa;
  --grey-card: #ffffff;       /* Pure white card backgrounds */
  --grey-border-light: #f1f3f5;

  --max-w: 1120px;            /* Modern wide grid spacing */

  /* Design Tokens */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 10px 30px rgba(27, 67, 50, 0.04);
  --shadow-hover: 0 15px 40px rgba(27, 67, 50, 0.08);
  --shadow-input: 0 0 0 4px rgba(45, 106, 79, 0.15);

  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 12px;
  --border-radius-sm: 6px;
}

/* ── RESET & GLOBAL STYLES ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth transitions for interactive elements */
a, button, input, textarea, select {
  transition: var(--transition-smooth);
}

/* Modern Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--grey-bg);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ── SITE HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0.9rem 2.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-subtle);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-link:hover {
  transform: scale(1.02);
}

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

.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  border-radius: var(--border-radius-sm);
}

.nav-burger:hover {
  background: var(--grey-border-light);
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── SITE NAV ── */
.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.site-nav > ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.55rem 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: var(--border-radius-sm);
  position: relative;
}

.site-nav a:hover {
  color: var(--green);
  background: var(--green-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--green);
  background: var(--green-soft);
  font-weight: 800;
}

/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.lang-switcher a {
  display: block;
  padding: 2px;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 0;
}

.lang-switcher a:hover {
  border-color: var(--green-accent);
  transform: translateY(-1px);
  background: none;
}

.lang-switcher img {
  border-radius: 2px;
  display: block;
  width: 21px;
  height: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── MOBILE NAV ── */
@media (max-width: 860px) {
  .site-header {
    padding: 0.8rem 1.5rem;
  }

  .nav-burger {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--grey-card);
    border-bottom: 2px solid var(--green);
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-hover);
    z-index: 200;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-nav > ul {
    flex-direction: column;
    width: 100%;
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    border-radius: var(--border-radius-sm);
    width: 100%;
  }

  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    justify-content: center;
    width: 100%;
  }

  .nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── PAGE LAYOUT ── */
.page-wrapper {
  max-width: 920px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.main-content {
  min-width: 0;
  background: var(--grey-card);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.sidebar {
  display: none;
}

@media (max-width: 860px) {
  .page-wrapper {
    padding: 0 1.25rem;
    margin-top: 1.5rem;
  }
  
  .main-content {
    padding: 2.25rem 1.5rem;
  }
}

/* ── MAIN CONTENT TYPOGRAPHY ── */
.main-content h1 {
  color: var(--green);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  border-left: none; /* Replaced left border with modern bottom layout */
  padding-left: 0;
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
  padding-left: 0;
}

.section-subtitle a {
  color: var(--green-light);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1.5px solid transparent;
}

.section-subtitle a:hover {
  border-color: var(--green-light);
  text-decoration: none;
}

.main-content h2 {
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 0.5rem;
}

.main-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: var(--green-accent);
  border-radius: 2px;
}

.main-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.main-content a {
  color: var(--green-light);
  text-decoration: none;
  font-weight: 600;
}

.main-content a:hover {
  color: var(--green);
  text-decoration: underline;
}

.main-content strong {
  font-weight: 700;
  color: var(--text);
}

/* ── PHOTO GRID ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 2rem 0;
}

.photo-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-subtle);
  background: var(--grey-bg);
  aspect-ratio: 4/3;
}

.photo-grid a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green-accent);
}

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

.photo-grid a:hover img {
  transform: scale(1.06);
  opacity: 0.95;
}

@media (max-width: 600px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

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

/* ── SOLUTIONS CARD GRID ── */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem 0;
}

.solution-card {
  background: var(--grey-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green-accent);
}

.solution-card h3 {
  color: var(--green);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--grey-border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.solution-card h3::after {
  display: none !important; /* Prevent global h2 line styles if any */
}

.solution-card h3::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.solution-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── MEMBER LOGOS (About Page) ── */
.member-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.member-item:hover {
  background: var(--grey-card);
  box-shadow: var(--shadow-card);
  border-color: var(--green-accent);
  transform: translateY(-2px);
}

.member-item img {
  flex-shrink: 0;
  max-height: 60px;
  width: auto;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  padding: 4px;
  background: #fff;
  box-shadow: var(--shadow-subtle);
}

.member-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.member-item > a {
  line-height: 0;
}

/* ── CERTIFICATION LINKS ── */
.certif-links {
  margin: 0.85rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.certif-links a {
  display: inline-flex;
  align-items: flex-start;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-light);
  text-decoration: none;
  line-height: 1.45;
}

.certif-links a::before {
  content: '→';
  margin-right: 8px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: transform 0.2s ease;
}

.certif-links a:hover::before {
  transform: translateX(3px);
}

/* ── COUNTRIES (Solutions Page) ── */
.countries {
  line-height: 1.9;
  text-align: justify;
  background: var(--grey-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  word-spacing: 0.12em;
}

/* ── CONTACT ADDRESS & FORM ── */
.contact-address {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--grey-bg);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--green);
}

.contact-address p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-address p strong {
  color: var(--text);
}

.contact-address p:last-child {
  margin-bottom: 0;
}

.contact-form {
  max-width: 540px;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form label {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--grey-card);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: var(--shadow-input);
  background: #fff;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form .actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.contact-form .btn-submit {
  padding: 0.8rem 2rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.15);
}

.contact-form .btn-submit:hover {
  background: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(27, 67, 50, 0.22);
}

.contact-form .btn-reset {
  padding: 0.8rem 1.5rem;
  background: var(--grey-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.contact-form .btn-reset:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--grey-bg);
}

/* ── SITE FOOTER ── */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── SINGLE PAGE APPLICATION SUPPORT ── */
body[data-current-lang="en"] [data-lang="fr"] {
  display: none !important;
}

body[data-current-lang="fr"] [data-lang="en"] {
  display: none !important;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
  animation: sectionFadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

/* Active flag indicators */
.lang-switcher a.active {
  border-color: var(--green-accent) !important;
  background: var(--green-soft) !important;
  transform: scale(1.15) !important;
  box-shadow: 0 3px 8px rgba(45, 106, 79, 0.2);
}

.lang-switcher a:hover {
  transform: scale(1.1) !important;
}

/* Honeypot field — visually hidden from users, visible to bots */
.csi-honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
