/* ==================== GLOBAL STYLES ==================== */
/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color Scheme */
:root {
  --primary-color: #4c5b9d;
  --secondary-color: #3249be;
  --accent-color: #0cbd09;
  --text-color: #1e293b;
  --text-light: #64748b;
  --background-color: #F1F1F1;
  --background-dark: #0e273f;
  --background-card: #231747;
  --background-section: #F8FAFC;
  --caption-content-gap: 0.85rem;
  --content-block-gap: 1.25rem;
  --header-height: 82px;
  --banner-height: 42px;
  --header-banner-gap: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
  word-break: break-word;
}

.main-content {
  flex: 1;
  padding-top: calc(var(--header-height) + var(--header-banner-gap) + var(--banner-height));
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  transition: all 0.3s ease;
}

button {
  font-family: inherit;
}

/* Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--accent-color);
  color: #F1F5F9;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--background-dark);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(74, 108, 247, 0.1);
}

.header.scrolled {
  background: var(--background-dark);
  padding: 0.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  color: var(--primary-color);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
  transition: all 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(74, 108, 247, 0.4));
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--background-color);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0.5rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
  }

  .nav.open {
    right: 0;
  }

  .nav-link {
    font-size: 1rem;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    position: relative;
    font-weight: 500;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 1rem;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--accent-color);
  }

  .nav-link:hover::after,
  .nav-link.active::after {
    width: calc(100% - 2rem);
  }
}

/* ==================== APPOINTMENT BANNER ==================== */
.appointment-banner {
  position: fixed;
  top: calc(var(--header-height) + var(--header-banner-gap));
  left: 0;
  right: 0;
  background: var(--accent-color);
  padding: 0.65rem 0;
  z-index: 950;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.banner-text {
  color: white;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.banner-btn {
  background: white;
  color: var(--accent-color);
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.banner-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==================== STICKY FLOATING APPOINTMENT BUTTON ==================== */
.sticky-appointment-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 1rem 1.75rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(74, 108, 247, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.sticky-appointment-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 32px rgba(74, 108, 247, 0.6);
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.sticky-appointment-btn .btn-icon {
  font-size: 1.5rem;
  animation: bounce 1s infinite;
}

.sticky-appointment-btn .btn-text {
  font-size: 1rem;
  letter-spacing: 0.5px;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(74, 108, 247, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(74, 108, 247, 0.6), 0 0 0 8px rgba(74, 108, 247, 0.1);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* ==================== FOOTER ==================== */
.footer {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #FFFFFF;
  padding: 4rem 0 0;
  overflow: hidden;
}

.footer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
  opacity: 0.5;
  z-index: 1;
}

.footer-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 3rem;
}

@media (max-width: 1100px) {
  .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

.footer-section h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: break-word;
}

.footer-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.footer-description {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
  overflow-wrap: break-word;
  word-break: break-word;
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-color);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  color: #F1F5F9;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-nav a:hover {
  opacity: 1;
  transform: translateX(5px);
  color: var(--accent-color);
}

.contact-info p,
.hours p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  opacity: 0.85;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}

.contact-info a {
  color: #F1F5F9;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: #F1F5F9;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.social-links a:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .banner-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  background: var(--accent-color);
}

.btn-secondary {
  background: transparent;
  color: #F1F5F9;
  border-color: #F1F5F9;
}

.btn-secondary:hover {
  background: #F1F5F9;
  color: var(--primary-color);
}

.btn-light {
  background: #F1F5F9;
  color: var(--primary-color);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* ==================== PAGE HEADER (SHARED) ==================== */
.page-header {
  position: relative;
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #F1F5F9;
  text-align: center;
  overflow: hidden;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  opacity: 0.95;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-weight: 700;
}

/* ==================== CONSISTENT CAPTION SPACING ==================== */
.service-card h3,
.service-item h3,
.qualification-item h3,
.info-card h3,
.timeline-content h3,
.direction-item h4,
.about-text h2,
.intro-content h2,
.contact-info-section h2,
.contact-form-section h2 {
  margin-bottom: var(--caption-content-gap);
}

.service-card p,
.service-description,
.qualification-item p,
.info-card p,
.timeline-content p,
.about-text p,
.contact-intro,
.intro-content p {
  margin-bottom: var(--content-block-gap);
}

.service-details,
.directions-grid,
.info-cards {
  margin-top: var(--content-block-gap);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 1.75rem;
  }

  .page-header p {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .sticky-appointment-btn {
    bottom: 20px;
    right: 20px;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .sticky-appointment-btn .btn-text {
    display: none;
  }

  .sticky-appointment-btn .btn-icon {
    font-size: 1.75rem;
    margin: 0;
  }

  .sticky-appointment-btn {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    padding: 0;
    justify-content: center;
  }

  .appointment-banner {
    padding: 0.55rem 0;
  }

  .banner-text {
    font-size: 0.9rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.5rem;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .banner-text {
    font-size: 0.8rem;
  }

  .footer-section h3 {
    font-size: 1.4rem;
  }

  .footer-section h4 {
    font-size: 1rem;
  }

  .container {
    padding: 0 1rem;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  .header,
  .footer,
  .appointment-banner,
  .sticky-appointment-btn,
  .btn,
  .menu-toggle {
    display: none;
  }

  .main-content {
    padding-top: 0;
  }

  body {
    background: white;
    color: black;
  }
}

/* ==================== HIDDEN CLASS ==================== */
.hidden {
  display: none !important;
}
