/*
Theme Name: StudyGujarat
Theme URI: https://studygujarat.lovable.app/
Author: StudyGujarat
Author URI: https://studygujarat.lovable.app/
Description: Educational theme for Gujarat board students providing study materials, notes, and past papers.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studygujarat
Tags: education, responsive-layout, custom-menu, featured-images
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f7fa;
  --fg: #1e2a3a;
  --card: #ffffff;
  --primary: #1d6fe5;
  --primary-fg: #ffffff;
  --secondary: #e8edf4;
  --secondary-fg: #1e2a3a;
  --muted: #6b7c93;
  --accent: #f59e0b;
  --accent-fg: #ffffff;
  --border: #dce3ed;
  --radius: 0.75rem;
  --shadow: 0 4px 24px -4px rgba(29,111,229,0.08);
  --shadow-hover: 0 8px 32px -4px rgba(29,111,229,0.15);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}
.site-logo svg { width: 24px; height: 24px; }

/* Desktop nav */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}
.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(30,42,58,0.7);
  transition: all 0.2s;
}
.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--primary);
  background: var(--secondary);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--fg); }

@media (max-width: 1023px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding-bottom: 1rem;
  }
  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 0.75rem 1.5rem; border-radius: 0; }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, #1558b8 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
}
.hero .container {
  position: relative;
  padding: 5rem 1rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary-fg);
  margin-bottom: 1rem;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: #1558b8; }
.btn-secondary { background: var(--secondary); color: var(--secondary-fg); }
.btn-secondary:hover { background: #d6deeb; }
.btn-outline {
  background: transparent;
  color: var(--primary-fg);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ===== SECTIONS ===== */
.section { padding: 4rem 0; }
.section-alt { background: rgba(232,237,244,0.5); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  gap: 1.5rem;
}
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(29,111,229,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.card h3 { font-weight: 600; font-size: 1.125rem; margin-bottom: 0.25rem; }
.card p { color: var(--muted); font-size: 0.875rem; }

/* Class cards */
.class-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.class-card .card-icon { margin-bottom: 0; }
.class-card span { font-weight: 600; }

/* ===== EARN SECTION ===== */
.earn-section { text-align: center; }
.earn-icon { color: var(--accent); margin: 0 auto 1rem; }
.earn-section p { color: var(--muted); max-width: 560px; margin: 0 auto 1.5rem; }

/* ===== WHY SECTION ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.why-item { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.why-item .card-icon { margin-bottom: 0; }
.why-item span { font-weight: 500; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}
.form-control {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--card);
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,111,229,0.1); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 639px) { .form-row { grid-template-columns: 1fr; } }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--fg);
  color: var(--primary-fg);
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}
.footer-col h3 { font-weight: 600; margin-bottom: 0.75rem; }
.footer-col p,
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

/* ===== SIDEBAR / WIDGETS ===== */
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}
.sidebar .widget ul { list-style: none; }
.sidebar .widget li { padding: 0.375rem 0; border-bottom: 1px solid var(--border); }
.sidebar .widget a { color: var(--muted); font-size: 0.875rem; }
.sidebar .widget a:hover { color: var(--primary); }

/* Content layout with sidebar */
.content-area { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
@media (max-width: 767px) { .content-area { grid-template-columns: 1fr; } }

/* ===== POST / PAGE CONTENT ===== */
.entry-title { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.entry-meta { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.entry-content { line-height: 1.8; }
.entry-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; }
.entry-content h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
.entry-content p { margin-bottom: 1rem; }
.entry-content ul, .entry-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content img { border-radius: var(--radius); margin: 1.5rem 0; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: 1px solid var(--border);
}
.pagination .current { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--secondary);
  color: var(--secondary-fg);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 672px; }
