/* ============================================================
   Encore Veterinary Hospital - Style Sheet
   Mobile-first responsive design
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --red: #EB151F;
  --red-logo: #FB1D1A;
  --red-dark: #70181F;
  --black: #000000;
  --white: #FFFFFF;
  --off-white: #FDF8F4;
  --charcoal: #1F2937;
  --gray: #6B7280;

  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --header-height: 64px;
  --container-max: 1140px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  min-height: 48px;
  min-width: 44px;
  text-align: center;
  line-height: 1.2;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--white);
  color: var(--red);
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 1.1rem;
  padding: 16px 32px;
}

/* Pulse animation for main CTA */
.pulse {
  animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(235,21,31,0.45); }
  70% { box-shadow: 0 0 0 14px rgba(235,21,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(235,21,31,0); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--red);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo {
  height: 120px;
  width: auto;
  margin: -24px 0;
  filter: invert(1) grayscale(1);
  mix-blend-mode: screen;
}

/* Nav links */
.nav-links {
  display: none;
  gap: 4px;
}

.nav-links a {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255,255,255,0.15);
}

/* Header phone button */
.nav-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background var(--transition);
  min-height: 44px;
  white-space: nowrap;
}

.nav-phone:hover,
.nav-phone:focus-visible {
  background: rgba(255,255,255,0.25);
}

.nav-phone span {
  display: none;
}

/* Hamburger */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu dropdown */
.nav-links.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--red-dark);
  padding: 12px 20px 20px;
  box-shadow: var(--shadow-lg);
}

.nav-links.is-open a {
  padding: 14px 16px;
  font-size: 1rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: calc(var(--header-height) + 48px) 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background shapes */
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--white);
  color: var(--red);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 24px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero-slogan {
  font-size: 1.15rem;
  font-weight: 400;
  opacity: 0.92;
  margin-bottom: 8px;
  font-style: italic;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.hero-cta-group .btn-primary {
  background: var(--white);
  color: var(--red);
  border-color: var(--white);
}

.hero-cta-group .btn-primary:hover,
.hero-cta-group .btn-primary:focus-visible {
  background: var(--off-white);
  border-color: var(--off-white);
  color: var(--red-dark);
}

.hero-cta-group .btn-primary.pulse {
  animation-name: pulse-ring-white;
}

@keyframes pulse-ring-white {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  70% { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.hero-accepting {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ============================================================
   WHY CHOOSE US
   ============================================================ */
.why-us {
  padding: 64px 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 64px 0;
  background: var(--off-white);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.service-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.55;
}

/* Tech Callout */
.tech-callout {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tech-callout-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-callout strong {
  font-size: 1.05rem;
  display: block;
  margin-bottom: 4px;
}

.tech-callout p {
  font-size: 0.92rem;
  opacity: 0.92;
  line-height: 1.55;
}

/* ============================================================
   HOURS
   ============================================================ */
.hours {
  padding: 64px 0;
  background: var(--white);
}

.hours-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hours-table-wrap {
  overflow-x: auto;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.hours-table th {
  text-align: left;
  font-weight: 600;
  color: var(--gray);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 2px solid var(--red);
}

.hours-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.hours-table tr:last-child td {
  border-bottom: none;
}

.hours-table strong {
  color: var(--red);
  font-size: 1.05em;
}

.hours-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hours-highlight-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border-left: 4px solid var(--red);
}

.hours-highlight-card strong {
  display: block;
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.hours-highlight-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.55;
}

.hours-highlight-card svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   LOCATION
   ============================================================ */
.location {
  padding: 64px 0;
  background: var(--off-white);
}

.location-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.location-info {
  text-align: center;
}

.location-address {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.location-history {
  color: var(--gray);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 20px;
}

.map-responsive {
  overflow: hidden;
  padding-bottom: 56.25%;
  position: relative;
  height: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.map-responsive iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 64px 0;
  background: var(--white);
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 72px;
}

.contact-btn:hover,
.contact-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-btn svg {
  flex-shrink: 0;
}

.contact-btn-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.contact-btn-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}

.contact-btn--call {
  background: var(--red);
  color: var(--white);
}

.contact-btn--call:hover,
.contact-btn--call:focus-visible {
  background: var(--red-dark);
}

.contact-btn--text {
  background: var(--charcoal);
  color: var(--white);
}

.contact-btn--text:hover,
.contact-btn--text:focus-visible {
  background: var(--black);
}

.contact-btn--email {
  background: var(--off-white);
  color: var(--charcoal);
  border: 2px solid rgba(0,0,0,0.08);
}

.contact-btn--email:hover,
.contact-btn--email:focus-visible {
  border-color: var(--red);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--red-dark);
  color: var(--white);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  height: 140px;
  width: auto;
  margin-bottom: 4px;
  filter: invert(1) grayscale(1);
  mix-blend-mode: screen;
}

.footer-slogan {
  font-size: 0.9rem;
  opacity: 0.8;
  font-style: italic;
}

.footer-col h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  opacity: 0.7;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  opacity: 0.9;
  transition: opacity var(--transition);
  min-height: 44px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 1;
  color: var(--red-logo);
}

.footer-hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
  opacity: 0.9;
  padding: 4px 0;
  max-width: 240px;
}

.footer-col p {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.6;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
  opacity: 0.9;
  transition: opacity var(--transition);
  min-height: 44px;
}

.footer-social:hover,
.footer-social:focus-visible {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ============================================================
   RESPONSIVE - TABLET (640px+)
   ============================================================ */
@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-slogan {
    font-size: 1.25rem;
  }

  .hero-cta-group {
    flex-direction: row;
    justify-content: center;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hours-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .hours-table-wrap {
    flex: 1;
  }

  .hours-highlights {
    flex: 1;
  }

  .location-content {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-phone span {
    display: inline;
  }
}

/* ============================================================
   RESPONSIVE - DESKTOP (900px+)
   ============================================================ */
@media (min-width: 900px) {
  :root {
    --header-height: 72px;
  }

  .hero {
    padding: calc(var(--header-height) + 72px) 20px 80px;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .hero-badge {
    font-size: 1rem;
  }

  .mobile-menu-btn {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .why-us,
  .services,
  .hours,
  .location,
  .contact {
    padding: 80px 0;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .location-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 48px;
  }

  .location-info {
    text-align: left;
    flex: 0 0 320px;
  }

  .map-responsive {
    flex: 1;
    padding-bottom: 35%;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* ============================================================
   RESPONSIVE - WIDE (1100px+)
   ============================================================ */
@media (min-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-buttons {
    flex-direction: row;
    max-width: 800px;
  }

  .contact-btn {
    flex: 1;
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 28px 20px;
  }
}

/* ============================================================
   FOCUS STYLES (Accessibility)
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.site-header :focus-visible,
.hero :focus-visible {
  outline-color: var(--white);
}

.site-footer :focus-visible {
  outline-color: var(--white);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pulse {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
