/*
Theme Name: Mahan Polyclinic
Theme URI: https://mahanpolyclinic.com
Author: Mahan Polyclinic
Description: Custom Gutenberg block theme for the private Mahan Polyclinic staging site.
Version: 3.0.2
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: mahan-polyclinic
*/

:root {
  --mahan-ink: #121111;
  --mahan-charcoal: #1e1b1f;
  --mahan-cream: #f7f2ec;
  --mahan-soft: #fffaf7;
  --mahan-lilac: #b244d1;
  --mahan-lilac-dark: #84329e;
  --mahan-gold: #c9a780;
  --mahan-line: rgba(18, 17, 17, 0.14);
  --mahan-radius: 26px;
  --mahan-shadow: 0 18px 54px rgba(30, 19, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--mahan-ink);
  background: var(--mahan-soft);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

a {
  color: inherit;
}

.wp-site-blocks {
  overflow: clip;
}

.mahan-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 12, 14, 0.96);
  backdrop-filter: blur(18px);
}

.mahan-header .wp-block-site-logo img {
  width: auto;
  max-height: 58px;
}

.mahan-header .wp-block-navigation,
.mahan-header .wp-block-navigation a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.mahan-header .wp-block-navigation a:hover,
.mahan-header .wp-block-navigation a:focus-visible {
  color: #e3b9ef;
}

.mahan-phone {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.mahan-main {
  margin-top: 0;
}

.mahan-section {
  position: relative;
  margin: 0;
  padding: clamp(64px, 8vw, 124px) max(24px, calc((100vw - 1240px) / 2));
  background: var(--mahan-soft);
}

.mahan-section:nth-child(even) {
  background: var(--mahan-cream);
}

.mahan-section--dark {
  color: #fff;
  background:
    radial-gradient(circle at 80% 15%, rgba(178, 68, 209, 0.24), transparent 30%),
    var(--mahan-charcoal) !important;
}

.mahan-section--hero {
  min-height: min(820px, 88vh);
  display: grid;
  align-content: end;
  isolation: isolate;
  color: #fff;
  background-position: center;
  background-size: cover;
}

body.home .mahan-section--hero .wp-block-cover__inner-container {
  margin-inline: auto;
  max-width: 1040px;
  text-align: center;
}

body.home .mahan-section--hero h1 {
  margin-inline: auto;
}

body.home .mahan-section--hero .wp-block-buttons {
  justify-content: center;
}

.mahan-masterpiece {
  font-family: "Libre Baskerville", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
}

.mahan-section--hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(10, 8, 11, 0.8), rgba(10, 8, 11, 0.18));
}

.mahan-section > * {
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
}

.mahan-section h1,
.mahan-section h2,
.mahan-section h3,
.mahan-section h4 {
  margin-top: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}

.mahan-section h1 {
  max-width: 920px;
  font-size: clamp(46px, 6vw, 78px);
}

.mahan-section h2 {
  max-width: 980px;
  font-size: clamp(36px, 4.3vw, 58px);
}

.mahan-section h3 {
  font-size: clamp(25px, 2.6vw, 38px);
}

.mahan-section p {
  max-width: 920px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.72;
}

.mahan-section .wp-block-buttons {
  margin-top: 30px;
}

.wp-block-button__link,
.mahan-button,
.mahan-form button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 25px;
  color: #fff;
  background: linear-gradient(135deg, var(--mahan-lilac), var(--mahan-lilac-dark));
  box-shadow: 0 12px 30px rgba(178, 68, 209, 0.24);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.wp-block-button__link:hover,
.mahan-button:hover,
.mahan-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.mahan-media-grid,
.mahan-section .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.mahan-section .wp-block-image,
.mahan-section .wp-block-gallery figure {
  margin: 0;
}

.mahan-section .wp-block-image img,
.mahan-section .wp-block-gallery img {
  width: 100%;
  border-radius: var(--mahan-radius);
  box-shadow: var(--mahan-shadow);
  object-fit: cover;
}

.mahan-carousel {
  position: relative;
}

.mahan-carousel .wp-block-gallery {
  display: flex;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.mahan-carousel .wp-block-gallery figure {
  flex: 0 0 min(360px, 82vw) !important;
  width: auto !important;
  min-width: 0;
  scroll-snap-align: start;
}

/* Homepage fidelity pass. */
body.home .mahan-header {
  position: absolute;
  right: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(44, 20, 66, 0.4), transparent);
  backdrop-filter: none;
}

body.home .mahan-section:not(.mahan-section--hero) {
  padding-top: clamp(58px, 6vw, 88px);
  padding-bottom: clamp(58px, 6vw, 88px);
  background: linear-gradient(135deg, #f7eaff, #fff 62%, #f4ddff);
}

body.home .mahan-section:not(.mahan-section--hero) h2 {
  margin-right: auto;
  margin-left: auto;
  max-width: 780px;
  font-size: clamp(32px, 3.4vw, 48px);
  text-align: center;
}

body.home .mahan-section:not(.mahan-section--hero) h3,
body.home .mahan-section:not(.mahan-section--hero) p,
body.home .mahan-section:not(.mahan-section--hero) .wp-block-buttons {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

body.home .mahan-section:not(.mahan-section--hero) p {
  max-width: 780px;
  font-size: 16px;
  line-height: 1.7;
}

.mahan-home-intro .wp-block-gallery {
  display: none !important;
}

.mahan-video {
  width: min(760px, 100%);
  margin: 42px auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(72, 27, 91, 0.2);
  aspect-ratio: 16 / 9;
}

.mahan-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.mahan-home-reviews .wp-block-gallery,
.mahan-home-departments .wp-block-gallery {
  max-width: 1040px;
}

.mahan-home-reviews .wp-block-gallery figure {
  flex-basis: min(300px, 78vw) !important;
}

.mahan-home-departments {
  color: #fff;
  background:
    radial-gradient(circle at 80% 15%, rgba(178, 68, 209, 0.3), transparent 34%),
    #1d0635 !important;
}

.mahan-home-popular {
  color: #fff;
  background: linear-gradient(145deg, #15071f, #26102d) !important;
}

.mahan-home-popular .wp-block-gallery {
  display: block;
  min-height: 405px;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  border-radius: 18px;
  background: url("assets/images/popular-botox.webp") center / cover no-repeat;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.mahan-home-popular .wp-block-gallery figure {
  display: none;
}

.mahan-home-popular .wp-block-gallery figure:first-child {
  display: none;
}

.mahan-home-popular .wp-block-gallery img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.mahan-home-advanced p {
  max-width: 900px !important;
}

.mahan-home-passion .wp-block-gallery {
  grid-template-columns: repeat(2, minmax(0, 320px));
  justify-content: center;
  max-width: 720px;
}

.mahan-home-passion .wp-block-gallery figure:first-child,
.mahan-home-passion .wp-block-gallery figure:last-child {
  display: none;
}

.mahan-home-passion .wp-block-gallery img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.mahan-home-cta {
  display: grid;
  min-height: 520px;
  align-content: center;
  color: #fff;
  background:
    radial-gradient(circle at 50% 100%, rgba(178, 68, 209, 0.65), transparent 44%),
    linear-gradient(180deg, #1a0629, #4b0776) !important;
}

.mahan-home-faq {
  color: #fff;
  background: linear-gradient(160deg, #2b0644, #7218aa) !important;
}

.mahan-home-faq__inner {
  width: min(900px, 100%);
  margin: auto;
}

.mahan-home-faq details {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  background: #fff;
  color: #24112c;
  box-shadow: none;
}

.mahan-home-faq summary {
  padding: 18px 20px;
  color: #6f2587;
}

.mahan-home-faq details p {
  padding: 0 20px 20px;
  color: #24112c;
  text-align: left !important;
}

body.home .mahan-footer {
  background: linear-gradient(180deg, #7218aa, #2a073e);
}

body.mahan-treatment-page .mahan-header,
body.mahan-reception-page .mahan-header {
  position: absolute;
  right: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(35, 15, 48, 0.5), transparent);
  backdrop-filter: none;
}

body.mahan-treatment-page .mahan-section {
  color: var(--mahan-ink);
  background: #fff !important;
}

body.mahan-treatment-page .mahan-section:nth-child(even) {
  background: #f7f8fa !important;
}

.mahan-treatment-hero {
  display: grid;
  min-height: min(720px, 86vh);
  align-content: center;
  color: #fff !important;
  background-position: center !important;
  background-size: cover !important;
  isolation: isolate;
}

.mahan-treatment-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(44, 14, 57, 0.7), rgba(44, 14, 57, 0.1));
}

.mahan-route-botox-in-dubai .mahan-treatment-hero {
  background-image: url("assets/images/botox-hero.webp") !important;
}

.mahan-route-skin-booster-in-dubai .mahan-treatment-hero,
.mahan-route-old-skin-booster .mahan-treatment-hero,
.mahan-route-copy-of-skin-booster .mahan-treatment-hero,
.mahan-route-copy-of-hydra-facial .mahan-treatment-hero {
  background-image: url("assets/images/treatment-hero.webp") !important;
}

.mahan-treatment-hero > * {
  width: min(760px, 100%);
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.mahan-treatment-hero h1 {
  margin: 0 auto 22px;
  color: #fff;
  font-size: clamp(48px, 6vw, 78px);
}

.mahan-treatment-hero p {
  color: #fff;
  font-size: clamp(17px, 1.5vw, 21px);
}

body.mahan-treatment-page .mahan-section:not(.mahan-treatment-hero) h2,
body.mahan-treatment-page .mahan-section:not(.mahan-treatment-hero) h3,
body.mahan-treatment-page .mahan-section:not(.mahan-treatment-hero) p {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

body.mahan-treatment-page .mahan-section:not(.mahan-treatment-hero) h2 {
  max-width: 880px;
  font-size: clamp(32px, 3.5vw, 50px);
}

body.mahan-treatment-page .mahan-section:not(.mahan-treatment-hero) p {
  max-width: 900px;
  font-size: 16px;
}

body.mahan-treatment-page .mahan-section .wp-block-buttons {
  justify-content: center;
}

body.mahan-treatment-page .mahan-section .wp-block-details {
  width: min(920px, 100%);
  margin-right: auto;
  margin-left: auto;
  border-color: rgba(178, 68, 209, 0.35);
  box-shadow: none;
}

body.mahan-treatment-page .mahan-section .wp-block-gallery:not(.has-nested-images) {
  max-width: 1040px;
}

.mahan-footer {
  background: linear-gradient(155deg, #761db2, #31064f);
}

.mahan-footer-map {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: 260px;
  margin: 8px auto 32px;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(125deg, rgba(43, 5, 70, 0.86), rgba(126, 32, 178, 0.65)),
    url("assets/images/mahan-reception-hero.webp") center / cover;
}

.mahan-footer-map iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

.mahan-footer-map-card {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 28px;
  width: min(360px, calc(100% - 56px));
  padding: 22px 24px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  color: #fff;
  background: rgba(22, 5, 35, 0.88);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
}

.mahan-footer-map-card strong {
  display: block;
  margin-bottom: 8px;
  font: 600 1.3rem/1.2 "Cormorant Garamond", serif;
}

.mahan-footer-map-card a {
  color: #fff;
}

.mahan-route-contact-us .mahan-main {
  background:
    linear-gradient(rgba(112, 42, 168, 0.55), rgba(112, 42, 168, 0.55)),
    url("assets/images/mahan-reception-hero.webp") center / cover fixed;
}

.mahan-route-contact-us .mahan-main .mahan-section {
  display: grid;
  width: min(1120px, calc(100% - 48px));
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 16px 56px;
  margin: 0 auto;
  padding: 56px;
  background: linear-gradient(135deg, #efd1ff, #fff 70%) !important;
  box-shadow: 0 24px 80px rgba(42, 7, 62, 0.3);
}

.mahan-route-contact-us .mahan-main .entry-content {
  padding: 150px 0 80px;
}

.mahan-route-contact-us .mahan-section > h1,
.mahan-route-contact-us .mahan-section > h2,
.mahan-route-contact-us .mahan-section > p {
  grid-column: 1;
}

.mahan-route-contact-us .mahan-section > h1 {
  margin-bottom: 10px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: clamp(48px, 5vw, 68px);
  font-weight: 700;
}

.mahan-route-contact-us .mahan-section > h2 {
  margin-bottom: 26px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.55;
}

.mahan-route-contact-us .mahan-section > p {
  margin: 4px 0;
}

.mahan-route-contact-us .mahan-form {
  grid-column: 2;
  grid-row: 1 / span 6;
  align-self: stretch;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.mahan-route-contact-us .mahan-form button {
  width: 100%;
  border-radius: 0;
  background: #120f14;
  box-shadow: none;
}

.mahan-route-book-an-appointment .mahan-section:has(.mahan-form) {
  background: linear-gradient(135deg, #efd1ff, #fff 70%);
}

.mahan-carousel-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.mahan-carousel-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--mahan-line);
  border-radius: 50%;
  background: #fff;
  font-size: 22px;
  cursor: pointer;
}

.mahan-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
}

.mahan-lightbox.is-open {
  display: flex;
}

.mahan-lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  border-radius: 16px;
}

.mahan-lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 42px;
  cursor: pointer;
}

.wp-block-details {
  margin: 14px auto;
  border: 1px solid var(--mahan-line);
  border-radius: 18px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.68);
}

.wp-block-details summary {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(20px, 2vw, 27px);
  cursor: pointer;
}

.mahan-form-wrap {
  max-width: 880px;
  margin: 32px auto 0;
  border: 1px solid var(--mahan-line);
  border-radius: var(--mahan-radius);
  padding: clamp(24px, 5vw, 52px);
  background: #fff;
  box-shadow: var(--mahan-shadow);
}

.mahan-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mahan-form .mahan-field--full {
  grid-column: 1 / -1;
}

.mahan-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.mahan-form input,
.mahan-form textarea,
.mahan-form select {
  width: 100%;
  border: 1px solid rgba(18, 17, 17, 0.24);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--mahan-ink);
  background: #fff;
  font: inherit;
}

.mahan-form textarea {
  min-height: 150px;
  resize: vertical;
}

.mahan-form input:focus,
.mahan-form textarea:focus,
.mahan-form select:focus {
  border-color: var(--mahan-lilac);
  outline: 3px solid rgba(178, 68, 209, 0.15);
}

.mahan-honeypot {
  position: absolute !important;
  left: -9999px !important;
}

.mahan-notice {
  max-width: 880px;
  margin: 20px auto;
  border-radius: 12px;
  padding: 14px 18px;
  background: #f1e7f5;
}

.mahan-notice--error {
  color: #781d2a;
  background: #fde8eb;
}

.mahan-empty-blog {
  min-height: 460px;
  display: grid;
  place-content: center;
  padding: 80px 24px;
  text-align: center;
}

.mahan-footer {
  color: #fff;
  background: #0d0c0e;
}

.mahan-footer a {
  color: #fff;
}

.mahan-footer .wp-block-site-logo img {
  width: auto;
  max-height: 80px;
}

.mahan-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mahan-footer-social a {
  text-decoration: none;
}

.mahan-staging-badge {
  position: fixed;
  z-index: 200;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 8px 13px;
  color: #fff;
  background: #6f2587;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .mahan-header .wp-block-group {
    gap: 14px !important;
  }

  .mahan-phone {
    display: none;
  }

  .mahan-section {
    padding-right: 24px;
    padding-left: 24px;
  }

  .mahan-form {
    grid-template-columns: 1fr;
  }

  .mahan-form > * {
    grid-column: 1;
  }

  .mahan-route-contact-us .mahan-main .mahan-section {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }

  .mahan-route-contact-us .mahan-section > h1,
  .mahan-route-contact-us .mahan-section > h2,
  .mahan-route-contact-us .mahan-section > p,
  .mahan-route-contact-us .mahan-form {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .mahan-home-popular .wp-block-gallery {
    min-height: 255px;
    background-size: contain;
  }

  .mahan-footer-map iframe {
    opacity: 0.32;
  }

  body {
    font-size: 16px;
  }

  .mahan-header {
    position: relative;
  }

  .mahan-header .wp-block-site-logo img {
    max-width: 195px;
  }

  .mahan-section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .mahan-section--hero {
    min-height: 680px;
  }

  .mahan-staging-badge {
    top: 102px;
    right: 10px;
    bottom: auto;
    padding: 6px 9px;
    font-size: 9px;
  }

  .mahan-media-grid,
  .mahan-section .wp-block-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* A high-contrast keyboard focus ring that remains visible on both pastel and dark sections. */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid #6e5174;
  outline-offset: 3px;
}
