/*
Theme Name: AIML Learn Community
Theme URI: https://community.aimllearn.com
Author: AIML Learn Pvt. Ltd.
Author URI: https://aimllearn.com
Description: Site-wide design template for community.aimllearn.com. Dark near-black sections, teal primary CTA, purple accents, teal/purple alternating section borders — matches the AIML Learn brand style guide.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: aimllearn-community
*/

/* ── AIML Learn Design Tokens (from AIMLLEARN-STYLE-GUIDE.md) ── */
:root {
  --black: #0C0C0C;
  --near-black: #0F0F1A;
  --card-dark: #1A1A2E;
  --surface: #24243A;
  --white: #FFFFFF;
  --off-white: #F7F8FA;
  --border: #E8EAF0;
  --border-dark: rgba(255,255,255,.10);

  --orange: #3CAEA3;      /* teal — primary CTA */
  --orange-d: #2D9D91;
  --orange-l: #5ECFC8;
  --purple: #6565A0;
  --purple-d: #4A4A82;
  --purple-l: #8484BC;
  --teal: #3CAEA3;
  --green: #22C55E;

  --txt: #374151;
  --txt-dark: #0F0F1A;
  --txt-muted: #6B7280;
  --txt-w: rgba(255,255,255,.90);
  --txt-w60: rgba(255,255,255,.60);
  --txt-w40: rgba(255,255,255,.40);

  --max-w: 1360px;
  --r: 12px;
  --r-lg: 20px;
  --r-pill: 9999px;

  --sh-sm: 0 2px 8px rgba(0,0,0,.06);
  --sh: 0 6px 20px rgba(0,0,0,.10);
  --sh-md: 0 12px 36px rgba(0,0,0,.14);
  --sh-lg: 0 24px 64px rgba(0,0,0,.18);
  --glow-o: 0 0 32px rgba(60,174,163,.35);
  --glow-p: 0 0 32px rgba(101,101,160,.40);

  --ease: cubic-bezier(.25,.46,.45,.94);
  --t: .22s var(--ease);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: #EDEEF4;
  color: var(--txt);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: 96px; /* announce bar (44px) + header (~52px) */
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Section system ── */
section { border-radius: 8px; margin: 5px 14px; }
section:nth-of-type(odd)  { border: 1.5px solid rgba(60,174,163,.32); }  /* teal */
section:nth-of-type(even) { border: 1.5px solid rgba(101,101,160,.32); } /* purple */

.bg-dark     { background: var(--near-black); color: var(--txt-w); }
.bg-purple   { background: var(--purple); color: #fff; }
.bg-white    { background: var(--white); }
.bg-offwhite { background: var(--off-white); }

.section-pad { padding: 80px 0; }
@media (max-width: 1100px) { .section-pad { padding: 64px 0; } }
@media (max-width: 768px)  { .section-pad { padding: 44px 0; } }

/* ── Eyebrow label ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--orange); display: inline-block; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 { color: var(--txt-dark); font-weight: 800; letter-spacing: -.04em; }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4,
.bg-purple h1, .bg-purple h2, .bg-purple h3, .bg-purple h4 { color: #fff; }
h1.hero-title { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 900; letter-spacing: -.05em; line-height: 1.1; }
h2.section-title { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; letter-spacing: -.04em; margin-bottom: 16px; }
p.lead { font-size: 1.1rem; line-height: 1.7; max-width: 640px; }
.bg-dark p, .bg-purple p { color: var(--txt-w); }
.bg-dark p.muted { color: var(--txt-w60); }
.bg-white p, .bg-offwhite p { color: var(--txt-muted); }

/* ── Default WordPress content (page/post body via the_content) ── */
.page-content { max-width: 760px; }
.page-content p { margin: 0 0 20px; }
.page-content a { color: var(--orange-d); text-decoration: underline; }
.page-content ul, .page-content ol { margin: 0 0 20px 24px; }
.page-content img { border-radius: var(--r); margin: 20px 0; height: auto; }
.page-content blockquote { border-left: 3px solid var(--orange); padding-left: 20px; color: var(--txt-muted); font-style: italic; margin: 20px 0; }
.page-content h2 { font-size: 1.6rem; margin: 32px 0 12px; }
.page-content h3 { font-size: 1.25rem; margin: 24px 0 10px; }
.page-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.page-content table th, .page-content table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-pill);
  font-family: var(--font); font-size: .92rem; font-weight: 700;
  cursor: pointer; text-decoration: none; border: 2px solid transparent;
  transition: all var(--t); letter-spacing: -.01em; position: relative; overflow: hidden;
}
.btn::after {
  content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.25);
  transform: translateX(-120%); transition: transform .5s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 4px 16px rgba(60,174,163,.30); }
.btn-primary:hover { background: var(--orange-d); box-shadow: var(--glow-o); transform: translateY(-1px); }
.btn-dark { background: var(--near-black); color: #fff; border-color: var(--near-black); }
.btn-dark:hover { background: var(--black); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 20px; font-size: .82rem; }

/* ── Tag pill ── */
.tag {
  display: inline-flex; align-items: center; padding: 4px 14px; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(60,174,163,.12); color: var(--orange-d); border: 1px solid rgba(60,174,163,.30);
}
.tag-dark { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.tag-purple { background: rgba(101,101,160,.12); color: var(--purple); border: 1px solid rgba(101,101,160,.30); }
.tag-pending { background: rgba(255,255,255,.10); color: var(--txt-w60); border: 1px solid rgba(255,255,255,.20); }

/* ── Check list ── */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--orange); font-weight: 800; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 32px; }
.card-light { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 28px; transition: all var(--t); }
.card-light:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.card-dark { background: var(--card-dark); border: 1px solid var(--border-dark); border-radius: var(--r); padding: 28px; color: var(--txt-w); }
.card-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 8px; }
.card-sub { font-size: .9rem; color: var(--txt-muted); line-height: 1.6; }
.card-dark .card-sub { color: var(--txt-w60); }

/* ── Form fields (dark surface) ── */
.form-field {
  width: 100%; background: var(--surface); border: 1.5px solid var(--border-dark);
  border-radius: 10px; color: #fff; padding: 13px 16px; font-family: var(--font); font-size: .92rem;
  transition: all var(--t);
}
.form-field::placeholder { color: var(--txt-w40); }
.form-field:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(60,174,163,.12); }
.form-grid { display: grid; gap: 16px; max-width: 560px; margin-top: 28px; }

/* ── Stats bar ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 900; letter-spacing: -.03em; }
.stat-label { font-size: .82rem; color: var(--txt-w60); margin-top: 4px; }

/* ── Diary tabs (courses / forum-topic style) ── */
.tab-bar { display: flex; gap: 4px; align-items: flex-end; overflow-x: auto; margin-top: 24px; }
.tab-btn {
  border: 1.5px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0;
  background: var(--off-white); color: var(--txt-muted); padding: 10px 20px; font-weight: 700;
  font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.tab-btn.active { background: var(--white); color: var(--orange); border-color: var(--orange); border-bottom: 2px solid var(--white); }
.tab-content-wrap { border: 1.5px solid var(--orange); border-radius: 0 12px 12px 12px; background: var(--white); padding: 28px; }

/* ── Announce bar ── */
.announce-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 44px;
  background: linear-gradient(90deg, var(--near-black), var(--purple), var(--near-black));
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 600; color: #fff; text-align: center; padding: 0 16px;
}

/* ── Header / nav ── */
.site-header {
  position: fixed; top: 44px; left: 0; right: 0; z-index: 900;
  background: var(--near-black); border-bottom: 1px solid var(--border-dark);
}
.nav-wrap { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { max-height: 40px; width: auto; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 8px; background: var(--card-dark);
  border: 1.5px solid var(--purple-l); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .78rem; color: #fff; letter-spacing: -.02em;
}
.logo-word { font-weight: 800; font-size: 1.05rem; color: #fff; letter-spacing: -.03em; }
.logo-word span { color: var(--orange); }

.main-nav ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: var(--txt-w); text-decoration: none; font-weight: 600; font-size: .88rem; transition: color var(--t); }
.main-nav a:hover { color: var(--orange-l); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 22px; height: 2px; background: #fff; display: block; }

.mobile-nav {
  position: fixed; inset: 0; z-index: 1100; background: var(--near-black);
  display: none; flex-direction: column; padding: 24px; transform: translateX(100%);
  transition: transform .3s var(--ease);
}
.mobile-nav.open { display: flex; transform: translateX(0); }
.mobile-nav-close { align-self: flex-end; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }
.mobile-nav ul { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 22px; padding: 0; }
.mobile-nav a { color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 700; }

/* ── Bottom sticky CTA bar ── */
.sticky-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
  background: var(--near-black); border-top: 1px solid var(--border-dark);
  padding: 12px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.sticky-bottom-bar p { color: #fff; font-weight: 700; font-size: .9rem; margin: 0; }
.sticky-bottom-bar .actions { display: flex; gap: 10px; }
body.has-bottom-bar { padding-bottom: 76px; }

/* ── Footer ── */
.site-footer { background: var(--near-black); color: var(--txt-w); padding: 64px 0 28px; margin: 5px 14px 0; border-radius: 8px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.footer-grid a { color: var(--txt-w60); text-decoration: none; font-size: .88rem; }
.footer-grid a:hover { color: var(--orange-l); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border-dark); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--txt-w40); }

/* ── Moderation notice ── */
.notice-card {
  display: flex; gap: 20px; align-items: flex-start; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 28px; margin-top: 28px;
}
.notice-icon {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(60,174,163,.12); color: var(--orange-d);
  display: flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; font-size: 1.1rem;
}

/* ── Admin bar offset (only affects logged-in editors, not visitors) ── */
body.admin-bar .announce-bar { top: 32px; }
body.admin-bar .site-header { top: 76px; }
@media screen and (max-width: 782px) {
  body.admin-bar .announce-bar { top: 46px; }
  body.admin-bar .site-header { top: 90px; }
}

/* ── Breakpoints ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  section { margin: 4px 0; border-radius: 0; }
  section:nth-of-type(odd), section:nth-of-type(even) { border-left: none; border-right: none; }
  .main-nav, .nav-cta .btn:not(.btn-sm) { display: none; }
  .hamburger { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  body { padding-top: 88px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sticky-bottom-bar { flex-direction: column; align-items: flex-start; }
}
