/**
 * TrekOn Modern Design System
 * A bold, professional design inspired by AllTrails, Komoot, and modern outdoor brands
 */

:root {
  /* Color System */
  --primary-green: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-light: #4caf50;
  --accent-orange: #ff6b35;
  --accent-blue: #2196f3;
  
  /* Neutrals */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-sans);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

/* Global Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-top: 0;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

/* Header Styling */
.site-header,
header.wp-block-template-part {
  background: var(--white) !important;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--gray-200);
}

/* Navigation Complete Overhaul */
.wp-block-navigation {
  padding: 0 !important;
  margin: 0 !important;
}

.wp-block-navigation__container {
  gap: 0 !important;
}

.wp-block-navigation-item {
  margin: 0 !important;
}

.wp-block-navigation-item__content,
.wp-block-navigation-link__content {
  padding: 1.25rem 1.5rem !important;
  color: var(--gray-700) !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  position: relative;
  background: transparent !important;
}

.wp-block-navigation-item__content:hover,
.wp-block-navigation-link__content:hover {
  color: var(--primary-green) !important;
  background: var(--gray-50) !important;
}

/* Active Menu Item */
.current-menu-item > .wp-block-navigation-item__content,
.current-menu-item > .wp-block-navigation-link__content {
  color: var(--primary-green) !important;
}

.current-menu-item > .wp-block-navigation-item__content::after,
.current-menu-item > .wp-block-navigation-link__content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  background: var(--primary-green);
}

/* Hero Section Styling */
.wp-block-cover {
  min-height: 500px !important;
}

.wp-block-cover__inner-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.wp-block-cover h1 {
  color: var(--white) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.wp-block-cover p {
  color: var(--white) !important;
  font-size: 1.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Main Content Area */
main,
.site-main,
.wp-site-blocks {
  background: var(--gray-50);
  min-height: calc(100vh - 200px);
}

/* Container Widths */
.wp-block-group__inner-container,
.wp-block-post-content,
.entry-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Cards and Blocks */
.wp-block-group {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

/* Buttons */
.wp-block-button__link,
.wp-element-button,
button,
.button {
  background: var(--primary-green) !important;
  color: var(--white) !important;
  padding: 0.75rem 2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  display: inline-block;
  font-size: 1rem !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
button:hover,
.button:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Links */
a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--white);
  color: var(--gray-900);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Footer */
footer,
.site-footer {
  background: var(--gray-900) !important;
  color: var(--gray-300) !important;
  padding: 3rem 0;
  margin-top: 4rem;
}

footer a,
.site-footer a {
  color: var(--gray-300) !important;
}

footer a:hover,
.site-footer a:hover {
  color: var(--white) !important;
}

/* Trek Specific Page Styling */
.treks-header {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.treks-header h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.treks-header p {
  font-size: 1.25rem;
  opacity: 0.95;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .wp-block-navigation-item__content,
  .wp-block-navigation-link__content {
    padding: 1rem !important;
    font-size: 0.9rem !important;
  }
  
  .wp-block-group__inner-container,
  .wp-block-post-content,
  .entry-content {
    padding: 1rem;
  }
}

/* Fix for specific TwentyTwentyFour issues */
.wp-block-navigation:not(.has-background) {
  background: transparent !important;
}

.wp-block-navigation ul {
  background: transparent !important;
}

/* Ensure all text is visible */
p, span, div, li, td, th {
  color: var(--gray-900);
}

/* Override any white text on white background */
.has-white-color {
  color: var(--gray-900) !important;
}

.has-white-background-color {
  background-color: var(--gray-50) !important;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}