/* ===========================================
   LocalLens.Homes – Shared Styles
   =========================================== */

/* CSS Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --deep: #0f2c3d;
  --warm: #c4452b;
  --sand: #f8f1e5;
  --stone: #5a6b7a;
  --white: #ffffff;
  --text: #1a2a3a;
  --transition: 0.3s ease;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip Navigation */
.skip-nav {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--warm);
  color: white;
  padding: 10px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
  transition: top var(--transition);
}

.skip-nav:focus {
  top: 0;
}

/* ===========================================
   Header & Navigation
   =========================================== */

header {
  background: var(--deep);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: white;
}

.logo span {
  color: var(--warm);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--warm);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--warm);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.emergency {
  background: var(--warm);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
  color: white;
  transition: background var(--transition);
}

.emergency:hover {
  background: #a83824;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-left: 1rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================================
   Buttons
   =========================================== */

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--warm);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  margin: 0.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover,
.btn:focus {
  background: #a83824;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(196, 69, 43, 0.3);
  outline: none;
}

.btn:focus-visible {
  outline: 3px solid rgba(196, 69, 43, 0.5);
  outline-offset: 2px;
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
}

.btn-outline:hover,
.btn-outline:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.btn-dark {
  background: var(--deep);
  border-color: var(--deep);
}

.btn-dark:hover,
.btn-dark:focus {
  background: #0a1f2c;
}

/* ===========================================
   Footer
   =========================================== */

footer {
  background: var(--deep);
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

footer p:last-child {
  opacity: 0.7;
  font-size: 0.9rem;
}

footer a {
  color: white;
  text-decoration: none;
  transition: opacity var(--transition);
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===========================================
   Fade-in Animation
   =========================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional stagger for small sibling groups (e.g., tour cards, why-grid items) */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* ===========================================
   Common Components
   =========================================== */

.story-note {
  background: var(--sand);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--warm);
  margin: 3rem 0;
  font-style: italic;
}

.crisis-story {
  background: var(--sand);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  border-left: 4px solid var(--warm);
}

/* ===========================================
   Dark Mode
   =========================================== */

[data-theme="dark"] {
  --deep: #1a3a52;
  --sand: #1e2d3d;
  --white: #1a2533;
  --text: #d8e6f0;
  --stone: #8ba5bb;
  --shadow: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  background-color: #121e2a;
  color: var(--text);
}

[data-theme="dark"] header {
  background: #0a1520;
}

[data-theme="dark"] .tour-card,
[data-theme="dark"] .planning-card,
[data-theme="dark"] .testimonial-card {
  background: #1a2d3d;
  color: var(--text);
}

[data-theme="dark"] .story-block {
  background: #1a2d3d;
  color: var(--text);
}

[data-theme="dark"] .featured-box,
[data-theme="dark"] .what-happens,
[data-theme="dark"] .inclusions-box,
[data-theme="dark"] .why-item,
[data-theme="dark"] .why-choose-item,
[data-theme="dark"] .day-card,
[data-theme="dark"] .note-box,
[data-theme="dark"] .crisis-story,
[data-theme="dark"] .story-note {
  background: #1e2d3d;
  color: var(--text);
}

[data-theme="dark"] .cred-badge {
  background: #1e2d3d;
  color: #d8e6f0;
}

[data-theme="dark"] footer {
  background: #0a1520;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
  transition: background var(--transition), border-color var(--transition);
  padding: 0;
  color: white;
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.dark-mode-toggle:focus-visible {
  outline: 3px solid rgba(196, 69, 43, 0.5);
  outline-offset: 2px;
}

/* CSS crescent moon icon for light mode */
.dark-mode-toggle::after {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset -4px 1px 0 0 white;
}

/* CSS filled circle (sun) icon for dark mode */
[data-theme="dark"] .dark-mode-toggle::after {
  background: white;
  box-shadow: 0 0 0 2px #1a3a52, 0 0 0 4px white;
  width: 10px;
  height: 10px;
}

/* ===========================================
   WhatsApp Floating Action Button
   =========================================== */

.whatsapp-fab {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 500;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab:focus-visible {
  outline: 3px solid #25d366;
  outline-offset: 3px;
}

/* ===========================================
   Sticky Mobile CTA
   =========================================== */

.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--deep);
  padding: 0.75rem 1rem;
  z-index: 400;
  text-align: center;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
}

.sticky-cta .btn {
  margin: 0;
  padding: 0.75rem 2rem;
  width: 100%;
  max-width: 300px;
}

@media (max-width: 768px) {
  .sticky-cta {
    display: block;
  }

  .whatsapp-fab {
    bottom: 5.5rem;
  }
}

/* Responsive: hide dark mode toggle label on very small screens */
@media (max-width: 360px) {
  .dark-mode-toggle {
    display: none;
  }
}


@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    background: var(--deep);
    flex-direction: column;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    margin: 0;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links a::after {
    display: none;
  }

  .logo {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .emergency {
    display: none;
  }
}
