/* shared.css - Shared styles for Landing page and Blog */

:root {
  /* Brand Palette */
  --primary-start: #667eea;
  --primary-end: #764ba2;
  --accent: #14b8a6;
  --accent-hover: #0d9488;

  /* Neutral Colors */
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-light: #e5e7eb;

  /* Spacing & Layout */
  --container-width: 1400px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --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);
  --shadow-blue: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

/* --- Container --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-decoration: none;
}

.btn.small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn.large {
  padding: 16px 32px;
  font-size: 1.125rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white !important;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(110%);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* --- Link Style --- */
.link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: none;
  /* Hidden on mobile by default */
}

.link:hover {
  color: var(--primary-end);
}

.link.active {
  color: var(--primary-end);
}

/* --- Navbar --- */
.landing-navbar {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.landing-navbar .nav-container {
  max-width: 1400px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.landing-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Mobile hamburger button for landing page */
.landing-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 105;
}

.landing-hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.landing-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.landing-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.landing-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Landing mobile menu */
.landing-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  flex-direction: column;
  padding: 80px 24px 24px;
  z-index: 104;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 16px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.mobile-link:hover {
  background: var(--bg-page);
}

.mobile-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.mobile-menu-buttons .btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
}

.landing-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 103;
}

/* --- Footer --- */
.landing-footer {
  background: #111827;
  color: white;
  padding: 60px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand strong {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

/* --- Utility Classes --- */
.hide-mobile {
  display: inline-flex;
}

/* --- Responsiveness --- */
@media (min-width: 768px) {
  .link {
    display: block;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .desktop-nav {
    display: flex;
  }

  .landing-hamburger {
    display: none;
  }
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }

  /* Hide desktop nav on mobile, show hamburger */
  .desktop-nav {
    display: none !important;
  }

  .landing-hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .landing-mobile-menu {
    width: 85%;
  }
}