/* ═══════════════════════════════════════════
   Art Denta Care — Custom Styles
   Accent colour: Crimson #8B1111
═══════════════════════════════════════════ */

html {
  scroll-behavior: smooth;
}

/* ─── Header States ─────────────────────── */

#header {
  background-color: transparent;
}

#header.scrolled {
  background-color: #FFFFFF;
  box-shadow: 0 1px 0 0 #EDE5E5;
}

#header.scrolled .header-logo {
  filter: none;
}

#header.scrolled .nav-link {
  color: #1A0808 !important;
}

#header.scrolled .nav-link:hover {
  color: #8B1111 !important;
}

#header.scrolled .menu-bar {
  background-color: #1A0808 !important;
}

/* Logo inversion for dark/transparent header */
#header:not(.scrolled) .header-logo {
  filter: brightness(0) invert(1);
}

.footer-logo {
  filter: brightness(0) invert(1);
}

/* ─── Navigation ────────────────────────── */

.nav-link {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 1);
}

.mobile-nav-link {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s ease;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link:hover {
  color: #FFFFFF;
}

/* ─── Buttons ───────────────────────────── */

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.25rem;
  background-color: #8B1111;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background-color 0.25s ease, transform 0.2s ease;
  cursor: pointer;
  border: 1px solid #8B1111;
  white-space: nowrap;
}

.btn-gold:hover {
  background-color: #6E0E0E;
  border-color: #6E0E0E;
}

.btn-gold:active {
  transform: scale(0.98);
}

.btn-gold:disabled {
  cursor: not-allowed;
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.25rem;
  background-color: transparent;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ─── Hero ──────────────────────────────── */

#home {
  background: linear-gradient(135deg, #0a0505 0%, #160606 50%, #0a0505 100%);
}

.hero-overlay {
  background: linear-gradient(
    105deg,
    rgba(10, 5, 5, 0.88) 0%,
    rgba(15, 5, 5, 0.6) 45%,
    rgba(10, 5, 5, 0.15) 100%
  );
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(139, 17, 17, 0.8), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1) translateY(0); }
  50% { opacity: 0.9; transform: scaleY(0.5) translateY(-8px); }
}

/* ─── Reveal Animations ─────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Image Hover Zoom ──────────────────── */

.hover-zoom {
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.service-card:hover .hover-zoom,
.gallery-item:hover .hover-zoom,
.philosophy-img-wrap:hover .hover-zoom {
  transform: scale(1.06);
}

/* ─── Image Container Gradients ────────── */

.img-wrap-hero {
  background: linear-gradient(160deg, #160606 0%, #260808 50%, #100404 100%);
}

.img-wrap-cream {
  background: linear-gradient(135deg, #f5f0f0 0%, #ede5e5 100%);
}

.img-wrap-dark {
  background: linear-gradient(135deg, #160606 0%, #240808 100%);
}

img.img-error {
  opacity: 0;
}

/* ─── Service Cards ─────────────────────── */

.service-card {
  background: #FFFFFF;
  border: 1px solid #EDE5E5;
  overflow: hidden;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.service-card:hover {
  box-shadow: 0 24px 60px rgba(139, 17, 17, 0.08);
  transform: translateY(-6px);
}

.service-card:focus {
  outline: 2px solid #8B1111;
  outline-offset: 2px;
}

/* ─── Gallery ───────────────────────────── */

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 4, 4, 0.85) 0%,
    rgba(10, 4, 4, 0.1) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1.75rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus .gallery-overlay {
  opacity: 1;
}

/* ─── Process Section ───────────────────── */

.process-number {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  line-height: 1;
  color: rgba(168, 43, 43, 0.58);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  display: block;
}

.process-card {
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.process-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139, 17, 17, 0.85), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.process-card:hover {
  border-color: rgba(139, 17, 17, 0.55);
  background-color: rgba(139, 17, 17, 0.09);
}

.process-card:hover::before {
  opacity: 1;
}

/* ─── About Section ─────────────────────── */

.credential-badge {
  padding: 0.625rem 1rem;
  border: 1px solid #EDE5E5;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6B5B5B;
  background: #F9F5F5;
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.credential-badge:hover {
  border-color: #8B1111;
  color: #8B1111;
}

/* ─── Testimonials ──────────────────────── */

.testimonial-card {
  background: #FFFFFF;
  border: 1px solid #EDE5E5;
  padding: 2.5rem;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  cursor: default;
}

.testimonial-card:hover {
  box-shadow: 0 12px 40px rgba(139, 17, 17, 0.07);
  transform: translateY(-3px);
}

.testimonial-card:focus {
  outline: 2px solid #8B1111;
  outline-offset: 2px;
}

.star {
  color: #8B1111;
  font-size: 1rem;
  line-height: 1;
}

/* ─── Contact Section ───────────────────── */

.contact-icon {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #EDE5E5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8B1111;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.contact-icon:hover {
  background-color: #F9F5F5;
}

.form-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #EDE5E5;
  background: #F9F5F5;
  color: #1A0808;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: #BBBBBB;
}

.form-input:focus {
  border-color: #8B1111;
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(139, 17, 17, 0.08);
}

.form-input.error {
  border-color: #d95c5c;
  background-color: #fff9f9;
}

.form-error {
  display: block;
  font-size: 0.72rem;
  color: #d95c5c;
  margin-top: 0.375rem;
  min-height: 1rem;
  letter-spacing: 0.01em;
}

/* ─── Footer ────────────────────────────── */

.footer-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

.social-link {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.social-link:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ─── Animated Underline Link ───────────── */

.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.link-underline:hover::after {
  width: 100%;
}

/* ─── Focus Accessibility ───────────────── */

:focus-visible {
  outline: 2px solid #8B1111;
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #8B1111;
  outline-offset: 2px;
}

/* ─── Mobile Menu Animation ─────────────── */

#mobile-menu:not(.hidden) {
  animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Divider ───────────────────────────── */

.divider-gold {
  width: 3rem;
  height: 1px;
  background-color: #8B1111;
  display: block;
}

/* ─── Team Card Doctor Thumbnails ──────── */

.team-thumb {
  object-fit: cover;
  object-position: top center;
}

/* ─── Responsive Tweaks ─────────────────── */

@media (max-width: 768px) {
  .hero-overlay {
    background: rgba(10, 4, 4, 0.72);
  }

  .process-number {
    font-size: 3.5rem;
  }
}
