/**
 * AnchorExchange V2 Brand Design System
 * Based on the design specifications in v2/1v2introduction.md
 *
 * This CSS file provides:
 * - Brand color variables
 * - Typography system (Inter & Poppins)
 * - Spacing utilities
 * - Component styles (buttons, cards, forms)
 * - Navigation and footer styles
 * - Background patterns
 */

/* ============================================
   COLOR SYSTEM
   ============================================ */
:root {
  /* Primary Brand Colors */
  --color-primary: #0A3D62;      /* Deep ocean blue - header, buttons, accents */
  --color-secondary: #3C6382;    /* Softer tone - backgrounds, hover states */
  --color-accent: #E55039;       /* Accent red - CTAs, icons, highlights */
  --color-highlight: #F0B429;    /* Gold amber - premium features, focus */

  /* Neutral Colors */
  --color-background: #F5F6FA;   /* Light neutral background */
  --color-headings: #2F3640;     /* Primary text color */
  --color-text: #535c68;         /* Body text color */
  --color-line: #CED6E0;         /* Dividers, borders */

  /* Feedback Colors */
  --color-success: #78E08F;      /* Success messages */
  --color-warning: #F6B93B;      /* Warnings */
  --color-error: #EB2F06;        /* Errors */

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-xxl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.3s ease;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Global scaling adjustment - scales entire site down by ~12.5% for comfortable 100% zoom viewing */
html {
  font-size: 87.5%; /* 14px base instead of 16px */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 1rem; /* Now equals 14px due to html scaling */
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Padding for bottom navigation */
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
}

body.has-sticky-header {
  padding-top: 0;
}

@media (max-width: 992px) {
  body.has-sticky-header {
    padding-top: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  color: var(--color-headings);
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

/* Heading sizes - scale automatically with html font-size */
/* At 87.5% base: h1=35px, h2=28px, h3=21px, h4=17.5px, h5=15.4px, h6=14px */
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

/* Link Styles */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* Lead Text */
.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.section {
  padding: var(--space-xl) 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1.5;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-highlight {
  background: var(--color-highlight);
  color: #000;
  border-color: var(--color-highlight);
}

.btn-highlight:hover {
  background: #f6c944;
  border-color: #f6c944;
  color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: #fff;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: var(--transition-slow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: var(--space-lg);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-headings);
}

.card-text {
  color: var(--color-text);
  line-height: 1.6;
}

/* ============================================
   FORMS
   ============================================ */
input, select, textarea {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: var(--transition-base);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--color-headings);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(60, 99, 130, 0.15);
}

input::placeholder, textarea::placeholder {
  color: #95a5a6;
}

label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--color-headings);
}

.form-group {
  margin-bottom: var(--space-lg);
}

/* ============================================
   HEADER (Logo + Quick Actions)
   ============================================ */
.v2-header-simple {
  background: var(--color-primary) !important;
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  min-height: 60px;
}

.v2-header-simple.header-scrolled {
  background: rgba(10, 61, 98, 0.98) !important;
  box-shadow: 0 10px 24px rgba(10, 61, 98, 0.18);
  backdrop-filter: blur(6px);
}

.v2-header-simple .container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Override Bootstrap container if needed */
.v2-header-simple > .container {
  display: flex !important;
}

.v2-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: var(--transition-fast);
  color: #fff;
}

.v2-logo:focus,
.v2-logo:active {
  outline: none;
  text-decoration: none;
}

.v2-logo:hover {
  transform: scale(1.02);
}

.v2-logo img {
  display: block;
  transition: var(--transition-fast);
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.v2-logo-text {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff !important;
  transition: var(--transition-fast);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: inline-block;
}

.v2-logo:hover .v2-logo-text {
  color: var(--color-highlight);
}

/* Header Quick Actions */
.v2-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.v2-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.v2-header-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-highlight);
}

.v2-header-link i {
  font-size: 1.1rem;
}

.v2-header-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--color-accent) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  border: none !important;
  cursor: pointer;
  white-space: nowrap;
}

.v2-header-btn:hover {
  background: var(--color-highlight);
  color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.v2-header-btn i {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .v2-logo-text {
    font-size: 1.25rem;
  }

  .v2-logo img {
    height: 32px;
  }

  /* Hide text on mobile, show icons only */
  .v2-header-link span,
  .v2-header-btn span {
    display: none;
  }

  .v2-header-link,
  .v2-header-btn {
    padding: 0.5rem;
    min-width: 40px;
    justify-content: center;
  }

  .v2-header-actions {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* On very small screens, hide all but the Post button */
  .v2-header-link {
    display: none;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.v2-footer {
  background: var(--color-secondary);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-xl) 0 0;
  margin-top: var(--space-xxl);
}

.v2-footer .footer-heading {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.v2-footer .footer-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  font-size: 0.95rem;
}

.newsletter-signup-card {
  position: relative;
  background: linear-gradient(135deg, rgba(10, 61, 98, 0.95), rgba(0, 119, 190, 0.9));
  border-radius: 24px;
  padding: 2.75rem;
  margin-bottom: 3rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(10, 61, 98, 0.25);
  color: #fff;
}

.newsletter-signup-card::before {
  content: '';
  position: absolute;
  inset: -45% 55% auto -10%;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 60%);
  opacity: 0.85;
}

.newsletter-signup-card-content {
  position: relative;
  z-index: 1;
}

.newsletter-signup-card h5 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

.newsletter-signup-card p {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.newsletter-signup-form .form-control {
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  border: none;
  box-shadow: none;
}

.newsletter-signup-form .btn {
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.newsletter-signup-form .btn:hover {
  transform: translateY(-1px);
}

.newsletter-status {
  min-height: 1.25rem;
  display: block;
  color: rgba(255, 255, 255, 0.85);
}

.newsletter-status.success {
  color: #78E08F;
}

.newsletter-status.error {
  color: #F6B93B;
}

@media (max-width: 768px) {
  .newsletter-signup-card {
    padding: 2rem;
  }
}

.v2-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.v2-footer .footer-links li {
  margin-bottom: var(--space-sm);
}

.v2-footer .footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

.v2-footer .footer-links a:hover {
  color: var(--color-highlight);
  padding-left: 4px;
}

.v2-footer .social-links {
  display: flex;
  gap: var(--space-md);
}

.v2-footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.v2-footer .social-link:hover {
  background: var(--color-highlight);
  color: #000;
  transform: translateY(-3px);
}

.v2-footer .footer-bottom {
  margin-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.v2-footer .footer-copyright,
.v2-footer .footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ============================================
   BACKGROUND PATTERN - ANCHORS
   ============================================ */
.v2-bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg transform='translate(21, 20)'%3E%3Cpath fill='%230A3D62' d='M9.243,3.5c0.422,0,0.766-0.344,0.766-0.766c0-0.423-0.344-0.766-0.766-0.766c-0.424,0-0.767,0.343-0.767,0.766C8.477,3.157,8.819,3.5,9.243,3.5L9.243,3.5z M15.566,10.772l2.109-1.708l0.424,2.681l0.424,2.682l-1.324-0.508c-1.076,3.355-4.222,5.785-7.937,5.785c-3.715,0-6.861-2.43-7.939-5.785L0,14.427l0.425-2.682l0.424-2.681l2.11,1.708l2.108,1.709l-1.582,0.607c0.631,2.123,2.402,3.756,4.604,4.191V7.852H4.383V5.736l3.706,0V5.214c-0.934-0.436-1.58-1.382-1.58-2.479C6.509,1.224,7.733,0,9.243,0s2.734,1.224,2.734,2.734c0,1.098-0.646,2.044-1.58,2.479v0.522l3.513,0v2.116h-3.513v9.436c2.218-0.421,4.007-2.062,4.642-4.199l-1.582-0.607L15.566,10.772L15.566,10.772z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  background-position: 0 0;
}

/* Alternative: Higher opacity version (uncomment if you want anchors more visible) */
/*
.v2-bg-pattern {
  opacity: 0.04;
}
*/

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.v2-main {
  min-height: calc(100vh - 300px);
  position: relative;
  padding-top: var(--space-lg);
  padding-bottom: 100px; /* Space for bottom navigation */
}

@media (max-width: 768px) {
  .v2-main {
    padding-bottom: 90px; /* Slightly less on mobile */
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Margin utilities */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Padding utilities */
.pt-xs { padding-top: var(--space-xs); }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-xs { padding-bottom: var(--space-xs); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

/* Border radius */
.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Colors */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-highlight { color: var(--color-highlight); }
.text-muted { color: var(--color-text); }

.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-light { background-color: var(--color-background); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }

  .v2-header .navbar-brand {
    font-size: 1.25rem;
  }

  .v2-header .nav-link {
    padding: 0.75rem 1rem;
  }

  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .btn {
    width: 100%;
    margin-bottom: var(--space-sm);
  }

  .section {
    padding: var(--space-lg) 0;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--color-highlight);
  outline-offset: 2px;
}

/* Skip to main content link (for accessibility) */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
}

.skip-to-main:focus {
  top: 0;
}

/* ============================================
   BOTTOM NAVIGATION V2 OVERRIDES
   ============================================ */
/* Make bottom nav solid blue to match header */
.bottom-nav {
  background: var(--color-primary) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1030 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Remove racing stripe and replace with solid blue */
.bottom-nav::before {
  display: none;
}

/* Fix bottom nav item alignment */
.bottom-nav-item,
.bottom-nav-browse-wrapper {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}

/* Equal spacing between all nav items */
.bottom-nav > *:not(:last-child) {
  margin-right: clamp(1.5rem, 8vw, 5rem) !important;
}

/* Bottom nav items - white text */
.bottom-nav-item {
  color: rgba(255, 255, 255, 0.9) !important;
}

.bottom-nav-item.active {
  color: var(--color-highlight) !important;
}

@media (hover: hover) {
  .bottom-nav-item:hover {
    color: var(--color-highlight) !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
}

/* Menu popups */
.bottom-nav-browse-menu,
.bottom-nav-account-menu,
.bottom-nav-general-menu {
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.bottom-nav-browse-item,
.bottom-nav-account-item,
.bottom-nav-general-item {
  color: var(--color-headings);
}

.bottom-nav-browse-item i,
.bottom-nav-account-item i,
.bottom-nav-general-item i {
  color: var(--color-primary);
}

.bottom-nav-browse-item:hover,
.bottom-nav-browse-item:focus,
.bottom-nav-account-item:hover,
.bottom-nav-account-item:focus,
.bottom-nav-general-item:hover,
.bottom-nav-general-item:focus {
  background-color: rgba(10, 61, 98, 0.1);
  color: var(--color-primary);
}

/* Search overlay */
.bottom-nav-search-submit {
  background-color: var(--color-primary);
}

.bottom-nav-search-submit:hover,
.bottom-nav-search-submit:focus {
  background-color: var(--color-secondary);
}

.bottom-nav-search-input:focus {
  border-color: var(--color-primary);
}

.bottom-nav-item:focus-visible {
  outline-color: var(--color-highlight);
}

.bottom-nav-browse-item:focus-visible,
.bottom-nav-account-item:focus-visible,
.bottom-nav-general-item:focus-visible {
  outline-color: var(--color-accent);
}

/* Highlight the Post button */
.bottom-nav-item-post {
  color: var(--color-accent) !important;
}

.bottom-nav-item-post:hover {
  color: var(--color-highlight) !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

/* Mobile devices (< 768px) */
@media (max-width: 767px) {
  /* Optimize bottom nav spacing for mobile */
  .bottom-nav {
    padding: 0.4rem 0 !important;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom)) !important;
  }

  .bottom-nav-item {
    min-height: 56px !important;
    padding: 0.4rem 0.2rem !important;
  }

  .bottom-nav-item i {
    font-size: 1.4rem !important;
    margin-bottom: 0.2rem !important;
  }

  .bottom-nav-item span {
    font-size: 0.7rem !important;
  }

  /* Make menus full width on mobile */
  .bottom-nav-browse-menu,
  .bottom-nav-account-menu,
  .bottom-nav-general-menu {
    min-width: 90vw !important;
    max-width: 90vw !important;
    left: 5vw !important;
    transform: translateX(0) translateY(10px) !important;
  }

  .bottom-nav-browse-menu.active,
  .bottom-nav-account-menu.active,
  .bottom-nav-general-menu.active {
    transform: translateX(0) translateY(0) !important;
  }

  .bottom-nav-browse-menu::before,
  .bottom-nav-account-menu::before,
  .bottom-nav-general-menu::before {
    left: 50% !important;
  }

  /* Larger touch targets for menu items */
  .bottom-nav-browse-item,
  .bottom-nav-account-item,
  .bottom-nav-general-item {
    padding: 1rem 1.25rem !important;
    font-size: 1rem !important;
  }

  .bottom-nav-browse-item i,
  .bottom-nav-account-item i,
  .bottom-nav-general-item i {
    font-size: 1.3rem !important;
  }

  /* Search overlay optimizations */
  .bottom-nav-search-container {
    padding: 1.25rem !important;
  }

  .bottom-nav-search-input {
    font-size: 1rem !important;
    padding: 1rem !important;
  }

  .bottom-nav-search-submit {
    padding: 1rem 1.25rem !important;
    font-size: 1rem !important;
  }
}

/* Small mobile devices (< 375px) */
@media (max-width: 374px) {
  .bottom-nav-item span {
    font-size: 0.65rem !important;
  }

  .bottom-nav-item i {
    font-size: 1.3rem !important;
  }

  /* Stack search form vertically on very small screens */
  .bottom-nav-search-form {
    flex-direction: column !important;
  }

  .bottom-nav-search-submit {
    width: 100% !important;
  }
}

/* Landscape mode on mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .bottom-nav {
    padding: 0.3rem 0 !important;
  }

  .bottom-nav-item {
    min-height: 48px !important;
    padding: 0.3rem 0.2rem !important;
  }

  .bottom-nav-item i {
    font-size: 1.2rem !important;
    margin-bottom: 0.1rem !important;
  }

  .bottom-nav-item span {
    font-size: 0.65rem !important;
  }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .bottom-nav {
    padding: 0.6rem 1rem !important;
    gap: 1rem !important;
  }

  .bottom-nav-item {
    max-width: 100px !important;
  }

  .bottom-nav-item i {
    font-size: 1.6rem !important;
  }

  .bottom-nav-item span {
    font-size: 0.8rem !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .v2-header-simple,
  .v2-footer,
  .bottom-nav,
  .btn,
  .v2-bg-pattern,
  .bottom-nav-search-overlay,
  .bottom-nav-search-container {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .v2-main {
    padding-bottom: 0;
  }
}
