/* ==========================================================
   Design System & CSS Variables - Miyahuna Jordan
   ========================================================== */
:root {
  --primary-green: #4D9E0A;
  --primary-green-dark: #3E8208;
  --primary-green-line: #579B20;
  --teal-blue: #15799A;
  --teal-blue-dark: #0E5E7A;
  --aqua-blue: #1698C6;
  --inactive-gray: #AAAAAA;
  --text-dark: #111111;
  --text-body: #333333;
  --text-muted: #666666;
  --btn-text: #555555;
  --arrow-bg: #F5F5F5;
  --arrow-color: #B8B8B8;
  --bg-white: #FFFFFF;
  --border-light: #EEEEEE;
  
  --font-main: "Cairo", "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================
   Reset & Base Styles
   ========================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  direction: rtl;
  font-family: var(--font-main);
  background-color: var(--bg-white);
  color: var(--text-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

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

/* ==========================================================
   Page Layout
   ========================================================== */
.page-wrapper {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================
   Header (Header Section)
   ========================================================== */
.site-header {
  width: 100%;
  height: 65px;
  background-color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 50;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.header-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Right side (RTL): Menu */
.header-right {
  display: flex;
  align-items: center;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 4px;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.menu-btn:hover {
  transform: scale(1.04);
}

.menu-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
}

/* Center: Logo */
.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.site-logo-img {
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .site-logo-img {
  transform: scale(1.03);
}

/* Left side (RTL) */
.header-left {
  display: flex;
  align-items: center;
}

/* ==========================================================
   Main Services Section
   ========================================================== */
.services-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 50px;
}

.section-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

/* Main Section Heading */
.main-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-top: 30px;
  margin-bottom: 22px;
  letter-spacing: -0.6px;
  line-height: 1.25;
}

/* Tabs Navigation */
.tabs-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 45px; /* Clean gap matching prompt */
}

.tab-item {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--inactive-gray);
  padding: 4px 8px;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  text-align: center;
}

.tab-item.active {
  color: var(--teal-blue);
  font-size: 16px;
  font-weight: 800;
}

.tab-item:hover:not(.active) {
  color: #777777;
}

.tab-divider-line {
  height: 2px;
  background-color: var(--primary-green-line);
  width: 85%;
  max-width: 320px;
  margin: 7px auto 8px auto;
  border-radius: 2px;
}

/* ==========================================================
   Services Slider & Cards
   ========================================================== */
.services-slider-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slider-viewport {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.slider-track {
  display: flex;
  width: 100%;
  transition: transform var(--transition-normal);
}

/* Main Service Card */
.service-card {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-inner {
  width: 84%;
  max-width: 360px;
  height: 155px;
  background-color: var(--primary-green);
  border-radius: 24px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 12px;
  position: relative;
  box-shadow: 0 4px 12px rgba(77, 158, 10, 0.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-inner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(77, 158, 10, 0.25);
}

/* Teardrop / Badge Icon */
.teardrop-icon-box {
  width: 48px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.teardrop-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.bill-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(2px);
}

/* Card Typography */
.card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--bg-white);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

/* Entry Button */
.btn-entry {
  width: 115px;
  height: 32px;
  background-color: var(--bg-white);
  color: var(--btn-text);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.btn-entry:hover {
  background-color: #FAFAFA;
  color: var(--teal-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.btn-entry:active {
  transform: translateY(0);
}

/* ==========================================================
   Slider Controls (Arrows)
   ========================================================== */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.slider-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--arrow-bg);
  color: var(--arrow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.slider-arrow:hover {
  background-color: #EAEAEA;
  color: var(--text-dark);
  transform: scale(1.05);
}

.slider-arrow:active {
  transform: scale(0.96);
}

/* ==========================================================
   View All Link
   ========================================================== */
.view-all-wrapper {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.view-all-link {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 6px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.view-all-link:hover {
  color: var(--teal-blue);
  transform: translateY(-1px);
}

/* ==========================================================
   Modals & Drawers
   ========================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 16px;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-white);
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-normal);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  background: #F9FAFB;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close-btn {
  font-size: 24px;
  color: #888;
  line-height: 1;
  padding: 0 6px;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 20px 22px;
  max-height: 70vh;
  overflow-y: auto;
}

.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.services-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #F8F9FA;
  border-radius: 12px;
  transition: background var(--transition-fast);
}

.services-list li:hover {
  background: #EEF7FA;
}

.list-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.list-info {
  flex: 1;
}

.list-info strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.list-info p {
  font-size: 11.5px;
  color: var(--text-muted);
}

.list-action-btn {
  background: var(--primary-green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 10px;
  transition: background var(--transition-fast);
}

.list-action-btn:hover {
  background: var(--primary-green-dark);
}

/* Service Details Popup */
.modal-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #DCE3E8;
  border-radius: 10px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 18px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.modal-input:focus {
  border-color: var(--teal-blue);
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.submit-action-btn {
  width: 100%;
  height: 44px;
  background: var(--primary-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  transition: background var(--transition-fast);
}

.submit-action-btn:hover {
  background: var(--primary-green-dark);
}

/* Side Drawer Menu */
.menu-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.menu-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.menu-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #FFF;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.menu-drawer-backdrop.open .menu-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--teal-blue);
}

.drawer-close-btn {
  font-size: 26px;
  color: #666;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}

.drawer-link {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  transition: all var(--transition-fast);
}

.drawer-link:hover, .drawer-link.active {
  background-color: #F2F9FA;
  color: var(--teal-blue);
  border-right: 3px solid var(--teal-blue);
}

/* ==========================================================
   Responsive Adaptations (Tablet & Desktop)
   ========================================================== */
@media (min-width: 768px) {
  .site-header {
    height: 72px;
  }
  
  .header-container {
    max-width: 1100px;
    padding: 0 32px;
  }

  .section-container {
    max-width: 900px;
  }

  .main-title {
    font-size: 34px;
    margin-top: 40px;
  }

  .tabs-nav {
    margin-bottom: 50px;
  }

  .tab-item {
    font-size: 16px;
  }

  .tab-item.active {
    font-size: 17px;
  }

  .tab-divider-line {
    max-width: 380px;
  }

  .card-inner {
    max-width: 360px; /* Keeps the exact compact aesthetic requested */
  }
}
