/* style.css - V2 World-Class Psychology Website Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Soft Light Theme Variables */
  --bg-color: #fafafa;
  --bg-secondary: #f4ece6;
  --text-primary: #2c3e50;
  --text-secondary: #5a6c7d;
  --primary-accent: #6a8d92; /* Soft Teal */
  --primary-accent-hover: #54767a;
  --secondary-accent: #d4a373; /* Warm Sand */
  --card-bg: #ffffff;
  --border-color: rgba(0,0,0,0.05);
  
  /* Glass and UI elements */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --box-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
  
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --border-radius: 16px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-color: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --primary-accent: #7faeb4; 
  --card-bg: #1a1a1a;
  --border-color: rgba(255,255,255,0.05);
  
  --glass-bg: rgba(18, 18, 18, 0.85);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  --box-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--text-primary);
  transition: color 0.4s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Reading Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 2000;
}
.progress-bar {
  height: 100%;
  background: var(--secondary-accent);
  width: 0%;
  transition: width 0.1s;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-accent);
  letter-spacing: 0.5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav-links li a {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-accent);
  transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: var(--transition);
}
.theme-toggle:hover {
  transform: scale(1.1);
  color: var(--primary-accent);
}

.burger {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 5px;
  transition: all 0.3s ease;
}

/* Scroll Reveal Animation Classes */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.show {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }

/* AdSense Containers (Invisible until AdSense populates) */
.ad-container {
  width: 100%;
  display: block;
  margin: 2rem 0;
  position: relative;
}
.ad-container::before {
  content: '';
  display: none;
}
.ad-leaderboard {
  max-width: 728px;
  height: 90px;
  margin: 3rem auto;
}
.ad-sidebar {
  width: 100%;
  height: 250px;
  margin: 1rem auto;
}

/* Hero Section */
.hero {
  position: relative;
  height: 90vh;
  margin-top: 70px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
}

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%; /* Extra height for parallax */
  object-fit: cover;
  z-index: 1;
  opacity: 0.7;
  transform: translateY(0);
  transition: transform 0.1s linear;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 4rem;
  border-radius: 24px;
  max-width: 700px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.btn-primary {
  background: var(--primary-accent);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 40px;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(106, 141, 146, 0.4);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--primary-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(106, 141, 146, 0.6);
}

/* Mood Widget Styles */
.mood-widget {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--box-shadow);
  margin: 4rem auto;
  max-width: 800px;
}

.mood-widget h2 {
  margin-bottom: 1rem;
}
.mood-widget p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.mood-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.mood-btn {
  background: var(--bg-secondary);
  border: 2px solid transparent;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  font-weight: 500;
}

.mood-btn:hover {
  border-color: var(--primary-accent);
  transform: translateY(-2px);
}

.mood-result {
  font-size: 1.25rem;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  color: var(--primary-accent);
  min-height: 3em;
  transition: opacity 0.3s;
}

/* Articles Section */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-accent);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

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

.card-img {
  height: 220px;
  background-color: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: var(--card-bg); /* ensure it covers scaled img */
  position: relative;
  z-index: 2;
}

.card-category {
  font-size: 0.85rem;
  color: var(--secondary-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: block;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.card-link {
  color: var(--primary-accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.card-link:hover {
  gap: 0.8rem;
}

/* Newsletter Section */
.newsletter-section {
  background: var(--primary-accent);
  color: #fff;
  padding: 6rem 2rem;
  text-align: center;
  border-radius: var(--border-radius);
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  z-index: 1;
}

.newsletter-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-content h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.newsletter-content p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
}

.newsletter-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.newsletter-btn {
  background: var(--text-primary);
  color: var(--bg-color);
  border: none;
  padding: 0 2rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-btn:hover {
  background: var(--secondary-accent);
  color: #fff;
}

/* Article Template Styles */
.article-header {
  padding: 10rem 0 4rem;
  background: var(--bg-secondary);
  text-align: center;
}

.article-meta {
  color: var(--text-secondary);
  margin-top: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}
.article-meta img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.article-layout {
  display: flex;
  gap: 4rem;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.article-body {
  flex: 7;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  margin: 3rem 0 1.5rem;
  font-size: 2rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body img {
  width: 100%;
  border-radius: var(--border-radius);
  margin: 2rem 0;
}

.article-body blockquote {
  border-left: 4px solid var(--secondary-accent);
  padding: 1.5rem 2rem;
  background: var(--bg-secondary);
  font-style: italic;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 2rem 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.article-sidebar {
  flex: 3;
}

.sticky-sidebar {
  position: sticky;
  top: 100px;
}

/* Author Box */
.author-box {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-top: 4rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.author-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.author-info h4 {
  margin-bottom: 0.5rem;
}
.author-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Secondary Pages Wrapper */
.page-header {
  background: var(--bg-secondary);
  padding: 10rem 0 5rem;
  text-align: center;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-top: -4rem;
  position: relative;
  z-index: 10;
  border: 1px solid var(--border-color);
}

.content-wrapper h2 {
  margin: 2.5rem 0 1.2rem;
}

.content-wrapper p, .content-wrapper ul {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.content-wrapper ul {
  padding-left: 2rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(106, 141, 146, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background-color: var(--text-primary);
  color: var(--bg-color);
  padding: 5rem 0 2rem;
  margin-top: 6rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 3rem;
  margin-bottom: 2rem;
}

.footer-col h3 {
  color: var(--bg-color);
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: var(--text-secondary);
  max-width: 300px;
}
[data-theme="dark"] .footer-col p {
  color: #adb5bd;
}

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

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

.footer-links a {
  color: var(--text-secondary);
}
[data-theme="dark"] .footer-links a {
  color: #adb5bd;
}

.footer-links a:hover {
  color: var(--secondary-accent);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
[data-theme="dark"] .footer-bottom {
  color: #adb5bd;
}

/* Responsive */
@media screen and (max-width: 900px) {
  .article-layout {
    flex-direction: column;
  }
}

@media screen and (max-width: 768px) {
  .nav-right {
    position: absolute;
    right: 0px;
    height: 100vh;
    top: 0;
    width: 280px;
    background-color: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  }

  .nav-links {
    flex-direction: column;
  }

  .nav-links li {
    opacity: 0;
  }

  .burger {
    display: block;
  }

  .nav-active {
    transform: translateX(0%);
  }
  
  .hero-content {
    padding: 2rem;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }

  .content-wrapper {
    padding: 2rem;
  }
}

.toggle .line1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
  opacity: 0;
}
.toggle .line3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow-hover);
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 90%;
  width: 800px;
  transition: opacity 0.4s ease;
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cookie-content a {
  color: var(--primary-accent);
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    bottom: 1rem;
  }
}
