/* ==========================================================================
   E-CustomPapers.com — Academic Writing Resource
   Custom theme layer on top of Bulma. Brand colors, typography, small tweaks.
   Editorial academic blue, serif display headings, card-based guide library.
   ========================================================================== */

:root {
  /* Brand blues — evolved from the original sky-blue (#57BAF4 / #1dcaff) */
  --ec-primary: #1f6fb2;
  --ec-primary-dark: #124d80;
  --ec-primary-darker: #0d3a61;
  --ec-primary-light: #3f9bd6;
  --ec-accent: #16b8c9;
  --ec-ink: #15232f;
  --ec-body: #34434f;
  --ec-muted: #6b7a86;
  --ec-line: #e3e9ef;
  --ec-bg: #ffffff;
  --ec-bg-alt: #f4f8fb;
  --ec-bg-deep: #0d3a61;
  --ec-radius: 12px;
  --ec-shadow: 0 10px 30px rgba(18, 77, 128, 0.10);
  --ec-shadow-sm: 0 4px 14px rgba(18, 77, 128, 0.08);
  --ec-serif: "Lora", Georgia, "Times New Roman", serif;
  --ec-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ec-sans);
  color: var(--ec-body);
  background: var(--ec-bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* Responsive media baseline */
img { max-width: 100%; height: auto; display: block; }

/* ---- Typography ---- */
h1, h2, h3, h4, .title, .subtitle.is-serif {
  font-family: var(--ec-serif);
  color: var(--ec-ink);
  line-height: 1.22;
  font-weight: 600;
}
.content h1 { font-size: 2.4rem; margin-bottom: 0.7em; letter-spacing: -0.01em; }
.content h2 { font-size: 1.7rem; margin-top: 1.9em; margin-bottom: 0.6em; color: var(--ec-primary-dark); }
.content h3 { font-size: 1.3rem; margin-top: 1.4em; }
.content p, .content li { color: var(--ec-body); }
.content a { color: var(--ec-primary); text-decoration: underline; text-underline-offset: 2px; }
.content a:hover { color: var(--ec-primary-dark); }
strong { color: var(--ec-ink); }

/* ---- Navbar ---- */
.navbar.ec-nav {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--ec-line);
  box-shadow: var(--ec-shadow-sm);
}
.navbar.ec-nav .navbar-item.ec-brand {
  font-family: var(--ec-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ec-primary-dark);
}
.navbar.ec-nav .ec-brand .ec-dot { color: var(--ec-accent); }
.navbar.ec-nav a.navbar-item:hover,
.navbar.ec-nav .navbar-item.has-dropdown:hover .navbar-link {
  background: var(--ec-bg-alt);
  color: var(--ec-primary-dark);
}
.navbar.ec-nav .navbar-item, .navbar.ec-nav .navbar-link {
  color: var(--ec-ink);
  font-weight: 600;
}
.navbar.ec-nav .navbar-dropdown { border-top: 2px solid var(--ec-primary); box-shadow: var(--ec-shadow); }

/* ---- Hero ---- */
.ec-hero {
  background: linear-gradient(135deg, var(--ec-primary-darker) 0%, var(--ec-primary) 70%, var(--ec-primary-light) 100%);
  color: #fff;
  padding: 4.5rem 1.25rem 4rem;
  position: relative;
  overflow: hidden;
}
.ec-hero::after {
  content: "";
  position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22,184,201,0.35), transparent 70%);
}
.ec-hero .ec-eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem;
  font-weight: 700; color: #bfe6f3; margin-bottom: 0.6rem;
}
.ec-hero h1 { color: #fff; font-size: 2.9rem; max-width: 18ch; }
.ec-hero p.ec-lede { color: #dceaf4; font-size: 1.2rem; max-width: 60ch; margin-top: 1rem; }
@media (max-width: 768px) { .ec-hero h1 { font-size: 2.1rem; } }

.ec-hero-img {
  border-radius: var(--ec-radius);
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
  border: 4px solid rgba(255,255,255,0.12);
}

/* ---- Page hero (interior, with image) ---- */
.ec-pagehead { background: var(--ec-bg-alt); border-bottom: 1px solid var(--ec-line); padding: 3rem 1.25rem 0; }
.ec-pagehead .ec-eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; font-weight: 700; color: var(--ec-primary); }
.ec-pagehead h1 { font-size: 2.5rem; margin: 0.4rem 0 1.2rem; }
.ec-pagehead .ec-feature-img { border-radius: var(--ec-radius) var(--ec-radius) 0 0; box-shadow: var(--ec-shadow); margin-bottom: -1px; }

/* ---- Cards / guide library ---- */
.ec-card {
  background: #fff;
  border: 1px solid var(--ec-line);
  border-radius: var(--ec-radius);
  box-shadow: var(--ec-shadow-sm);
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.ec-card:hover { transform: translateY(-4px); box-shadow: var(--ec-shadow); }
.ec-card .ec-card-body { padding: 1.5rem 1.5rem 1.6rem; }
.ec-card h3 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.ec-card h3 a { color: var(--ec-ink); text-decoration: none; }
.ec-card h3 a:hover { color: var(--ec-primary); }
.ec-card p { color: var(--ec-muted); font-size: 0.97rem; margin-bottom: 1rem; }
.ec-card .ec-more { color: var(--ec-primary); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.ec-card .ec-more::after { content: " \2192"; }
.ec-card .ec-icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ec-bg-alt); color: var(--ec-primary);
  font-size: 1.25rem; margin-bottom: 1rem;
}

/* ---- Feature / trust strip ---- */
.ec-strip { background: var(--ec-bg-alt); border-top: 1px solid var(--ec-line); border-bottom: 1px solid var(--ec-line); }
.ec-trust { text-align: center; padding: 1rem; }
.ec-trust .ec-trust-num { font-family: var(--ec-serif); font-size: 1.05rem; font-weight: 700; color: var(--ec-primary-dark); }
.ec-trust .ec-trust-icon { font-size: 1.7rem; color: var(--ec-accent); margin-bottom: 0.4rem; }

/* ---- Section ---- */
.ec-section { padding: 4rem 1.25rem; }
.ec-section-alt { background: var(--ec-bg-alt); }
.ec-section .ec-section-title { text-align: center; margin-bottom: 0.4rem; font-size: 2rem; }
.ec-section .ec-section-sub { text-align: center; color: var(--ec-muted); max-width: 60ch; margin: 0 auto 2.5rem; }

/* ---- Article body image ---- */
.ec-inline-img {
  border-radius: var(--ec-radius);
  box-shadow: var(--ec-shadow-sm);
  margin: 2rem 0;
  width: 100%;
}
figure.ec-figure { margin: 2rem 0; }
figure.ec-figure figcaption { color: var(--ec-muted); font-size: 0.88rem; margin-top: 0.5rem; text-align: center; }

/* ---- Callout ---- */
.ec-callout {
  background: var(--ec-bg-alt);
  border-left: 4px solid var(--ec-primary);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.4rem;
  margin: 2rem 0;
}
.ec-callout h3 { margin-top: 0; }

/* ---- Buttons ---- */
.button.ec-btn {
  background: #fff; color: var(--ec-primary-dark);
  border: none; border-radius: 999px; font-weight: 700;
  padding: 0.7rem 1.5rem; box-shadow: var(--ec-shadow-sm);
}
.button.ec-btn:hover { transform: translateY(-2px); box-shadow: var(--ec-shadow); color: var(--ec-primary-darker); }
.button.ec-btn-outline {
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); border-radius: 999px; font-weight: 700;
}
.button.ec-btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }

/* ---- Footer ---- */
.ec-footer { background: var(--ec-bg-deep); color: #c8dbea; padding: 3.5rem 1.25rem 2rem; }
.ec-footer h4 { color: #fff; font-family: var(--ec-serif); font-size: 1.1rem; margin-bottom: 1rem; }
.ec-footer a { color: #c8dbea; text-decoration: none; }
.ec-footer a:hover { color: #fff; text-decoration: underline; }
.ec-footer .ec-foot-brand { font-family: var(--ec-serif); font-weight: 700; font-size: 1.3rem; color: #fff; }
.ec-footer ul { list-style: none; }
.ec-footer ul li { margin-bottom: 0.45rem; }
.ec-footer .ec-foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem; padding-top: 1.5rem;
  font-size: 0.85rem; color: #9fbdd4;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}

/* ---- Breadcrumb ---- */
.ec-breadcrumb { font-size: 0.85rem; color: var(--ec-muted); padding: 1rem 0 0; }
.ec-breadcrumb a { color: var(--ec-primary); text-decoration: none; }

/* ---- 404 ---- */
.ec-404 { text-align: center; padding: 6rem 1.25rem; }
.ec-404 .ec-404-num { font-family: var(--ec-serif); font-size: 6rem; color: var(--ec-primary); line-height: 1; }

/* ---- Misc ---- */
.ec-tag {
  display: inline-block; background: var(--ec-bg-alt); color: var(--ec-primary-dark);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.8rem;
}
.content ul { margin-left: 1.1rem; }
.content ul li { margin-bottom: 0.5rem; }
.ec-prose { max-width: 760px; margin: 0 auto; }

/* ---- Layout utilities (replace inline style attributes for strict separation) ---- */
.ec-main { padding-top: 3.25rem; } /* offset for fixed navbar */
.ec-foot-tagline { margin-top: 0.8rem; max-width: 34ch; }
.ec-404 p { max-width: 52ch; margin: 0 auto; }
.ec-404 .title { font-family: var(--ec-serif); }
