/* =========================================================
   ZABITECH COMMUNITY - GLOBAL STYLES v4 (OPTIMIZED)
   CLEAN + FAST + SEO + ADSENSE SAFE
========================================================= */

/* =========================
   ROOT VARIABLES (UNCHANGED COLORS)
========================= */
:root {
  --primary: #0078d4;
  --primary-dark: #005fa3;
  --bg: #f5f7fa;
  --text: #1f2937;
  --muted: #6b7280;
  --white: #ffffff;
  --border: #e5e7eb;

  --radius: 10px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  --header-height: 70px;
}

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

html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: var(--header-height);
}

/* =========================
   LINKS
========================= */
a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   HEADER (FIXED STABLE)
========================= */
.blue-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
}

.blue-header .container {
  max-width: 1200px;
  width: 100%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  color: var(--white);
  font-weight: 700;
  font-size: 1.3rem;
}

.blue-header nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.blue-header nav a {
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: 0.2s ease;
}

.blue-header nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.blue-header nav a.active {
  background: var(--white);
  color: var(--primary);
}

/* =========================
   HERO
========================= */
.hero {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #f0f7ff);
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.hero p {
  max-width: 750px;
  margin: auto;
  color: var(--muted);
}

/* =========================
   BUTTONS
========================= */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--white);
  border: 1px solid var(--primary);
  color: var(--primary);
}

/* =========================
   SECTIONS
========================= */
section {
  padding: 50px 20px;
}

/* =========================
   GRID SYSTEMS
========================= */
.topics-grid,
.articles {
  display: grid;
  gap: 20px;
}

.topics-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.articles {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* =========================
   CARDS
========================= */
.topic-card,
.article,
.faq-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.topic-card {
  padding: 20px;
  text-align: center;
}

.topic-card:hover,
.faq-card:hover {
  transform: translateY(-3px);
}

.article {
  overflow: hidden;
}

.article img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.article h3 {
  padding: 10px 12px 0;
}

.article p {
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.readmore {
  display: block;
  padding: 10px 12px;
  color: var(--primary);
  font-weight: 600;
}

/* =========================
   FAQ
========================= */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.faq-card {
  border: 1px solid var(--border);
  padding: 15px 18px;
}

.faq-card summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--primary);
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card p {
  margin-top: 10px;
  color: #444;
}

/* =========================
   FOOTER
========================= */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 25px 20px;
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  color: var(--primary);
  margin: 0 8px;
}

/* =========================
   DASHBOARD
========================= */
.dashboard-page {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  background: var(--bg);
}

.sidebar {
  width: 240px;
  background: var(--primary);
  color: var(--white);
  padding: 20px;
}

.dashboard-main {
  flex: 1;
  padding: 30px;
  background: var(--white);
}

/* =========================
   FORMS
========================= */
input, select, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* =========================
   COMMUNITY PAGE FIX
========================= */
.community-page {
  padding-top: var(--header-height);
}

.community-page .container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
}

/* FIX CLS (IMPORTANT) */
#feed {
  display: grid;
  gap: 20px;
  min-height: 400px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  body {
    padding-top: 110px;
  }

  .blue-header .container {
    flex-direction: column;
    gap: 10px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .dashboard-page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}   
/* =========================
   SECTION HEADINGS (CENTER FIX)
========================= */
.section-title,
.about-home h2,
.topics-section h2,
.articles-section h2,
.faq-section h2,
.join h2 {
  text-align: center;
  margin: 0 auto 20px auto;
}

/* optional: center sub text too */
.section-title p,
.topics-section p,
.articles-section p,
.faq-section p {
  text-align: center;
  color: var(--muted);
  max-width: 700px;
  margin: 10px auto 30px auto;
}
section {
  text-align: center;
}.topic-card,
.article,
.faq-card {
  text-align: left;
}

/* FAQ GRID CARDS LAYOUT */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* EACH CARD */
.faq-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* DETAILS STYLE */
.faq-card summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--primary);
}

.faq-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
} 
/* =========================
   CONTACT PAGE - PROFESSIONAL UPGRADE
========================= */
.contact-page {
  padding: 110px 20px 60px;
  max-width: 1100px;
  margin: auto;
}
.contact-hero {
  text-align: center;
  margin-bottom: 48px;
}
.contact-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 12px;
  font-weight: 700;
}
.contact-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 16px;
}
.contact-badge {
  display: inline-block;
  background: #e6f3ff;
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0,120,212,0.15);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.contact-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6f3ff, #f0f7ff);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.contact-card h2 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.contact-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.contact-card a:hover { text-decoration: underline; }
.contact-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  background: #f9fafb;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}
/* =========================
   PRIVACY POLICY PAGE
========================= */

.policy-page {
  padding: 100px 20px 50px;
  max-width: 900px;
  margin: auto;
}

.policy-hero {
  text-align: center;
  margin-bottom: 40px;
}

.policy-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.policy-hero p {
  color: var(--muted);
}

/* CONTENT */
.policy-content h2 {
  margin-top: 25px;
  color: var(--primary);
  font-size: 1.2rem;
}

.policy-content p {
  margin-top: 8px;
  line-height: 1.7;
  color: var(--text);
}
/* =========================
   TERMS & CONDITIONS PAGE
========================= */

.terms-page {
  padding: 100px 20px 50px;
  max-width: 900px;
  margin: auto;
}

.terms-hero {
  text-align: center;
  margin-bottom: 40px;
}

.terms-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.terms-hero p {
  color: var(--muted);
}

/* CONTENT */
.terms-content h2 {
  margin-top: 25px;
  color: var(--primary);
  font-size: 1.2rem;
}

.terms-content p {
  margin-top: 8px;
  line-height: 1.7;
  color: var(--text);
}
/* ZabitechCommunity Light Skeleton */
.skeleton-card {
  background: #54c2e4;
  border: 1px solid #4481fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, #1b8ae6 25%, #2870ff 50%, #0f63ff 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}

.skeleton-title { height: 22px; width: 75%; margin-bottom: 14px; }
.skeleton-meta { height: 14px; width: 35%; margin-bottom: 18px; }
.skeleton-line { height: 12px; width: 100%; margin-bottom: 8px; }
.skeleton-line.short { width: 80%; }
.skeleton-btn { height: 28px; width: 110px; margin-top: 14px; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
} 
/* --- FIX FOOTER JUMP --- */
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* your main content wrapper - change #main if yours is different */
main, .container, #app {
  flex: 1 0 auto;
}

#feed {
  min-height: 65vh; /* reserves space so footer doesn't jump */
  transition: opacity .2s ease;
}

/* make skeleton same height as real card */
.card, .skeleton-card {
  min-height: 190px;
  background: #4f7fee;
  border: 1px solid #3b84f8;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* --- FOOTER STYLING - zabitechcommunity --- */
footer {
  background: #ffffff !important;
  color: #334155 !important;
  border-top: 1px solid #e2e8f0;
  padding: 30px 20px;
  margin-top: auto; /* sticks to bottom */
  text-align: center;
}

footer a {
  color: #0ea5e9 !important; /* your site blue */
  text-decoration: none;
  font-weight: 500;
  margin: 0 10px;
}

footer a:hover {
  color: #0284c7 !important;
  text-decoration: underline;
}

footer p, footer span {
  color: #64748b !important;
}
.skeleton-card {
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.skeleton-card .line {
  height: 14px;
  border-radius: 6px;
  margin: 12px 0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-card .line.title {
  width: 65%;
  height: 20px;
  background: linear-gradient(90deg, #74b0ff 25%, #92c3ff 50%, #97c4ff 75%); /* very light ZabiTech blue */
}

.skeleton-card .line.meta { width: 35%; height: 12px; }
.skeleton-card .line.short { width: 85%; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
