/* =========================================================
   THEME / RESET
   ========================================================= */
:root{
  --primary: rgb(37, 99, 235);
  --primary-soft: rgba(37, 99, 235, 0.08);
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --hover: #f1f5f9;
  --shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  --r: 12px;
  --maxw: 1250px;

  /* footer */
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --footer-heading: #f8fafc;
  --footer-accent: #3b82f6;
  --footer-border: rgba(255,255,255,0.1);
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body{
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: #f8fafc;
}

/* Media safety */
img, svg, video{ max-width: 100%; height: auto; }

/* IMPORTANT:
   Don’t remove focus globally (accessibility).
   If you want minimal focus, use :focus-visible below. */
:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* =========================================================
   NAV
   ========================================================= */
#nav-spacer{ height: 72px; }

.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff !important;
  border-bottom: 1px solid var(--border);
}

.nav__inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__brand{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.8rem;
  text-decoration: none;
  margin-right: auto;
  font-family: "Pacifico", cursive;
  font-weight: 700;
  color: #000;
}

.nav__links{
  display: none;
  list-style: none;
  align-items: center;
  gap: 2px;
  font-family: "Roboto", sans-serif;
}
@media (min-width: 1100px){ .nav__links{ display: flex; } }

.nav__links a,
.nav__ddbtn{
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.nav__links a:hover,
.nav__ddbtn:hover{
  background: var(--hover);
  color: var(--primary);
}

.nav__dd{ position: relative; }
.nav__ddmenu{
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.nav__dd:hover .nav__ddmenu{ display: flex; }
.nav__ddmenu a{ font-size: 0.85rem; }

.nav__controls{
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__iconbtn{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: 0.2s;
}
.nav__iconbtn:hover{ background: var(--primary-soft); color: var(--primary); }

/* Search bar */
.search-container{
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #dbe8ff;
  border-bottom: 0 solid var(--border);
}
.search-container.active{ max-height: 80px; border-bottom-width: 1px; }

.search-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  gap: 12px;
}
.search-inner input{
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  outline: none;
  font-size: 1rem;
}

/* =========================================================
   MOBILE DRAWER
   ========================================================= */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  justify-content: flex-end;
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer.active{
  opacity: 1;
  pointer-events: auto;
}

.drawer__panel{
  width: min(320px, 85vw);
  background: var(--bg);
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;

  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.drawer.active .drawer__panel{ transform: translateX(0); }

.drawer__link{
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.drawer__link:hover{ background: var(--hover); }
.drawer__sub{ padding-left: 40px; font-size: 0.95rem; opacity: 0.8; }

.mobile-only{ display: flex; }
@media (min-width: 1100px){ .mobile-only{ display: none; } }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background-color: var(--footer-bg) !important;
  color: var(--footer-text);
  padding: 60px 0 0 0;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
}

.footer-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-logo{ color: var(--footer-heading); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.footer-slogan{ color: var(--footer-accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.footer-desc{ font-size: 0.9rem; margin-bottom: 20px; }

.footer-column h3{
  color: var(--footer-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.footer-column h3::after{
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--footer-accent);
  margin-top: 8px;
}
.footer-column ul{ list-style: none; padding: 0; }
.footer-column ul li{ margin-bottom: 12px; }
.footer-column ul li a{
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-column ul li a:hover{
  color: var(--footer-accent);
  padding-left: 5px;
}

.footer-socials{ display: flex; gap: 15px; }
.footer-socials a{
  color: var(--footer-heading);
  background: rgba(255,255,255,0.05);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.footer-socials a:hover{
  background: var(--footer-accent);
  transform: translateY(-3px);
}

.footer-bottom{
  border-top: 1px solid var(--footer-border);
  padding: 25px 0;
  margin-top: 20px;
}
.bottom-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
@media (min-width: 768px){
  .bottom-container{ flex-direction: row; justify-content: space-between; }
}
.footer-bottom p{ font-size: 0.85rem; }
.footer-tagline{ font-style: italic; opacity: 0.7; }

/* =========================================================
   SCROLLBAR (optional)
   ========================================================= */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: #f3f6fb; }
::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, #2f6fe4, #1e56c9);
  border-radius: 999px;
  border: 2px solid #f3f6fb;
}
::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, #3c7df0, #1e56c9);
}
*{ scrollbar-width: thin; scrollbar-color: #2f6fe4 #cccccc; }

/* =========================================================
   ADBLOCK OVERLAY
   ========================================================= */
body.no-scroll{ overflow: hidden; height: 100vh; }

.overlay{
  position: fixed;
  inset: 0;
  display: none;                /* JS sets to flex */
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.35);

  opacity: 0;
  transition: opacity 220ms ease;
}
.overlay.is-open{ opacity: 1; }

.banner{
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);

  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform, opacity;
}
.overlay.is-open .banner{
  transform: translateY(0) scale(1);
  opacity: 1;
}

.logo{
  font-weight: 900;
  color: #1d4ed8;
  font-size: 34px;
  margin-bottom: 10px;
  font-family: "Pacifico", cursive;
  line-height: 1.1;
  word-break: break-word;
}
.msg{
  margin: 0 0 14px 0;
  color: #808080;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  line-height: 1.45;
}
.btn{
  width: 100%;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.05s ease;
  font-family: "Poppins", sans-serif;
}
.btn:hover{ background: #3c7aff; }
.btn:active{ transform: translateY(1px); }

@media (max-width: 480px){
  .overlay{ padding: 12px; }
  .banner{ width: 100%; padding: 14px; border-radius: 14px; }
  .logo{ font-size: 28px; margin-bottom: 8px; }
  .msg{ font-size: 13px; margin-bottom: 12px; }
}
@media (max-width: 360px){
  .logo{ font-size: 24px; }
  .msg{ font-size: 12.5px; }
}
@media (max-height: 520px){
  .overlay{ align-items: flex-start; padding-top: 14px; }
  .banner{ max-height: calc(100vh - 28px); overflow: auto; }
}
@media (prefers-reduced-transparency: reduce){
  .overlay{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15, 23, 42, 0.55);
  }
}

/* =========================================================
   NEWSLETTER POPUP
   ========================================================= */
body.nl-no-scroll{ overflow: hidden; height: 100vh; }

.nl-overlay{
  position: fixed;
  inset: 0;
  display: none;                /* JS sets to flex */
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99998;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.35);

  opacity: 0;
  transition: opacity 220ms ease;
}
.nl-overlay.is-open{ opacity: 1; }

.nl-modal{
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
  position: relative;
  text-align: center;

  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform, opacity;
}
.nl-overlay.is-open .nl-modal{
  transform: translateY(0) scale(1);
  opacity: 1;
}

.nl-close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nl-close:hover{ background: #f8fafc; }

.nl-brand{
  font-weight: 900;
  color: #1d4ed8;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-family: "Poppins", sans-serif;
}
.nl-title{
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  font-family: "Poppins", sans-serif;
}
.nl-text{
  margin: 0 0 14px 0;
  font-size: 14px;
  color: #475569;
  font-family: "Roboto", sans-serif;
  line-height: 1.45;
  text-transform: capitalize;
}

.nl-form{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.nl-input{
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 12px;
  outline: none;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
}
.nl-input:focus{
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nl-btn{
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}
.nl-btn:hover{ background: #3c7aff; }
.nl-btn:disabled{ opacity: 0.7; cursor: not-allowed; }

.nl-status{
  margin-top: 10px;
  font-size: 13px;
  color: #475569;
  font-family: "Roboto", sans-serif;
  min-height: 1.2em; /* prevents layout jump */
}

/* Responsive - Newsletter */
@media (max-width: 520px){
  .nl-overlay{ padding: 12px; }
  .nl-modal{ padding: 14px; border-radius: 14px; }
  .nl-form{ grid-template-columns: 1fr; }
  .nl-btn{ width: 100%; }
}

/* Short screens - Newsletter */
@media (max-height: 520px){
  .nl-overlay{ align-items: flex-start; padding-top: 14px; }
  .nl-modal{ max-height: calc(100vh - 28px); overflow: auto; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .overlay, .banner, .nl-overlay, .nl-modal{
    transition: none !important;
  }
}

/* Reduced transparency */
@media (prefers-reduced-transparency: reduce){
  .nl-overlay{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15, 23, 42, 0.55);
  }
}

#adTest{
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  display: block;
  visibility: visible;
  pointer-events: none;
}

/* ========================= */
/* UPLOAD POPUP              */
/* ========================= */
.upload-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.upload-overlay.is-open {
  opacity: 1;
}

.upload-modal {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  padding: 32px 28px 26px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
  transform: translateY(16px);
  transition: transform 0.22s ease;
  text-align: center;
}

.upload-overlay.is-open .upload-modal {
  transform: translateY(0);
}

.upload-modal__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--primary-light, #eff6ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #2563eb);
  margin: 0 auto 18px;
}

.upload-modal__icon svg {
  width: 28px;
  height: 28px;
}

.upload-modal__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text, #111);
  margin: 0 0 10px;
}

.upload-modal__text {
  font-size: 0.875rem;
  color: var(--muted, #6b7280);
  line-height: 1.6;
  margin: 0 0 18px;
}

.upload-modal__tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.upload-modal__tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
}

.upload-modal__tags span svg {
  width: 13px;
  height: 13px;
}

.upload-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: var(--primary, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}

.upload-btn-primary:hover {
  background: var(--primary-dark, #1d4ed8);
  transform: translateY(-1px);
}

.upload-btn-primary svg {
  width: 17px;
  height: 17px;
}

.upload-btn-later {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--muted, #6b7280);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  width: 100%;
}

.upload-btn-later:hover {
  background: var(--border, #e5e7eb);
  color: var(--text, #111);
}

.upload-btn-later svg {
  width: 15px;
  height: 15px;
}

.upload-modal__note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--muted, #9ca3af);
}

/* ========================= */
/* LATER TOAST               */
/* ========================= */
.upload-later-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text, #111827);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.upload-later-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.upload-later-toast svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.upload-toast-undo {
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}