@font-face {
  font-family: "loyal";
  src: url("../new-fonts/eighties/Eighties-Comeback/OTF/EightiesComeback - Semi Bold Semi Condensed.otf")
    format("opentype");
}

@font-face {
  font-family: "loyal-black";
  src: url("../new-fonts/eighties/Eighties-Comeback/OTF/EightiesComeback - Black.otf")
    format("opentype");
}

.image-wrapper img {
  transition: opacity 0.8s ease-in-out;
}

.second-part-address,
.third-part-address {
  margin-left: 25px;
}

.phone-number {
  margin-top: 20px;
}

.first-part-timings {
  margin-top: 20px;
}

.second-part-timings {
  margin-left: 90px;
}

.clinic-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  margin-top: 10px;
  margin-bottom: 200px;
}
.clinic-container {
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: flex-start;
}
.clinic-container h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
  margin-left: 250px;
  color: #ffeb78ff;
  font-family: "loyal", sans-serif;
}
.clinic-logo {
  width: 50px;
  height: auto;
  margin-bottom: -100px;
  margin-left: 50px;
}
.image-wrapper {
  position: relative;
  border-radius: 1rem;
  overflow: visible;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  z-index: 1; /* lowest priority */
  height: 450px;
}
.image-wrapper img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}
#clinicImage {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}
.pad-container {
  position: absolute;
  bottom: -1rem;
  right: -0.6rem;
  width: 320px;
  transform: rotate(-3deg);
  z-index: 2; /* middle priority */
}
.pad {
  position: relative;
  top: 80px;
  border-radius: 0.75rem;
  overflow: visible;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.35);
  background: white;
}
.pad img {
  width: 100%;
  display: block;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding-top: 15px;
  length: auto;
}
.pad-info {
  position: absolute;
  inset: 0;
  padding: 1rem;
  padding-top: 100px;
}
.pad-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "loyal-black";
}
.pad-info h3 span {
  font-family: serif;
  font-size: 1.25rem;
  font-family: "loyal-black";
}
.pad-info .details {
  font-size: 1rem;
  margin-top: 0.75rem;
  color: #1e293b;
  font-family: "loyal", sans-serif;
}
.pad-info .details div {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.signature-line {
  margin-top: 1.5rem;
  height: 1px;
  width: 66%;
  background: #cbd5e1;
}
.dentist {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.tape {
  position: absolute;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%) rotate(4deg);
  width: 120px;
  height: 32px;
  background: rgba(253, 244, 196, 0.92);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 0 1px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  z-index: 30; /* highest priority */
}
.tape::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.05) 0,
    rgba(0, 0, 0, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.4;
}

@media (max-width: 600px) {
  /* ===== Section spacing ===== */
  .clinic-section {
    padding: 1.25rem;
    margin-top: 24px;
    margin-bottom: 120px;
  }

  /* ===== Logo & Heading ===== */
  .clinic-logo {
    display: block;
    margin-top: 20px;
    margin-bottom: -60px;
  }

  .clinic-container h2 {
    font-size: 2.2rem;
    margin-left: 0;
    text-align: center;
  }

  /* ===== Clinic Image ===== */
  .image-wrapper {
    position: relative;
    box-shadow: none; /* remove heavy desktop shadow */
    overflow: visible; /* allow pad to overflow */
  }

  .image-wrapper img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
    opacity: 1 !important; /* stop fade glitches */
    transition: none !important;
    z-index: 1; /* keep image at bottom */
    position: relative;
  }

  /* ===== Prescription Pad Container (DETACHED) ===== */
  .pad-container {
    position: absolute;
    bottom: -120px; /* pushes it slightly below image */
    left: 50%;
    transform: translateX(-50%) rotate(340deg);
    width: 220px; /* adjust size */
    z-index: 5;
  }

  /* ===== Remove fake white card ===== */
  .pad {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  }

  /* ===== Prescription Image ONLY ===== */
  .pad img {
    width: 100%;
    display: block;
    position: relative;
    z-index: 1; /* BELOW text */
  }

  /* ===== Prescription Text ===== */
  .pad-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 70px 14px 20px; /* tweak this */
    z-index: 2; /* IMPORTANT */
  }

  .pad-info h3 {
    font-size: 0.8rem;
    justify-content: flex-start;
  }

  .pad-info .details {
    font-size: 0.65rem;
    line-height: 1.6;
  }

  /* ===== Remove tape on mobile ===== */
  .tape {
    position: absolute;
    top: 64px; /* goes above pad AND image */
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 70px;
    height: 22px;
    background: rgba(253, 244, 196, 0.92);
    backdrop-filter: blur(2px);
    border-radius: 4px;
    z-index: 10; /* higher than pad & image */
  }
}

@media (max-width: 600px) {
  /* ===== Pad container ===== */

  /* ===== Prescription Pad ===== */
  .pad {
    position: relative; /* KEY */
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    overflow: hidden; /* keep edges clean */
    background: white;
  }

  /* ===== FULL PRESCRIPTION IMAGE ===== */
  .pad img {
    width: 100%;
    height: auto; /* FULL image */
    display: block;
    object-fit: contain; /* NO cropping */
  }

  /* ===== Alignment fixes ===== */
  .second-part-address,
  .third-part-address {
    margin-left: 20px;
  }

  .second-part-timings {
    margin-left: 56px;
  }
}

@media (max-width: 800px) and (orientation: landscape) {
  /* ===== Section spacing ===== */
  .clinic-section {
    margin-bottom: 80px;
    padding: 1rem 1.5rem;
  }

  /* ===== Heading ===== */
  .clinic-container h2 {
    font-size: 2.5rem !important;
    text-align: left !important;
  }

  /* ===== Clinic Image ===== */
  .image-wrapper img {
    height: 200px; /* shorter for landscape */
    border-radius: 14px;
  }

  /* ===== Prescription Pad ===== */
  .pad-container {
    max-width: 260px; /* slightly narrower */
    margin: 24px auto 0;
  }

  .pad {
    border-radius: 16px;
  }

  /* ===== Text overlay tuning ===== */
  .pad-info {
    padding: 20px 14px 18px !important; /* reduced top padding */
  }

  .pad-info h3 {
    font-size: 0.95rem !important;
  }

  .pad-info .details {
    font-size: 0.8rem !important;
    line-height: 1 !important;
  }
}

@media (max-width: 1000px) and (orientation: landscape) {
  /* ===== Section spacing ===== */
  .clinic-section {
    margin-bottom: 80px;
    padding: 1rem 1.5rem;
  }

  /* ===== Heading ===== */
  .clinic-container h2 {
    font-size: 2rem;
    text-align: center;
  }

  /* ===== Clinic Image ===== */
  .image-wrapper img {
    height: 200px; /* shorter for landscape */
    border-radius: 14px;
  }

  /* ===== Prescription Pad ===== */
  .pad-container {
    max-width: 260px; /* slightly narrower */
    margin: 24px auto 0;
  }

  .pad {
    border-radius: 16px;
  }

  /* ===== Text overlay tuning ===== */
  .pad-info {
    padding: 100px 14px 18px; /* reduced top padding */
  }

  .pad-info h3 {
    font-size: 1.05rem;
  }

  .pad-info .details {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

@media (min-width: 821px) and (max-width: 1023px) {
  .clinic-container h2 {
    font-size: 3rem;
    margin-left: 0;
    text-align: center;
  }

  .image-wrapper img {
    height: 360px;
  }

  .pad-container {
    width: 280px; !important;
    bottom: -2.5rem; !important;
    right: -1.5rem;!important;
  }

  .pad {
    top: 70px;
  }
}

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  .image-wrapper img {
    height: 380px;
  }

  .pad-container {
    width: 300px;
  }

  .pad {
    top: 80px;
  }
}
