/* ==========================================================================
   Heath & Reach Veterinary Surgery — Stylesheet
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --green-dark: #1b5e20;
  --green-deep: #004e1e;
  --green-light: #e8f5e9;
  --amber: #e39c4a;
  --amber-dark: #b46d2d;
  --grey-warm: #c0b99f;
  --cream: #fff8de;
  --white: #ffffff;
  --text-dark: #2d3436;
  --text-medium: #424242;
  --text-light: #666666;

  --font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --max-width: 1100px;
  --radius: 6px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--white);
}

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

a {
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--green-deep);
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--green-dark);
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 1.6rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: 1.25rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
}

ul, ol {
  margin-bottom: var(--space-sm);
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.3rem;
}

strong {
  font-weight: 600;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Header & Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--green-light);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
}

.logo-link {
  flex-shrink: 0;
}

.logo {
  height: 50px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

.header-phone {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--amber-dark);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Nav */
.main-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  padding: var(--space-sm) 0;
}

.main-nav.open {
  display: flex;
}

.main-nav a {
  display: block;
  padding: 0.6rem 0;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--green-light);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--green-dark);
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #2e7d32 100%);
  color: var(--white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 2.4rem;
  margin-bottom: var(--space-sm);
}

.hero-intro {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto var(--space-md);
  line-height: 1.8;
  opacity: 0.95;
}

.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-sm);
  max-width: 900px;
  margin: var(--space-md) auto;
}

.hero-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-hours {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: inline-block;
}

.hero-hours h2 {
  color: var(--white);
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-hours p {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

/* --- Buttons & CTAs --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

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

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

.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

/* Standalone button (outside hero) */
.btn-standalone {
  background: var(--green-dark);
  color: var(--white);
}

.btn-standalone:hover {
  background: var(--green-deep);
  color: var(--white);
}

.btn-amber {
  background: var(--amber);
  color: var(--white);
}

.btn-amber:hover {
  background: var(--amber-dark);
  color: var(--white);
}

/* --- Cards & Info Boxes --- */
.info-cards {
  padding: var(--space-xl) 0;
  background: var(--green-light);
}

.card-grid {
  display: grid;
  gap: var(--space-md);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-family: var(--font-body);
  margin-bottom: var(--space-xs);
}

.card-phone {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
}

.card-phone:hover {
  color: var(--amber-dark);
}

.card a {
  word-break: break-word;
}

.card p {
  margin-bottom: 0;
  color: var(--text-medium);
}

/* Service cards */
.service-list h3 {
  background: var(--green-light);
  padding: var(--space-sm) var(--space-md);
  border-left: 4px solid var(--green-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: var(--space-md);
}

.service-list h3 + p {
  padding-left: var(--space-md);
  color: var(--text-medium);
}

/* Team jump links */
.team-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.team-jump-links .btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

/* Team cards */
.team-grid {
  display: grid;
  gap: var(--space-md);
}

.team-member {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-sm);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-member h3 {
  margin-top: 0;
  color: var(--green-dark);
}

.team-member .qualifications {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: var(--space-xs);
}

.team-member .role {
  font-weight: 600;
  color: var(--amber-dark);
  margin-bottom: var(--space-xs);
}

/* --- Emergency Callout --- */
.emergency-box {
  background: #fff8e1;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.emergency-box h3 {
  color: var(--amber-dark);
  margin-top: 0;
}

.emergency-box a {
  color: var(--amber-dark);
  font-weight: 700;
}

.home-emergency {
  padding: 0 0 var(--space-xl);
}

/* --- Practice Page --- */
.practice-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.practice-photo {
  border-radius: var(--radius);
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.practice-photo-wide {
  border-radius: var(--radius);
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin: var(--space-md) 0;
}

.practice-photo-small {
  border-radius: var(--radius);
  max-width: 300px;
  margin: var(--space-md) 0;
}

.facilities-grid {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.facility-item {
  background: var(--green-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.facility-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.facility-placeholder {
  background: linear-gradient(135deg, var(--green-dark) 0%, #2e7d32 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.facility-placeholder span {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0.9;
}

.facility-item p {
  padding: var(--space-sm) var(--space-md);
  margin: 0;
}

@media (min-width: 768px) {
  .facilities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .facility-photo {
    height: 220px;
  }

  .practice-photo {
    height: 300px;
  }
}

@media (max-width: 700px) {
  .hero-photos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .practice-gallery {
    grid-template-columns: 1fr;
  }
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  gap: var(--space-lg);
}

.text-small {
  font-size: 0.9rem;
  color: var(--text-light);
}

.contact-info h3 {
  margin-top: var(--space-md);
}

.contact-info h3:first-child {
  margin-top: 0;
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 350px;
  border: 0;
}

/* --- Page Content --- */
.page-content {
  padding: var(--space-xl) 0;
}

.page-content h1 {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--green-light);
}

/* --- Footer --- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-xl) 0 0;
}

.footer-inner {
  display: grid;
  gap: var(--space-lg);
}

.site-footer h3 {
  color: var(--amber);
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: var(--amber);
}

.site-footer p {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.footer-bottom {
  margin-top: var(--space-lg);
  padding: var(--space-sm) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- Small Mobile Fixes --- */
@media (max-width: 400px) {
  .logo {
    height: 40px;
  }

  .header-phone {
    font-size: 0.95rem;
  }

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

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

  .hero-photo {
    height: 200px;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
  }
}

/* --- Responsive Breakpoints --- */

/* Tablet (768px+) */
@media (min-width: 768px) {
  h1 {
    font-size: 2.6rem;
  }

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

  .hero-intro {
    font-size: 1.2rem;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .map-container iframe {
    height: 400px;
  }

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

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .logo {
    height: 60px;
  }

  /* Desktop nav: horizontal */
  .hamburger {
    display: none;
  }

  .main-nav {
    display: flex;
    width: auto;
    flex-direction: row;
    padding: 0;
    gap: 0;
    order: 3;
    width: 100%;
    justify-content: flex-end;
    margin-top: var(--space-xs);
  }

  .main-nav a {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-bottom: none;
    font-size: 0.95rem;
    position: relative;
  }

  .main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: var(--amber);
    transform: scaleX(0);
    transition: transform 0.2s;
  }

  .main-nav a:hover::after,
  .main-nav a.active::after {
    transform: scaleX(1);
  }

  .header-inner {
    flex-wrap: wrap;
  }

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