﻿:root {
      --primary: #1976d2;
      --secondary: #e3f2fd;
      --bg: #ffffff;
      --accent: #f8f9fa;
      --text: #16324f;
      --muted: #6c7b8a;
      --radius: 14px;
      --shadow-sm: 0 8px 22px rgba(25, 118, 210, 0.08);
      --shadow-md: 0 16px 35px rgba(15, 85, 153, 0.14);
      --glass: rgba(255, 255, 255, 0.68);
      --border: rgba(255, 255, 255, 0.5);
    }

    [data-theme="dark"] {
      --primary: #68a9ff;
      --secondary: #0f2a40;
      --bg: #08141f;
      --accent: #0d1d2a;
      --text: #e6f2ff;
      --muted: #9fb6ca;
      --glass: rgba(8, 20, 31, 0.75);
      --border: rgba(104, 169, 255, 0.2);
      --shadow-sm: 0 8px 22px rgba(4, 20, 36, 0.35);
      --shadow-md: 0 16px 35px rgba(2, 10, 18, 0.5);
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      font-family: "Cairo", sans-serif;
      background-color: var(--bg);
      color: var(--text);
      line-height: 1.8;
      overflow-x: hidden;
    }

    .section-space {
      padding: 90px 0;
    }

    .section-title {
      max-width: 650px;
      margin-inline: auto;
      text-align: center;
      margin-bottom: 44px;
    }

    .section-title h2 {
      font-size: clamp(1.6rem, 2.2vw, 2.5rem);
      font-weight: 800;
      color: var(--text);
      margin-bottom: 12px;
    }

    .section-title p {
      color: var(--muted);
      margin: 0;
    }

    .btn-medical {
      background: linear-gradient(120deg, var(--primary), #2d8be9);
      color: #fff;
      border: 0;
      border-radius: 12px;
      padding: 10px 22px;
      position: relative;
      overflow: hidden;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .btn-medical:hover,
    .btn-medical:focus {
      transform: translateY(-2px);
      box-shadow: var(--shadow-sm);
      color: #fff;
    }

    .btn-outline-medical {
      border: 1px solid var(--primary);
      color: var(--primary);
      border-radius: 12px;
      padding: 10px 22px;
      background: transparent;
      transition: all 0.3s ease;
    }

    .btn-outline-medical:hover,
    .btn-outline-medical:focus {
      background: var(--primary);
      color: #fff;
    }

    .ripple {
      position: absolute;
      border-radius: 50%;
      transform: scale(0);
      animation: ripple 0.6s linear;
      background: rgba(255, 255, 255, 0.55);
      pointer-events: none;
    }

    @keyframes ripple {
      to {
        transform: scale(4);
        opacity: 0;
      }
    }

    .loader {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: grid;
      place-items: center;
      background: linear-gradient(180deg, #f2f9ff, #ffffff);
      transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .loader.hidden {
      opacity: 0;
      visibility: hidden;
    }

    .pulse-logo {
      width: 84px;
      height: 84px;
      border-radius: 50%;
      background: #fff;
      color: var(--primary);
      display: grid;
      place-items: center;
      font-size: 2rem;
      box-shadow: var(--shadow-md);
      animation: pulse 1.6s infinite;
      overflow: hidden;
      padding: 6px;
    }

    .pulse-logo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
    }

    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.09); }
      100% { transform: scale(1); }
    }

    .top-nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1030;
      transition: all 0.35s ease;
      backdrop-filter: blur(0);
    }

    .top-nav.scrolled {
      background: var(--glass);
      backdrop-filter: blur(14px);
      box-shadow: var(--shadow-sm);
      border-bottom: 1px solid var(--border);
    }

    .navbar-brand {
      font-weight: 800;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .brand-logo {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      object-fit: cover;
      box-shadow: var(--shadow-sm);
      background: #fff;
      padding: 2px;
    }

    .nav-link {
      color: var(--text);
      font-weight: 600;
      position: relative;
      margin-inline: 2px;
    }

    .nav-link::after {
      content: "";
      position: absolute;
      bottom: 4px;
      right: 0;
      width: 0;
      height: 2px;
      background: var(--primary);
      transition: width 0.3s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
      width: 100%;
      left: 0;
    }

    .icon-btn {
      width: 41px;
      height: 41px;
      border-radius: 50%;
      border: 1px solid rgba(25, 118, 210, 0.2);
      display: grid;
      place-items: center;
      background: #fff;
      color: var(--primary);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .icon-btn:hover {
      transform: translateY(-2px) scale(1.03);
      box-shadow: var(--shadow-sm);
      color: var(--primary);
    }

    .hero {
      position: relative;
      min-height: 100vh;
      display: flex;
      align-items: center;
      padding-top: 96px;
      background:
        linear-gradient(110deg, rgba(255,255,255,0.95) 40%, rgba(227,242,253,0.6) 100%),
        url("https://images.unsplash.com/photo-1584982751601-97dcc096659c?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
    }

    .hero-glass {
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow-sm);
      padding: 28px;
      backdrop-filter: blur(10px);
    }

    .hero h1 {
      font-size: clamp(2rem, 4vw, 3.25rem);
      font-weight: 800;
      line-height: 1.4;
      margin-bottom: 15px;
    }

    .hero p {
      color: var(--muted);
      margin-bottom: 24px;
      font-size: 1.1rem;
    }

    .hero-image {
      border-radius: 16px;
      box-shadow: var(--shadow-md);
      max-width: 100%;
      object-fit: cover;
    }

    .floating-icon {
      position: absolute;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: #fff;
      color: var(--primary);
      display: grid;
      place-items: center;
      box-shadow: var(--shadow-sm);
      animation: float 3.2s ease-in-out infinite;
    }

    .floating-icon.one { top: 20%; left: 7%; }
    .floating-icon.two { top: 29%; right: 10%; animation-delay: 0.4s; }
    .floating-icon.three { bottom: 24%; left: 14%; animation-delay: 0.8s; }

    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-12px); }
    }

    .hero-wave {
      position: absolute;
      bottom: -1px;
      left: 0;
      width: 100%;
      line-height: 0;
    }

    .stat-box,
    .about-card,
    .service-card,
    .doctor-card,
    .department-card,
    .news-card,
    .event-item,
    .testimonial-card,
    .faq-item,
    .contact-card,
    .footer-card {
      background: var(--bg);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
      transition: transform 0.35s ease, box-shadow 0.35s ease;
    }

    .service-card:hover,
    .doctor-card:hover,
    .news-card:hover,
    .department-card:hover,
    .event-item:hover,
    .about-card:hover,
    .testimonial-card:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-md);
    }

    .stats {
      margin-top: -70px;
      position: relative;
      z-index: 2;
    }

    .stat-box {
      text-align: center;
      padding: 24px 16px;
      border: 1px solid rgba(25, 118, 210, 0.08);
    }

    .stat-box h3 {
      font-size: 2rem;
      font-weight: 800;
      color: var(--primary);
      margin: 0;
    }

    .stat-box p {
      margin: 6px 0 0;
      color: var(--muted);
      font-weight: 600;
    }

    .about-media,
    .map-frame {
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      min-height: 320px;
    }

    .about-media img,
    .news-card img,
    .doctor-card img,
    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .about-card,
    .service-card,
    .doctor-card,
    .department-card,
    .news-card,
    .event-item,
    .testimonial-card,
    .faq-item,
    .contact-card {
      padding: 24px;
      border: 1px solid rgba(25, 118, 210, 0.08);
      height: 100%;
    }

    .service-icon,
    .department-icon {
      width: 52px;
      height: 52px;
      border-radius: 12px;
      background: var(--secondary);
      display: grid;
      place-items: center;
      color: var(--primary);
      font-size: 1.4rem;
      margin-bottom: 14px;
    }

    .doctor-card img {
      border-radius: 14px;
      height: 250px;
      margin-bottom: 16px;
    }

    .schedule-table-wrap {
      background: var(--bg);
      border: 1px solid rgba(25, 118, 210, 0.08);
      border-radius: var(--radius);
      box-shadow: var(--shadow-sm);
      overflow-x: auto;
    }

    .schedule-table {
      min-width: 640px;
      margin-bottom: 0;
    }

    .schedule-table thead th {
      background: var(--secondary);
      color: var(--primary);
      font-weight: 800;
      white-space: nowrap;
      border-bottom: none;
      padding: 16px 12px;
    }

    .schedule-table tbody td {
      color: var(--text);
      white-space: normal;
      padding: 14px 12px;
      border-color: rgba(25, 118, 210, 0.08);
    }

    .schedule-table tbody .doctor-cell {
      font-weight: 700;
      color: var(--primary);
      background: var(--accent);
      white-space: nowrap;
    }

    .social-list {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .social-list a {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--secondary);
      color: var(--primary);
      display: grid;
      place-items: center;
      text-decoration: none;
      transition: all 0.3s ease;
    }

    .social-list a:hover {
      background: var(--primary);
      color: #fff;
      transform: scale(1.06);
    }

    .form-control,
    .form-select,
    textarea.form-control {
      border-radius: 12px;
      border: 1px solid rgba(25, 118, 210, 0.18);
      padding: 11px 14px;
      background-color: var(--bg);
      color: var(--text);
    }

    .form-control:focus,
    .form-select:focus {
      box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.18);
      border-color: var(--primary);
    }

    .events-timeline {
      position: relative;
      padding-right: 26px;
    }

    .events-timeline::before {
      content: "";
      position: absolute;
      right: 8px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: linear-gradient(var(--primary), transparent);
    }

    .event-item {
      position: relative;
      margin-bottom: 18px;
    }

    .event-item::before {
      content: "";
      position: absolute;
      right: -24px;
      top: 28px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--primary);
      box-shadow: 0 0 0 5px rgba(25, 118, 210, 0.15);
    }

    .gallery-grid {
      column-count: 4;
      column-gap: 14px;
    }

    .gallery-item {
      break-inside: avoid;
      margin-bottom: 14px;
      border-radius: 14px;
      overflow: hidden;
      position: relative;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
    }

    .gallery-item::after {
      content: "\F4CA";
      font-family: "bootstrap-icons";
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 1.8rem;
      background: rgba(14, 62, 107, 0.35);
      opacity: 0;
      transition: opacity 0.25s ease;
    }

    .gallery-item:hover::after {
      opacity: 1;
    }

    .star {
      color: #ffc107;
    }

    .accordion-button {
      font-weight: 700;
      color: var(--text);
      background: var(--bg);
    }

    .accordion-button:not(.collapsed) {
      color: var(--primary);
      background: var(--secondary);
      box-shadow: none;
    }

    .contact-list li {
      list-style: none;
      margin-bottom: 10px;
      color: var(--muted);
    }

    .contact-list i {
      color: var(--primary);
      margin-left: 8px;
    }

    footer {
      background: linear-gradient(160deg, #0f4e8a, #0d67b9);
      color: #ecf5ff;
    }

    .footer-card {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      padding: 26px;
    }

    .footer-links a {
      color: #e7f1ff;
      text-decoration: none;
      display: inline-block;
      margin-bottom: 8px;
      transition: transform 0.25s ease;
    }

    .footer-links a:hover {
      transform: translateX(-4px);
      color: #fff;
    }

    .fixed-actions {
      position: fixed;
      bottom: 22px;
      left: 18px;
      z-index: 999;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .float-btn {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      border: 0;
      display: grid;
      place-items: center;
      color: #fff;
      box-shadow: var(--shadow-sm);
      text-decoration: none;
      font-size: 1.2rem;
      transition: transform 0.3s ease;
    }

    .float-btn:hover {
      transform: translateY(-3px) scale(1.04);
      color: #fff;
    }

    .whatsapp-btn { background: #25d366; }
    .call-btn { background: var(--primary); }
    .top-btn { background: #0f3f6c; opacity: 0; visibility: hidden; }
    .top-btn.show { opacity: 1; visibility: visible; }

    .cookie-banner {
      position: fixed;
      bottom: 16px;
      right: 16px;
      left: 16px;
      z-index: 1040;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: var(--shadow-sm);
      backdrop-filter: blur(10px);
      padding: 14px 16px;
      display: none;
    }

    .cookie-banner.show {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      align-items: center;
      flex-wrap: wrap;
    }

    .modal-content {
      border-radius: 14px;
      border: 1px solid rgba(25, 118, 210, 0.15);
      background: var(--bg);
    }

    .lightbox-modal img {
      max-height: 76vh;
      border-radius: 12px;
      object-fit: contain;
    }

    .newsletter-input {
      min-width: 220px;
    }

    @media (max-width: 1199px) {
      .gallery-grid { column-count: 3; }
    }

    @media (max-width: 991px) {
      .section-space { padding: 72px 0; }
      .hero { min-height: auto; padding-bottom: 90px; }
      .stats { margin-top: -30px; }
      .gallery-grid { column-count: 2; }
    }

    @media (max-width: 767px) {
      .gallery-grid { column-count: 1; }
      .events-timeline { padding-right: 0; }
      .events-timeline::before,
      .event-item::before { display: none; }
      .fixed-actions { left: 12px; bottom: 12px; }
    }

    .badge-pill {
      display: inline-block;
      background: var(--secondary);
      color: var(--primary);
      font-weight: 700;
      font-size: 0.85rem;
      padding: 6px 16px;
      border-radius: 999px;
      margin-bottom: 14px;
    }

    .badge-pill:empty {
      display: none;
    }

    .about-quote {
      background: var(--accent);
      border-right: 4px solid var(--primary);
      border-radius: 12px;
      padding: 18px 20px;
      margin: 18px 0 0;
    }

    .doctor-avatar-fallback {
      border-radius: 14px;
      height: 250px;
      margin-bottom: 16px;
      display: grid;
      place-items: center;
      background: var(--secondary);
      color: var(--primary);
      font-size: 3rem;
    }
