/* 
 * Clipboards and Books Theme
 * A minimalist, approachable theme for a membership content platform.
 * 
 * Inspired by modern fintech design: clean, spacious, professional but casual.
 */

:root {
  /* =========================================
     Color Palette
     ========================================= */

  /* Primary Brand Colors */
  --primary-blue: #2563eb;
  /* Softer than corporate blue */
  --primary-hover: #1d4ed8;

  /* Text Colors */
  --text-dark: #1f2937;
  /* Almost black, softer for headings */
  --text-body: #4b5563;
  /* Dark gray for reading */
  --text-light: #6b7280;
  /* Meta text */
  --text-inverse: #ffffff;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  /* Very light gray for sections */
  --bg-footer: #1f2937;

  /* Borders & Shadows */
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* =========================================
     Typography
     ========================================= */

  /* Serif for editorial headings (Georgia fallback) */
  --font-heading: 'Shadows Into Light', cursive;

  /* System stack for performant, native-feeling body text */
  --font-body: 'Comic Relief', cursive, sans-serif;

  --leading-body: 1.6;
  --leading-heading: 1.2;
}

/* =========================================
   Reset & Base Styles
   ========================================= */

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

body {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: var(--leading-body);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: var(--leading-heading);
  margin-bottom: 0.35rem;
  /* Increased from 0.25rem (+~25%+) */
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 0.35rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.35rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

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

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

ul,
ol {
  font-family: var(--font-body);
  line-height: 1.4;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.25rem;
}

p {
  font-family: var(--font-body);
  line-height: 1.4;
  /* Increased from 1.3 */
  margin-bottom: 1.05rem;
  /* Reduced by 25% from 1.4rem */
}

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

/* =========================================
   Layout Containers
   ========================================= */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
  background-color: var(--bg-white);
}

.section-alt {
  background-color: var(--bg-light);
}

/* =========================================
   Navigation Header
   ========================================= */

.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.nav-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 8rem;
  padding: 1rem 0;
}

.brand {
  font-family: 'Shadows Into Light', cursive;
  font-weight: bold;
  font-size: 2.5rem;
  color: var(--text-dark);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-body);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.btn-nav {
  background-color: var(--primary-blue);
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.btn-nav:hover {
  background-color: var(--primary-hover);
  text-decoration: none !important;
}

/* Secondary Navigation (Categories) */
.nav-secondary {
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.75rem 0;
  background: #fff;
}

.cat-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.9rem;
}

.cat-links a {
  color: var(--text-light);
}

.cat-links a:hover {
  color: var(--text-dark);
}

/* =========================================
   Hero Section
   ========================================= */

.hero {
  /* Image background with overlay - Reduced opacity for brighter image (0.3/0.4 instead of 0.7/0.8) */
  background: linear-gradient(rgba(30, 41, 59, 0.3), rgba(30, 41, 59, 0.4)), url('../images/hero_new.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

/* Semi-transparent overlay pattern support */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  text-align: center;
  max-width: 800px;
}

.hero-title {
  font-size: 1.5rem;
  /* Reduced from 2.5rem */
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  /* Added shadow for readability on brighter bg */
}

.hero-lead {
  font-size: 0.75rem;
  /* Reduced from 1.25rem */
  opacity: 1;
  /* Increased opacity since text is smaller */
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (min-width: 900px) {
  .hero-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .hero-text {
    flex: 1;
    text-align: left;
    max-width: 600px;
    padding-right: 2rem;
  }

  .hero-title {
    font-size: 1.75rem;
    /* Reduced from 3.5rem */
  }

  .hero-card {
    flex: 0 0 400px;
    /* Fixed width for card */
  }
}

/* =========================================
   Components: Cards
   ========================================= */

/* Login/Action Card (sits in Hero) */
.card-action {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  color: var(--text-dark);
}

.card-action h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Content Card Grid */
.grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.post-img {
  height: 200px;
  background-color: #e5e7eb;
  object-fit: cover;
  width: 100%;
}

.post-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.post-title a {
  color: var(--text-dark);
  text-decoration: none;
}

.post-excerpt {
  font-size: 1rem;
  color: var(--text-body);
  margin-bottom: 1.5rem;
  flex: 1;
  /* Pushes footer down */
}

/* =========================================
   Components: Badges & Buttons
   ========================================= */

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-member {
  background-color: #1f2937;
  color: white;
}

.badge-public {
  background-color: #d1fae5;
  color: #065f46;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: white;
  text-decoration: none;
}

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

.btn-secondary:hover {
  background-color: var(--bg-light);
  border-color: #d1d5db;
  text-decoration: none;
}

.btn-full {
  width: 100%;
}

.text-link {
  color: var(--primary-blue);
  font-weight: 500;
  cursor: pointer;
}

/* =========================================
   Components: Forms
   ========================================= */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-body);
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
}

/* =========================================
   Footer
   ========================================= */

.site-footer {
  background-color: var(--bg-footer);
  color: #d1d5db;
  padding: 4rem 0 2rem;
  margin-top: auto;
  /* Push to bottom if sparse content */
}

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

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

/* =========================================
   Utilities
   ========================================= */

.mt-md {
  margin-top: 1.5rem;
}

.mt-lg {
  margin-top: 3rem;
}

.mb-sm {
  margin-bottom: 1rem;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}

.hidden-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: block;
  }
}