/*
   Custom styles — Cabinet d'Hépato-Gastro-Entérologie et de Proctologie
   Dr BENNANI Youssef — Casablanca
*/

/* Playfair Display Font */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

:root {
  --bs-primary: #21325B; /* Bleu marine */
  --bs-primary-rgb: 33, 50, 91;
  --accent-color: #C9A96E; /* Gold accent */
  --body-bg: #F9F8F6; /* Off-white */
}

a {
  color: var(--bs-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #009da2;
  text-decoration: underline;
}

.card-link {
  color: var(--bs-primary) !important;
}

.card-link:hover {
  color: #009da2 !important;
}

/* Pagination override */
.page-link {
  color: var(--bs-primary) !important;
}

.page-item.active .page-link {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}

.page-link:hover {
  color: #009da2 !important;
}

.page-link:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 177, 183, 0.25) !important;
}

body {
  background-color: var(--body-bg) !important;
  font-family: 'Inter', sans-serif;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif !important;
  color: var(--bs-primary) !important;
}

/* Primary Button color override */
.btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.btn-primary:hover {
  background-color: #009da2 !important; /* Slightly darker teal */
  border-color: #009da2 !important;
}

/* Secondary/Accent styles */
.btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.btn-outline-primary:hover {
  background-color: var(--bs-primary) !important;
  color: #fff !important;
}

/* Text color overrides */
.text-primary {
  color: var(--bs-primary) !important;
}

.bg-primary {
  background-color: var(--bs-primary) !important;
}

/* Accent for highlights */
.text-accent {
  color: var(--accent-color) !important;
}

.bg-accent {
  background-color: var(--accent-color) !important;
}

/* Footer override */
footer.bg-dark {
  background-color: var(--bs-primary) !important;
}

footer.bg-dark h5, footer.bg-dark p, footer.bg-dark a, footer.bg-dark span {
  color: #fff !important;
}

footer.bg-dark .btn-primary {
  background-color: #fff !important;
  color: var(--bs-primary) !important;
  border-color: #fff !important;
}

footer.bg-dark .btn-primary:hover {
  background-color: #f8f9fa !important;
  color: var(--bs-primary) !important;
}

footer.bg-dark a:hover {
  text-decoration: underline;
}

.navbar-collapse {
  flex-grow: 1 !important;
}

/* Response Fix: Only row on desktop */
@media (min-width: 992px) {
  .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Center items between first and last */
  .navbar-nav > li:first-child {
    margin-left: auto !important;
  }

  .navbar-nav > li:nth-last-child(2) {
    margin-right: auto !important;
  }

  .navbar-nav > li:last-child {
    margin-left: auto !important;
  }
}

@media (max-width: 991.98px) {
  .navbar-nav {
    margin-top: 1rem;
    padding-bottom: 1rem;
  }
  .navbar-nav .nav-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .navbar-nav .btn {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
  }
}

/* Quote Responsive Size */
blockquote.blockquote-lg {
    font-size: 1.25rem !important;
}

@media (max-width: 768px) {
    blockquote.blockquote-lg {
        font-size: 1.1rem !important;
    }
}

/* Global Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

footer .list-unstyled {
  margin-top: 0.5rem !important;
}

.navbar-brand {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  margin-right: 2rem !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0;
}

/* Fix for Rendez-vous button text on one line */
.btn-primary.btn-sm, .navbar-nav .btn {
  white-space: nowrap !important;
  padding-left: 1.2rem !important;
  padding-right: 1.2rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem;
}

/* Adjust nav links for visibility */
.navbar-nav .nav-link {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  font-size: 1rem;
}

/* Push to the far RIGHT in header */
.navbar-collapse {
  flex-grow: 1;
}

@media (max-width: 1200px) {
    .navbar-nav .nav-link {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
      flex-basis: 100%;
  }
}

/* ── Responsive: Dropdown menus ── */
@media (max-width: 575.98px) {
  #header-overlay .dropdown-menu {
    min-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* ── Responsive: Page hero / breadcrumb sections ── */
@media (max-width: 767.98px) {
  [style*="min-height:420px"],
  [style*="min-height: 420px"] {
    min-height: 260px !important;
  }
}

/* ── Responsive: Gallery image tiles ── */
.gallery-tile {
  height: 18rem;
  background-size: cover;
  background-position: center;
}
@media (max-width: 767.98px) {
  .gallery-tile {
    height: 12rem !important;
  }
}
@media (max-width: 575.98px) {
  .gallery-tile {
    height: 10rem !important;
  }
}

/* ── Responsive: Hero profile image ── */
.hero-profile-img {
  max-height: 520px;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 767.98px) {
  .hero-profile-img {
    max-height: 320px !important;
  }
}
@media (max-width: 575.98px) {
  .hero-profile-img {
    max-height: 260px !important;
  }
}

/* ── Responsive: Decorative dots SVG ── */
.decorative-dots {
  width: 12rem;
}
@media (max-width: 767.98px) {
  .decorative-dots {
    width: 7rem !important;
  }
}

/* ── Responsive: Map iframe wrapper ── */
.map-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.map-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 575.98px) {
  .map-responsive-wrapper {
    padding-bottom: 75%; /* taller on small screens */
  }
}

/* ── Responsive: Contact section map on mobile ── */
@media (max-width: 767.98px) {
  #contactsSection .position-md-absolute {
    position: relative !important;
    height: 300px;
    width: 100%;
  }
  #contactsSection .position-md-absolute iframe {
    height: 100%;
    width: 100%;
  }
}

/* Cookie Banner Styles */
#cookie-banner {
  box-shadow: 0 -5px 25px rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
}

#cookie-banner .btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

#cookie-banner .link-primary {
  color: var(--bs-primary) !important;
}
