/* ====== Global Vars ====== */
:root {
  --dark-blue: #0d1f35;
  --golden-brown: #c19357;
  --light-gray: #f8fafc;
  --subpage-bg: #c4cacf;
}

/* ===== Base ===== */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  color: #333;
  background-color: var(--subpage-bg);
}

/* App container for sticky footer */
#app { min-height: 100vh; display: flex; flex-direction: column; }
#main-content { flex: 1; display: flex; flex-direction: column; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* Utilities */
.text-center { text-align: center; }
.text-white { color: white; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.flex-col { flex-direction: column; }
.gap-12 { gap: 3rem; }
.grid { display: grid; }
.md\:grid-cols-2 { grid-template-columns: 1fr; }
.md\:grid-cols-3 { grid-template-columns: 1fr; }
.p-8 { padding: 2rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Header */
.header { background-color: var(--dark-blue); color: white; padding: 1rem; }
.header-nav { display: flex; justify-content: center; align-items: center; }
.nav-links button {
  color: white; background: none; border: none; cursor: pointer; font-weight: 500;
  padding: 0.5rem 1rem; transition: color 0.3s ease;
}
.nav-links button:hover { color: var(--golden-brown); }

/* Hero */
.hero {
  background-image: linear-gradient(rgba(13, 31, 53, 0.9), rgba(13, 31, 53, 0.9)), url('img/homepage_background.jpg');
  background-size: cover; background-position: center; color: white; padding: 5rem 2rem;
  display: flex; align-items: center; justify-content: center;
}
.hero h1 {
  font-size: 3rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.hero-logo-lg { max-width: 95%; height: auto; max-height: 45vh; margin-bottom: 1rem; filter: drop-shadow(0 0 5px white); }
.hero-subtitle, .hero-verse {
  font-size: 1.125rem; color: #cbd5e1; max-width: 48rem; margin: 0 auto 2rem; font-weight: 700;
}

/* Site Buttons */
.btn {
  font-weight: 700; padding: 0.75rem 2rem; border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  transition: all 0.3s ease; border: none; cursor: pointer;
}
.btn:hover { transform: scale(1.05); }
.btn-primary { background-color: var(--golden-brown); color: white; }
.btn-primary:hover { background-color: #a37a4a; }
.btn-secondary { background-color: var(--dark-blue); color: white; border-radius: 0.5rem; padding: 0.75rem 1.5rem; }
.btn-secondary:hover { background-color: #1a3754; }

/* About */
.about-section {
  background-image: linear-gradient(rgba(13, 31, 53, 0.7), rgba(13, 31, 53, 0.7)), url('img/intention.png');
  background-size: cover; background-position: center;
}
.about-section .container { padding-top: 5rem; padding-bottom: 5rem; }
.section-title { font-size: 2.25rem; font-weight: 700; text-align: center; color: var(--dark-blue); margin-bottom: 3rem; }
.about-section .section-title { color: white; }
.about-content { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .about-content { grid-template-columns: 1fr 1fr; } }
.about-text { color: white; line-height: 1.75; order: 2; }
@media (min-width: 768px) { .about-text { order: 1; } }
.about-text p { font-size: 1.125rem; margin-bottom: 1.5rem; }
.about-icon { display: flex; justify-content: center; order: 1; }
@media (min-width: 768px) { .about-icon { order: 2; } }
.about-icon img {
  max-width: 100%; height: auto; border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Community */
.community-section {
  background-image: linear-gradient(rgba(13, 31, 53, 0.7), rgba(13, 31, 53, 0.7)), url('img/community.png');
  background-size: cover; background-position: center; background-attachment: fixed;
  display: flex; flex-direction: column; flex: 1;
}
.community-section .container { padding-top: 5rem; padding-bottom: 5rem; }
.community-section .section-title { color: white; }
.pillars-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .pillars-grid { grid-template-columns: repeat(3, 1fr); } }
.pillar-card {
  background-color: rgba(255,255,255,0.9); padding: 2rem; border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.pillar-card:hover { transform: scale(1.05); }
.pillar-header { display: flex; align-items: center; justify-content: center; color: var(--golden-brown); margin-bottom: 1rem; }
.pillar-header h3 { font-size: 1.5rem; font-weight: 600; color: var(--dark-blue); margin: 0 0 0 1rem; }
.pillar-card p { color: #4a5568; text-align: center; }

/* Blog */
.blog-section {
  background-image: linear-gradient(rgba(13, 31, 53, 0.7), rgba(13, 31, 53, 0.7)), url('img/creategreat.png');
  background-size: cover; background-position: center; padding: 5rem 0; position: relative; overflow: hidden; flex: 1;
}
.blog-section .section-title { color: white; }
.blog-intro { font-size: 1.25rem; color: white; max-width: 600px; margin: 0 auto 3rem; text-align: center; }
.blog-carousel-container { position: relative; max-width: 1280px; margin: 0 auto; }
.blog-posts-carousel { display: flex; transition: transform 0.5s ease-in-out; gap: 2rem; padding: 0 2rem; }
.blog-post-card {
  background-color: white; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  overflow: hidden; transition: all 0.3s ease; cursor: pointer; width: 384px; flex-shrink: 0; flex-grow: 0;
}
@media (max-width: 768px) { .blog-post-card { width: 100%; } }
.blog-post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.blog-post-image { width: 200px; height: 200px; object-fit: cover; margin: 0 auto; display: block; border-radius: 0.75rem; }
.blog-post-content { padding: 1.5rem; }
.blog-post-content h3 { font-size: 1.25rem; font-weight: 600; color: var(--dark-blue); margin: 0 0 .5rem 0; }
.blog-post-content p { font-size: 0.875rem; color: #718096; margin-bottom: 1rem; }
.blog-post-date { font-size: 0.8rem; color: #9ca3af; text-align: center; }
.carousel-control {
  position: absolute; top: 50%; transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5); color: white; border: none; cursor: pointer; padding: 1rem; border-radius: 50%; z-index: 10; opacity: .8; transition: opacity .3s ease;
}
.carousel-control:hover { opacity: 1; }
.carousel-control.left { left: 10px; } .carousel-control.right { right: 10px; }

/* Full Blog Post */
.full-blog-post {
  background-image: linear-gradient(rgba(13, 31, 53, 0.7), rgba(13, 31, 53, 0.7)), url('img/creategreat.png');
  background-size: cover; background-position: center; background-attachment: fixed; padding: 5rem 0; flex: 1; display: flex; flex-direction: column;
}
.full-blog-post .post-card-wrapper {
  background-color: white; padding: 3rem 2rem; border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  margin: 0 auto; max-width: 900px;
}
.full-blog-post .post-header { text-align: center; margin-bottom: 2rem; }
.full-blog-post .post-title { font-size: 2.5rem; font-weight: 700; color: var(--dark-blue); }
.full-blog-post .post-meta { font-size: 1rem; color: #6b7280; margin-top: .5rem; }
.full-blog-post .post-image { width: 100%; max-height: 450px; object-fit: cover; border-radius: .75rem; margin-bottom: 2rem; }
.full-blog-post .post-body { font-size: 1.125rem; line-height: 1.75; color: #4a5568; }
.full-blog-post .back-button { margin-top: 2rem; text-align: center; }

/* Contact */
.contact-section {
  background-image: linear-gradient(rgba(13, 31, 53, 0.7), rgba(13, 31, 53, 0.7)), url('img/contactus.png');
  background-size: cover; background-position: center; background-attachment: fixed; color: white; padding: 5rem 0;
  display: flex; align-items: center; justify-content: center; min-height: 80vh; flex: 1;
}
.contact-section .container { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.contact-section .section-title { color: white; }
.contact-form-container { max-width: 500px; width: 100%; }
.contact-form {
  background-color: rgba(255,255,255,0.9); padding: 2.5rem; border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: .5rem; font-weight: 500; color: var(--dark-blue); }
.form-group input, .form-group textarea {
  width: 100%; padding: .75rem; border: 1px solid #d1d5db; border-radius: .5rem; font-family: 'Inter', sans-serif; font-size: 1rem; box-sizing: border-box; color: #333;
}
.form-group textarea { resize: vertical; min-height: 150px; }
.form-button-container { text-align: center; margin-top: 2rem; }

/* Hub */
.hub-section {
  background-image: linear-gradient(rgba(13, 31, 53, 0.7), rgba(13, 31, 53, 0.7)), url('img/hub.png');
  background-size: cover; background-position: center; background-attachment: fixed; color: white; padding: 5rem 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80vh; flex: 1;
}
.hub-content-wrapper { max-width: 1200px; width: 100%; text-align: center; }
.hub-content-wrapper h2 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
.hub-content-wrapper p { font-size: 1.25rem; font-weight: 500; max-width: 600px; margin: 0 auto 2rem; }
.login-form-container {
  background-color: rgba(255,255,255,0.9); padding: 2.5rem; border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  max-width: 520px; margin: 0 auto;
}

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal {
  background-color: white; padding: 2rem; border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2); max-width: 500px; width: 90%; text-align: center;
}
.modal h3 { color: var(--dark-blue); font-size: 1.5rem; margin: 0 0 1rem 0; }
.modal p { color: #4a5568; margin-bottom: 1.5rem; }
.modal .btn-secondary { border-radius: 0.5rem; }
.error-message {
  background-color: #fee2e2; color: #991b1b; padding: 1rem; border-radius: 0.5rem; margin-bottom: 1.5rem; font-weight: 500; text-align: left;
}

/* Footer */
.footer { background-color: var(--dark-blue); color: #cbd5e1; padding: 2.5rem 0; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; color: var(--golden-brown); }
.footer-links a { color: inherit; transition: color 0.3s ease; }
.footer-links a:hover { color: white; }

/* Responsive basics */
@media (max-width: 768px) {
  .hero { padding: 3rem 1rem; }
  .hero h1 { font-size: 2rem; }
}

/* ===== Forum (Top Tabs White Pod) ===== */
.forum-pod { padding: 3rem 0; background: linear-gradient(180deg, rgba(14,32,54,0.04), rgba(14,32,54,0.06)); }
.forum-card {
  max-width: 1100px; margin: 0 auto; background: #fff; border-radius: 16px;
  border: 1px solid rgba(14,32,54,0.08); box-shadow: 0 8px 28px rgba(14,32,54,0.12); overflow: hidden;
}

/* Tabs */
.forum-tabs { padding: 10px 12px 0 12px; border-bottom: 1px solid rgba(14,32,54,0.08); background: #fff; }
.tabs-list {
  list-style: none; margin: 0; padding: 0 2px; display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: thin;
}
.tabs-list > li, .tab-item { display: inline-flex; }
.tab-link {
  display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid transparent;
  border-top-left-radius: 12px; border-top-right-radius: 12px; color: var(--dark-blue, #0E2036);
  text-decoration: none; font-weight: 700; background: #f8fafc; transition: background .2s ease, border-color .2s ease; white-space: nowrap;
}
.tab-item.tab-active .tab-link {
  background: #fff; border-color: rgba(14,32,54,0.12); border-bottom-color: #fff; box-shadow: 0 -2px 10px rgba(14,32,54,0.06);
}
.tab-link.disabled { cursor: default; opacity: .6; }

/* Content + footer */
.forum-content { padding: 16px; }
.panel-title { margin: 0 0 6px 0; font-size: 1rem; font-weight: 800; letter-spacing: .2px; color: var(--dark-blue, #0E2036); text-transform: uppercase; }
.forum-footer { border-top: 1px solid rgba(14,32,54,0.08); padding: 12px; display: flex; justify-content: flex-end; }

/* Badges / hints */
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: .75rem; font-weight: 700; background: rgba(14,32,54,0.06); color: var(--dark-blue, #0E2036); }
.join-hint, .channel-placeholder, .threads-empty, .comment-empty {
  background: #f8fafc; border: 1px dashed #e2e8f0; color: #475569; padding: 14px 12px; border-radius: 12px; text-align: center;
}

/* Create Channel */
.create-channel-form.inside-content { margin-top: 4px; background: #fafbfc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.create-channel-form .form-group { display: grid; gap: 6px; }
.create-channel-form label { font-size: .85rem; color: #475569; font-weight: 600; }
.create-channel-form input[type="text"] {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; font-size: .95rem; background: #fff;
}

/* Composer */
.forum-composer { display: grid; gap: 10px; margin: 12px 0 16px 0; background: #fafbfc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.forum-composer .form-group { display: grid; gap: 6px; }
.forum-composer label { font-size: .85rem; color: #475569; font-weight: 600; }
.forum-composer textarea, .forum-composer input[type="url"] {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; font-size: .95rem; background: #fff;
}

/* Threads */
.threads-header { display: flex; align-items: start; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(14,32,54,0.08); padding-bottom: 12px; margin-bottom: 12px; }
.channel-desc { color: #64748b; font-size: .9rem; }
.threads-list { display: grid; gap: 12px; margin-top: 10px; }

.thread-card { border: 1px solid rgba(14,32,54,0.08); border-radius: 14px; background: #fff; padding: 12px; }
.thread-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(14,32,54,0.08); margin-bottom: 8px; }
.thread-title { margin: 0; font-size: 1rem; font-weight: 800; color: var(--dark-blue, #0E2036); }
.thread-meta { font-size: .8rem; color: #64748b; }
.thread-actions { display: flex; gap: 8px; }
.thread-body { color: #334155; line-height: 1.55; }
.thread-media a, .comment-media a {
  display: inline-flex; align-items: center; text-decoration: none; border: 1px solid #e2e8f0; padding: 6px 10px; border-radius: 8px; font-size: .85rem; margin-top: 8px;
}

/* Comments (basic nesting styles in case added later) */
.comments { margin-top: 12px; display: grid; gap: 10px; }
.comment-card { background: #fafafa; border: 1px solid #e5e7eb; border-left: 4px solid rgba(193,147,88,0.55); border-radius: 10px; padding: 10px 10px 10px 12px; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment-head strong { font-weight: 800; color: var(--dark-blue, #0E2036); }
.comment-date { font-size: .75rem; color: #94a3b8; margin-left: auto; margin-right: 8px; }
.comment-body { color: #334155; line-height: 1.5; }
.depth-0 { margin-left: 0; } .depth-1 { margin-left: 12px; } .depth-2 { margin-left: 24px; } .depth-3 { margin-left: 36px; } .depth-4 { margin-left: 48px; } .depth-5 { margin-left: 60px; }
.comment-form { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; display: grid; gap: 8px; }
.comment-form .form-group { display: grid; gap: 6px; }
.comment-form label { font-size: .85rem; color: #475569; font-weight: 600; }
.comment-form textarea, .comment-form input[type="url"] { width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; font-size: .93rem; background: #fff; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.pager-status { font-size: .9rem; color: #475569; }
.pager-btn { text-decoration: none; border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px 10px; font-size: .9rem; color: var(--dark-blue, #0E2036); background: #fff; }
.pager-btn:hover { background: #f8fafc; }
.pager-btn.disabled, .pager-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Mobile polish */
@media (max-width: 640px) {
  .tab-link { padding: 9px 12px; font-size: .92rem; }
  .forum-content { padding: 12px; }
  .thread-actions { gap: 6px; }
  .comment-card { padding: 8px 8px 8px 10px; }
}
