/* style-main.css */

/* ============================= */
/* Custom Fonts */
/* ============================= */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-regular-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("../fonts/quicksand-regular-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============================= */
/* Base Styles (original) */
/* ============================= */

:root {
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #9aa4b2;
  --accent: #06b6d4;
  --highlight: #7c3aed;
  --glass: rgba(255, 255, 255, 0.03);
  --radius: 14px;
  --maxw: 1200px;
  font-family: "Montserrat", "Quicksand", ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", Roboto, Arial;
  color-scheme: dark;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: linear-gradient(180deg, #060b12, #070c14);
  color: #e6eef6;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--maxw);
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

header img.mascot {
  width: 120px;
  height: 120px;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 12px;
}

header .logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #022;
  font-size: 24px;
  margin: auto;
  text-decoration: none;
}

header h1 {
  margin: 8px 0 6px 0;
  font-size: 32px;
}

header p.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 650px;
}

nav {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

nav a {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  font-weight: 600;
  transition: 0.3s;
}

nav a:hover {
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  color: #022;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* .card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
} */

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.8);
}

.card h3 {
  margin: 8px 0;
  font-size: 18px;
}

.card p {
  margin: 4px 0 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.card button {
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  border: none;
  color: #022;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.card button:hover {
  background: linear-gradient(90deg, var(--highlight), var(--accent));
}

.ad-placeholder {
  background: linear-gradient(
    120deg,
    rgba(6, 182, 212, 0.05),
    rgba(124, 58, 237, 0.05)
  );
  border: 1px dashed rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 24px 0;
}

footer {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  width: 100%;
  max-width: var(--maxw);
}

footer img {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 4px;
}

footer {
  background: rgba(11, 18, 32, 0.6);
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 40px;
  width: 100%;
}
footer img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 4px;
}
/* #consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #0b1220;
    color: #e6eef6;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
    display: none;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    font-size: 14px;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }
  
  #consent-banner.show {
    display: flex;
  }
  
  #consent-banner.hide {
    transform: translateY(120%);
    opacity: 0;
  }
  
  #consent-banner button {
    background: linear-gradient(90deg, #06b6d4, #7c3aed);
    border: none;
    color: #022;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    margin-left: 12px;
  }
  
  #consent-banner button:hover {
    background: linear-gradient(90deg, #7c3aed, #06b6d4);
  }
  
  #consent-banner a {
    color: #06b6d4;
    text-decoration: underline;
    margin-left: 10px;
  }
  
  .cookie-banner {
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    visibility: visible;
  }
  
  .cookie-banner.hide {
    opacity: 0;
    visibility: hidden;
  }
   */

/* ============================= */
/* Consent Banner (restored + safe tweaks) */
/* ============================= */

#consent-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #0b1220;
  color: #e6eef6;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
  display: none;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  font-size: 14px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  /* safety: never grow so tall it covers everything on tiny screens */
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* add spacing between text and actions */
#consent-banner > *:not(button):not(a) {
  margin-bottom: 12px; /* breathing room under message */
}

/* group buttons & link neatly */
#consent-banner button,
#consent-banner a {
  margin-top: 6px; /* small spacing from text */
}

/* Optional for mobile screens */
@media (max-width: 600px) {
  #consent-banner > *:not(button):not(a) {
    margin-bottom: 8px;
  }
}

/* visible / hide helpers (keeps your original API) */
#consent-banner.show {
  display: flex;
}
#consent-banner.hide {
  transform: translateY(120%);
  opacity: 0;
}

/* buttons (restored original gradient + styles) */
#consent-banner button {
  background: linear-gradient(90deg, #06b6d4, #7c3aed);
  border: none;
  color: #022;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  margin-left: 12px;
}

/* hover flip (keeps your original hover behavior) */
#consent-banner button:hover {
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
}

/* explicit IDs (match your HTML ids to avoid surprises) */
#accept-consent {
  /* your primary accept button */
  /* identical to the generic button above but explicit here for clarity */
  background: linear-gradient(90deg, #06b6d4, #7c3aed);
  color: #022;
}
#accept-consent:hover {
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
}

/* decline button style (matches the inline style you used previously) */
#decline-consent {
  background: #444;
  color: #e6eef6;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
  margin-left: 8px;
}
#decline-consent:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* link inside the banner */
#consent-banner a {
  color: #06b6d4;
  text-decoration: underline;
  margin-left: 10px;
}

/* small accessibility improvement: visible focus */
#consent-banner button:focus {
  outline: 3px solid rgba(6, 182, 212, 0.16);
  outline-offset: 2px;
}

/* keep your cookie-banner helpers intact */
.cookie-banner {
  opacity: 1;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  visibility: visible;
}
.cookie-banner.hide {
  opacity: 0;
  visibility: hidden;
}

/* responsive: stack actions on narrow screens but keep bottom offset */
@media (max-width: 600px) {
  #consent-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-height: 45vh;
  }
  /* ensure buttons align right on mobile */
  #consent-banner > div {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  /* reduce left margin so buttons fit */
  #consent-banner button {
    margin-left: 0;
  }
}

/* ============================= */
/* Responsive Media Queries */
/* ============================= */

/* Medium tablets & small laptops (≤1024px) */
@media (max-width: 1024px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    text-align: left;
  }
  header .logo {
    flex-shrink: 0;
  }
  header h1 {
    font-size: clamp(16px, 3vw, 22px);
  }
  header p.lead {
    font-size: clamp(12px, 2.5vw, 14px);
  }
  nav {
    margin-top: 8px;
  }
}

/* Small devices (≤768px) */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .form-row {
    flex-direction: column;
    gap: 10px;
  }
  .results {
    flex-direction: column;
    align-items: stretch;
  }
  .stat {
    width: 100%;
    min-width: unset;
  }
  footer {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* Ultra-small phones (≤480px) */
@media (max-width: 480px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  header .logo {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
  nav {
    flex-direction: row; /* keep side by side */
    flex-wrap: wrap; /* wrap neatly */
    justify-content: center;
    gap: 8px;
    width: 100%;
  }
  nav a {
    flex: 0 1 auto;
    font-size: 13px;
    padding: 8px 10px;
    width: auto;
    white-space: nowrap;
  }
  .form-row {
    flex-direction: column;
    gap: 8px;
  }
  .results {
    flex-direction: column;
    align-items: stretch;
  }
  .stat {
    width: 100%;
  }
  footer {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}

/* Large/Extra-large desktops (≥1400px) */
@media (min-width: 1400px) {
  header {
    flex-wrap: nowrap;
    gap: 20px;
  }
  header h1 {
    font-size: clamp(22px, 2vw, 32px);
    white-space: normal;
    line-height: 1.3;
  }
}

/* Extra-wide desktops (≥1600px) */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
    padding: 32px;
  }
}
