/* styles.css */

/* --- 1. GLOBAL STYLES & BRAND IDENTITY --- */
body {
  font-family: 'Inter', sans-serif;
  color: #2C2C2C; /* Graphite Gray */
  background-color: #F9FAFB; /* Softer white */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="ar"] body {
  font-family: 'Tajawal', sans-serif;
}

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #E5E7EB; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #1E2A46; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #2d3f6b; }


/* --- 2. "WOW" FACTOR - SERVICE DETAILS LAYOUT --- */

.unified-top-section {
  background-color: #FFFFFF;
  border-radius: 1.5rem; /* 24px */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
  position: relative;
  overflow: hidden;
  padding: 3rem 2rem;
}

@media (min-width: 768px) {
  .unified-top-section {
    padding: 4rem;
  }
}

@keyframes moveGrid {
    from { background-position: 0 0; }
    to { background-position: 80px 80px; }
}

.unified-top-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background-image:
      linear-gradient(to right, rgba(30, 42, 70, 0.05) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(30, 42, 70, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.7;
  z-index: 0;
  animation: moveGrid 45s linear infinite;
}

.service-hero-grid, .features-content-wrapper {
    position: relative;
    z-index: 1;
}

.service-hero-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 5rem; /* Space between hero and features */
}

@media (min-width: 768px) {
  .service-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  html[lang="ar"] .service-hero-grid {
    direction: rtl;
  }
}

.service-title {
  color: #1E2A46;
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.service-description {
  color: #4B5563;
  font-size: 1.125rem;
  white-space: pre-line;
  line-height: 1.75;
}

.service-image {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(30, 42, 70, 0.25);
}

/* ===== START: THE FINAL AND CORRECT SOLUTION FOR OVERFLOW ISSUE ===== */

.service-features-title {
  text-align: center;
  color: #1E2A46;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.service-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-features li {
  display: flex;
  flex-direction: column;
  min-width: 0; /* IMPORTANT: Allows the flex item to shrink below its content's intrinsic size */
}

.feature-box {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(30, 42, 70, 0.1);
  position: relative;
  padding-left: 4.5rem;
  transition: all 0.3s ease-in-out;
  display: flex;
  align-items: center;
  flex-grow: 0; /* <<< THIS IS THE FIX */
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(30, 42, 70, 0.1), 0 4px 6px -4px rgba(30, 42, 70, 0.1);
}

html[lang="ar"] .feature-box {
  padding-left: 1.5rem;
  padding-right: 4.5rem;
}

.feature-box::before {
  content: '✓';
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #1E2A46;
  color: #7BDFF2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
}

html[lang="ar"] .feature-box::before {
  left: auto;
  right: 1.5rem;
}

.feature-title {
  font-weight: 500;
  color: #1E2A46;
}

.feature-description-outside {
  font-size: 0.9rem;
  color: #6B7280;
  line-height: 1.6;
  text-align: left;
  margin-top: 0.75rem;
  padding: 0 0.5rem;
  /* THE FIX: These lines force long, unbreakable words to wrap inside their container */
  overflow-wrap: break-word;
  word-break: break-all;
}

html[lang="ar"] .feature-description-outside {
  text-align: right;
}

/* ===== END: THE FINAL AND CORRECT SOLUTION ===== */


/* Section 3: Call To Action */
.service-cta-section {
  text-align: center;
  padding: 3rem 1.5rem;
  background-color: #1E2A46;
  border-radius: 1.5rem;
}

.service-cta-title {
  color: #FFFFFF;
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-cta-description {
  color: #D1D5DB;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.service-cta-button {
  display: inline-block;
  background-color: #7BDFF2;
  color: #1E2A46;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.service-cta-button:hover {
  background-color: #62c4d4;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


/* --- 3. FLOATING ACTION BUTTONS (FAB) --- */
.fab-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.fab-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: #1E2A46;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
}

.fab-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 16px rgba(30, 42, 70, 0.3);
}

.fab-tooltip {
  position: absolute;
  right: 100%;
  margin-right: 1rem;
  white-space: nowrap;
  padding: 0.25rem 0.75rem;
  background-color: #2C2C2C;
  color: white;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateX(5px);
  transition: all 0.2s ease-out;
  pointer-events: none;
}

html[lang="ar"] .fab-tooltip {
  right: auto;
  left: 100%;
  margin-right: 0;
  margin-left: 1rem;
  transform: translateX(-5px);
}

.fab-button:hover .fab-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.service-description p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}