/* ==========================================================================
   Serbisyo Kapitbahay - Modern AdSense-Ready Design System
   ========================================================================== */

:root {
  --primary: #673ab7;
  --primary-dark: #512da8;
  --primary-light: #ede7f6;
  --primary-rgb: 103, 58, 183;
  --accent: #ff9800;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 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-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-w: 1200px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* --------------------------------------------------------------------------
   Layout Containers
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.content-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

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

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

.btn-cta {
  background: var(--primary);
  color: white !important;
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: 0 4px 14px 0 rgba(var(--primary-rgb), 0.35);
  transition: transform 0.15s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }
  .nav-links.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #ede7f6 0%, transparent 60%);
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 22px;
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Cards and Grids
   -------------------------------------------------------------------------- */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-title p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 64px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  margin-bottom: 64px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Article & Guide Layouts (AdSense Ready)
   -------------------------------------------------------------------------- */
.article-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.article-category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.article-header h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 36px 0 16px;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 24px 24px;
}

.article-body li {
  margin-bottom: 10px;
}

.callout-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
}

.callout-box h4 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.callout-box p {
  margin-bottom: 0;
  color: #475569;
}

/* --------------------------------------------------------------------------
   Contact Form Styles
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 64px 0 32px;
  margin-top: 80px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand h3 {
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

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

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Article Enhancements: Breadcrumbs, Tables, Author, FAQ, Categories
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.breadcrumb-separator {
  color: #cbd5e1;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: white;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.data-table th {
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: #f8fafc;
}

.author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 40px 0 24px;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.faq-section {
  margin: 44px 0;
}

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.faq-item h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 8px;
}

.faq-item p {
  margin-bottom: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 36px;
  justify-content: center;
}

.category-pill {
  display: inline-block;
  padding: 8px 18px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.related-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
