/* Modern Veterinary Clinic CSS Framework */

/* CSS Custom Properties */
:root {
  /* Colors - Veterinary Theme */
  --primary-color: #2d5a8b;      /* Trustworthy blue */
  --secondary-color: #52b788;     /* Healing green */
  --accent-color: #f77f00;       /* Warm orange */
  --text-primary: #2c3e50;       /* Dark blue-gray */
  --text-secondary: #5a6c7d;     /* Medium gray */
  --text-light: #7a8999;        /* Light gray */
  --background-light: #f8fafc;   /* Very light blue */
  --background-white: #ffffff;
  --border-light: #e2e8f0;
  --shadow-light: rgba(45, 90, 139, 0.1);
  --shadow-medium: rgba(45, 90, 139, 0.15);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-secondary: 'Merriweather', Georgia, serif;
  
  /* Spacing - 8pt grid system */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-10: 5rem;    /* 80px */
  
  /* Breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

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

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Header and Navigation */
.header {
  background: var(--background-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px var(--shadow-light);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.clinic-logo {
  height: 40px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.nav-menu {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: 6px;
  transition: all 0.3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  background: var(--background-light);
  color: var(--primary-color);
}

.nav-cta {
  background: var(--primary-color);
  color: white !important;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: var(--space-1);
  min-height: 44px;
  min-width: 44px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, 
    rgba(45, 90, 139, 0.95), 
    rgba(82, 183, 136, 0.9)),
    var(--background-light);
  color: white;
  padding: var(--space-10) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 30L45 45L30 60L15 45Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E") repeat;
  opacity: 0.3;
}

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

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--space-3);
  line-height: 1.1;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 56px;
  gap: var(--space-1);
}

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

.btn-primary:hover {
  background: #e67000;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(247, 127, 0, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

.btn-white:hover {
  background: var(--background-light);
  transform: translateY(-2px);
}

.cta-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

/* Sections */
.section {
  padding: var(--space-10) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.card {
  background: var(--background-white);
  border-radius: 12px;
  padding: var(--space-4);
  box-shadow: 0 4px 6px var(--shadow-light);
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow-medium);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Staff Cards */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.staff-card {
  background: var(--background-white);
  border-radius: 12px;
  padding: var(--space-4);
  text-align: center;
  box-shadow: 0 4px 6px var(--shadow-light);
  transition: all 0.3s ease;
}

.staff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow-medium);
}

.staff-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-3);
  border: 4px solid var(--secondary-color);
}

.staff-name {
  font-size: 1.25rem;
  margin-bottom: var(--space-1);
}

.staff-title {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.staff-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Service Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4);
}

.feature {
  text-align: center;
  padding: var(--space-3);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-3);
  background: var(--background-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-color);
}

.feature-title {
  margin-bottom: var(--space-2);
}

.feature-description {
  color: var(--text-secondary);
}

/* Contact Information */
.contact-info {
  background: var(--background-light);
  border-radius: 12px;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  min-width: 24px;
}

.phone-link {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.125rem;
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer-section h4 {
  color: var(--secondary-color);
  margin-bottom: var(--space-3);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-1);
}

.footer-section a {
  color: #cbd5e0;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid #4a5568;
  padding-top: var(--space-4);
  text-align: center;
  color: #a0aec0;
  font-size: 0.9rem;
}

.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.partner-logo {
  height: 40px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.partner-logo:hover {
  opacity: 1;
}

/* Background Utilities */
.bg-primary { background: var(--primary-color); }
.bg-secondary { background: var(--secondary-color); }
.bg-light { background: var(--background-light); }
.bg-white { background: var(--background-white); }

/* Text Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-white { color: white; }

/* Spacing Utilities */
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border-top: 1px solid var(--border-light);
    flex-direction: column;
    padding: var(--space-3);
    gap: var(--space-2);
    box-shadow: 0 4px 6px var(--shadow-light);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.125rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .card-grid,
  .staff-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 var(--space-3);
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--space-8) 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section {
    padding: var(--space-6) 0;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Consultation Form Styles */
.form-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
}

.form-intro {
  margin-bottom: var(--space-6);
}

.form-intro h2 {
  color: var(--primary-color);
  margin-bottom: var(--space-3);
  font-family: var(--font-secondary);
}

.form-intro p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.consultation-types {
  background: var(--background-light);
  padding: var(--space-4);
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
}

.consultation-types h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-2);
  font-size: 1.1rem;
}

.consultation-types ul {
  list-style: none;
  padding: 0;
}

.consultation-types li {
  margin-bottom: var(--space-2);
  padding-left: var(--space-3);
  position: relative;
}

.consultation-types li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.consultation-form {
  background: white;
  padding: var(--space-6);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px var(--shadow-light);
  border: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--border-light);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(45, 90, 139, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: var(--space-1);
  display: block;
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: var(--space-2);
  font-weight: normal !important;
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: auto !important;
  margin: 0;
  margin-top: 2px;
}

.checkmark {
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-card,
.emergency-card {
  background: white;
  padding: var(--space-5);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px var(--shadow-light);
  border: 1px solid var(--border-light);
}

.contact-card h3,
.emergency-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-4);
  font-family: var(--font-secondary);
}

.contact-card .contact-item {
  margin-bottom: var(--space-3);
}

.contact-card .contact-item:last-child {
  margin-bottom: 0;
}

.emergency-card {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #fca5a5;
}

.emergency-card h3 {
  color: #dc2626;
}

.emergency-card p {
  color: #7f1d1d;
  margin-bottom: var(--space-2);
}

.emergency-card .btn {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

.emergency-card .btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Success and Error Messages */
.success-message,
.email-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.success-content,
.email-modal-content {
  background: white;
  padding: var(--space-6);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.email-modal-content {
  max-width: 600px;
  text-align: left;
}

.success-content h3 {
  color: var(--secondary-color);
  margin-bottom: var(--space-3);
  font-family: var(--font-secondary);
}

.success-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.hero-secondary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  min-height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .consultation-form {
    padding: var(--space-4);
  }
  
  .contact-card,
  .emergency-card {
    padding: var(--space-4);
  }
  
  .success-content,
  .email-modal-content {
    margin: var(--space-4);
    width: calc(100% - var(--space-8));
  }
}

@media (max-width: 480px) {
  .form-wrapper {
    gap: var(--space-4);
  }
  
  .consultation-form {
    padding: var(--space-3);
  }
  
  .btn-full {
    padding: var(--space-2) var(--space-3);
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .nav-toggle,
  .btn {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .section {
    padding: 20pt 0;
  }
}