/* ============================================
   Townsville Dental Clinic — Professional Dental Theme
   Clean, modern, medical-grade design
   ============================================ */

/* --- Variables --- */
:root {
  --bg: #ffffff;
  --bg-light: #f8fafb;
  --bg-warm: #f5f7f4;
  --text: #1a2332;
  --text-muted: #4a5568;
  --text-light: #718096;
  --green: #1a6b4a;
  --green-light: #228b5b;
  --green-dark: #145439;
  --green-bg: rgba(26, 107, 74, 0.06);
  --gold: #c8a45e;
  --gold-light: #d4b872;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --max-width: 1200px;
  --content-width: 780px;
  --font-heading: 'DM Sans', sans-serif;
  --font-body: 'Inter', 'DM Sans', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 0.9375rem;
}

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.05rem; margin-top: 1.5rem; margin-bottom: 0.4rem; }
p { margin-bottom: 1.2rem; }
strong { font-weight: 600; }
ul, ol { margin-bottom: 1.2rem; padding-left: 1.5rem; }
li { margin-bottom: 0.3rem; }
blockquote {
  border-left: 3px solid var(--green);
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--green-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: white; }
.btn-secondary {
  background: var(--green-bg);
  color: var(--green);
  border-color: transparent;
}
.btn-secondary:hover { background: var(--green); color: white; }
.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green); color: white; }
.btn-outline-light {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover { background: white; color: var(--green-dark); border-color: white; }


/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
}
.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.4rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar a { color: rgba(255,255,255,0.9); }
.top-bar a:hover { color: white; }
.top-bar-left { display: flex; align-items: center; gap: 0.5rem; }
.top-bar-left a { display: flex; align-items: center; gap: 0.35rem; font-weight: 500; }
.top-bar-left svg { flex-shrink: 0; }
.top-bar-sep { opacity: 0.4; }
.top-bar-hours { opacity: 0.7; }
.top-bar-right a { font-weight: 500; }


/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 48px; width: auto; }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px; height: 40px;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.nav-toggle:hover { background: var(--bg-light); }
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav */
.nav-menu {
  display: none;
  position: absolute;
  top: 72px;
  left: 0; right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem 0.75rem;
  box-shadow: var(--shadow-md);
}
.nav-menu.active { display: block; }
.nav-menu a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.nav-menu a:hover { background: var(--bg-light); color: var(--green); }
.nav-menu a.active { color: var(--green); background: var(--green-bg); }
.nav-menu .nav-cta {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--green);
  color: white;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
}
.nav-menu .nav-cta:hover { background: var(--green-dark); color: white; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    align-items: center;
    gap: 0.2rem;
  }
  .nav-menu a {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    font-size: 0.88rem;
  }
  .nav-menu .nav-cta {
    margin-top: 0;
    margin-left: 0.5rem;
  }
  .top-bar-hours { display: inline; }
}

@media (max-width: 767px) {
  .top-bar-hours { display: none; }
  .top-bar-right { display: none; }
}


/* ========================================
   HERO
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%);
  color: white;
  padding: 4rem 1.25rem;
  text-align: center;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-actions .btn-primary {
  background: white;
  color: var(--green-dark);
  border-color: white;
  font-size: 1rem;
  padding: 0.85rem 2rem;
}
.hero-actions .btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--text); }
.hero-actions .btn-outline {
  color: white;
  border-color: rgba(255,255,255,0.4);
  font-size: 0.95rem;
}
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); color: white; }

@media (min-width: 768px) {
  .hero { padding: 5rem 1.25rem; }
  .hero h1 { font-size: 3rem; }
}


/* ========================================
   HOME CONTENT
   ======================================== */
.home-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  margin-top: 0;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-header .view-all {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
}


/* --- Features Grid --- */
.features-section {
  padding: 4rem 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-icon {
  width: 56px; height: 56px;
  background: var(--green-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--green);
}
.feature-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0;
  line-height: 1.6;
}


/* --- Services Section --- */
.services-section {
  padding: 3rem 0 4rem;
}
.section-cta {
  text-align: center;
  margin-top: 2rem;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}
.card-icon {
  width: 56px; height: 56px;
  background: var(--green-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--green);
  transition: background 0.2s;
}
.card:hover .card-icon { background: var(--green); color: white; }
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.card p, .card .card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}


/* --- CTA Banner --- */
.cta-banner {
  margin: 3rem 0;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  color: white;
}
.cta-banner h2 { color: white; margin-top: 0; font-size: 1.75rem; }
.cta-banner p { opacity: 0.9; font-size: 1.05rem; margin-bottom: 1.5rem; }
.cta-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* --- News Section --- */
.news-section {
  padding: 3rem 0 4rem;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.news-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.news-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); color: var(--text); }
.news-card-body { padding: 1.5rem; }
.news-date {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.news-card h3 { margin: 0.4rem 0 0.5rem; font-size: 1.05rem; }
.news-card p { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 0.75rem; }
.news-link { color: var(--green); font-weight: 600; font-size: 0.85rem; }


/* ========================================
   LIST PAGE
   ======================================== */
.list-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.list-page-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem 0;
}
.list-page-header h1 { margin-bottom: 0.5rem; }
.list-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }


/* ========================================
   ARTICLE PAGE
   ======================================== */
.article-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep { margin: 0 0.4rem; opacity: 0.4; }

/* Article header */
.article-header { margin-bottom: 2rem; }
.category-badge {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.article-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.article-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.meta-sep { opacity: 0.4; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag {
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

/* TOC */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.toc nav, .toc ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.toc li { margin-bottom: 0.3rem; }
.toc a { color: var(--text-muted); font-size: 0.85rem; }
.toc a:hover { color: var(--green); }
.toc ul ul { padding-left: 1rem; }

/* Article body */
.article-body {
  font-size: 1rem;
  line-height: 1.8;
}
.article-body h2 { font-size: 1.4rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.article-body h3 { font-size: 1.15rem; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.article-body th, .article-body td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border: 1px solid var(--border);
}
.article-body th { background: var(--bg-light); font-weight: 600; }

/* FAQ */
.faq-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.faq-section h2 { margin-top: 0; font-size: 1.4rem; margin-bottom: 1.5rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-q {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  background: var(--bg-light);
  cursor: pointer;
}
.faq-a {
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Page CTA */
.page-cta {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--green-bg);
  border: 1px solid rgba(26, 107, 74, 0.12);
  border-radius: var(--radius-md);
  text-align: center;
}
.page-cta h3 { margin-top: 0; margin-bottom: 0.4rem; }
.page-cta p { color: var(--text-muted); margin-bottom: 1rem; }
.page-cta .cta-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Error page */
.error-page {
  text-align: center;
  padding: 5rem 1.25rem;
  max-width: 500px;
  margin: 0 auto;
}
.error-page h1 { font-size: 5rem; color: var(--green); margin-bottom: 1rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }


/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-info-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.contact-info-card h3 { margin-top: 0; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}
.contact-info-item svg { flex-shrink: 0; color: var(--green); margin-top: 0.15rem; }
.contact-info-item a { color: var(--green); font-weight: 500; }
.contact-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 300px;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 300px; border: none; }


/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 0;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
}
.footer-col h4 {
  color: white;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.75;
}
.footer-logo { height: 40px; width: auto; margin-bottom: 1rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--green); color: white; }

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.footer-contact svg { flex-shrink: 0; color: var(--green-light); margin-top: 0.1rem; }
.footer-contact a { color: rgba(255,255,255,0.75); }
.footer-contact a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.78rem;
  opacity: 0.55;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: white; }
