/* ============================================
   Dr. Edwin V. Motto — Medical Practice Website
   Custom Styles
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: #1e3a5f;
  color: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#navbar.nav-scrolled {
  border-bottom-color: rgba(30, 58, 95, 0.08);
  box-shadow: 0 1px 20px rgba(30, 58, 95, 0.06);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #c9a84c;
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* Mobile menu button */
.mobile-menu-btn {
  position: relative;
  z-index: 10;
}

.menu-line {
  display: block;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
  width: 1.25rem;
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  animation: slideDown 0.3s ease;
}

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

.mobile-nav-link {
  position: relative;
  padding-left: 0;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: #c9a84c;
  transition: width 0.2s;
}

.mobile-nav-link:hover::before {
  width: 16px;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1e3a5f;
  color: #fff;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.25);
}

.btn-primary:hover {
  background: #142740;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #1e3a5f;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1.5px solid rgba(30, 58, 95, 0.2);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.btn-secondary:hover {
  background: #fff;
  border-color: #1e3a5f;
  transform: translateY(-1px);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #c9a84c;
  color: #142740;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.35);
}

.btn-gold:hover {
  background: #b08d20;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
}

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #c9a84c;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.btn-outline-gold:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: #c9a84c;
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero-gradient {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 40%, #f5f0e8 100%);
  padding-top: 80px;
}

.hero-deco {
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-image-wrap {
  position: relative;
  z-index: 2;
}

.hero-image-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(30, 58, 95, 0.15);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 600 / 720;
  object-fit: cover;
}

.hero-image-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(30, 58, 95, 0.08), transparent);
  pointer-events: none;
}

.hero-image-frame::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.3), transparent 60%);
  z-index: -1;
}

.hero-floating-card {
  position: absolute;
  bottom: 2rem;
  left: -1.5rem;
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 40px rgba(30, 58, 95, 0.12);
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scroll-indicator {
  opacity: 0.6;
}

/* ---------- About Section ---------- */
.about-image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(30, 58, 95, 0.1);
}

.about-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 560 / 420;
  object-fit: cover;
}

.about-image-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(201, 168, 76, 0.08), transparent);
  pointer-events: none;
}

/* ---------- Services ---------- */
.service-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(30, 58, 95, 0.06);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(30, 58, 95, 0.08);
  border-color: rgba(201, 168, 76, 0.2);
}

.service-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.3s;
}

.service-card:hover .service-card-icon {
  background: linear-gradient(135deg, #1e3a5f, #334b63);
}

.service-card:hover .service-card-icon svg {
  stroke: #c9a84c;
}

/* ---------- Approach ---------- */
.approach-image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(30, 58, 95, 0.1);
}

.approach-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 560 / 640;
  object-fit: cover;
}

.approach-item {
  transition: transform 0.3s;
}

.approach-item:hover {
  transform: translateX(4px);
}

/* ---------- Contact ---------- */
.contact-info-card {
  padding: 1.5rem;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}

.contact-info-card:hover {
  box-shadow: 0 10px 30px rgba(30, 58, 95, 0.06);
  transform: translateY(-2px);
}

.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid #d9e2ec;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #1e3a5f;
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.input-field::placeholder {
  color: #9fb3c8;
}

.input-field:focus {
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.input-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23627d98' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.success-message {
  margin-top: 1rem;
  animation: fadeIn 0.4s ease;
}

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

/* ---------- Scroll Reveal ---------- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Progressive enhancement — animated only when JS runs and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
  }
  .reveal-right {
    opacity: 0;
    transform: translateX(30px);
  }
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hero-floating-card {
    left: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 767px) {
  .hero-gradient {
    padding-top: 72px;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-floating-card {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 1rem;
    animation: none;
  }

  .about-image-accent,
  .hero-image-accent {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content h1 {
    font-size: 3rem;
  }
}
