/* ============================================================
   Everyday Guide — Global Styles
   Google Material Design inspired, clean white aesthetic
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1a73ed;
  --blue-dark: #1557b0;
  --blue-light: #e8f0fe;
  --dark: #202124;
  --gray: #5f6368;
  --gray-light: #9aa0a6;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --border: #e8eaed;
  --red: #ea4335;
  --green: #34a853;
  --yellow: #fbbc04;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --max-width: 1200px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--blue-dark); }

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

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo:hover { text-decoration: none; color: var(--blue); }

.site-logo .logo-icon {
  font-size: 1.5rem;
}

.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.header-nav a {
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--blue); text-decoration: none; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-info { color: var(--gray); font-size: 0.85rem; }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--gray);
  font-size: 0.85rem;
}

.footer-links a:hover { color: var(--blue); }

/* --- Hero / Home --- */
.hero {
  padding: 48px 20px 36px;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 10px;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--gray);
  margin-bottom: 28px;
}

/* Search Box */
.search-box {
  max-width: 520px;
  margin: 0 auto 40px;
}

.search-box input {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 40px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26,115,237,0.12);
}

/* --- Category Cards --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding-bottom: 48px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.25s, transform 0.2s;
}

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

.category-card .cat-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.category-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.category-card .cat-desc {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.article-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-list li a {
  display: block;
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
}

.article-list li a:hover {
  background: var(--blue-light);
  color: var(--blue);
  text-decoration: none;
}

.article-list li a small {
  display: block;
  font-weight: 400;
  color: var(--gray-light);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* --- Detail Page Layout --- */
.detail-layout {
  display: flex;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.article-main {
  flex: 0 0 70%;
  min-width: 0;
}

.article-sidebar {
  flex: 0 0 30%;
  min-width: 0;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--gray-light); margin: 0 4px; }

/* --- Article Content --- */
.article-content h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--dark);
}

.article-meta {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.article-meta .meta-sep {
  color: var(--border);
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blue-light);
}

.article-content p {
  margin-bottom: 16px;
  font-size: 1.02rem;
  color: #333;
}

.article-content ul, .article-content ol {
  margin: 8px 0 16px 24px;
}

.article-content li {
  margin-bottom: 8px;
  font-size: 1rem;
}

.article-content strong {
  color: var(--dark);
}

/* --- Hero Image Placeholder --- */
.hero-img {
  width: 100%;
  height: 260px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.hero-img .img-emoji {
  font-size: 5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.hero-img .img-label {
  position: absolute;
  bottom: 16px;
  left: 20px;
  color: #fff;
  font-size: 0.8rem;
  background: rgba(0,0,0,0.45);
  padding: 4px 12px;
  border-radius: 20px;
}

/* --- FAQ Section --- */
.faq-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.faq-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item {
  margin-bottom: 18px;
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item h3::before {
  content: 'Q:';
  color: var(--blue);
  font-weight: 800;
  font-size: 1rem;
}

.faq-item p {
  color: #444;
  margin-left: 24px;
  font-size: 0.95rem;
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: none;
  padding-bottom: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.related-grid a {
  display: block;
  padding: 14px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.related-grid a:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  text-decoration: none;
}

/* --- Sidebar Widgets --- */
.sidebar-widget {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget ul li {
  margin-bottom: 8px;
}

.sidebar-widget ul li a {
  font-size: 0.9rem;
  color: var(--gray);
}

.sidebar-widget ul li a:hover { color: var(--blue); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.7rem; }
  .hero .subtitle { font-size: 1rem; }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    flex-direction: column;
  }

  .article-main,
  .article-sidebar {
    flex: 0 0 100%;
  }

  .article-content h1 { font-size: 1.55rem; }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-img { height: 180px; }
  .hero-img .img-emoji { font-size: 3.5rem; }

  .header-nav { gap: 12px; }
  .header-nav a { font-size: 0.8rem; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Placeholder Pages --- */
.placeholder-page {
  max-width: 700px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

.placeholder-page h1 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.placeholder-page p {
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 12px;
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .article-sidebar,
  .ad-slot, .related-articles, .search-box {
    display: none;
  }
  .article-main { flex: 1 1 100%; }
}
