/* =================================================================
   Modern Responsive CSS for Floating Market Bangkok
   Thailand-inspired design with mobile-first approach
   Based on recoleta-ba.com structure with Thai tourism colors
   ================================================================= */

/* ===== CSS VARIABLES - Thailand Tourism Colors ===== */
:root {
  /* Thailand Tourism Colors - Modern Web Interpretation */
  --thai-blue: #4A90C2;
  --thai-red: #D63384;
  --thai-gold: #FFC107;
  --thai-green: #28A745;
  --thai-white: #FFFFFF;
  
  /* Extended Palette */
  --primary-blue: var(--thai-blue);
  --accent-red: var(--thai-red);
  --accent-gold: var(--thai-gold);
  --nature-green: var(--thai-green);
  --text-dark: #2C3E50;
  --text-light: #6C757D;
  --white: var(--thai-white);
  --background-light: #F8F9FA;
  --border-light: #E9ECEF;
  
  /* Typography */
  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-secondary: Georgia, 'Times New Roman', serif;
  
  /* Spacing */
  --container-max-width: 1200px;
  --mobile-padding: 1.5rem;
  --section-padding: 2rem 0;
  --border-radius: 8px;
  
  /* Shadows */
  --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-strong: 0 8px 16px rgba(0,0,0,0.2);
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT STRUCTURE ===== */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--mobile-padding);
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--thai-blue) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-section {
  background-image: url('images/slide1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
}

/* Mild desaturation overlay instead of strong color overlay */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg, 
    rgba(74, 144, 194, 0.15) 0%, 
    rgba(44, 62, 80, 0.25) 100%
  );
  /* Mild desaturation filter */
  backdrop-filter: saturate(0.8) brightness(0.9);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: var(--section-padding);
}

/* Hero title with better readability */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  /* Semi-transparent background behind text */
  background: rgba(44, 62, 80, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  backdrop-filter: blur(3px);
  color: #ffffff;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 300;
  margin-bottom: 2rem;
  opacity: 1;
  background: rgba(44, 62, 80, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  backdrop-filter: blur(2px);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  color: #ffffff;
  display: inline-block;
}

/* ===== NAVIGATION ===== */
.main-navigation {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--mobile-padding);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-logo:hover {
  color: var(--accent-red);
}

/* Desktop Navigation - Hidden on Mobile */
.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  display: inline-block;
  margin-left: 2rem;
}

.nav-menu a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--primary-blue);
  border-bottom-color: var(--accent-gold);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-blue);
  cursor: pointer;
  padding: 0.5rem;
  /* Top-right positioning with ad space */
  position: relative;
  margin-top: 1rem;
  margin-right: 1rem;
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  color: var(--accent-red);
}

/* Mobile Menu Overlay - Hidden by Default */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-strong);
  z-index: 1002;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-menu-overlay.active {
  left: 0;
}

/* Force mobile menu to be visible when active class is applied */
body.menu-open .mobile-menu-overlay {
  left: 0 !important;
}

.mobile-menu-header {
  background: var(--primary-blue);
  color: var(--white);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-menu li {
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-menu a {
  display: block;
  padding: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.mobile-nav-menu a:hover {
  background-color: var(--background-light);
  color: var(--primary-blue);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: var(--section-padding);
}

/* Mobile-first responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Images go to screen edge on mobile */
@media (max-width: 768px) {
  .full-width-mobile {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }
  
  /* Text content with mobile padding */
  .content-wrapper p,
  .content-wrapper h1,
  .content-wrapper h2,
  .content-wrapper h3,
  .content-wrapper ul,
  .content-wrapper ol {
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
  }
}

/* ===== CALLOUT STYLES ===== */
.callout-info {
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border-left: 4px solid var(--primary-blue);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.callout-tip {
  background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%);
  border-left: 4px solid var(--nature-green);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.callout-warning {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  border-left: 4px solid var(--accent-gold);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.callout-cultural {
  background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD9 100%);
  border-left: 4px solid var(--accent-red);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.callout-highlight {
  background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
  border-left: 4px solid var(--accent-gold);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (min-width: 769px) {
  /* Desktop Navigation */
  .nav-menu {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .content-wrapper {
    padding: 0 2rem;
  }
  
  /* Desktop hero adjustments */
  .hero-section {
    min-height: 70vh;
  }
}

@media (min-width: 1024px) {
  .content-wrapper {
    padding: 0 3rem;
  }
}

/* ===== HOMEPAGE SPECIFIC STYLES ===== */
.welcome-section {
  padding: 2rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  border-left: 4px solid var(--primary-blue);
}

.feature-card h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.feature-card ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.feature-card li {
  margin-bottom: 0.5rem;
}

.feature-card a {
  color: var(--primary-blue);
  text-decoration: none;
}

.feature-card a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

.cta-button {
  margin-top: 1.5rem;
}

.cta-button a {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-blue), var(--thai-blue));
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.cta-button a:hover {
  background: linear-gradient(135deg, var(--accent-red), var(--thai-red));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.map-preview {
  text-align: center;
  margin: 1rem 0;
}

.map-preview img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease;
}

.map-preview img:hover {
  transform: scale(1.05);
}

.popular-markets {
  margin: 3rem 0;
}

.markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.market-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border-top: 3px solid var(--accent-gold);
}

.market-card h4 {
  margin-bottom: 0.5rem;
}

.market-card h4 a {
  color: var(--primary-blue);
  text-decoration: none;
}

.market-card h4 a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

.planning-section {
  margin: 3rem 0;
}

.planning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.planning-item {
  text-align: center;
  padding: 1rem;
}

.planning-item h4 a {
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 1.1rem;
}

.planning-item h4 a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

.luxury-section {
  margin: 3rem 0;
}

.luxury-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.luxury-item {
  text-align: center;
}

.luxury-item a {
  display: block;
  background: linear-gradient(135deg, var(--accent-gold), #FFD700);
  color: var(--text-dark);
  padding: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.luxury-item a:hover {
  background: linear-gradient(135deg, var(--accent-red), var(--thai-red));
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Mobile optimizations for homepage */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .markets-grid {
    grid-template-columns: 1fr;
  }
  
  .planning-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .luxury-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 2rem 0 1rem;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-gold);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
  font-size: 0.9rem;
}