:root {
  --container: 1200px;
  --primary: #16a34a; /* Green 600 */
  --primary-hover: #15803d; /* Green 700 */
  --primary-light: #dcfce7; /* Green 100 */
  --text-main: #1f2937; /* Gray 800 */
  --text-muted: #6b7280; /* Gray 500 */
  --bg-body: #f9fafb; /* Gray 50 */
  --bg-white: #ffffff;
  --border-color: #e5e7eb; /* Gray 200 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
}

* { box-sizing: border-box; }

body { 
  margin: 0; 
  font-family: 'Instrument Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; 
  color: var(--text-main); 
  background: var(--bg-body); 
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  color: #111827;
  margin-top: 0;
  line-height: 1.2;
}

h2 {
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--primary-hover);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

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

.container { 
  max-width: var(--container); 
  margin: 0 auto; 
  padding: 0 1.5rem; 
}

/* Header */
.site-header { 
  background: var(--bg-white); 
  border-bottom: 1px solid var(--border-color); 
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.site-header .container { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 4.5rem;
}

.logo { 
  font-weight: 800; 
  font-size: 1.5rem; 
  color: var(--primary-hover); 
  text-decoration: none; 
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a { 
  color: var(--text-main); 
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover { 
  color: var(--primary); 
  border-bottom-color: var(--primary);
}

/* Hero Section */
.hero { 
  background: linear-gradient(to bottom, #f0fdf4, #ffffff); 
  padding: 4rem 0; 
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.search-box { 
  display: flex; 
  gap: 0.75rem; 
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.search-box select, .search-box input { 
  flex: 1;
  padding: 0.75rem 1rem; 
  border: 1px solid var(--border-color); 
  border-radius: var(--radius); 
  font-size: 1rem;
  outline: none;
  min-width: 200px;
}

.search-box select:focus, .search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box button { 
  background: var(--primary); 
  color: #fff; 
  border: none; 
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer; 
  transition: background 0.2s;
  min-width: 120px;
}

.search-box button:hover { 
  background: var(--primary-hover); 
}

/* Sections */
section {
  padding: 4rem 0;
}

section.categories { background: var(--bg-white); }
section.featured-centers { background: var(--bg-body); }
section.articles { background: var(--bg-white); }
section.why { background: #064e3b; color: white; } /* Dark Green bg */

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

/* Cards */
.card { 
  background: var(--bg-white); 
  border: 1px solid var(--border-color); 
  border-radius: var(--radius-lg); 
  padding: 0; 
  box-shadow: var(--shadow-sm); 
  display: flex; 
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body, .card > h3, .card > p {
  padding: 1.5rem;
}

.card h3 {
  margin-top: 0;
  color: var(--text-main);
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Categories Specific */
.categories .card {
  text-align: center;
  padding: 2rem;
  border-top: 4px solid var(--primary);
}

.categories .card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.categories .card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Featured Centers Specific */
.featured-centers .card-body {
  padding: 1.5rem;
}

/* Articles Specific */
.articles .card {
  border: none;
  box-shadow: var(--shadow);
}

/* Why Section */
.why h2 { color: white; text-align: center; margin-bottom: 2rem; }
.why ul { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}
.why li {
  font-size: 1.125rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

/* Footer */
.site-footer { 
  background: #111827; 
  color: #d1d5db; 
  padding: 4rem 0 2rem; 
  margin-top: 0;
  border-top: none;
}

.site-footer a { color: #9ca3af; }
.site-footer a:hover { color: #fff; }
.site-footer h3, .site-footer h4 { color: #fff; }

/* Mobile Responsive */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 1rem;
  }
  
  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .hero { padding: 2rem 0; }
  
  .search-box {
    flex-direction: column;
  }
  
  .search-box select, .search-box input, .search-box button {
    width: 100%;
    min-width: 0;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}

/* 3-Col Layout (Legacy Support if needed) */
.layout-3col { display: grid; grid-template-columns: 260px 1fr 220px; gap: 1.5rem; }
@media (max-width: 1024px) {
  .layout-3col { grid-template-columns: 1fr; }
}
.layout-3col .left, .layout-3col .right, .layout-3col .body { 
  background: #fff; 
  border: 1px solid var(--border-color); 
  border-radius: var(--radius); 
  padding: 1.5rem; 
}

/* Sidebar Styles */
aside h3 {
  font-size: 1.125rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

aside ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

aside li {
  margin-bottom: 0.5rem;
}

aside a {
  display: block;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--text-main);
  transition: background 0.2s, color 0.2s;
}

aside a:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}

/* Breadcrumb */
.breadcrumb { margin: 1rem 0 1.5rem; font-size: 0.875rem; color: var(--text-muted); }
.breadcrumb ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li+li:before { content: "/"; color: var(--text-muted); margin: 0 0.5rem; }

/* Controls/Filters */
.filter { 
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  display: block;
}

.filter select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.filter button { 
  background: var(--primary); 
  color: white; 
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.filter button:hover { background: var(--primary-hover); }

.controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  justify-content: flex-end;
}

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; list-style: none; padding: 0; }
.page-item .page-link { 
  padding: 0.5rem 1rem; 
  border: 1px solid var(--border-color); 
  border-radius: var(--radius); 
  color: var(--primary);
  display: block;
}
.page-item.active .page-link {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Thumb/Placeholder */
.thumb {
  width: 100%;
  height: 200px;
  background-color: #f3f4f6;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

/* List View */
.list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.list .card {
  flex-direction: row;
  height: auto;
}

.list .card .thumb, .list .card img {
  width: 250px;
  height: auto;
  min-height: 180px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  object-fit: cover;
}

.card:hover h3 {
  color: var(--primary);
}

@media (max-width: 768px) {
  .list .card {
    flex-direction: column;
  }
  .list .card .thumb, .list .card img {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* Ad */
.ad {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
}
