/* ============================================================
   hosp — Hospitals Network
   Namespace  : hosp
   Fonts      : El Messiri (نصوص) + IBM Plex Mono (وسوم الدلالة)
============================================================ */

/* 1. Variables & Colors */
.hosp {
    /* عام للسكشن */
    --hosp-bg:             #F5F8FB;
    --hosp-text:           #4B5C71;
    --hosp-title:          #0B2A4A;
    --hosp-border:         #DDE6EE;

    /* الكارت */
    --hosp-card-bg:        #FFFFFF;
    --hosp-card-title:     #0B2A4A;
    --hosp-card-text:      #55677D;
    --hosp-card-btn-bg:    #0B9AA5; 
    --hosp-card-btn-text:  #FFFFFF;

    /* الأزرار العامة وCTA */
    --hosp-btn-bg:         #0B2A4A;
    --hosp-btn-bg-hover:   #0B9AA5;
    --hosp-btn-text:       #FFFFFF;
    --hosp-btn-text-hover: #0B2A4A;

    /* Padding للسكشن بالكامل */
    --hosp-padding-top:    2rem;
    --hosp-padding-bottom: 2rem;
}

/* 2. Reset داخل الـ namespace */
.hosp,
.hosp *,
.hosp *::before,
.hosp *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 3. Base Styles — Mobile */
.hosp {
    background: var(--hosp-bg);
    padding-block: var(--hosp-padding-top) var(--hosp-padding-bottom);
    font-family: "El Messiri", sans-serif;
    direction: rtl;
    overflow: hidden;
}

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

.hosp__container {
    width: 100%;
    max-width: 90rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.hosp__header {
    text-align: center;
    max-width: 40rem;
    margin-inline: auto;
    margin-bottom: 2.75rem;
}

.hosp__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(0.7rem, 2.6vw, 0.8rem);
    letter-spacing: 0.12em;
    color: var(--hosp-card-btn-bg);
    background: color-mix(in srgb, var(--hosp-card-btn-bg) 12%, transparent);
    border: 0.0625rem solid color-mix(in srgb, var(--hosp-card-btn-bg) 35%, transparent);
    border-radius: 999rem;
    padding: 0.4em 1.1em;
    margin-bottom: 1.25rem;
}

.hosp__title {
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    font-weight: 700;
    color: var(--hosp-title);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.hosp__subtitle {
    font-size: clamp(0.95rem, 3.6vw, 1.05rem);
    color: var(--hosp-text);
    line-height: 1.75;
}

.hosp__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.hosp__card {
    position: relative;
    background: var(--hosp-card-bg);
    border: 0.0625rem solid var(--hosp-border);
    border-radius: 0.9rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

/* الشريط الجانبي — توقيع القسم على الهوفر */
.hosp__card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 0.25rem;
    background: var(--hosp-card-btn-bg);
    transform: scaleY(0.35);
    transform-origin: bottom;
    transition: transform 0.4s ease;
    z-index: 2; /* ليكون فوق الصورة وجسم الكارت */
}

.hosp__card:hover {
    box-shadow: 0 1.25rem 2.5rem -1.5rem rgba(11, 42, 74, 0.35);
    transform: translateY(-0.2rem);
}

.hosp__card:hover::before { transform: scaleY(1); }

/* دمج الصورة بشكل مقوس واحترافي */
.hosp__card-image-wrap {
    position: relative;
    width: 100%;
    height: 12rem; /* ارتفاع الصورة */
    overflow: hidden;
}

.hosp__card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hosp__card:hover .hosp__card-img {
    transform: scale(1.05);
}



.hosp__card-body {
    position: relative;
    padding: 1.5rem 1.5rem 1rem; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 1; /* ليكون فوق القوس */
}

.hosp__card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hosp-card-title);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.hosp__card-text {
    font-size: 0.95rem;
    color: var(--hosp-card-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hosp__card-text strong {
    color: var(--hosp-title);
}

/* زر الخدمة في أسفل الكارت */
.hosp__card-footer {
    padding: 0 1.5rem 1.5rem;
    margin-top: auto; /* لضمان بقائه في الأسفل */
}

.hosp__card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-family: "El Messiri", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hosp-card-btn-text);
    background: var(--hosp-card-btn-bg);
    border: none;
    border-radius: 0.6rem;
    padding: 0.7em 1.5em;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    width: 100%; /* الزر يأخذ عرض الكارت */
    justify-content: center;
}

.hosp__card-btn:hover,
.hosp__card-btn:focus-visible {
    background: var(--hosp-btn-bg); /* لون الـ hover الغامق */
    color: var(--hosp-btn-text);
    transform: translateY(-0.1rem);
}

.hosp__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 0.0625rem solid var(--hosp-border);
}

.hosp__cta-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hosp-title);
}

.hosp__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-family: "El Messiri", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hosp-btn-text);
    background: var(--hosp-btn-bg);
    border: none;
    border-radius: 0.6rem;
    padding: 0.9em 1.9em;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.hosp__cta-btn:hover,
.hosp__cta-btn:focus-visible {
    background: var(--hosp-btn-bg-hover);
    color: var(--hosp-btn-text-hover);
    transform: translateY(-0.15rem);
}

.hosp__cta-btn:focus-visible {
    outline: 0.125rem solid var(--hosp-card-btn-bg);
    outline-offset: 0.2rem;
}

@keyframes hosp-reveal {
    from { opacity: 0; transform: translateY(1rem); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .hosp__card,
    .hosp__cta-btn,
    .hosp__card-btn,
    .hosp__card-img,
    .hosp__card::before {
        transition: none;
        animation: none;
    }
}

/* 4. Breakpoints بالترتيب */

/* Small Tablet 481 → 600 */
@media (min-width: 481px) {
    .hosp__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Medium Tablet 601 → 768 */
@media (min-width: 601px) {
    .hosp__header { margin-bottom: 3.25rem; }
}

/* Large Tablet 769 → 1024 */
@media (min-width: 769px) {
    .hosp__grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    .hosp__cta { flex-direction: row; justify-content: space-between; text-align: right; }
}

/* Small Desktop 1025 → 1280 */
@media (min-width: 1025px) {
    .hosp { --hosp-padding-top: 6rem; --hosp-padding-bottom: 6rem; }
    .hosp__grid { gap: 1.75rem; }
    .hosp__card-image-wrap { height: 13.5rem; }
}

/* Medium Desktop 1281 → 1440 */
@media (min-width: 1281px) {
    .hosp__container { padding-inline: 2.5rem; }
}

/* Large Desktop 1441 → 1920 */
@media (min-width: 1441px) {
    .hosp { --hosp-padding-top: 7rem; --hosp-padding-bottom: 7rem; }
}

/* Extra Large 1921+ */
@media (min-width: 1921px) {
    .hosp__container { max-width: 100rem; }
}
/* International accreditation badges (JCI / NABH / ISO...) under the hospital title */
.sgl-hosp__accreditations {
  margin-top: 1rem;
}
.sgl-hosp__accreditations-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0B2E59;
  margin-bottom: 0.55rem;
}
.sgl-hosp__accreditations-title i {
  color: #0B9AA5;
  font-size: 0.85rem;
}
.sgl-hosp__accreditations-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.sgl-hosp__accred-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid #C9EEF0;
  border-radius: 0.8rem;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 0.3rem 0.8rem rgba(11, 46, 89, 0.06);
}
.sgl-hosp__accred-badge img {
  height: 2.6rem;
  width: auto;
  max-width: 5.5rem;
  object-fit: contain;
  display: block;
  flex: none;
}
.sgl-hosp__accred-badge i {
  color: #0B9AA5;
  font-size: 1.2rem;
  flex: none;
}
.sgl-hosp__accred-badge-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #087D88;
  white-space: nowrap;
}

/* Accreditation chip overlaid on the hospital card thumbnail */
.hosp__card-accred {
  position: absolute;
  top: 0.7rem;
  inset-inline-start: 0.7rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0B2E59;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  box-shadow: 0 4px 10px rgba(11, 46, 89, 0.18);
}

.hosp__card-accred--logo {
  padding: 0.3rem 0.5rem;
}
.hosp__card-accred--logo img {
  height: 1.1rem;
  width: auto;
  max-width: 3.5rem;
  object-fit: contain;
  display: block;
}

/* Embedded Google Maps location for the hospital page — now placed after the
   patient testimonials section, as its own top-level block. */
.sgl-hosp__map {
  margin-top: 2.75rem;
  padding: 1.75rem;
  border: 0.0625rem solid #E4EEF0;
  border-radius: 1rem;
  background: #fff;
}
.sgl-hosp__map-frame {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 0.6rem 1.6rem rgba(11, 46, 89, 0.08);
  border: 1px solid #E4EEF0;
}
.sgl-hosp__map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sgl-hosp__map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #087D88;
  background: #E8F7F8;
  border: 1px solid #C9EEF0;
  border-radius: 0.7rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.sgl-hosp__map-btn:hover {
  background: #DBF1F2;
}
