/*
Theme Name: Carlmbeng Transition
Theme URI: https://carlmbeng.com
Author: Franklin
Description: Custom theme for carlmbeng.com — built with proper wp_head()/wp_footer() support so Elementor and standard WordPress plugins work correctly. Brand: navy, brand blue, and gold accents; Cormorant Garamond for headings, DM Sans for body text.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: carlmbeng-theme
*/

:root {
  --cb-dark: #0d1a24;
  --cb-brand: #22475d;
  --cb-brand-mid: #2e6080;
  --cb-gold: #c9a84c;
  --cb-gold-pale: #fdf8ed;
  --cb-gray: #94a3b0;
  --cb-white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--cb-dark);
  background: var(--cb-white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--cb-dark);
  line-height: 1.2;
}

a { color: var(--cb-brand-mid); }

.site-header {
  background: var(--cb-dark);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
}

.site-header .site-title a {
  color: var(--cb-white);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  text-decoration: none;
}

.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--cb-gray);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}

.site-header nav a:hover { color: var(--cb-gold); }

/* Mobile hamburger toggle — JS adds/removes .cb-nav-open on the header. */
.cb-nav-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 26px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 30;
  position: relative;
}

.cb-nav-toggle-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cb-white);
  border-radius: 2px;
  pointer-events: none;
}

@media (max-width: 150px) {
  .site-header {
    padding: 10px 10px;
    position: relative;
  }

  .cb-nav-toggle-btn {
    display: flex;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cb-dark);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    z-index: 25;
  }

  .site-header.cb-nav-open nav {
    display: block;
  }

  .site-header nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 8px 20px 16px;
  }

  .site-header nav ul li {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-header nav ul li a {
    display: block;
    padding: 12px 4px;
    white-space: normal;
  }
}

.site-footer {
  background: var(--cb-dark);
  color: var(--cb-gray);
  padding: 32px;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a { color: var(--cb-gold); }

.site-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Let Elementor-built pages go fully edge-to-edge, unaffected by the
   theme's own content wrapper padding/max-width above. */
.elementor-page .site-content {
  max-width: none;
  padding: 0;
}

/* Resource library (auto-updating archive). */
.cb-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.cb-resource-card {
  border: 1px solid #e3ecf1;
  border-radius: 10px;
  padding: 20px;
  background: var(--cb-white);
}

.cb-resource-card h3 {
  font-size: 1.2rem;
  margin: 8px 0;
}

.cb-resource-buttons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.cb-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}

.cb-btn-en { background: var(--cb-brand); color: var(--cb-white); }
.cb-btn-fr { background: var(--cb-gold); color: var(--cb-dark); }
.cb-btn-disabled { background: #eee; color: #999; cursor: default; }

/* Newsletter signup form. */
.cb-newsletter-box {
  background: var(--cb-gold-pale);
  border: 1px solid var(--cb-gold);
  border-radius: 10px;
  padding: 24px;
  max-width: 480px;
}

.cb-newsletter-box form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cb-newsletter-box input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--cb-gray);
  border-radius: 6px;
}

.cb-newsletter-box button {
  background: var(--cb-brand);
  color: var(--cb-white);
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.cb-newsletter-success { color: #1a7a3c; font-weight: 600; }
.cb-newsletter-error { color: #b3261e; font-weight: 600; }

.cb-resource-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
