/* Thobea Medical Centre - Main Stylesheet */
:root {
  --primary: #C8102E;
  --primary-dark: #9B0C23;
  --primary-light: #E31C23;
  --secondary: #0A2F5C;
  --accent: #00A3E0;
  --text: #1A1A1A;
  --text-light: #555;
  --bg: #FFFFFF;
  --bg-light: #F8F9FA;
  --bg-dark: #0A2F5C;
  --border: #E5E7EB;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ========== HEADER ========== */
.header {
  background: var(--bg);
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 1.15rem;
  color: var(--primary);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

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

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

.btn-white:hover {
  background: var(--bg-light);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(10,47,92,0.85), rgba(200,16,46,0.75)), url('../images/building-front.jpg') center/cover no-repeat;
  color: white;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 650px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

/* ========== SECTIONS ========== */
.section {
  padding: 4.5rem 1.5rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: var(--secondary);
  margin-bottom: 0.6rem;
}

.section-header p {
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

.bg-light {
  background: var(--bg-light);
}

/* ========== SERVICES GRID ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  border-top: 4px solid var(--primary);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(200,16,46,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-light);
}

/* ========== ABOUT ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-images img {
  border-radius: var(--radius);
  object-fit: cover;
  height: 220px;
  width: 100%;
}

.about-images img:first-child {
  grid-column: 1 / -1;
  height: 260px;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.8rem;
}

.stat h4 {
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 800;
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ========== GALLERY ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.gallery-grid img {
  border-radius: var(--radius);
  height: 240px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  background: rgba(200,16,46,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.contact-item p, .contact-item a {
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-item a:hover {
  color: var(--primary);
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========== CTA ========== */
.cta {
  background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
  color: white;
  text-align: center;
  padding: 4rem 1.5rem;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.cta p {
  max-width: 500px;
  margin: 0 auto 1.8rem;
  opacity: 0.9;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand .logo-text strong {
  color: white;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.6rem;
}

.footer ul a {
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer ul a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 500px;
  }

  .stats {
    flex-wrap: wrap;
    gap: 1.2rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .about-images img {
    height: 180px;
  }

  .about-images img:first-child {
    height: 200px;
  }
}