/* =========================================================
   ATSE Vairag - public homepage theme (blue)
   Used only by index.php via lib/public-header.php.
   Does NOT affect the admin panel or css/stylesheet.css.
   ========================================================= */
:root {
  --atse-blue: #0D3B8C;
  --atse-navy: #082457;
  --atse-blue-2: #0A2E6E;
  --atse-saffron: #F07A1A;
  --atse-orange: #C2560A;
  --atse-gold: #F5B82E;
  --atse-gold-ink: #2A1300;
  --atse-red: #C62828;
  --atse-teal: #0F7C7A;
  --atse-green: #2E7D32;
  --atse-sky: #1565C0;
  --atse-indigo: #3949AB;
  --atse-bg: #F2F6FC;
  --atse-card: #FFFFFF;
  --atse-text: #14213D;
  --atse-text-2: #4A5873;
  --atse-line: #E6EDF7;
  --atse-shadow: 0 4px 14px rgba(13, 59, 140, 0.08);
  --atse-shadow-lg: 0 10px 30px rgba(13, 59, 140, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.atse-home {
  margin: 0;
  background: var(--atse-bg);
  color: var(--atse-text);
  font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.atse-home a { color: var(--atse-blue); text-decoration: none; }
.atse-home a:hover { color: var(--atse-orange); }
.atse-home img { max-width: 100%; }
.atse-home :focus-visible { outline: 3px solid var(--atse-gold); outline-offset: 2px; }
.atse-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.atse-serif { font-family: 'Noto Serif Devanagari', serif; }
.atse-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Top strip ---------- */
.atse-topstrip { background: var(--atse-navy); color: #DCE6F7; font-size: 14px; }
.atse-topstrip .atse-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; padding-bottom: 6px; }
.atse-topstrip a { color: var(--atse-gold); font-weight: 600; }
.atse-topstrip a:hover { color: #FFFFFF; }
.atse-topstrip-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
#google_translate_element { min-height: 24px; }

/* ---------- Header ---------- */
.atse-header { background: #FFFFFF; }
.atse-header-main { display: flex; align-items: center; justify-content: center; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
.atse-logo { width: 104px; height: 104px; object-fit: contain; flex-shrink: 0; }
.atse-brand { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.atse-brand-org { font-size: 15px; font-weight: 600; color: var(--atse-orange); }
.atse-brand-title { margin: 0; font-family: 'Noto Serif Devanagari', serif; font-size: 36px; font-weight: 800; line-height: 1.25; color: var(--atse-blue); }
.atse-brand-sub { display: inline-block; margin-top: 4px; padding: 4px 16px; border-radius: 999px; background: #FDEBD6; color: #8A3A05; font-size: 15px; font-weight: 700; letter-spacing: 0.03em; }
.atse-stripe { display: flex; height: 6px; }
.atse-stripe span { flex: 1; }
.atse-stripe span:nth-child(1) { background: var(--atse-saffron); }
.atse-stripe span:nth-child(2) { background: var(--atse-gold); }
.atse-stripe span:nth-child(3) { background: var(--atse-red); }
.atse-stripe span:nth-child(4) { background: var(--atse-sky); }

/* ---------- Navigation ---------- */
.atse-nav { background: var(--atse-blue); }
.atse-nav-bar { display: none; }
.atse-menu { list-style: none; margin: 0 auto; padding: 0 24px; max-width: 1240px; display: flex; flex-wrap: wrap; justify-content: center; }
.atse-menu a { display: block; padding: 14px 20px; color: #FFFFFF; font-size: 16px; font-weight: 600; }
.atse-menu a:hover { background: var(--atse-blue-2); color: var(--atse-gold); }
.atse-menu a.is-active { background: var(--atse-gold); color: var(--atse-gold-ink); font-weight: 700; }

/* ---------- Notice bar ---------- */
.atse-notice { background: #FFE7A8; border-bottom: 2px solid var(--atse-gold); }
.atse-notice .atse-wrap { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.atse-notice-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; background: var(--atse-red); color: #FFFFFF; font-weight: 800; font-size: 14px; padding: 5px 14px; border-radius: 999px; }
.atse-notice-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FFFFFF; animation: atse-pulse 1.6s infinite; }
.atse-notice-window { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.atse-notice-track { display: inline-flex; white-space: nowrap; animation: atse-marquee 35s linear infinite; }
.atse-notice-window:hover .atse-notice-track { animation-play-state: paused; }
.atse-notice-item { padding-right: 56px; font-size: 16px; font-weight: 600; color: #3D2600; }
.atse-notice-item::before { content: "\2022"; color: var(--atse-red); margin-right: 10px; }
.atse-notice-all { flex-shrink: 0; font-weight: 700; font-size: 15px; }
.atse-home .atse-notice-all { color: #8A1C1C; }
@keyframes atse-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes atse-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Main ---------- */
.atse-main { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 44px; }
.atse-section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.atse-section-title::before { content: ""; width: 6px; height: 34px; border-radius: 3px; background: var(--atse-saffron); }
.atse-section-title h2 { margin: 0; font-family: 'Noto Serif Devanagari', serif; font-size: 28px; color: var(--atse-blue); line-height: 1.3; }

/* ---------- Hero: slider + quick panel ---------- */
.atse-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.atse-slider { flex: 999 1 560px; min-width: 0; position: relative; border-radius: 20px; overflow: hidden; background: #D6E2F3; min-height: 420px; border: 4px solid #FFFFFF; box-shadow: var(--atse-shadow-lg); }
.atse-slider-track { position: absolute; inset: 0; display: flex; transition: transform .6s ease; }
.atse-slide { flex: 0 0 100%; height: 100%; }
.atse-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.atse-slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--atse-saffron); color: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.atse-slider-btn:hover { background: var(--atse-orange); }
.atse-slider-prev { left: 16px; }
.atse-slider-next { right: 16px; }
.atse-slider-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.atse-slider-dot { width: 10px; height: 10px; padding: 0; border-radius: 5px; border: 0; background: #FFFFFF; cursor: pointer; transition: width .3s; }
.atse-slider-dot.is-active { width: 28px; background: var(--atse-gold); }

.atse-quick { flex: 1 1 360px; min-width: 0; background: var(--atse-blue); color: #FFFFFF; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--atse-shadow-lg); }
.atse-quick-tag { align-self: flex-start; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--atse-gold-ink); background: var(--atse-gold); padding: 3px 12px; border-radius: 999px; }
.atse-quick h2 { margin: 0; font-family: 'Noto Serif Devanagari', serif; font-size: 27px; line-height: 1.3; color: #FFFFFF; }
.atse-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.atse-home .atse-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; color: #FFFFFF; min-height: 96px; font-size: 17px; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.atse-home .atse-tile:hover { color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.atse-tile svg { width: 26px; height: 26px; }
.atse-tile-orange { background: var(--atse-orange); }
.atse-tile-teal { background: var(--atse-teal); }
.atse-tile-green { background: var(--atse-green); }
.atse-home .atse-tile-gold { background: var(--atse-gold); color: var(--atse-gold-ink); font-weight: 800; }
.atse-home .atse-tile-gold:hover { color: var(--atse-gold-ink); }
.atse-home .atse-quick-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.4); color: #FFFFFF; font-size: 16px; font-weight: 600; }
.atse-home .atse-quick-link:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }

/* ---------- Section cards ---------- */
.atse-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.atse-home .atse-card { background: var(--atse-card); border-radius: 0 0 16px 16px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; border-top: 5px solid var(--c, var(--atse-blue)); box-shadow: var(--atse-shadow); color: var(--atse-text); transition: transform .15s, box-shadow .15s; }
.atse-home .atse-card:hover { transform: translateY(-3px); box-shadow: var(--atse-shadow-lg); color: var(--atse-text); }
.atse-card-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--cbg, #E3E6F8); display: flex; align-items: center; justify-content: center; }
.atse-card-icon svg { width: 26px; height: 26px; stroke: var(--c, var(--atse-blue)); }
.atse-card-title { font-size: 18px; font-weight: 700; }
.atse-card-sub { font-size: 14px; color: var(--atse-text-2); }
.atse-card-go { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--c, var(--atse-blue)); }

/* login row: three cards side by side */
.atse-logins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.atse-home .atse-login { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px; background: var(--atse-card); box-shadow: var(--atse-shadow); border-left: 5px solid var(--c, var(--atse-blue)); color: var(--atse-text); transition: transform .15s, box-shadow .15s; }
.atse-home .atse-login:hover { transform: translateY(-2px); box-shadow: var(--atse-shadow-lg); color: var(--atse-text); }
.atse-login .atse-card-icon { flex-shrink: 0; }
.atse-login-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.atse-login-arrow { flex-shrink: 0; font-weight: 800; color: var(--c, var(--atse-blue)); }

.c-orange { --c: var(--atse-orange); --cbg: #FDEBD6; }
.c-gold { --c: #8A6200; --cbg: #FFF1C7; }
.c-green { --c: var(--atse-green); --cbg: #DFF1E0; }
.c-indigo { --c: var(--atse-indigo); --cbg: #E3E6F8; }
.c-blue { --c: var(--atse-sky); --cbg: #DDE8F7; }
.c-red { --c: var(--atse-red); --cbg: #FBE0E0; }

/* ---------- News + info ---------- */
.atse-panels { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.atse-panel { background: var(--atse-card); border-radius: 18px; overflow: hidden; box-shadow: var(--atse-shadow); min-width: 0; }
.atse-panel-news { flex: 1 1 360px; }
.atse-panel-info { flex: 999 1 560px; }
.atse-panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; color: #FFFFFF; }
.atse-panel-head h2 { margin: 0; font-size: 20px; color: #FFFFFF; }
.atse-panel-head svg { width: 22px; height: 22px; flex-shrink: 0; }
.atse-panel-news .atse-panel-head { background: var(--atse-orange); }
.atse-panel-info .atse-panel-head { background: var(--atse-blue); }
.atse-news-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.atse-news-list li { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--atse-line); }
.atse-news-list li:last-child { border-bottom: 0; }
.atse-news-date { flex-shrink: 0; width: 58px; text-align: center; background: #FDEBD6; color: #8A3A05; border-radius: 10px; padding: 6px 0; font-size: 13px; font-weight: 700; line-height: 1.25; }
.atse-news-text { font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.atse-empty { padding: 18px 22px; color: var(--atse-text-2); }
.atse-info-body { padding: 8px 22px 16px; }
.atse-info-item { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px dashed var(--atse-line); font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.atse-info-item:last-child { border-bottom: 0; }
.atse-info-item::before { content: ""; position: absolute; left: 0; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--atse-saffron); }

/* ---------- Footer ---------- */
.atse-footer { background: var(--atse-navy); color: #DCE6F7; }
.atse-footer-main { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; padding-top: 40px; padding-bottom: 20px; }
.atse-footer-brand { flex: 1 1 360px; display: flex; gap: 16px; align-items: flex-start; }
.atse-footer-logo { width: 72px; height: 72px; object-fit: contain; background: #FFFFFF; border-radius: 50%; flex-shrink: 0; }
.atse-footer-name { font-family: 'Noto Serif Devanagari', serif; font-size: 21px; color: var(--atse-gold); font-weight: 700; display: block; }
.atse-footer-text { font-size: 15px; line-height: 1.6; margin: 4px 0 0; }
.atse-footer-menu { flex: 1 1 320px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: 15px; }
.atse-home .atse-footer a { color: #FFFFFF; }
.atse-home .atse-footer a:hover { color: var(--atse-gold); }
.atse-footer-bottom { border-top: 1px solid #1C3D7A; font-size: 14px; }
.atse-footer-bottom .atse-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 16px; padding-bottom: 24px; }
.atse-home .atse-footer-bottom a { color: var(--atse-gold); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .atse-cards, .atse-logins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atse-logins .atse-login:last-child { grid-column: 1 / -1; }
  .atse-brand-title { font-size: 30px; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .atse-wrap { padding: 0 14px; }
  .atse-topstrip .atse-wrap { justify-content: center; text-align: center; }
  .atse-header-main { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .atse-logo { width: 56px; height: 56px; }
  .atse-brand-org, .atse-brand-sub { display: none; }
  .atse-brand-title { font-size: 18px; }
  .atse-nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; }
  .atse-nav-bar span { color: #FFFFFF; font-weight: 700; }
  .atse-menu-toggle { width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--atse-gold); color: var(--atse-gold-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .atse-menu { display: none; flex-direction: column; padding: 6px 0; background: var(--atse-blue-2); }
  .atse-menu.is-open { display: flex; }
  .atse-menu a { padding: 12px 20px; font-size: 17px; border-left: 5px solid transparent; }
  .atse-menu a.is-active { background: transparent; color: var(--atse-gold); border-left-color: var(--atse-gold); }
  .atse-notice .atse-wrap { flex-wrap: wrap; gap: 8px; }
  .atse-notice-window { flex-basis: 100%; order: 3; }
  .atse-main { padding-top: 20px; gap: 30px; }
  .atse-slider { min-height: 220px; border-width: 3px; border-radius: 16px; }
  .atse-slider-btn { width: 40px; height: 40px; }
  .atse-quick { padding: 18px; border-radius: 18px; }
  .atse-quick h2 { font-size: 21px; }
  .atse-home .atse-tile { min-height: 76px; font-size: 16px; }
  .atse-section-title h2 { font-size: 22px; }
  .atse-cards, .atse-logins { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .atse-logins .atse-login:last-child { grid-column: auto; }
  .atse-home .atse-card { min-height: 0; flex-direction: row; align-items: center; padding: 14px 16px; border-top: 0; border-left: 5px solid var(--c); border-radius: 0 12px 12px 0; }
  .atse-card-sub, .atse-card-go { display: none; }
  .atse-footer-brand { flex-direction: column; align-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .atse-notice-track { animation: none; white-space: normal; }
  .atse-slider-track { transition: none; }
  .atse-notice-badge::before { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .atse-notice-dup { display: none; }
}
