/* BibleProject-Inspired Design for Bible Study Website */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700;800&family=Inter:wght@300;400;500;600&family=Cormorant+Garamond:wght@400;500;600&display=swap');

/* CSS Custom Properties - BibleProject Color Palette */
:root {
  /* Background Colors */
  --bg-cream: #faf6ef;
  --bg-sage: #e8ede5;
  --bg-peach: #f0ddd0;
  --bg-tan: #f2e8d8;
  --bg-soft-blue: #e5edf5;
  --bg-scripture: #f5efe3;
  
  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  
  /* Accent Colors */
  --accent-green: #2d5f3f;
  --accent-terracotta: #c4623a;
  --accent-gold: #b8860b;
  
  /* Button Colors */
  --button-dark: #1a1a1a;
  --button-light: #faf6ef;
  
  /* Typography */
  --font-serif: 'Source Serif 4', 'Times New Roman', serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-scripture: 'Cormorant Garamond', 'Times New Roman', serif;
  
  /* Spacing */
  --section-padding: 100px 0;
  --container-max-width: 1200px;
  --content-max-width: 800px;
  
  /* Shadows */
  --card-shadow: 0 4px 24px rgba(26, 26, 26, 0.08);
  --card-hover-shadow: 0 8px 40px rgba(26, 26, 26, 0.12);
  
  /* Border Radius */
  --border-radius-small: 8px;
  --border-radius-medium: 16px;
  --border-radius-large: 24px;
  --border-radius-pill: 50px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-cream: #1a1a1a;
  --bg-sage: #2a2a2a;
  --bg-peach: #2a252a;
  --bg-tan: #252a2a;
  --bg-soft-blue: #1a252a;
  --bg-scripture: #242118;
  
  --text-primary: #e8e8e8;
  --text-secondary: #c4c4c4;
  --text-muted: #9a9a9a;
  
  --button-dark: #e8e8e8;
  --button-light: #2a2a2a;
  
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
  min-height: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-terracotta);
}

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

.content-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  background-color: var(--bg-cream);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  z-index: 100;
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-small);
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: rgba(26, 26, 26, 0.05);
}

/* Hero Section */
.hero {
  padding: var(--section-padding);
  background-color: var(--bg-cream);
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero .subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--button-dark);
  color: var(--button-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-green);
  border: 2px solid var(--accent-green);
}

.btn-secondary:hover {
  background-color: var(--accent-green);
  color: var(--button-light);
}

/* Decorative Divider */
.decorative-divider {
  text-align: center;
  margin: 3rem 0;
  font-size: 2rem;
  color: var(--accent-terracotta);
  opacity: 0.7;
}

/* Sections */
.section {
  padding: var(--section-padding);
}

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

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

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

.section-soft-blue {
  background-color: var(--bg-soft-blue);
}

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

/* Cards */
.card {
  background-color: var(--button-light);
  border-radius: var(--border-radius-medium);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

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

.card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

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

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

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

/* Today's Study Feature */
.todays-study {
  text-align: center;
}

.feature-card {
  background-color: var(--button-light);
  border-radius: var(--border-radius-large);
  padding: 3rem;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--card-shadow);
}

.feature-card .study-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feature-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card .passage {
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Study Grid */
.study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.study-card {
  background-color: var(--button-light);
  border-radius: var(--border-radius-medium);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.study-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  text-decoration: none;
  color: inherit;
}

.study-card .study-reference {
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.study-card h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.study-card .study-info {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Email Subscription */
.subscription-form {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.email-input-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.email-input {
  flex: 1;
  padding: 1rem;
  border: 2px solid rgba(26, 26, 26, 0.1);
  border-radius: var(--border-radius-small);
  font-size: 1rem;
  background-color: var(--button-light);
  color: var(--text-primary);
}

.email-input:focus {
  outline: none;
  border-color: var(--accent-green);
}

/* Footer */
footer {
  background-color: var(--text-primary);
  color: var(--button-light);
  padding: 3rem 0 2rem;
  text-align: center;
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.social-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

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

/* Study Page Specific Styles */
.study-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.study-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 0;
}

.study-reference {
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.study-theme {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.study-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.study-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.share-btn {
  font-size: 1.2rem;
  padding: 0.8rem;
  border-radius: var(--border-radius-small);
  background-color: rgba(26, 26, 26, 0.05);
  transition: all 0.3s ease;
}

.share-btn:hover {
  background-color: var(--accent-green);
  color: white;
}

/* Opening Thought */
.opening-thought {
  border-left: 4px solid var(--accent-terracotta);
  background-color: var(--bg-tan);
  padding: 2rem;
  border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0;
  margin: 3rem 0;
  font-style: italic;
}

.opening-thought p {
  margin-bottom: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

/* Content Sections */
.content-section {
  margin: 4rem 0;
}

.section-header {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-terracotta);
  border-radius: 2px;
}

/* Scripture Text */
.scripture-text {
  background-color: var(--bg-scripture);
  padding: 3rem;
  border-radius: var(--border-radius-large);
  font-family: var(--font-scripture);
  font-size: 1.1rem;
  line-height: 1.9;
  margin: 2rem 0;
}

.scripture-text h3 {
  font-family: var(--font-sans);
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.scripture-text p {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.verse-number {
  font-weight: 600;
  color: var(--accent-green);
  font-size: 0.9em;
  vertical-align: super;
  margin-right: 0.3rem;
}

/* Cross References */
.cross-reference {
  background-color: var(--bg-sage);
  border-left: 4px solid var(--accent-green);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0;
}

.cross-reference strong {
  color: var(--accent-green);
}

/* Application Section */
.application-section {
  background-color: var(--bg-peach);
  padding: 3rem;
  border-radius: var(--border-radius-large);
  margin: 3rem 0;
}

.application-section h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* Prayer Section */
.prayer-section {
  background: linear-gradient(135deg, var(--bg-tan), var(--bg-peach));
  padding: 3rem;
  border-radius: var(--border-radius-large);
  margin: 3rem 0;
  text-align: center;
  position: relative;
}

.prayer-section::before {
  content: "🙏";
  font-size: 3rem;
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--button-light);
  padding: 1rem;
  border-radius: 50%;
  box-shadow: var(--card-shadow);
}

.prayer-section h3 {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* Study Navigation */
.study-navigation {
  display: flex;
  justify-content: space-between;
  margin: 4rem 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  color: var(--accent-terracotta);
  transform: translateX(-4px);
}

.nav-btn.next:hover {
  transform: translateX(4px);
}

/* Table of Contents (Desktop) */
.toc-sidebar {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  background-color: var(--button-light);
  padding: 2rem;
  border-radius: var(--border-radius-medium);
  box-shadow: var(--card-shadow);
  max-width: 200px;
  z-index: 50;
}

.toc-sidebar h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

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

.toc-sidebar li {
  margin-bottom: 0.8rem;
}

.toc-sidebar a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
}

.toc-sidebar a:hover,
.toc-sidebar a.active {
  color: var(--accent-green);
  border-left-color: var(--accent-green);
}

/* Reading Progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-green);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  transition: transform 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    font-size: 0.9rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .hero .subtitle {
    font-size: 1.1rem;
  }
  
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .feature-card .study-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .email-input-group {
    flex-direction: column;
  }
  
  .study-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .share-buttons {
    gap: 2rem;
  }
  
  .scripture-text {
    padding: 2rem;
  }
  
  .toc-sidebar {
    display: none;
  }
  
  .study-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .opening-thought {
    margin: 2rem 0;
    padding: 1.5rem;
  }
  
  .application-section,
  .prayer-section {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.8rem;
  }
  
  nav {
    padding: 1rem 0.8rem;
  }
  
  .nav-links {
    gap: 0.5rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .scripture-text {
    font-size: 1rem;
    padding: 1.5rem;
  }
  
  .study-card,
  .card {
    padding: 1.5rem;
  }
}

/* Animation for fade-in elements */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .toc-sidebar,
  .study-navigation,
  .share-buttons,
  header,
  footer {
    display: none;
  }
  
  .study-content {
    max-width: none;
  }
}