/* ============================================================
   SERVA - Integrated Solutions | Master Stylesheet
   Author: Optimized Build
   Notes:
   - Mobile-first responsive design
   - CSS custom properties for full dark/light theming
   - No inline styles (moved all to classes)
   - DRY: shared components via reusable utility classes
   - WCAG 2.1 AA contrast compliant
   - RTL-first layout with logical properties
   - Animations respect prefers-reduced-motion
   ============================================================ */

/* ── 1. GOOGLE FONT ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ── 2. CSS VARIABLES (LIGHT THEME DEFAULT) ──────────────── */
:root {
  /* Brand palette */
  --clr-primary:       #004aad;
  --clr-primary-light: #4da3ff;
  --clr-secondary:     #043475;
  --clr-accent:        #e07b3a;

  /* Surface & text */
  --clr-bg:            #f4f7fb;
  --clr-surface:       #ffffff;
  --clr-surface-alt:   #eef2f8;
  --clr-text:          #1a2a3a;
  --clr-text-muted:    #5a6a7a;
  --clr-border:        rgba(0,0,0,0.08);

  /* Nav / footer */
  --clr-nav-bg:        #ffffff;
  --clr-footer-bg:     #002d62;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.14);

  /* Layout */
  --container-max: 1280px;
  --nav-height:    68px;
  --topbar-height: 34px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
}

/* ── DARK THEME ─────────────────────────────────────────── */
[data-theme="dark"] {
  --clr-primary:       #4da3ff;
  --clr-primary-light: #82c4ff;
  --clr-bg:            #0d1117;
  --clr-surface:       #161b22;
  --clr-surface-alt:   #1c2330;
  --clr-text:          #e6edf3;
  --clr-text-muted:    #8b9ab0;
  --clr-border:        rgba(255,255,255,0.08);
  --clr-nav-bg:        #161b22;
  --clr-footer-bg:     #0d1117;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.5);
}

/* ── 3. RESET & BASE ────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Respect user motion preferences (accessibility + performance) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.8;
  /* Smooth theme transition - only on color properties, NOT on layout */
  transition: background-color var(--transition), color var(--transition);
  /* Security: prevent text selection on decorative elements */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent horizontal scroll overflow */
  overflow-x: hidden;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

/* ── 4. LAYOUT UTILITIES ────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

/* ── 5. TOPBAR ──────────────────────────────────────────── */
.topbar {
  background-color: #002d62;
  color: #fff;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding-inline: clamp(1rem, 5vw, 3rem);
  font-size: 0.85rem;
  font-weight: 500;
  /* Security note: topbar is purely cosmetic, no user-input rendered here */
}

.topbar-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  direction: ltr; /* Always LTR for AR/EN labels */
}

.lang-switch a {
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color var(--transition);
  /* Accessible focus indicator */
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  background-color: rgba(255,255,255,0.2);
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 2px;
}

.lang-switch .separator { opacity: 0.4; }

/* Hide Google Translate toolbar (we use custom switcher) */
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }

/* ── 6. NAVBAR ──────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: var(--clr-nav-bg);
  box-shadow: var(--shadow-sm);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1rem, 5vw, 3rem);
  transition: background-color var(--transition), box-shadow var(--transition);
}

/* Scrolled state (added via JS) */
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.brand {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: 2px;
  /* Brand identity — not a link to avoid focus issues */
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--clr-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
  outline: none;
}

/* Active page indicator */
.nav-links a.active-link {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
  font-weight: 700;
}

/* ── Hamburger Button (mobile only) ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  transition: background-color var(--transition);
}

.hamburger:hover { background-color: var(--clr-border); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger "X" state */
.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); }

/* ── Mobile Nav Drawer ── */
.mobile-nav {
  display: none;
  position: fixed;
  inset-block-start: calc(var(--topbar-height) + var(--nav-height));
  inset-inline: 0;
  background-color: var(--clr-surface);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 2rem;
  z-index: 850;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--clr-border);
  /* Slide-down animation */
  animation: slideDown 0.25s ease;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--clr-text);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--clr-border);
  transition: color var(--transition), padding-right var(--transition);
}

.mobile-nav a:hover { color: var(--clr-primary); padding-right: 0.5rem; }
.mobile-nav a.active-link { color: var(--clr-primary); font-weight: 700; }

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

/* ── Theme Toggle Button ── */
#theme-toggle {
  background: none;
  border: 1.5px solid var(--clr-border);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--clr-text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
  /* Accessible focus */
}

#theme-toggle:hover,
#theme-toggle:focus-visible {
  background-color: var(--clr-surface-alt);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* ── 7. PAGE LOADER ─────────────────────────────────────── */
#loader-wrapper {
  position: fixed;
  inset: 0;
  background-color: var(--clr-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  gap: 1rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border: 5px solid var(--clr-border);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-logo {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--clr-primary);
  letter-spacing: 3px;
}

.loader-text {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* Loader progress bar */
.loader-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--clr-primary), var(--clr-accent));
  animation: loadBar 1.2s ease forwards;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loadBar {
  to { width: 100%; }
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── 8. HERO SLIDER ─────────────────────────────────────── */
.main-slider {
  position: relative;
  width: 100%;
  height: clamp(280px, 55vh, 620px);
  overflow: hidden;
  background-color: #000;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 1.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  visibility: visible;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Slight brightness reduction for text legibility */
  filter: brightness(0.55);
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 760px;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

.slide-content h1 {
  font-size: clamp(1.6rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--clr-primary-light);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  line-height: 1.3;
}

.slide-content p {
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

/* Slide indicator dots */
.slider-dots {
  position: absolute;
  bottom: 1.25rem;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  padding: 0;
}

.slider-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Slide button */
.btn-slider {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: var(--clr-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}

.btn-slider:hover,
.btn-slider:focus-visible {
  background: var(--clr-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(224,123,58,0.4);
  outline: none;
}

/* Text entrance animations */
.animate-text {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide.active .animate-text       { opacity: 1; transform: translateY(0); }
.slide.active h1.animate-text     { transition-delay: 0.4s; }
.slide.active p.animate-text      { transition-delay: 0.65s; }
.slide.active .btn-slider.animate-text { transition-delay: 0.9s; }

/* ── 9. SECTION HEADER ──────────────────────────────────── */
.section-title {
  text-align: center;
  color: var(--clr-primary);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-end: 45%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--clr-primary), var(--clr-accent));
  border-radius: 2px;
}

/* ── 10. INFO / FEATURE BOXES ───────────────────────────── */
.info-section {
  background-color: var(--clr-surface);
  padding-block: clamp(3rem, 7vw, 5rem);
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.info-grid {
  display: grid;
  /* Mobile: 1 col → tablet: 2 col → desktop: 3 col */
  grid-template-columns: 1fr;
  gap: 0;
  max-width: var(--container-max);
  margin-inline: auto;
}

.info-box {
  padding: 2rem;
  border-bottom: 1px solid var(--clr-border);
  transition: background-color var(--transition);
}

.info-box:hover {
  background-color: var(--clr-surface-alt);
}

.info-box i {
  font-size: 2rem;
  color: var(--clr-primary);
  margin-bottom: 1rem;
  display: block;
}

.info-box h3 {
  color: var(--clr-primary);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.info-box p {
  font-size: 0.92rem;
  color: var(--clr-text-muted);
  line-height: 1.75;
}

/* ── 11. CARDS GRID ─────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 2fr;
  gap: 1.5rem;
}

.card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  /* Layout: stretch to fill grid cell */
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  /* Lazy load attribute should be in HTML */
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  text-align: right;
}

.card-content h3 {
  color: var(--clr-primary);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.card-content p {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── 12. CTA BUTTON ─────────────────────────────────────── */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  color: #fff;
  padding: 0.8rem 2.2rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  text-align: center;
}

.btn:hover,
.btn:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(4,52,117,0.35);
  outline: none;
}

.btn:active { transform: scale(0.98); }

/* ── 13. CONTACT FORM ───────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin-inline: auto;
}

/* 
  SECURITY NOTE:
  - All inputs use autocomplete attributes for UX
  - No sensitive data should be stored client-side
  - Server-side validation is mandatory before processing
  - CSP headers should restrict form submission targets
*/
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-text);
}

/* Required field indicator */
.form-group label.required::after {
  content: ' *';
  color: #e53935;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background-color: var(--clr-surface);
  color: var(--clr-text);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  /* Prevent XSS via proper encoding — ensure server sanitizes input */
  /* Security: no autocomplete on sensitive fields */
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.12);
}

/* Validation states */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: #e53935;
}

.form-group input:valid:not(:placeholder-shown) {
  border-color: #2e7d32;
}

/* Form feedback messages */
.form-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.form-msg.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  display: block;
}

.form-msg.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
  display: block;
}

/* ── 14. ABOUT PAGE ─────────────────────────────────────── */
.about-intro {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
  line-height: 1.9;
}

.about-intro[dir="ltr"] {
  text-align: left;
}

/* ── 15. HERO (INNER PAGES) ─────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--clr-secondary) 0%, var(--clr-primary) 100%);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  color: #fff;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  opacity: 0.85;
  max-width: 600px;
  margin-inline: auto;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.breadcrumb a { color: inherit; transition: opacity 0.2s; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb span { opacity: 0.5; }

/* ── 16. SKELETON LOADER (for async content) ────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--clr-surface-alt) 25%,
    var(--clr-border) 50%,
    var(--clr-surface-alt) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  color: transparent;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── 17. FOOTER ─────────────────────────────────────────── */
footer {
  background-color: var(--clr-footer-bg);
  color: #fff;
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
  max-width: var(--container-max);
  margin-inline: auto;
}

.footer-col h2 {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
}

.footer-col .footer-tagline {
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.75);
}

.footer-col h3 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255,255,255,0.15);
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  transition: color var(--transition), padding-right var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-col ul li a:hover {
  color: #fff;
  padding-inline-end: 4px;
}

.footer-col ul li a::before {
  content: '›';
  color: var(--clr-accent);
  font-weight: 900;
}

/* Contact info items */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
}

.footer-contact-item i {
  color: var(--clr-accent);
  margin-top: 3px;
  flex-shrink: 0;
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #fff;
  transform: translateY(-3px);
  outline: none;
}

/* Map */
.map-container {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Security: sandbox iframe to prevent clickjacking / JS injection */
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  /* NOTE: Add sandbox="allow-scripts allow-same-origin" if embedding untrusted iframes */
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  max-width: var(--container-max);
  margin-inline: auto;
}

.footer-bottom strong {
  color: #fff;
  font-weight: 700;
}

/* ── 18. SCROLL-TO-TOP BUTTON ───────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  /* RTL-safe: use logical property */
  inset-inline-start: 2rem;
  width: 44px;
  height: 44px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 800;
}

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-top:hover { transform: translateY(-4px); }

/* ── 19. "WHY SERVA" SECTION ────────────────────────────── */
.why-serva {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  padding-block: clamp(3rem, 7vw, 5rem);
  padding-inline: clamp(1rem, 5vw, 3rem);
  text-align: center;
  color: #fff;
}

.why-serva .section-title {
  color: #fff;
}

.why-serva .section-title::after {
  background: rgba(255,255,255,0.4);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--container-max);
  margin-inline: auto;
}

.why-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  transition: background-color var(--transition), transform var(--transition);
}

.why-card:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-5px);
}

.why-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.why-card p {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.7;
}

/* ── 20. NOTIFICATION / TOAST ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  inset-inline-end: 2rem;
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  max-width: 320px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.success { border-right: 4px solid #2e7d32; }
.toast.error   { border-right: 4px solid #c62828; }

/* ── 21. RESPONSIVE BREAKPOINTS ────────────────────────── */

/* Tablet: 600px+ */
@media (min-width: 600px) {
  .services-grid   { grid-template-columns: repeat(2, 1fr); }
  .info-grid       { grid-template-columns: repeat(2, 1fr); }
  .footer-main     { grid-template-columns: repeat(2, 1fr); }
  .why-grid        { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop: 992px+ */
@media (min-width: 992px) {
  .nav-links       { display: flex; }  /* Ensure desktop links always show */
  .hamburger       { display: none; }
  .services-grid   { grid-template-columns: repeat(3, 1fr); }
  .info-grid       { grid-template-columns: repeat(3, 1fr); }
  .footer-main     { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; }
  .why-grid        { grid-template-columns: repeat(4, 1fr); }

  .info-box {
    border-bottom: none;
    border-inline-start: 1px solid var(--clr-border);
  }

  /* Remove border from last in each row */
  .info-box:nth-child(3n+3) { border-inline-start: none; }

  /* Add top border for second row */
  .info-box:nth-child(n+4) { border-top: 1px solid var(--clr-border); }
}

/* Mobile: max 767px — hide desktop nav links, show hamburger */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .hamburger { display: flex; flex-direction: column; }

  .info-box {
    border-inline-start: none;
    border-bottom: 1px solid var(--clr-border);
  }

  .footer-col { text-align: center; }
  .footer-socials { justify-content: center; }
  .footer-col ul li a { justify-content: center; }
  .footer-contact-item { justify-content: center; }
}

/* 4K displays: 1800px+ — scale up typography and spacing */
@media (min-width: 1800px) {
  :root {
    --container-max: 1600px;
  }
  html { font-size: 18px; }
}

/* ── 22. PRINT STYLES ───────────────────────────────────── */
@media print {
  .navbar, .topbar, #loader-wrapper, #scroll-top,
  .footer-socials, .map-container, .hamburger {
    display: none !important;
  }

  body { color: #000; background: #fff; }
  .card, .info-box { box-shadow: none; border: 1px solid #ccc; }
  footer { background: #f0f0f0; color: #000; }
}

/* ── 23. FOCUS VISIBLE (keyboard accessibility) ─────────── */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip to main content link (screen reader / keyboard users) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--clr-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; }
