:root{
  --primary:#1a56db;
  --primary-dark:#1e3a8a;
  --secondary:#0e9f6e;
  --accent:#f59e0b;

  --bg:#f7f8fb;
  --text:#0f172a;
  --muted:rgba(15,23,42,.65);

  --radius:18px;
  --shadow:0 12px 30px rgba(15,23,42,.10);
  --shadow-lg:0 20px 60px rgba(15,23,42,.16);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);

  /* ⚠️ NO uses overflow-x:hidden global si tienes navbar con dropdown/offcanvas */
  overflow-x: clip; /* mejor que hidden, evita romper menús */
}

a{ color: inherit; }

/* =========================================================
   ✅ IMPORTANTE: NO tocar .container (Bootstrap lo usa)
   ========================================================= */
/* Si quieres, lo dejamos como Bootstrap-like (no rompe header) */
.container{
  width: 100%;
  padding-right: .75rem;
  padding-left: .75rem;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px){ .container{ max-width: 540px; } }
@media (min-width: 768px){ .container{ max-width: 720px; } }
@media (min-width: 992px){ .container{ max-width: 960px; } }
@media (min-width: 1200px){ .container{ max-width: 1140px; } }
@media (min-width: 1400px){ .container{ max-width: 1320px; } }

/* ✅ Tu contenedor “premium” para course.php, my_courses.php, catalog.php, etc */
.app-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* util: full-bleed sin romper layout */
.full-bleed{
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  width: 100vw !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: none !important;
}

/* =========================================================
   Flash messages (si tu flash_show imprime .flash, se verá bien)
   ========================================================= */
.flash-messages{
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 1300;
  max-width: 420px;
  width: calc(100% - 36px);
}
.flash{
  background:#fff;
  border: 1px solid rgba(15,23,42,.10);
  border-left: 6px solid var(--primary);
  border-radius: 14px;
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
  margin-bottom: .8rem;
}
.flash.success{ border-left-color: #10b981; }
.flash.error{ border-left-color: #ef4444; }
.flash.warning{ border-left-color: #f59e0b; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{
  margin-top: 3rem;
  background: #0b1220;
  color: #fff;
  padding: 2.4rem 0 1.4rem;
}
.footer-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
  align-items:start;
}
.footer-title{
  font-weight: 1000;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.footer-title span{ color: var(--secondary); }
.footer-head{
  font-weight: 900;
  margin-bottom: .6rem;
}
.footer-text{
  color: rgba(255,255,255,.78);
  line-height: 1.6;
  margin: .35rem 0;
}
.footer-link{
  display:block;
  color: rgba(255,255,255,.78);
  text-decoration:none;
  margin: .35rem 0;
}
.footer-link:hover{ color: #fff; }
.footer-copy{
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.60);
  text-align:center;
  font-weight: 700;
  font-size: .9rem;
}

@media (max-width: 900px){
  .footer-grid{ grid-template-columns: 1fr; }
  .flash-messages{
    left: 18px;
    right: 18px;
    max-width: none;
  }
}
