/**
 * Axom Home - Base Styles & Global Layout
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--text-muted);
  font-size: 0.975rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Main Container Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container-wide {
  max-width: var(--max-width-wide);
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  flex: 1;
  padding-bottom: calc(var(--bottom-nav-height) + 24px); /* ensure content never covered by mobile nav */
}

@media (min-width: 1024px) {
  #main-content {
    padding-bottom: var(--space-3xl);
  }
}

/* ==========================================
   DESKTOP & TABLET HEADER NAVBAR
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-normal);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: var(--space-xs);
}

.header-brand img {
  height: 44px;
  width: auto;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: var(--space-sm);
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-subtle);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-subtle);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Language Selector Dropdown */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.lang-btn:hover, .lang-btn:focus {
  background: var(--bg-card);
  border-color: var(--border-brand);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}

.lang-dropdown.show {
  display: flex;
  animation: fadeInDown 0.2s ease-out;
}

.lang-option {
  padding: 8px 12px;
  text-align: left;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background var(--transition-fast);
}

.lang-option:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.lang-option.active {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 700;
}

/* Notification Bell */
.notification-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.notification-bell:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent-red);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
}

/* Post Property CTA Button in Header */
.btn-header-post {
  display: none;
}

@media (min-width: 768px) {
  .btn-header-post {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--primary);
    color: var(--text-inverse) !important;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
  }

  .btn-header-post:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--space-xs);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: var(--z-bottom-nav);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (min-width: 1024px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-width: 58px;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active svg {
  transform: translateY(-2px);
  stroke: var(--primary);
  stroke-width: 2.2;
}

/* Special Post Action Center Button in Bottom Nav */
.bottom-nav-item.post-btn-center {
  position: relative;
  top: -12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white !important;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(12, 90, 55, 0.4);
  padding: 0;
  border: 3px solid white;
}

.bottom-nav-item.post-btn-center svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.bottom-nav-item.post-btn-center span {
  display: none;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background-color: var(--bg-dark);
  color: #94A3B8;
  padding-top: var(--space-3xl);
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-2xl));
  margin-top: auto;
  border-top: 1px solid #1E293B;
}

@media (min-width: 1024px) {
  .site-footer {
    padding-bottom: var(--space-2xl);
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
  }
}

.footer-brand p {
  color: #94A3B8;
  font-size: 0.9rem;
  margin-top: var(--space-sm);
  max-width: 320px;
}

.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #FBBF24;
}

.footer-disclaimer-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-xl);
  font-size: 0.825rem;
  color: #CBD5E1;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* Keyframe Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
