/* =====================================================
   OptiPlax - Main Stylesheet (Shared Components)
   ===================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --navy: #1e3a5f;
  --navy-deep: #142a47;
  --navy-light: #2c5282;
  --teal: #0a8a95;
  --teal-light: #14b8c4;
  --teal-soft: #e6f6f8;
  --gold: #d4a017;
  --gold-light: #f0c14b;
  --coral: #e85a4f;
  --cream: #fdf9f3;
  --bg: #f5f7fa;
  --bg-alt: #ffffff;
  --text: #1f2a3a;
  --text-soft: #4a5568;
  --text-muted: #6b7689;
  --border: #e2e8f0;
  --success: #16a085;
  --shadow-sm: 0 2px 8px rgba(20, 42, 71, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 42, 71, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 42, 71, 0.12);
  --radius: 12px;
  --radius-lg: 18px;
  --transition: 0.2s ease;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.text-center { text-align: center; }

/* ---------- Announcement Bar ---------- */
.announce-bar {
  background: linear-gradient(90deg, var(--navy-deep), var(--navy), var(--teal));
  color: #fff;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 100;
}
.announce-bar a { color: var(--gold-light); font-weight: 700; text-decoration: underline; }
.announce-bar a:hover { color: #fff; }

/* ---------- Header / Navigation ---------- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 40px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}
.logo img { width: 36px; height: 36px; }
.logo span { letter-spacing: -0.02em; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width var(--transition);
}
.nav-links a:hover::after { width: 100%; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--navy);
  cursor: pointer;
  padding: 6px;
}

/* ---------- Buttons ---------- */
.btn-cta, .btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #c8901a);
  color: #fff !important;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
  box-shadow: 0 6px 16px rgba(212, 160, 23, 0.3);
  letter-spacing: 0.02em;
}
.btn-cta:hover, .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(212, 160, 23, 0.42);
  color: #fff !important;
}
.btn-cta-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--navy) !important;
  border: 2px solid var(--navy);
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
}
.btn-outline:hover { background: var(--navy); color: #fff !important; }

/* ---------- Footer (5-column) ---------- */
.footer {
  background: var(--navy-deep);
  color: #cfd8e3;
  padding: 60px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr 1.1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: #cfd8e3;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--teal-light); }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}
.footer-logo img { width: 36px; height: 36px; }
.footer-about p { font-size: 0.88rem; line-height: 1.6; color: #aabbce; }
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.82rem;
  color: #8a9ab0;
}
.footer-disclaimer {
  max-width: 950px;
  margin: 0 auto 16px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #8a9ab0;
}

/* ---------- Legal Page Layout ---------- */
.legal-page {
  background: #fff;
  padding: 60px 0;
  min-height: 60vh;
}
.legal-page .container {
  max-width: 850px;
}
.legal-page h1 {
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  color: var(--navy);
}
.legal-page h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.legal-page p, .legal-page li {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.legal-page ul, .legal-page ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-page strong { color: var(--navy); }

/* ---------- Blog Archive ---------- */
.blog-hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #fff;
  padding: 70px 24px 50px;
  text-align: center;
}
.blog-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.5rem; }
.blog-hero p { color: #cfd8e3; max-width: 700px; margin: 0 auto; font-size: 1.1rem; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 24px;
}
.blog-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-tag {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.blog-card h2 { font-size: 1.3rem; margin-bottom: 10px; }
.blog-card p { font-size: 0.95rem; color: var(--text-soft); flex-grow: 1; }
.blog-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 14px; }
.blog-link {
  margin-top: 14px;
  color: var(--teal);
  font-weight: 600;
  display: inline-block;
}

/* ---------- Blog Post Layout ---------- */
.post-wrap {
  background: #fff;
  padding: 50px 0 80px;
}
.post-wrap .container { max-width: 800px; }
.post-wrap h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
  color: var(--navy);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.post-wrap h2 {
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  font-size: 1.55rem;
  color: var(--navy);
}
.post-wrap h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
  color: var(--navy-light);
}
.post-wrap p, .post-wrap li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 1.1rem;
}
.post-wrap ul, .post-wrap ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-wrap strong { color: var(--navy); }
.post-wrap blockquote {
  border-left: 4px solid var(--teal);
  padding: 14px 24px;
  background: var(--teal-soft);
  margin: 1.5rem 0;
  font-style: italic;
  border-radius: 0 12px 12px 0;
  color: var(--text);
}
.post-cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #fff;
  padding: 36px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 36px 0;
}
.post-cta h3 { color: #fff; margin-bottom: 12px; font-size: 1.4rem; }
.post-cta p { color: #cfd8e3; margin-bottom: 18px; }

/* ---------- AI Answer Block (Featured Snippet) ---------- */
.ai-block {
  background: linear-gradient(135deg, var(--teal-soft), #d3eef0);
  border-left: 5px solid var(--teal);
  padding: 22px 26px;
  border-radius: 0 12px 12px 0;
  margin: 22px 0;
  box-shadow: var(--shadow-sm);
}
.ai-block .q {
  display: block;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: 8px;
  font-family: var(--font-display);
}
.ai-block p { color: var(--text); font-size: 0.98rem; margin-bottom: 0; }

/* ---------- Contact Form ---------- */
.contact-form {
  background: #fff;
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 620px;
  margin: 30px auto;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  font-size: 0.94rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fafbfc;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* ---------- 404 Page ---------- */
.notfound {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 60vh;
  text-align: center;
  padding: 60px 24px;
}
.notfound .big-404 {
  font-family: var(--font-display);
  font-size: clamp(6rem, 14vw, 11rem);
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.notfound h1 { color: var(--navy); margin-bottom: 12px; font-size: 2rem; }
.notfound p { max-width: 500px; margin: 0 auto 24px; color: var(--text-soft); }
.notfound .help-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}
.notfound .help-links a {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-weight: 500;
  color: var(--navy);
}
.notfound .help-links a:hover { background: var(--teal-soft); border-color: var(--teal); }

/* ---------- About Page ---------- */
.about-hero {
  background: linear-gradient(135deg, var(--teal-soft), #fff);
  padding: 70px 24px 50px;
  text-align: center;
}
.about-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 14px;
}
.about-hero p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--text-soft);
}
.about-content { background: #fff; padding: 60px 24px; }
.about-content .container { max-width: 850px; }
.about-content h2 { margin-top: 2rem; }
.about-content p, .about-content li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 1.1rem;
}
.about-content strong { color: var(--navy); }

/* ---------- Mobile Sticky CTA ---------- */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.12);
  z-index: 95;
  border-top: 1px solid var(--border);
}
.mobile-sticky-cta a {
  display: block;
  background: linear-gradient(135deg, var(--gold), #c8901a);
  color: #fff !important;
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
    gap: 14px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .nav-wrap .btn-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .mobile-sticky-cta { display: block; }
  body { padding-bottom: 70px; }
  .section { padding: 50px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding: 40px 0 20px; }
  .nav-wrap { padding: 12px 18px; }
  .logo { font-size: 1.3rem; }
  .logo img { width: 32px; height: 32px; }
  .post-wrap { padding: 30px 0 60px; }
  .post-wrap p, .post-wrap li { font-size: 1rem; }
  .blog-grid { padding: 0 18px; gap: 22px; }
  .legal-page h1 { font-size: 1.8rem; }
  .contact-form { padding: 24px; }
}
