:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#e5e7eb;
  --primary:#5b6cff;
  --primary-dark:#4052e6;
  --accent:#eef2ff;
  --success:#0f766e;
  --shadow:0 14px 35px rgba(17,24,39,.08);
  --radius:22px;
  --container:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.7;
}
body.menu-open{
  overflow:hidden;
}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}
.container{width:min(var(--container),calc(100% - 32px));margin:0 auto}

/* ========= HEADER ========= */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(229,231,235,.9);
}
.header-inner{
  min-height:78px;
  display:grid;
  grid-template-columns:auto 1fr auto auto;
  align-items:center;
  gap:18px;
}
.logo{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
}
.logo-mark{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--primary),#8fa2ff);
  color:#fff;
  font-weight:800;
}
.logo-text{
  font-size:1.1rem;
  color:var(--text);
}
.main-nav{
  display:flex;
  gap:18px;
  justify-content:center;
  align-items:center;
}
.main-nav a{
  color:var(--muted);
  font-weight:600;
}
.main-nav a:hover{
  color:var(--text);
}
.search-form{
  display:flex;
  gap:8px;
  align-items:center;
}
.search-form input,
.search-page-form input,
.form-control{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:13px 14px;
  font-size:15px;
  outline:none;
}
.search-form button,
.search-page-form button,
.btn{
  border:none;
  border-radius:14px;
  padding:13px 18px;
  font-weight:700;
  cursor:pointer;
}
.search-form button,
.search-page-form button,
.btn-primary{
  background:var(--primary);
  color:#fff;
}
.search-form button:hover,
.search-page-form button:hover,
.btn-primary:hover{
  background:var(--primary-dark);
}
.btn-secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
}
.menu-toggle{
  display:none;
  width:46px;
  height:46px;
  border:none;
  background:#fff;
  border-radius:14px;
  padding:0;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}
.menu-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:#111827;
  border-radius:10px;
  transition:.25s ease;
}
.menu-toggle.is-open span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2){
  opacity:0;
}
.menu-toggle.is-open span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}
.mobile-menu-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.42);
  opacity:0;
  visibility:hidden;
  transition:.25s ease;
  z-index:998;
}
.mobile-menu-overlay.is-open{
  opacity:1;
  visibility:visible;
}

/* ========= MAIN ========= */
.site-main{padding:28px 0 60px}
.breadcrumbs{margin:4px 0 24px}
.breadcrumbs ol{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.95rem;
}
.breadcrumbs li:not(:last-child)::after{
  content:"/";
  margin-left:10px;
  color:#c0c4cf;
}
.breadcrumbs a:hover{color:var(--text)}

.hero{
  background:linear-gradient(135deg,#eef2ff 0%,#ffffff 55%,#f6f8fb 100%);
  border:1px solid #e8ebff;
  box-shadow:var(--shadow);
  border-radius:32px;
  padding:56px;
  margin-bottom:34px;
}
.hero-badge{
  display:inline-flex;
  padding:8px 14px;
  background:#fff;
  color:var(--primary);
  border-radius:999px;
  border:1px solid #dfe4ff;
  font-size:.9rem;
  font-weight:700;
}
.hero h1{
  margin:18px 0 14px;
  font-size:clamp(2rem,4vw,3.5rem);
  line-height:1.15;
}
.hero p{
  max-width:760px;
  font-size:1.06rem;
  color:var(--muted);
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:26px;
}

.section{margin:34px 0}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:14px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.section-head h1,
.section-head h2{
  margin:0;
  line-height:1.2;
}
.section-subtitle{
  margin:0;
  color:var(--muted);
  max-width:780px;
}
.text-link{
  color:var(--primary);
  font-weight:700;
}

/* ========= CARDS ========= */
.card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}
.card{
  background:var(--surface);
  border:1px solid #edf0f4;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.post-card,
.category-card{
  display:flex;
  flex-direction:column;
  height:100%;
}
.card-image{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  overflow:hidden;
  background:#eef2f7;
}
.card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.card-body{
  padding:22px;
  display:flex;
  flex-direction:column;
  flex:1;
}
.post-category{
  display:inline-block;
  margin-bottom:10px;
  color:var(--success);
  font-size:.92rem;
  font-weight:700;
}
.post-card h2,
.post-card h3{
  margin:0 0 10px;
  font-size:1.2rem;
  line-height:1.3;
  min-height:56px;
}
.post-card p{
  margin:0;
  color:var(--muted);
}
.post-meta{
  margin-top:14px;
  color:#94a3b8;
  font-size:.92rem;
}
.category-card h3{margin:0 0 10px}
.category-card p{margin:0 0 14px;color:var(--muted)}

/* ========= ARTICLE ========= */
.article-page{
  background:#fff;
  border-radius:32px;
  box-shadow:var(--shadow);
  border:1px solid #edf0f4;
  overflow:hidden;
}
.article-header{
  padding:34px 34px 24px;
  border-bottom:1px solid #eef1f6;
}
.article-header h1{
  margin:10px 0 8px;
  line-height:1.15;
  font-size:clamp(2rem,4vw,3rem);
}
.article-cover{
  width:100%;
  max-width:860px;
  margin:24px auto 0;
  border-radius:24px;
  overflow:hidden;
  background:#f3f4f6;
}
.article-cover img{
  width:100%;
  max-height:520px;
  object-fit:cover;
  object-position:center;
}
.article-content{
  padding:34px;
  font-size:1.05rem;
}
.article-content h2,
.article-content h3{
  line-height:1.25;
  margin:32px 0 14px;
}
.article-content p,
.article-content ul,
.article-content ol{
  margin:0 0 16px;
}
.article-content ul,
.article-content ol{
  padding-left:22px;
}
.article-content a{
  color:var(--primary);
  text-decoration:underline;
}
.article-content table{
  width:100%;
  border-collapse:collapse;
  margin:18px 0;
}
.article-content table td,
.article-content table th{
  border:1px solid #e5e7eb;
  padding:12px;
}
.article-content blockquote{
  margin:20px 0;
  padding:16px 18px;
  background:#f8fafc;
  border-left:4px solid var(--primary);
  border-radius:16px;
}
.article-content strong{
  font-weight:700;
}
.related-block{margin-top:30px}

/* ========= PAGE BOXES ========= */
.page-box,
.empty-box{
  background:#fff;
  border-radius:26px;
  padding:34px;
  box-shadow:var(--shadow);
  border:1px solid #edf0f4;
}
.not-found-box{text-align:center}
.search-page-form{
  display:flex;
  gap:10px;
  max-width:680px;
  margin:0 0 20px;
}
.search-result-count{
  color:var(--muted);
  margin-bottom:18px;
}
.pagination{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:24px;
}
.pagination a{
  min-width:44px;
  height:44px;
  display:grid;
  place-items:center;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  font-weight:700;
}
.pagination a.active{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}

/* ========= ADS ========= */
.top-ad-wrap{
  padding:10px 0 4px;
}
.ad-slot-top{
  margin:0;
}
.ad-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
}
.ad-card-media{
  background:#f8fafc;
}
.ad-card-media-link{
  display:block;
}
.ad-card-image{
  width:100%;
  max-height:360px;
  object-fit:contain;
  object-position:center;
  background:#f8fafc;
}
.ad-card-video{
  width:100%;
  max-height:360px;
  display:block;
  object-fit:contain;
  background:#000;
}
.ad-card-content{
  padding:20px;
}
.ad-card-title{
  font-size:22px;
  font-weight:800;
  line-height:1.2;
  margin:0 0 10px;
}
.ad-card-text{
  color:#4b5563;
  line-height:1.6;
}
.ad-card-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:11px 18px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  background:#111827;
  color:#fff;
}
.ad-slot-after-header,
.ad-slot-before-footer{
  margin:24px 0 28px;
}
.ad-card-html{
  padding:0;
}

/* ========= FOOTER ========= */
.site-footer{
  margin-top:40px;
  background:#fff;
  border-top:1px solid #edf0f4;
}
.footer-grid{
  padding:40px 0;
  display:grid;
  grid-template-columns:1.2fr .8fr .8fr;
  gap:24px;
}
.footer-title{
  font-size:1.05rem;
  font-weight:800;
  margin-bottom:12px;
}
.footer-links{
  list-style:none;
  margin:0;
  padding:0;
}
.footer-links li{margin-bottom:8px}
.footer-links a{color:var(--muted)}
.footer-links a:hover{color:var(--text)}
.footer-bottom{
  border-top:1px solid #edf0f4;
  padding:14px 0;
  color:var(--muted);
  font-size:.94rem;
}

/* ========= ADMIN ========= */
.admin-body{
  background:#f4f7fb;
}
.admin-layout{
  min-height:100vh;
  display:grid;
  grid-template-columns:280px 1fr;
}
.admin-sidebar{
  background:#111827;
  color:#fff;
  padding:26px 18px;
}
.admin-brand{
  font-size:1.3rem;
  font-weight:800;
  margin-bottom:24px;
}
.admin-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.admin-nav a{
  color:#cbd5e1;
  padding:12px 14px;
  border-radius:14px;
  font-weight:600;
}
.admin-nav a:hover,
.admin-nav a.active{
  background:rgba(255,255,255,.08);
  color:#fff;
}
.admin-content{
  padding:28px;
}
.admin-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
  flex-wrap:wrap;
}
.admin-user{
  color:#64748b;
  font-weight:600;
}
.admin-stats-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
  margin-bottom:24px;
}
.admin-stat-card{
  background:#fff;
  border-radius:20px;
  padding:22px;
  box-shadow:var(--shadow);
  border:1px solid #e9eef5;
}
.admin-stat-card span{
  display:block;
  color:#64748b;
  margin-bottom:8px;
}
.admin-stat-card strong{
  font-size:1.8rem;
  line-height:1;
}
.admin-box{
  background:#fff;
  border-radius:24px;
  padding:24px;
  box-shadow:var(--shadow);
  border:1px solid #e9eef5;
}
.admin-box-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.admin-table-wrap{
  overflow:auto;
}
.admin-table{
  width:100%;
  border-collapse:collapse;
  min-width:820px;
}
.admin-table th,
.admin-table td{
  border-bottom:1px solid #e8edf4;
  padding:14px 12px;
  text-align:left;
  vertical-align:top;
}
.admin-table th{
  color:#475569;
  font-size:.95rem;
}
.admin-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.admin-actions a{
  color:var(--primary);
  font-weight:700;
}
.admin-disabled-link{
  color:#94a3b8;
  font-weight:600;
}
.admin-form{
  display:block;
}
.admin-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.admin-form-group{
  margin-bottom:16px;
}
.admin-form-group label{
  display:block;
  margin-bottom:8px;
  font-weight:700;
}
.admin-form-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:8px;
}
.admin-textarea-sm{
  min-height:110px;
  resize:vertical;
}
.admin-textarea-xl{
  min-height:420px;
  resize:vertical;
}
.admin-alert{
  border-radius:16px;
  padding:14px 16px;
  margin-bottom:16px;
  font-weight:700;
}
.admin-alert-success{
  background:#dcfce7;
  color:#166534;
}
.admin-alert-danger{
  background:#fee2e2;
  color:#991b1b;
}
.admin-image-preview{
  margin:6px 0 16px;
}
.admin-image-preview img,
.admin-image-preview video{
  width:220px;
  max-width:100%;
  border-radius:18px;
  border:1px solid #e5e7eb;
  margin-bottom:10px;
}
.admin-checkbox{
  display:flex;
  gap:8px;
  align-items:center;
  font-weight:600;
}
.admin-auth-wrap{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:20px;
  background:linear-gradient(135deg,#eef2ff 0%,#f8fafc 100%);
}
.admin-auth-card{
  width:min(100%,420px);
  background:#fff;
  border-radius:28px;
  padding:30px;
  box-shadow:var(--shadow);
  border:1px solid #e6ebf3;
}
.admin-auth-card h1{
  margin-top:0;
  margin-bottom:20px;
}
.admin-btn-full{
  width:100%;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 1100px){
  .admin-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 1024px){
  .header-inner{
    grid-template-columns:auto 1fr auto;
  }
  .main-nav{
    gap:14px;
  }
  .search-form input{
    min-width:180px;
  }
  .card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 900px){
  .admin-layout{
    grid-template-columns:1fr;
  }
  .admin-form-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 768px){
  .container{
    width:min(100% - 24px, var(--container));
  }

  .header-inner{
    grid-template-columns:auto 1fr auto;
    gap:12px;
    min-height:72px;
  }

  .logo-text{
    font-size:1rem;
  }

  .menu-toggle{
    display:flex;
    order:3;
  }

  .search-form{
    order:2;
    width:100%;
    max-width:180px;
    justify-self:end;
  }

  .search-form input{
    min-width:0;
    width:100%;
    padding:10px 12px;
    font-size:14px;
  }

  .search-form button{
    padding:10px 12px;
    font-size:13px;
  }

  .main-nav{
    position:fixed;
    top:0;
    right:-100%;
    width:min(320px,84vw);
    height:100vh;
    background:#fff;
    box-shadow:-20px 0 40px rgba(0,0,0,.12);
    padding:90px 18px 24px;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    transition:right .28s ease;
    z-index:999;
  }

  .main-nav.is-open{
    right:0;
  }

  .main-nav a{
    padding:14px 12px;
    border-radius:12px;
    background:#f9fafb;
    color:#111827;
  }

  .hero{
    padding:28px;
  }

  .card-grid{
    grid-template-columns:1fr;
    gap:16px;
  }

  .card-image{
    aspect-ratio:16/10;
  }

  .article-header,
  .article-content,
  .page-box,
  .empty-box{
    padding:22px;
  }

  .article-cover img{
    max-height:280px;
  }

  .search-page-form{
    flex-direction:column;
  }

  .footer-grid{
    grid-template-columns:1fr;
  }

  .top-ad-wrap{
    padding:8px 0 2px;
  }

  .ad-slot-top .ad-card{
    border-radius:20px;
  }

  .ad-slot-top .ad-card-image,
  .ad-slot-top .ad-card-video{
    max-height:180px;
    object-fit:contain;
    background:#f8fafc;
  }

  .ad-slot-top .ad-card-content{
    padding:14px;
  }

  .ad-slot-top .ad-card-title{
    font-size:18px;
    margin-bottom:8px;
  }

  .ad-slot-top .ad-card-text{
    font-size:14px;
    line-height:1.45;
  }

  .ad-slot-top .ad-card-button{
    width:100%;
    margin-top:12px;
    padding:12px 16px;
  }

  .ad-slot-after-header .ad-card-image,
  .ad-slot-after-header .ad-card-video,
  .ad-slot-before-footer .ad-card-image,
  .ad-slot-before-footer .ad-card-video{
    max-height:220px;
    object-fit:contain;
    background:#f8fafc;
  }
}

@media (max-width: 640px){
  .admin-content{
    padding:16px;
  }
  .admin-stats-grid{
    grid-template-columns:1fr;
  }
  .admin-box{
    padding:16px;
  }
}

@media (max-width: 520px){
  .header-inner{
    grid-template-columns:auto 1fr auto;
    gap:10px;
  }

  .logo-mark{
    width:38px;
    height:38px;
    border-radius:12px;
  }

  .logo-text{
    font-size:.96rem;
  }

  .search-form{
    max-width:145px;
  }

  .search-form input{
    height:38px;
    font-size:13px;
  }

  .search-form button{
    height:38px;
    font-size:12px;
    padding:0 10px;
  }

  .menu-toggle{
    width:42px;
    height:42px;
  }

  .hero{
    padding:24px 20px;
  }

  .ad-slot-top .ad-card-image,
  .ad-slot-top .ad-card-video{
    max-height:140px;
  }

  .ad-slot-top .ad-card-title{
    font-size:16px;
  }

  .ad-slot-top .ad-card-text{
    font-size:13px;
  }
}

.ad-slot-top .ad-card {
  max-width: 860px;
  margin: 0 auto;
}

.ad-slot-top .ad-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ad-slot-top .ad-card-title,
.ad-slot-top .ad-card-text {
  width: 100%;
}

.ad-slot-top .ad-card-button {
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 769px) {
  .ad-slot-top .ad-card-image,
  .ad-slot-top .ad-card-video {
    max-height: 260px;
    object-fit: contain;
    background: #f8fafc;
  }
}

html,
body {
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

.site-header,
.site-main,
.site-footer,
.top-ad-wrap,
.desktop-nav-wrap {
  overflow-x: clip;
}

/* desktop nav */
.desktop-nav-wrap {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(229,231,235,.9);
}

.desktop-nav {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.desktop-nav a {
  color: var(--muted);
  font-weight: 600;
}

.desktop-nav a:hover {
  color: var(--text);
}

/* mobile menu system */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.42);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
  z-index: 2000;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 84vw);
  height: 100dvh;
  background: #fff;
  box-shadow: -20px 0 40px rgba(0,0,0,.16);
  padding: 88px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  transform: translateX(110%);
  transition: transform .28s ease;
  z-index: 2001;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer a {
  display: block;
  width: 100%;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f9fafb;
  color: #111827;
  font-weight: 600;
}

@media (max-width: 768px) {
  .desktop-nav-wrap {
    display: none;
  }

  .site-header {
    overflow: visible;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 72px;
    gap: 10px;
  }

  .logo {
    min-width: 0;
  }

  .logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
  }

  .search-form {
    max-width: 150px;
    min-width: 0;
  }

  .search-form input {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
  }

  .search-form button {
    padding: 10px 12px;
    font-size: 13px;
  }

  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 2002;
    flex: 0 0 46px;
  }

  .top-ad-wrap {
    padding: 8px 0 2px;
  }

  .ad-slot-top .ad-card {
    border-radius: 20px;
  }

  .ad-slot-top .ad-card-image,
  .ad-slot-top .ad-card-video {
    max-height: 180px;
    object-fit: contain;
    background: #f8fafc;
  }

  .ad-slot-top .ad-card-content {
    padding: 14px;
  }

  .ad-slot-top .ad-card-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .ad-slot-top .ad-card-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .ad-slot-top .ad-card-button {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
  }
}

@media (min-width: 769px) {
  .mobile-drawer,
  .mobile-menu-overlay {
    display: none !important;
  }

  .menu-toggle {
    display: none !important;
  }

  .ad-slot-top .ad-card {
    max-width: 860px;
    margin: 0 auto;
  }

  .ad-slot-top .ad-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ad-slot-top .ad-card-title,
  .ad-slot-top .ad-card-text {
    width: 100%;
  }

  .ad-slot-top .ad-card-button {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
  }

  .ad-slot-top .ad-card-image,
  .ad-slot-top .ad-card-video {
    max-height: 260px;
    object-fit: contain;
    background: #f8fafc;
  }
}

body.popup-open {
  overflow: hidden;
}

.popup-ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
  z-index: 3000;
}

.popup-ad-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.popup-ad-wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(92vw, 760px);
  max-height: 88vh;
  overflow: auto;
  transform: translate(-50%, -46%);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
  z-index: 3001;
  padding: 12px;
}

.popup-ad-wrap.is-open {
  transform: translate(-50%, -50%);
  opacity: 1;
  visibility: visible;
}

.popup-ad-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transform: translate(20%, -20%);
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.popup-ad-card .ad-card {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.popup-ad-card .ad-card-image,
.popup-ad-card .ad-card-video {
  max-height: 360px;
  object-fit: contain;
  background: #f8fafc;
}

.popup-ad-card .ad-card-content {
  text-align: center;
}

.popup-ad-card .ad-card-button {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .popup-ad-wrap {
    width: min(94vw, 94vw);
    padding: 8px;
  }

  .popup-ad-close {
    width: 38px;
    height: 38px;
    font-size: 24px;
    transform: translate(8%, -8%);
  }

  .popup-ad-card .ad-card-image,
  .popup-ad-card .ad-card-video {
    max-height: 220px;
  }

  .popup-ad-card .ad-card-content {
    padding: 14px;
  }

  .popup-ad-card .ad-card-title {
    font-size: 18px;
  }

  .popup-ad-card .ad-card-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .popup-ad-card .ad-card-button {
    width: 100%;
  }
}

/* ===== SMART ADS ===== */

.smart-ad {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease;
}

.smart-ad.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.smart-ad-shell {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.smart-ad-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(17,24,39,.92);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.smart-ad-toggle-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .22s ease;
}

.smart-ad.is-collapsed .smart-ad-toggle-icon {
  transform: rotate(180deg);
}

.smart-ad-inner {
  transition: max-height .25s ease, opacity .25s ease, transform .25s ease, margin .25s ease;
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
}

.smart-ad.is-collapsed .smart-ad-inner {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  margin-top: 0;
}

.smart-ad-top {
  padding: 10px 0 4px;
}

.smart-ad-after-header {
  padding: 14px 0 4px;
}

.smart-ad-top .ad-card,
.smart-ad-after-header .ad-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15,23,42,.10);
}

.smart-ad-top .ad-card-image,
.smart-ad-top .ad-card-video,
.smart-ad-after-header .ad-card-image,
.smart-ad-after-header .ad-card-video {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
}

.smart-ad-top .ad-card-content,
.smart-ad-after-header .ad-card-content {
  text-align: center;
  padding: 18px 18px 20px;
}

.smart-ad-top .ad-card-button,
.smart-ad-after-header .ad-card-button {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .smart-ad-top,
  .smart-ad-after-header {
    padding: 8px 0 2px;
  }

  .smart-ad-toggle {
    width: 36px;
    height: 36px;
    top: 8px;
    right: 8px;
  }

  .smart-ad-top .ad-card-image,
  .smart-ad-top .ad-card-video,
  .smart-ad-after-header .ad-card-image,
  .smart-ad-after-header .ad-card-video {
    max-height: 190px;
  }

  .smart-ad-top .ad-card-content,
  .smart-ad-after-header .ad-card-content {
    padding: 14px;
  }

  .smart-ad-top .ad-card-title,
  .smart-ad-after-header .ad-card-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .smart-ad-top .ad-card-text,
  .smart-ad-after-header .ad-card-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .smart-ad-top .ad-card-button,
  .smart-ad-after-header .ad-card-button {
    width: 100%;
  }
}

/* ===== SMART AFTER HEADER AD ===== */

.smart-after-header-ad {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease;
  padding: 14px 0 4px;
}

.smart-after-header-ad.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.smart-after-header-shell {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.smart-after-header-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(17,24,39,.92);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.smart-after-header-toggle-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .22s ease;
}

.smart-after-header-ad.is-collapsed .smart-after-header-toggle-icon {
  transform: rotate(180deg);
}

.smart-after-header-inner {
  transition: max-height .25s ease, opacity .25s ease, transform .25s ease, margin .25s ease;
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
}

.smart-after-header-ad.is-collapsed .smart-after-header-inner {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  margin-top: 0;
}

.smart-after-header-ad .ad-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15,23,42,.10);
}

.smart-after-header-ad .ad-card-image,
.smart-after-header-ad .ad-card-video {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
}

.smart-after-header-ad .ad-card-content {
  text-align: center;
  padding: 18px 18px 20px;
}

.smart-after-header-ad .ad-card-button {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .smart-after-header-ad {
    padding: 8px 0 2px;
  }

  .smart-after-header-toggle {
    width: 36px;
    height: 36px;
    top: 8px;
    right: 8px;
  }

  .smart-after-header-ad .ad-card-image,
  .smart-after-header-ad .ad-card-video {
    max-height: 190px;
  }

  .smart-after-header-ad .ad-card-content {
    padding: 14px;
  }

  .smart-after-header-ad .ad-card-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .smart-after-header-ad .ad-card-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .smart-after-header-ad .ad-card-button {
    width: 100%;
  }
}

/* ===== SMART TOP + AFTER ADS ===== */

.smart-top-ad,
.smart-after-ad {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}

.smart-top-ad.is-visible,
.smart-after-ad.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.smart-top-ad {
  padding: 10px 0 4px;
}

.smart-after-ad {
  padding: 14px 0 4px;
}

.smart-top-ad-shell,
.smart-after-ad-shell {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.smart-top-ad-toggle,
.smart-after-ad-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(17,24,39,.92);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.smart-top-ad-toggle-icon,
.smart-after-ad-toggle-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .22s ease;
}

.smart-top-ad.is-collapsed .smart-top-ad-toggle-icon,
.smart-after-ad.is-collapsed .smart-after-ad-toggle-icon {
  transform: rotate(180deg);
}

.smart-top-ad-inner,
.smart-after-ad-inner {
  transition: max-height .22s ease, opacity .22s ease, transform .22s ease;
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
}

.smart-top-ad.is-collapsed .smart-top-ad-inner,
.smart-after-ad.is-collapsed .smart-after-ad-inner {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
}

.smart-top-ad .ad-card,
.smart-after-ad .ad-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15,23,42,.10);
}

.smart-top-ad .ad-card-image,
.smart-top-ad .ad-card-video,
.smart-after-ad .ad-card-image,
.smart-after-ad .ad-card-video {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
}

.smart-top-ad .ad-card-content,
.smart-after-ad .ad-card-content {
  text-align: center;
  padding: 18px 18px 20px;
}

.smart-top-ad .ad-card-button,
.smart-after-ad .ad-card-button {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .smart-top-ad,
  .smart-after-ad {
    padding: 8px 0 2px;
  }

  .smart-top-ad-toggle,
  .smart-after-ad-toggle {
    width: 36px;
    height: 36px;
    top: 8px;
    right: 8px;
  }

  .smart-top-ad .ad-card-image,
  .smart-top-ad .ad-card-video,
  .smart-after-ad .ad-card-image,
  .smart-after-ad .ad-card-video {
    max-height: 190px;
  }

  .smart-top-ad .ad-card-content,
  .smart-after-ad .ad-card-content {
    padding: 14px;
  }

  .smart-top-ad .ad-card-title,
  .smart-after-ad .ad-card-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .smart-top-ad .ad-card-text,
  .smart-after-ad .ad-card-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .smart-top-ad .ad-card-button,
  .smart-after-ad .ad-card-button {
    width: 100%;
  }
}

.contact-cards{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:24px;
}

.contact-card{
  display:block;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:22px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  transition:transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 36px rgba(0,0,0,.08);
}

.contact-card-title{
  font-size:20px;
  font-weight:800;
  margin-bottom:8px;
  color:#111827;
}

.contact-card-text{
  color:#6b7280;
  line-height:1.5;
}

.contact-note{
  margin-top:24px;
  padding:18px 20px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  color:#374151;
  font-weight:600;
}

@media (max-width: 768px){
  .contact-cards{
    grid-template-columns:1fr;
    gap:14px;
  }

  .contact-card{
    padding:18px;
  }

  .contact-card-title{
    font-size:18px;
  }
}
/* SEO / editorial trust blocks */
.article-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 10px 0 18px;
    color: #667085;
    font-size: 14px;
}

.article-byline a,
.article-editorial-note a,
.editorial-page a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content-notice,
.article-editorial-note {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid #f0c36d;
    border-radius: 14px;
    background: #fff8e8;
    line-height: 1.6;
}

.article-editorial-note {
    border-color: #d0d5dd;
    background: #f8fafc;
}

.editorial-page h2 {
    margin-top: 28px;
}
