/* =========================================================
   MODERN SAAS DESIGN TOKENS & RESET
   ========================================================= */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  --bg-main: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevents horizontal scroll jumping on mobile */
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  min-height: 100dvh; /* Dynamic viewport height (fixes mobile URL bar shift) */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   GLASSMORPHISM NAVBAR
   ========================================================= */
.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-box img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.brand-text {
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

/* Desktop Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background: var(--bg-main);
  color: var(--text-main);
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-main);
}

/* =========================================================
   MAIN LAYOUT & GENERAL UI
   ========================================================= */
.main {
  display: flex;
  justify-content: center;
  padding: 24px 20px;
  flex: 1;
  width: 100%;
}

/* Universal Button Styling */
button {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background: var(--primary-hover);
}

button:active {
  transform: scale(0.98);
}

/* Ad Unit Placeholders (AdSense Ready) */
.ad-container {
  background: var(--bg-main);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  margin: 20px auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  min-height: 90px;
  width: 100%;
  max-width: 970px;
}

/* Universal Iframe/Img constraints */
iframe {
  width: 100%;
  height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-main);
}

img {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  object-fit: contain;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 20px 40px;
  text-align: center;
  margin-top: auto;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.site-footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-footer nav a:hover {
  color: var(--primary);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 25px;
}

.socials a img {
  width: 24px;
  height: 24px;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
}

.socials a:hover img {
  opacity: 1;
  transform: translateY(-2px);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================================
   MOBILE RESPONSIVENESS
   ========================================================= */
@media (max-width: 950px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none; /* Hidden by default on mobile */
    position: absolute;
    top: 100%; /* Dynamically matches header height */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.show {
    display: flex;
    animation: slideDown 0.2s ease-out forwards;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.05rem;
  }

  .site-footer nav {
    flex-direction: column;
    gap: 16px;
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}