/* =================================================================
   Modern Responsive CSS for HK-Wanchai.com
   Hong Kong-inspired design with mobile-first approach
   Based on recoleta-ba.com structure with Hong Kong adaptations
   ================================================================= */

/* ===== CSS VARIABLES - Hong Kong Flag Colors ===== */
:root {
  /* Hong Kong Flag Colors */
  --hk-red: #DE2910;
  --hk-white: #FFFFFF;
  --hk-red-dark: #C41E3A;
  --hk-red-light: #E85A6E;
  
  /* Extended Palette */
  --primary-red: var(--hk-red);
  --accent-gold: #FFD700;
  --text-dark: #2C3E50;
  --text-light: #6C757D;
  --white: var(--hk-white);
  --background-light: #F8F9FA;
  --border-light: #E9ECEF;
  --success-green: #28A745;
  --warning-orange: #FFC107;
  
  /* 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-red) 0%, var(--hk-red-dark) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-section {
  background-image: url('images/5197572332_d7fd4cddbb_o.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll; /* Changed from fixed for mobile compatibility */
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
}

/* Mild desaturation overlay - addressing watchpoint 1 */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg, 
    rgba(222, 41, 16, 0.15) 0%, 
    rgba(196, 30, 58, 0.2) 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 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  /* Mild background for title - addressing watchpoint 1 */
  background: rgba(0, 0, 0, 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(0, 0, 0, 0.5);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  backdrop-filter: blur(2px);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  color: #ffffff;
  display: inline-block;
  max-width: 80%;
}

/* ===== 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-red);
  text-decoration: none;
  display: flex;
  align-items: center;
}

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

/* Desktop Navigation */
.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-red);
  border-bottom-color: var(--accent-gold);
}

/* Mobile Menu Button - positioned top-right with 1rem padding */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  position: relative;
  margin-top: 1rem;
  margin-right: 1rem;
}

.mobile-menu-toggle:hover {
  background-color: var(--background-light);
  color: var(--primary-red);
}

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

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

.mobile-menu-header {
  padding: 1.5rem;
  background: var(--primary-red);
  color: var(--white);
  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.5rem;
}

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

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

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

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

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

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

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

.content-section {
  margin-bottom: 3rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  border-bottom: 3px solid var(--accent-gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--hk-red-dark);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

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

a:hover,
a:focus {
  color: var(--hk-red-dark);
  text-decoration: underline;
}

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

.callout-cultural {
  background: linear-gradient(135deg, var(--hk-white) 0%, #FFF8E1 100%);
  border-left: 4px solid var(--primary-red);
  padding: 1.5rem;
  margin: 2rem 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(--warning-orange);
  padding: 1.5rem;
  margin: 2rem 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(--success-green);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

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

/* Callout headings */
.callout-info h3,
.callout-cultural h3,
.callout-warning h3,
.callout-tip h3,
.callout-fact h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

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

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

.footer-section h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.footer-section a {
  color: var(--white);
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #555;
  color: var(--text-light);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile-specific styles */
@media (max-width: 767px) {
  :root {
    --mobile-padding: 1.5rem;
  }
  
  /* Mobile content padding */
  .main-content {
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
  }
  
  /* Allow images to go to screen edge but keep text centered */
  .full-width-mobile {
    margin-left: calc(-1 * var(--mobile-padding));
    margin-right: calc(-1 * var(--mobile-padding));
    width: calc(100% + 2 * var(--mobile-padding));
  }
  
  /* Hero adjustments for mobile */
  .hero-section {
    min-height: 50vh;
    background-attachment: scroll;
  }
  
  .hero-title {
    font-size: 2rem;
    padding: 0.4rem 0.8rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Tablet styles */
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .hero-section {
    background-attachment: fixed;
  }
}

/* Desktop styles */
@media (min-width: 1024px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  .hero-section {
    min-height: 70vh;
  }
}

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

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== BACKWARDS COMPATIBILITY ===== */
/* Support for existing class names */
.insideContent {
  padding: 1rem;
}

.insideContent p, 
.insideContent li {
  line-height: 1.6;
  color: var(--text-dark);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.indexContent p,
.indexContent li a {
  line-height: 1.7;
  color: var(--text-dark);
  font-size: 1rem;
  max-width: 100%;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-red);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-red);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}