/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --primary: #115e59;      /* Deep Navy */
  --secondary: #334155;    /* Slate Blue */
  --accent: #c6a87c;       /* Muted Gold */
  --bg-body: #f8fafc;      /* Light Grey */
  --bg-card: #ffffff;      /* White */
  --text-main: #1e293b;    
  --text-light: #64748b;   
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
button { font-family: inherit; }

/* =========================================
   2. HEADER & NAVIGATION (Universal)
   ========================================= */
.topbar {
  background: #fff;
  color: var(--primary);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.topbar .logo {
  height: 50px; width: 50px;
  border-radius: 50%; object-fit: cover;
  display: block; border: 2px solid var(--accent);
}

.topbar nav { display: flex; gap: 20px; }
.topbar nav a { 
    color: var(--text-main); 
    font-weight: 500; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.topbar nav a:hover { color: var(--accent); }

/* =========================================
   3. HOME PAGE SPECIFIC STYLES
   ========================================= */
.hero-landing {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 5rem 2rem;
  background-image: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9));
}
.hero-landing h2 { color: var(--accent); font-size: 3rem; margin-bottom: 1rem; }
.hero-landing p { font-size: 1.2rem; color: #cbd5e1; max-width: 600px; margin: 0 auto 2rem auto; }

.container { max-width: 1000px; margin: 0 auto; padding: 3rem 2rem; }
.section-title { text-align: center; margin-bottom: 3rem; }

/* 2x2 Grid for Courses */
.grid-balanced {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .grid-balanced { grid-template-columns: 1fr 1fr !important; }
}

/* Home/Shop Card Style */
.card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent);
  border: 1px solid #f1f5f9;
}
/* Ensure cards in grid fit */
.grid-balanced .card { width: 100% !important; margin: 0 !important; max-width: none !important; }

/* =========================================
   4. BLOG MAGAZINE LAYOUT
   ========================================= */
.hero-compact {
  text-align: center; padding: 3rem 2rem;
  background: #fff; border-bottom: 1px solid #eee;
}
.hero-compact h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.tagline { color: var(--text-light); font-style: italic; }

/* Filter Bar */
.category-bar {
  display: flex; justify-content: center; gap: 10px;
  padding: 1.5rem; flex-wrap: wrap; background: #fff; border-bottom: 1px solid #eee;
}
.cat-btn {
  background: transparent; border: 1px solid #ddd;
  padding: 6px 14px; border-radius: 20px; font-size: 0.85rem;
  cursor: pointer; color: var(--text-light);
}
.cat-btn:hover, .cat-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* Magazine 3-Column Grid */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

/* Blog Post Card (Vertical) */
.post-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s; border: 1px solid #eee;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.post-image { width: 100%; height: 200px; object-fit: cover; }
.post-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }

.post-meta {
  font-size: 0.75rem; color: var(--accent); text-transform: uppercase;
  letter-spacing: 1px; font-weight: 700; margin-bottom: 0.5rem;
}
.post-title { font-size: 1.3rem; line-height: 1.3; margin-bottom: 0.8rem; }
.post-excerpt { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; flex: 1; }

/* Buttons */
.btn {
  display: inline-block; background: var(--primary); color: white;
  padding: 0.6rem 1.2rem; border-radius: 6px; font-weight: 600; cursor: pointer; border: none;
}
.read-more-btn {
  background: transparent; color: var(--primary); border: 2px solid var(--primary);
  padding: 6px 12px; border-radius: 4px; font-weight: 700; cursor: pointer;
  align-self: flex-start; /* Aligns left */
  margin-top: auto;
}
.read-more-btn:hover { background: var(--primary); color: white; }

/* Full Content Area (Hidden by default) */
.full-content { display: none; padding-top: 1rem; border-top: 1px solid #eee; margin-top: 1rem; }

/* =========================================
   5. FOOTER & EXTRAS
   ========================================= */
.footer { background: #0b1120; color: white; padding: 4rem 2rem 2rem; margin-top: auto; }
.footer-wrapper { max-width: 1100px; margin: auto; display: flex; flex-wrap: wrap; gap: 2rem; }
.footer-section { flex: 1 1 250px; }
.footer-section h3 { font-size: 1.2rem; color: var(--accent); margin-bottom: 1rem; }
.footer-section p { margin-bottom: 0.5rem; color: #cbd5e1; }
.footer-section a { display: block; margin: 0.4rem 0; color: #cbd5e1; }
.footer-section a:hover { color: var(--accent); }

.footer-bottom { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #64748b; }
.admin-link { color: #334155; opacity: 0.5; margin-left: 10px; font-size: 0.8rem; }

.whatsapp-float { position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; z-index: 2000; }
.whatsapp-float img { width: 100%; height: 100%; }

/* Mobile */
.mobile-menu-trigger { display: none; }
@media (max-width: 768px) {
  .mobile-menu-trigger { display: block; position: fixed; top: 15px; left: 15px; z-index: 2000; background: var(--primary); color: white; border: none; padding: 10px; border-radius: 5px; }
  .topbar { flex-direction: column; gap: 10px; }
  .magazine-grid { grid-template-columns: 1fr; } 
  .footer-wrapper { flex-direction: column; }
}

/* --- EXPANSION LOGIC --- */
/* When a post is open, span the whole grid width */
.post-card.is-expanded {
    grid-column: 1 / -1; /* This forces it to take up all columns */
    width: 100%;
    max-width: 1000px; /* Keeps lines easy to read */
    margin: 0 auto;    /* Centers it */
    z-index: 50;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); /* Pop out effect */
}

/* Make the text bigger when reading full mode */
.post-card.is-expanded .post-body {
    padding: 3rem; /* More breathing room */
}

/* --- COMMENT & REACTION STYLES --- */
.comment-block {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

/* The Emoji Bar */
.reaction-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.react-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}
.react-btn:hover { background: #e2c08d; color:white; border-color:#e2c08d; }

.reply-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}
.reply-btn:hover { text-decoration: underline; }

/* Indented Replies */
.reply-item {
    margin-left: 40px; /* Indent */
    margin-top: 10px;
    padding-left: 10px;
    border-left: 3px solid #eee;
    font-size: 0.95rem;
    color: #555;
    background: #fafafa;
    padding: 8px;
    border-radius: 0 8px 8px 0;
}

.reply-form {
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    margin-left: 20px;
    margin-top: 10px;
}

.react-btn.big {
    padding: 8px 16px;
    font-size: 1rem;
    background: white;
    border: 1px solid var(--accent);
}
.react-btn.big:hover {
    background: var(--accent);
    color: white;
}

/* --- RICH TEXT CONTENT STYLES --- */
.rich-text-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.rich-text-content h2, 
.rich-text-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.rich-text-content ul, 
.rich-text-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.rich-text-content li {
    margin-bottom: 0.5rem;
}

.rich-text-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    font-style: italic;
    color: #555;
    margin: 1.5rem 0;
}