/* Import variables */
@import url('variables.css');

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: hsl(var(--color-foreground));
  background-color: hsl(var(--color-background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Site Wrapper */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

/* Header Styles */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--color-background) / 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--color-border));
}

.header-logo {
  border-bottom: 1px solid hsl(var(--color-border) / 0.5);
  padding: var(--spacing-lg) 0;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  text-decoration: none;
  color: inherit;
}

.logo-image {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.site-title {
  font-size: var(--font-size-3xl);
  font-weight: bold;
  color: hsl(var(--color-primary));
}

.site-tagline {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: hsl(var(--color-muted-foreground));
}

/* Navigation */
.site-nav {
  padding: var(--spacing-md) 0;
}

/* Hidden checkbox for menu toggle */
.nav-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  -webkit-appearance: none;
  appearance: none;
}

/* Hamburger button (label) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer !important; /* Critical for iOS */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
}

/* Hamburger lines */
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) {
  top: 12px;
}

.nav-toggle span:nth-child(2) {
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-toggle span:nth-child(3) {
  bottom: 12px;
}

/* Hamburger animation when checked */
.nav-check:checked ~ .nav-toggle span:nth-child(1) {
  transform: translateX(-50%) rotate(45deg);
  top: 50%;
  margin-top: -1px;
}

.nav-check:checked ~ .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-check:checked ~ .nav-toggle span:nth-child(3) {
  transform: translateX(-50%) rotate(-45deg);
  bottom: 50%;
  margin-bottom: -1px;
}

.nav-menu {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-link {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  color: hsl(var(--color-foreground));
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: hsl(var(--color-primary) / 0.1);
  color: hsl(var(--color-primary));
}

/* No special styling for active nav links */

/* Hero Sections */
.hero {
  position: relative;
  height: 24rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Hero backgrounds */
.hero-main {
  background-image: url('../images/hero-background.jpg');
}

.hero-planning {
  background-image: url('https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=1920&h=800&fit=crop');
}

.hero-adventures {
  background-image: url('https://images.unsplash.com/photo-1544735716-392fe2489ffa?w=1920&h=800&fit=crop');
}

.hero-shoestring {
  background-image: url('https://images.unsplash.com/photo-1571896349842-33c89424de2d?w=1920&h=800&fit=crop');
}

.hero-cruise {
  background-image: url('https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=1920&h=800&fit=crop');
}

.hero-stories {
  background-image: url('https://images.unsplash.com/photo-1552550049-db097c9480d1?w=1920&h=800&fit=crop');
}

/* Hero overlays */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0.9;
}

.hero-overlay-planning {
  background: linear-gradient(to right, rgba(30, 58, 138, 0.8), rgba(37, 99, 235, 0.7), rgba(67, 56, 202, 0.8));
}

.hero-overlay-adventures {
  background: linear-gradient(to right, rgba(124, 45, 18, 0.8), rgba(185, 28, 28, 0.7), rgba(180, 83, 9, 0.8));
}

.hero-overlay-shoestring {
  background: linear-gradient(to right, rgba(20, 83, 45, 0.8), rgba(13, 148, 136, 0.7), rgba(6, 95, 70, 0.8));
}

.hero-overlay-cruise {
  background: linear-gradient(to right, rgba(8, 145, 178, 0.8), rgba(37, 99, 235, 0.7), rgba(3, 105, 161, 0.8));
}

.hero-overlay-stories {
  background: linear-gradient(to right, rgba(88, 28, 135, 0.8), rgba(79, 70, 229, 0.7), rgba(109, 40, 217, 0.8));
}

/* Page Hero Overlays */
.hero-overlay-page-default {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

.hero-overlay-page-blue {
  background: linear-gradient(to right, rgba(30, 58, 138, 0.8), rgba(37, 99, 235, 0.7), rgba(67, 56, 202, 0.8));
}

.hero-overlay-page-orange {
  background: linear-gradient(to right, rgba(124, 45, 18, 0.8), rgba(185, 28, 28, 0.7), rgba(180, 83, 9, 0.8));
}

.hero-overlay-page-green {
  background: linear-gradient(to right, rgba(20, 83, 45, 0.8), rgba(13, 148, 136, 0.7), rgba(6, 95, 70, 0.8));
}

.hero-overlay-page-purple {
  background: linear-gradient(to right, rgba(88, 28, 135, 0.8), rgba(79, 70, 229, 0.7), rgba(109, 40, 217, 0.8));
}

.hero-overlay-page-pink {
  background: linear-gradient(to right, rgba(219, 39, 119, 0.8), rgba(236, 72, 153, 0.7), rgba(190, 24, 93, 0.8));
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  padding: 0 var(--container-padding);
}

.hero-text {
  max-width: 64rem;
  margin: 0 auto;
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: bold;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--font-size-6xl);
  }
}

.hero-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-planning {
  background: var(--gradient-planning);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-adventures {
  background: var(--gradient-adventures);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-shoestring {
  background: var(--gradient-shoestring);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-cruise {
  background: var(--gradient-cruise);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-stories {
  background: var(--gradient-stories);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Page Hero Gradients (Custom Fields) */
.hero-gradient-page-blue {
  background: var(--gradient-planning);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-page-orange {
  background: var(--gradient-adventures);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-page-green {
  background: var(--gradient-shoestring);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-page-purple {
  background: var(--gradient-cruise);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-page-pink {
  background: var(--gradient-stories);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xl);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero-description {
    font-size: var(--font-size-xl);
  }
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-lg);
  font-weight: bold;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elegant);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-button:hover {
  transform: scale(1.05);
}

.hero-button-planning,
.hero-button-adventures,
.hero-button-shoestring,
.hero-button-cruise,
.hero-button-stories {
  background: white;
  color: hsl(var(--color-foreground));
}

.hero-button-planning:hover {
  background: hsl(219 100% 95%);
  color: hsl(219 70% 45%);
}

.hero-button-adventures:hover {
  background: hsl(25 100% 95%);
  color: hsl(25 70% 45%);
}

.hero-button-shoestring:hover {
  background: hsl(142 100% 95%);
  color: hsl(142 70% 25%);
}

.hero-button-cruise:hover {
  background: hsl(199 100% 95%);
  color: hsl(199 70% 35%);
}

.hero-button-stories:hover {
  background: hsl(270 100% 95%);
  color: hsl(270 60% 45%);
}

/* Page Hero Buttons (Custom Fields) */
.hero-button-page-blue,
.hero-button-page-orange,
.hero-button-page-green,
.hero-button-page-purple,
.hero-button-page-pink {
  background: white;
  color: hsl(var(--color-foreground));
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-lg);
  font-weight: bold;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elegant);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-button-page-blue:hover {
  background: hsl(219 100% 95%);
  color: hsl(219 70% 45%);
  transform: scale(1.05);
}

.hero-button-page-orange:hover {
  background: hsl(25 100% 95%);
  color: hsl(25 70% 45%);
  transform: scale(1.05);
}

.hero-button-page-green:hover {
  background: hsl(142 100% 95%);
  color: hsl(142 70% 25%);
  transform: scale(1.05);
}

.hero-button-page-purple:hover {
  background: hsl(270 100% 95%);
  color: hsl(270 60% 45%);
  transform: scale(1.05);
}

.hero-button-page-pink:hover {
  background: hsl(330 100% 95%);
  color: hsl(330 70% 45%);
  transform: scale(1.05);
}

.button-icon {
  width: 20px;
  height: 20px;
}

/* Content Feed */
.content-feed {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: bold;
  margin-bottom: var(--spacing-xl);
}

.featured-section {
  margin-bottom: var(--spacing-3xl);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--spacing-3xl);
}

/* Pagination */
.pagination {
  margin-top: var(--spacing-3xl);
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
}

/* Footer */
.site-footer {
  background: hsl(var(--color-muted));
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  margin-top: var(--spacing-3xl);
}

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

.footer-title {
  font-size: var(--font-size-lg);
  font-weight: bold;
  margin-bottom: var(--spacing-md);
}

.footer-text {
  color: hsl(var(--color-muted-foreground));
  line-height: 1.6;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: var(--spacing-sm);
}

.footer-nav a {
  color: hsl(var(--color-muted-foreground));
  text-decoration: none;
}

.footer-nav a:hover {
  color: hsl(var(--color-primary));
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  position: relative;
  flex-wrap: wrap;
}

/* Hide messages by default */
.newsletter-form .message-success,
.newsletter-form .message-error {
  display: none;
  width: 100%;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
}

.newsletter-form .message-success {
  background: hsl(var(--color-success-100, 120 60% 95%));
  color: hsl(var(--color-success-800, 120 60% 25%));
  border: 1px solid hsl(var(--color-success-200, 120 60% 85%));
}

.newsletter-form .message-error {
  background: hsl(var(--color-error-100, 0 60% 95%));
  color: hsl(var(--color-error-800, 0 60% 25%));
  border: 1px solid hsl(var(--color-error-200, 0 60% 85%));
}

/* Show messages based on form state */
.newsletter-form.success .message-success {
  display: block;
}

.newsletter-form.error .message-error {
  display: block;
}

/* Hide form inputs on success */
.newsletter-form.success .newsletter-input,
.newsletter-form.success .newsletter-button {
  display: none;
}

/* Loading state */
.newsletter-form.loading .newsletter-button {
  opacity: 0.7;
  cursor: wait;
}

.newsletter-input {
  flex: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid hsl(var(--color-border));
  border-radius: var(--radius-md);
}

.newsletter-button {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: hsl(var(--color-primary));
  color: hsl(var(--color-primary-foreground));
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.newsletter-button:hover {
  opacity: 0.9;
}

.footer-bottom {
  border-top: 1px solid hsl(var(--color-border));
  padding-top: var(--spacing-xl);
  text-align: center;
  color: hsl(var(--color-muted-foreground));
}

.footer-bottom a {
  color: hsl(var(--color-primary));
  text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-toggle {
    display: block;
    margin-left: auto;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: hsl(var(--color-background));
    border-bottom: 1px solid hsl(var(--color-border));
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    z-index: 1000;
  }
  
  /* Show menu when checkbox is checked */
  .nav-check:checked ~ .nav-menu {
    display: flex;
    animation: slideDown 0.3s ease-out;
  }
  
  /* iOS-friendly animation */
  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
    }
    to {
      opacity: 1;
      max-height: 500px;
    }
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: var(--spacing-sm) 0;
  }
}