* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: var(--secondary-color, #f4f7fb); color: #1e293b; }
a { color: var(--primary-color, #3E7699); text-decoration: none; }
.container { width: 100%; margin: 0; padding: 0 24px; }

.site-header { background: var(--primary-color, #3E7699); border-bottom: 0; color: #fff; position: sticky; top: 0; z-index: 20; }
.header-wrap { max-width: 1420px; margin: 0 auto; padding: 10px 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { max-height: 46px; width: auto; }
.menu-inline { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.menu-inline a { color: #fff; font-weight: 600; padding: 8px 10px; border-radius: 6px; }
.menu-inline a:hover { background: rgba(255,255,255,.14); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.socials { display: flex; gap: 6px; }
.social-link { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; color: #fff; }
.social-link svg, .icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; cursor: pointer; display: grid; place-items: center; }
.small-link { font-size: 13px; color: #fff; opacity: .95; }
.user-pill { background: rgba(255,255,255,.16); color: #fff; border-radius: 20px; padding: 5px 10px; font-size: 12px; }

.search-drawer { max-height: 0; overflow: hidden; transition: max-height .25s ease; background: #fff; border-top: 1px solid rgba(0,0,0,.08); }
.search-drawer.open { max-height: 92px; }
.search-form { display: flex; gap: 8px; }
.search-form input { padding: 8px 10px; border: 1px solid #c6cfda; border-radius: 8px; min-width: 200px; }
.search-form button { border: 0; border-radius: 8px; background: var(--primary-color, #3E7699); color: #fff; padding: 8px 12px; cursor: pointer; }
.search-form.compact { max-width: 1420px; margin: 0 auto; padding: 12px 24px; }

main.container { padding: 22px 24px; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid transparent; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.content-card { background: #fff; border: 1px solid #dbe2ea; border-radius: 0; padding: 24px; margin-bottom: 20px; width: 100%; }

.hero { min-height: var(--hero-min-desktop, 380px); border-radius: 14px; overflow: hidden; margin-bottom: 20px; background: linear-gradient(120deg, rgba(30,60,84,.95), rgba(62,118,153,.88)); background-size: cover; background-position: center; display: flex; align-items: stretch; }
.hero-overlay { padding: 44px 38px; color: #fff; max-width: 760px; min-height: inherit; display: flex; flex-direction: column; justify-content: center; }
.hero-kicker { margin: 0 0 10px; opacity: 0.9; font-weight: 700; }
.hero h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 56px); line-height: 1.1; }
.hero p { font-size: 18px; margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-light, .btn-solid { padding: 11px 18px; border-radius: 8px; font-weight: 700; display: inline-block; }
.btn-light { background: #fff; color: #16344a; }
.btn-solid { background: #1f4f72; color: #fff; border: 1px solid #83b0ce; }

.home-carousel { position: relative; min-height: 200px; }
.carousel-item { display: none; border: 1px solid #e3ebf3; border-radius: 10px; padding: 14px; background: #f8fbfe; }
.carousel-item.active { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: center; }
.carousel-thumb { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; }
.carousel-content h3 { margin: 0 0 8px; }

.post-featured { width: 100%; max-height: 380px; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.search-thumb { width: 120px; height: 78px; object-fit: cover; border-radius: 6px; }
.post-item { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: start; border-top: 1px solid #e7edf4; padding: 12px 0; }
.post-item:first-of-type { border-top: 0; }
.meta { color: #64748b; font-size: 14px; }
.editor-content img { max-width: 100%; }
.events-list { display: grid; gap: 10px; }
.event-card { border: 1px solid #dce6ef; border-radius: 10px; background: #f8fbfe; padding: 12px; }
.mini-carousel-item { display: none; border: 1px solid #e3ebf3; border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.mini-carousel-item.active { display: block; }

.login-page-body { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 20% 20%, #1e3960, #10264a); }
.login-page-main { flex: 1; display: grid; place-items: center; padding: 24px; }
.login-shell { background: #fff; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; width: min(920px, 96vw); box-shadow: 0 16px 50px rgba(5, 16, 36, .35); }
.login-brand { background: linear-gradient(160deg, #3E7699, #2b5d79); color: #fff; padding: 30px; display: grid; align-content: center; }
.login-brand-logo { max-height: 56px; width: auto; margin-bottom: 10px; }
.login-box { border: 0; margin: 0; border-radius: 0; padding: 30px; display: grid; gap: 8px; }
.login-box input { border: 1px solid #c6cfda; border-radius: 8px; padding: 9px 10px; }
.login-box button { border: 0; border-radius: 8px; background: #3E7699; color: #fff; padding: 10px 12px; cursor: pointer; font-weight: 700; }
.login-footer { margin-top: 0; }

.site-footer { margin-top: 24px; background: #fff; border-top: 1px solid #dbe2ea; padding: 16px 0; color: #475569; }

@media (max-width: 900px) {
  .header-wrap { grid-template-columns: 1fr; padding: 10px 12px; }
  .menu-inline { justify-content: flex-start; }
  .topbar-right { justify-content: flex-start; }
  .search-form { width: 100%; }
  .search-form input { flex: 1; width: 100%; min-width: 0; }
  .container { padding: 0 12px; }
  main.container { padding: 18px 12px; }
  .login-shell { grid-template-columns: 1fr; }
  .carousel-item.active { grid-template-columns: 1fr; }
  .search-thumb { width: 100%; height: 160px; }
  .post-item { grid-template-columns: 1fr; }
  .hero { min-height: var(--hero-min-mobile, 240px); }
}
