/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&family=Roboto&family=Roboto+Mono&display=swap');

/* CSS Variables */
:root {
  /* Colors */
  --primary-blue: #5065A8;
  --dark-blue: #3A4980;
  --secondary-dark: #2A2A2A;
  --primary-light: #F2EEE4;
  --secondary-light: #E4E7F2;
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  
  /* Typography */
  --heading-font: 'Lato', sans-serif;
  --body-font: 'Roboto', sans-serif;
  --mono-font: 'Roboto Mono', monospace;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  
  /* Other */
  --border-radius: 8px;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
  --transition-standard: all 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  background-color: var(--light-gray);
  color: var(--secondary-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--dark-blue);
}

/* ============================================
   BASE STYLES - Used across entire site
   ============================================ */

/* Layout Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-sm);
}

.section {
  padding: var(--space-lg) 0;
}

.section--light {
  background-color: var(--light-gray);
}

.section--dark {
  background-color: var(--secondary-dark);
  color: var(--primary-light);
}

.section h2 {
  text-align: center;
}

/* ============================================
   TYPOGRAPHY - Universal text styles
   ============================================ */

.heading {
  font-family: var(--heading-font);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--secondary-dark);
}

.heading--xl { font-size: 2.5rem; }
.heading--lg { font-size: 2rem; }
.heading--md { font-size: 1.5rem; color: var(--primary-blue); }
.heading--sm { font-size: 1.2rem; }

.heading--light { color: var(--white); }
.heading--primary { color: var(--primary-blue); }

.text {
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.text--sm { font-size: 0.9rem; }
.text--lg { font-size: 1.1rem; }
.text--muted { color: var(--secondary-dark); opacity: 0.8; }
.text--center { text-align: center; }

.link {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.link:hover {
  color: var(--dark-blue);
}

.link--light {
  color: var(--primary-light);
}

.link--light:hover {
  color: var(--white);
}

/* ============================================
   COMPONENTS - Reusable UI elements
   ============================================ */

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-standard);
  text-align: center;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn--primary:hover {
  background-color: var(--dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: var(--white)
}

.btn--secondary {
  background-color: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn--secondary:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn--light {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn--light:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Button container for centering */
.btn-group {
  text-align: center;
  margin: var(--space-md) 0;
}

.btn-group .btn {
  margin: 0 var(--space-xs);
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-standard);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.card__image {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__image img {
  transform: scale(1.05);
}

.card__content {
  padding: var(--space-md);
}

.card__content--overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(42,42,42,0.9), transparent);
  color: var(--white);
}

/* Card Overlay Style - Improved */
.card--overlay {
  position: relative;
  overflow: hidden;
}

.card--overlay .card__content--overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(42,42,42,0.95) 0%, rgba(42,42,42,0.7) 30%, transparent 100%);
  color: var(--white);
  transform: translateY(calc(100% - 60px)); /* Show only title area */
  transition: transform 0.3s ease;
}

/* Show just the title by default */
.card--overlay .heading {
  margin-bottom: var(--space-sm);
}

/* Hide excerpt and link by default */
.card--overlay .text,
.card--overlay .link {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* On hover, reveal everything */
.card--overlay:hover .card__content--overlay {
  transform: translateY(0);
}

.card--overlay:hover .text,
.card--overlay:hover .link {
  opacity: 1;
  transform: translateY(0);
}

/* Horizontal Story Cards */
.story-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-standard);
  display: flex;
  margin-bottom: var(--space-md);
}

.story-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
}

.story-card__image {
  width: 300px;
  min-height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.story-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.story-card:hover .story-card__image img {
  transform: scale(1.05);
}

.story-card__content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.story-card__title {
  margin-bottom: var(--space-sm);
  font-size: 1.4rem;
  line-height: 1.3;
}

.story-card__excerpt {
  color: var(--secondary-dark);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  flex-grow: 1;
}

.story-card__meta {
  font-family: var(--mono-font);
  font-size: 0.85rem;
  color: var(--primary-blue);
}

/* Ensure text remains readable */
.card--overlay .heading--light,
.card--overlay .text,
.card--overlay .link--light {
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Image Heights */
.img-height--sm { height: 180px; }
.img-height--md { height: 220px; }
.img-height--lg { height: 260px; }
.img-height--xl { height: 300px; }

/* Grids */
.grid {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.grid--1 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.grid--gap-sm { gap: var(--space-sm); }
.grid--gap-lg { gap: var(--space-lg); }

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-divider {
  width: 60px;
  height: 3px;
  background-color: var(--primary-blue);
  margin: var(--space-sm) auto var(--space-md);
}

/* Hero Sections */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 40vh;
  max-height: 600px;
  height: 50vh;
  margin-top: 60px;
}

.hero.mt-5 {
  margin-top: 60px !important;
}

.hero--tall { 
  height: 60vh;
  max-height: 700px; 
}
.hero--full { 
  min-height: 100vh; 
  max-height: none;
}

.hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(42,42,42,0.3), rgba(42,42,42,0.7));
}

.hero__content {
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 var(--space-md);
  z-index: 2;
}

/* Meta Information */
.meta {
  display: flex;
  gap: var(--space-md);
  font-family: var(--mono-font);
  font-size: 0.85rem;
  color: var(--primary-blue);
}

.meta--divided {
  justify-content: space-between;
  border-top: 1px solid var(--light-gray);
  padding-top: var(--space-xs);
  margin-top: var(--space-sm);
}

.meta__tag {
  background-color: var(--secondary-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

/* States */
.is-loading { opacity: 0.6; pointer-events: none; }
.is-hidden { display: none; }
.is-visible { display: block; }

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

@media (max-width: 768px) {
  .heading--xl { font-size: 2rem; }
  .heading--lg { font-size: 1.5rem; }
  
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  
  .hero { height: 45vh; }
  .hero--tall { height: 55vh; }
  
  .hide-mobile { display: none; }
  .show-mobile { display: block; }

  .story-card {
    flex-direction: column;
  }
  
  .story-card__image {
    width: 100%;
    height: 200px;
  }
  
  .story-card__content {
    padding: var(--space-sm);
  }
}

/* Load More Button */
.load-more {
  text-align: center;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 1400px) {
  .hide-desktop { display: none; }
  .show-desktop { display: block; }
}

/* ============================================
  Navigation and Footer Components
   ============================================ */

.nav {
  background-color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

.nav__list {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.nav__item {
  margin: 0;
}

.nav__link {
  display: block;
  color: var(--secondary-dark);
  padding: var(--space-md) var(--space-sm);
  font-family: var(--heading-font);
  text-decoration: none;
  position: relative;
}

.nav__link:hover,
.nav__link--active {
  color: var(--primary-blue);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
}
.footer {
  background-color: var(--secondary-dark);
  color: var(--primary-light);
  padding: var(--space-lg) 0 var(--space-sm);
  margin-top: auto;
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__section h3 {
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   PHOTO STORY SPECIFIC STYLES
   ============================================ */

/* Story Content Layout */
.story-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.story-content .text {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.story-content .text--lg {
  font-size: 1.25rem;
  line-height: 1.7;
  font-weight: 300;
}

/* Story Images */
.story-image {
  margin: var(--space-lg) 0;
  text-align: center;
}

.story-image img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

/* Story Details Section */
.story-details {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--light-gray);
}

/* Gear List */
.gear-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.gear-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--light-gray);
}

.gear-list li:last-child {
  border-bottom: none;
}

/* Section Divider within Story */
.story-content hr.section-divider {
  margin: var(--space-xl) auto;
  width: 100px;
}

/* Responsive Adjustments for Stories */
@media (max-width: 768px) {
  .story-content .text {
    font-size: 1rem;
  }
  
  .story-content .text--lg {
    font-size: 1.1rem;
  }
  
  .story-image {
    margin: var(--space-md) -var(--space-sm);
  }
  
  .story-image img {
    border-radius: 0;
  }
}

.affiliate-disclosure {
  background-color: var(--secondary-light);
  border: 1px solid var(--primary-blue);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  font-size: 0.9rem;
  color: var(--secondary-dark);
}

.affiliate-disclosure strong {
  color: var(--primary-blue);
}