/* ========================================
   FJALLSÁRLÓN GLACIER - DESIGN SYSTEM
   ======================================== */

:root {
  /* Color Palette - Glacier Blues & Icy Whites */
  --glacier-blue: #4A90A4;
  --deep-ice: #2C5F75;
  --ice-white: #F0F8FF;
  --slate-gray: #4F5D75;
  --dark-slate: #2D3748;
  --accent-teal: #5BA5B8;
  --text-dark: #1A202C;
  --text-light: #E2E8F0;
  --border-light: #E2E8F0;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-accent: 'Outfit', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--ice-white);
  overflow-x: hidden;
}

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

a {
  color: var(--glacier-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-teal);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-accent);
  line-height: 1.2;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
  color: var(--dark-slate);
}

.container>*:first-child,
section>*:first-child,
.hero-content>*:first-child {
  margin-top: 0;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-sm);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.section-dark {
  background-color: var(--dark-slate);
  color: var(--text-light);
}

/* Ensure headings in dark sections are light by default */
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
  color: var(--ice-white);
}

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

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
  background: linear-gradient(135deg, var(--glacier-blue), var(--deep-ice));
  padding: var(--space-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.nav-brand {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ice-white);
}

.nav-menu {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-link {
  color: var(--ice-white);
  font-weight: 500;
  padding: var(--space-xs) 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--ice-white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ice-white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: calc(100vh - 60px);
    background-color: var(--dark-slate);
    flex-direction: column;
    gap: 0;
    padding: var(--space-lg);
    transition: var(--transition);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    display: block;
    padding: var(--space-sm);
  }

  .btn-nav {
    display: block;
    margin: var(--space-md) var(--space-sm) 0;
    text-align: center;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: linear-gradient(rgba(44, 95, 117, 0.6), rgba(44, 95, 117, 0.6)),
    url('../images/glacier_hero.webp');
  background-size: cover;
  background-position: center;
  color: var(--ice-white);
  text-align: center;
  padding: var(--space-2xl) 0;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  color: var(--ice-white);
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: var(--glacier-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}

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

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

.btn-nav {
  background-color: var(--accent-teal);
  color: white;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.9rem;
  border-radius: var(--border-radius);
}

.btn-nav:hover {
  background-color: var(--glacier-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}

/* ========================================
   CARDS
   ======================================== */

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

.card {
  background-color: white;
  color: var(--text-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
  color: var(--dark-slate);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  background-color: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-gray);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.card-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content .btn {
  margin-top: auto;
  align-self: flex-start;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  margin-top: 0;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background-color: var(--dark-slate);
  color: var(--text-light);
  padding: var(--space-xl) 0 var(--space-md);
}

.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(--ice-white);
  margin-bottom: var(--space-sm);
}

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

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--text-light);
}

.footer-links a:hover {
  color: var(--accent-teal);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--slate-gray);
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  h1 {
    font-size: 1.75rem;
  }
}