/* Global layout: top bar, header, navigation, footer, popup. Loaded on every page.
   Moved here from inline <style> blocks in the PHP templates. */

/* ===== template-parts/header/topbar.php ===== */
.kk-topbar {
  background: #0074a2;
  font-family: 'Mukta', sans-serif;
  font-size: 13px;
}
.kk-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  flex-wrap: wrap;
  padding: 3px 0;
}
.kk-topbar-date {
  color: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.kk-topbar-date i { color: #7fd0f0; font-size: 13px; }
.kk-topbar-date p,
.kk-topbar-date span { margin: 0; display: inline; color: inherit; }

.kk-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.kk-topbar-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.kk-topbar-menu li { margin: 0; }
.kk-topbar-menu li a {
  display: inline-block;
  color: rgba(255,255,255,.92) !important;
  text-decoration: none !important;
  padding: 6px 10px;
  line-height: 1;
  transition: color .2s, background .2s;
  border-radius: 3px;
}
.kk-topbar-menu li a:hover,
.kk-topbar-menu li.current-menu-item a {
  color: #ffffff !important;
  background: #28aee4;
}

.kk-topbar-social {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kk-topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #ffffff !important;
  background: rgba(255,255,255,.14);
  font-size: 11px;
  text-decoration: none !important;
  transition: background .2s, transform .2s;
}
.kk-topbar-social a:hover {
  background: #28aee4;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .kk-topbar-inner { justify-content: center; }
  .kk-topbar-right { gap: 10px; }
  .kk-topbar-menu li a { padding: 6px 7px; }
}
@media (max-width: 480px) {
  .kk-topbar-menu { display: none; }
}

/* ===== header.php (block 1) ===== */
.kk-top-header-wrap {
  background: #fff;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.kk-top-header {
  min-height: 80px;
}
.kk-logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.kk-logo-link { display: inline-block; line-height: 1; }
.kk-logo-img { max-height: 70px; width: auto; display: block; mix-blend-mode: multiply; }
.kk-logo-text { line-height: 1; }
.kk-logo-first { font-size: 42px; font-weight: 700; color: #28aee4; font-family: 'Mukta', sans-serif; }
.kk-logo-last  { font-size: 42px; font-weight: 700; color: #100f0f; font-family: 'Mukta', sans-serif; }
.kk-nepali-date {
  font-size: 15px;
  color: #000;
  font-family: 'Mukta', sans-serif;
  margin-top: 2px;
 font-weight:600;
}
/* Ad area: 1 banner fills the space, 2 banners sit side by side */
.kk-header-adv {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.kk-header-adv .widget {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  text-align: center;
}
.kk-header-adv .widget img {
  max-width: 100%;
  max-height: 100px;
  width: auto;
  height: auto;
  display: inline-block;
}

@media (max-width: 767px) {
  .kk-top-header { text-align: center; }
  .kk-logo-block { align-items: center; margin-bottom: 12px; }
  .kk-header-adv { justify-content: center; }
}
@media (max-width: 575px) {
  .kk-header-adv .widget { flex-basis: 100%; }
}

/* ===== template-parts/header/navigation.php ===== */
/* NAVBAR */
.kk-navbar-wrap {
  background: #0074a2;
  position: relative;
  z-index: 999;
}

.kk-navbar-inner {
  padding: 0;
}

.kk-navbar {
  padding: 0 !important;
  min-height: 52px;
}

/* MENU */
.kk-main-nav .nav-item > a.nav-link {
  color: #fff !important;
  font-size: 18px;
  font-weight: 500;
  font-family: 'Mukta', sans-serif;
  padding: 13px 12px !important;
  transition: background 0.22s ease;
}

.kk-main-nav .nav-item > a.nav-link:hover,
.kk-main-nav .nav-item.active > a.nav-link {
  background: rgba(255,255,255,0.15) !important;
}

.kk-main-nav .dropdown-menu {
  background: #005d82 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 6px 0;
  margin-top: 0 !important;
}

.kk-main-nav .dropdown-menu .dropdown-item {
  color: #d6effa !important;
  font-size: 16px;
  font-weight: 500;
  padding: 6px 18px;
  transition: background 0.2s;
}

.kk-main-nav .dropdown-menu .dropdown-item:hover {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
}

.kk-main-nav .dropdown-toggle::after {
  content: '\f107' !important;
  font-family: FontAwesome !important;
  font-size: 16px;
  border: none !important;
  vertical-align: middle;
  margin-left: 4px;
}

/* MOBILE TOGGLER */
.kk-toggler {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
  padding: 4px;
}

.kk-toggler:focus {
  outline: none !important;
  box-shadow: none !important;
}

.kk-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1),
              opacity 0.25s ease,
              width 0.3s ease;
}

.kk-toggler[aria-expanded="true"] .kk-bar-1 {
  transform: translateY(7px) rotate(45deg);
}

.kk-toggler[aria-expanded="true"] .kk-bar-2 {
  opacity: 0;
  width: 0;
}

.kk-toggler[aria-expanded="true"] .kk-bar-3 {
  transform: translateY(-7px) rotate(-45deg);
}

/* RIGHT ICONS */
.kk-nav-icons {
  gap: 4px;
  padding: 0 4px;
}

.kk-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.2s ease;
  padding: 0;
}

.kk-icon-btn:hover {
  background: rgba(255,255,255,0.28);
  transform: scale(1.1);
}

.kk-icon-btn:focus {
  outline: none;
  box-shadow: none;
}

.kk-bars-btn {
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  position: relative;
}

.kk-bars-btn .kk-bar {
  width: 18px;
  height: 2px;
  transform-origin: center;
}

.kk-bars-btn:hover .kk-bar {
  background: #fff;
}

.kk-bars-btn.kk-active {
  background: rgba(255,255,255,0.28);
}

.kk-bars-btn.kk-active .kk-bar-1 {
  transform: translateY(7px) rotate(45deg);
}

.kk-bars-btn.kk-active .kk-bar-2 {
  opacity: 0;
  width: 0;
}

.kk-bars-btn.kk-active .kk-bar-3 {
  transform: translateY(-7px) rotate(-45deg);
}

/* SEARCH PANEL */
.kk-search-panel {
  background: #005d82;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(.4,0,.2,1),
              padding 0.3s ease;
  padding: 0;
}

.kk-search-panel.kk-open {
  max-height: 80px;
  padding: 10px 0;
}

.kk-search-form {
  gap: 8px;
}

.kk-search-input {
  flex: 1;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: 'Mukta', sans-serif;
  font-size: 16px;
  padding: 6px 14px;
}

.kk-search-input::placeholder {
  color: rgba(255,255,255,0.65);
}

.kk-search-input:focus {
  outline: none;
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
  box-shadow: none;
}

.kk-search-submit {
  background: #fff;
  color: #0074a2;
  font-weight: 600;
  font-family: 'Mukta', sans-serif;
  border-radius: 4px;
  padding: 6px 18px;
  white-space: nowrap;
  transition: background 0.2s;
}

.kk-search-submit:hover {
  background: #cdeaf8;
}

.kk-search-close {
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  padding: 0 6px;
  border: none;
  line-height: 1;
}

.kk-search-close:hover {
  color: #fff;
}

/* POPULAR MODAL */
#kkPopularModal .modal-backdrop,
.modal-backdrop {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.kk-popular-modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(4,35,48,0.3);
}

.kk-popular-modal-header {
  background: linear-gradient(135deg, #0074a2 0%, #28aee4 100%);
  padding: 16px 24px;
  border-bottom: none;
}

.kk-popular-modal-header .modal-title {
  color: #fff !important;
  font-family: 'Mukta', sans-serif;
  font-size: 19px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
}

.kk-modal-close-btn {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.kk-modal-close-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(90deg);
}

.kk-popular-modal-body::-webkit-scrollbar {
  width: 5px;
}

.kk-popular-modal-body::-webkit-scrollbar-thumb {
  background: #7fd0f0;
  border-radius: 4px;
}

.kk-pop-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid #d9eefa;
  height: 100%;
  transition: background 0.18s;
}

.kk-pop-item:hover {
  background: #f2fafd;
}

@media (min-width: 576px) {
  .kk-pop-item {
    border-right: 1px solid #d9eefa;
  }
}

.kk-pop-thumb {
  position: relative;
  flex-shrink: 0;
}

.kk-pop-thumb img {
  width: 100px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.kk-pop-num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0074a2, #28aee4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-family: 'Mukta', sans-serif;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,116,162,0.45);
}

.kk-pop-title {
  flex: 1;
}

.kk-pop-title a {
  font-family: 'Mukta', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}

.kk-pop-title a:hover {
  color: #0074a2;
}

/* STICKY HEADER */
.kk-navbar-wrap.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 3px 16px rgba(0,0,0,0.18);
  animation: kkSlideDown 0.35s ease;
}

@keyframes kkSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.kk-sticky-brand {
  display: flex;
  align-items: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-right: 0;
  text-decoration: none !important;
  transition: max-width 0.35s ease, opacity 0.28s ease, margin-right 0.35s ease;
}

.kk-sticky-brand img {
  height: 38px;
  width: auto;
  display: block;
  background: #fff;
  padding: 3px 9px;
  border-radius: 4px;
}

.kk-sticky-brand-name {
  font-family: 'Mukta', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.kk-navbar-wrap.sticky .kk-sticky-brand {
  max-width: 220px;
  opacity: 1;
  margin-right: 12px;
}

@media (max-width: 991px) {
  .kk-navbar-wrap.sticky .kk-sticky-brand {
    max-width: 170px;
  }

  .kk-sticky-brand img {
    height: 34px;
  }
}

/* MOBILE MENU */
@media (max-width: 991px) {

  .kk-menu-collapse.show .kk-main-nav {
    padding: 6px 0 10px;
  }

  .kk-main-nav .nav-item > a.nav-link {
    padding: 10px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .kk-main-nav .dropdown-menu {
    background: #00516f !important;
    margin: 0 !important;
  }

}

/* SIDEBAR */
.kk-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,35,48,0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10000;
}

.kk-sidebar-backdrop.kk-open {
  display: block;
  animation: kkFadeIn 0.25s ease;
}

@keyframes kkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.kk-sidebar-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 340px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 28px rgba(0,0,0,0.22);
  transition: right 0.38s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.kk-sidebar-drawer.kk-open {
  right: 0;
}

.kk-sd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0074a2 0%, #28aee4 100%);
  flex-shrink: 0;
}

.kk-sd-logo {
  max-height: 44px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}

.kk-sd-site-name {
  font-family: 'Mukta', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.kk-sd-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.kk-sd-close:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(90deg);
}

.kk-sd-menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.kk-sd-menu::-webkit-scrollbar {
  width: 4px;
}

.kk-sd-menu::-webkit-scrollbar-thumb {
  background: #a5def5;
  border-radius: 4px;
}

.kk-sd-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kk-sd-nav > li {
  border-bottom: 1px solid #e8f5fc;
}

.kk-sd-nav > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-family: 'Mukta', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #093a4e !important;
  text-decoration: none !important;
  transition: background 0.18s, color 0.18s, padding-left 0.18s;
}

.kk-sd-nav > li > a:hover,
.kk-sd-nav > li.current-menu-item > a {
  background: #edf7fc;
  color: #0074a2 !important;
  padding-left: 26px;
}

.kk-sd-nav > li.current-menu-item > a {
  border-left: 3px solid #0074a2;
}

.kk-sd-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f2fafd;
  display: none;
}

.kk-sd-nav li.kk-sd-open > .sub-menu {
  display: block;
}

.kk-sd-nav .sub-menu li a {
  display: block;
  padding: 10px 20px 10px 36px;
  font-family: 'Mukta', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #0d4a63 !important;
  text-decoration: none !important;
  border-bottom: 1px solid #d9eefa;
  transition: background 0.15s;
}

.kk-sd-nav .sub-menu li:last-child a {
  border-bottom: none;
}

.kk-sd-nav .sub-menu li a:hover {
  background: #d9eefa;
}

.kk-sd-has-children > a::after {
  content: '\f107';
  font-family: FontAwesome;
  font-size: 16px;
  color: #6cc3ec;
  transition: transform 0.25s;
}

.kk-sd-has-children.kk-sd-open > a::after {
  transform: rotate(180deg);
}

/* ADVERTISEMENT */
.kk-sd-adv {
  flex-shrink: 0;
  padding: 14px 16px;
  border-top: 2px solid #d9eefa;
  background: #f2fafd;
  text-align: center;
}

.kk-sd-adv .kk-sidebar-widget {
  margin: 0;
}

.kk-sd-adv .kk-sidebar-widget-title {
  font-family: 'Mukta', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #6cc3ec;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.kk-sd-adv img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

@media (max-width: 991px) {
  .kk-sd-adv {
    display: none;
  }
}

/* ===== header.php (block 2) ===== */

	.footer .items .media:nth-child(1) {
    margin-top: 0;
}

.footer .items .media {
    display: block;
    margin-top: 40px;
}

.footer .items .media .facebook {
    background: #3b5998 !important;
}
.footer .items .media .facebook {
    background: #3b5998;
}
	.footer .items .media .twitter {
    background: #00aced !important;
}
.footer .items .media .twitter {
    background: #00aced;
}
	footer .items .media .youtube {
    background: #b00 !important;
}
.footer .items .media .youtube {
    background: #b00;
}
	.footer .items .media .instagram {
    background: #bc2a8d !important;
}
.footer .items .media .instagram {
    background: #bc2a8d;
}

/* ===== footer.php ===== */
/* ===== LIGHT FOOTER — logo palette ===== */
.kk-footer { font-family: 'Mukta', sans-serif; background: #ffffff; border-top: 1px solid #e6eef3; }

/* --- Main area --- */
.kk-footer-main { padding: 56px 0 36px; }

/* Column headings: dark text, light rule, sky-blue accent segment */
.kk-footer-h {
    font-size: 20px;
    font-weight: 700;
    color: #100f0f;
    padding-bottom: 13px;
    margin-bottom: 24px;
    position: relative;
    border-bottom: 1px solid #e4e4e4;
}
.kk-footer-h::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 2px;
    background: #28aee4;
}

/* Col 1: brand */
.kk-footer-brand-logo img {
    max-height: 80px;
    width: auto;
    display: block;
}
.kk-footer-brand-name {
    font-size: 26px;
    font-weight: 700;
    color: #100f0f;
    text-decoration: none;
    line-height: 1.2;
    display: inline-block;
}

.kk-footer-about {
    font-size: 15px;
    color: #6b6b6b;
    line-height: 1.9;
    margin-top: 20px;
    margin-bottom: 0;
}

/* Col 2: contact rows */
.kk-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: #444444;
    line-height: 1.7;
    margin-bottom: 15px;
}
.kk-contact-row i {
    color: #0074a2;
    font-size: 15px;
    width: 18px;
    text-align: center;
    margin-top: 5px;
    flex-shrink: 0;
}
.kk-contact-row strong { color: #100f0f; font-weight: 700; }
.kk-contact-row a { color: #444444; text-decoration: none; transition: color .2s; }
.kk-contact-row a:hover { color: #28aee4; text-decoration: none; }

/* Col 3: links */
.kk-flink {
    display: block;
    font-size: 15px;
    color: #444444;
    text-decoration: none;
    margin-bottom: 13px;
    transition: color .2s;
}
.kk-flink:hover { color: #28aee4; text-decoration: none; }
.kk-footer-h--sub { margin-top: 34px; }

/* Col 4: team */
.kk-team-entry {
    font-size: 15px;
    color: #444444;
    line-height: 1.75;
    margin-bottom: 13px;
}
.kk-team-entry strong { color: #100f0f; font-weight: 700; }
.kk-pura-team-btn {
    display: inline-block;
    border: 1px solid #0074a2;
    color: #0074a2;
    padding: 5px 18px;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}
.kk-pura-team-btn:hover {
    background: #28aee4;
    border-color: #28aee4;
    color: #ffffff;
    text-decoration: none;
}

/* --- Social bar --- */
.kk-footer-social-bar {
    background-color: #f2f9fd;
    border-top: 1px solid #e0eef6;
    padding: 14px 0;
}
.kk-social-label {
    font-size: 13px;
    color: #0074a2;
    font-weight: 600;
    margin-right: 10px;
    white-space: nowrap;
}
.kk-social-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #0074a2;
    border-radius: 50px;
    padding: 4px 14px;
    color: #0074a2;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    background: #ffffff;
}
.kk-social-pill:hover {
    background: #28aee4;
    border-color: #28aee4;
    color: #ffffff;
    text-decoration: none;
}
.kk-footer-reg-badge {
    border-left: 2px solid #28aee4;
    padding-left: 12px;
    font-size: 12px;
    color: #6b6b6b;
    line-height: 1.5;
    text-align: left;
    display: inline-block;
}
.kk-footer-reg-badge strong { color: #100f0f; }
.kk-footer-social-bar .kk-reg-col { text-align: right; }

/* --- Copyright bar --- */
.kk-footer-copyright {
    background-color: #0074a2;
    padding: 11px 0;
}
.kk-footer-copyright .copy-text,
.kk-footer-copyright .dev-text {
    font-size: 13px;
    color: rgba(255,255,255,.88);
}
.kk-footer-copyright a { color: #bfe9fb; text-decoration: none; transition: color .2s; }
.kk-footer-copyright a:hover { color: #ffffff; }

/* Responsive tweaks */
@media (max-width: 991px) {
    .kk-footer-col { margin-bottom: 36px; }
    .kk-footer-main { padding-bottom: 8px; }
}
@media (max-width: 767px) {
    .kk-footer-social-bar .kk-reg-col { text-align: left; margin-top: 12px; }
    .kk-footer-social-bar .d-flex { flex-wrap: wrap; gap: 8px; }
}

/* Return-to-top */
#return-to-top { position: fixed; bottom: 28px; right: 28px; z-index: 9999; }

/* ===== home-parts/dice-popup.php ===== */
.dice-popup {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	width: 300px;
	max-width: 80vw;
}
.dice-popup-close {
	position: absolute;
	top: -12px;
	right: -12px;
	z-index: 3;
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	background: #0a2733;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0,0,0,0.35);
	transition: background 0.2s, transform 0.2s;
}
.dice-popup-close:hover { background: #28aee4; transform: rotate(90deg); }

/* 3D stage */
.dice-stage { perspective: 1400px; }
.dice-cube {
	position: relative;
	width: 100%;
	transform-style: preserve-3d;
}

/* Each face holds one image */
.dice-face { width: 100%; }
.dice-face img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

/* ── Static (single image) ──────────────────────────── */
.dice-static .dice-face { animation: dicePopIn 0.5s ease; }

/* ── Rotating (two or more images) — never stops moving ─ */
.dice-rotating .dice-cube { animation: diceTumble 6s linear infinite; }

/* First face stays in flow (defines height); others stack behind it */
.dice-rotating .dice-face { backface-visibility: hidden; }
.dice-rotating .dice-face:not(:first-child) {
	position: absolute;
	inset: 0;
}
.dice-rotating .dice-face:nth-child(1) { transform: rotateY(0deg); }
.dice-rotating .dice-face:nth-child(2) { transform: rotateY(180deg); }

/* Continuous dice tumble — keeps rotating around forever */
@keyframes diceTumble {
	0%   { transform: rotateY(0deg); }
	25%  { transform: rotateY(90deg); }
	50%  { transform: rotateY(180deg); }
	75%  { transform: rotateY(270deg); }
	100% { transform: rotateY(360deg); }
}
@keyframes dicePopIn {
	from { opacity: 0; transform: translateY(20px) scale(0.92); }
	to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.dice-popup.dice-hidden { display: none; }

@media (max-width: 575px) {
	.dice-popup { width: 200px; right: 12px; bottom: 12px; }
}
