/* ==========================================================================
   SPANSKUNDERVISNING.DK - Stylesheet
   Warm, Latin American café-inspired design
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Colors - Warm, earthy palette inspired by Argentine cafés */
  --color-cream: #FDF8F3;
  --color-warm-white: #FFFEFA;
  --color-terracotta: #C65D3B;
  --color-terracotta-dark: #A84832;
  --color-terracotta-light: #E8A090;
  --color-olive: #5C6B4A;
  --color-olive-light: #8A9A78;
  --color-espresso: #2C2420;
  --color-espresso-light: #4A403A;
  --color-sand: #E8DDD4;
  --color-gold: #D4A853;
  
  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(44, 36, 32, 0.08);
  --shadow-medium: 0 8px 30px rgba(44, 36, 32, 0.12);
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-espresso);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-terracotta);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-espresso);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--color-espresso-light);
}

.accent-text {
  color: var(--color-terracotta);
}

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

.container--narrow {
  max-width: var(--max-width-narrow);
}

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

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

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

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

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(253, 248, 243, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 36, 32, 0.08);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-soft);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-espresso);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo__icon {
  font-size: 1.75rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-espresso);
  position: relative;
  padding: var(--space-xs) 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-terracotta);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--color-terracotta);
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-espresso);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    z-index: 1001;
  }
  
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-warm-white);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-medium);
    transition: right var(--transition-base);
  }
  
  .nav.open {
    right: 0;
  }
  
  .nav__link {
    font-size: 1.25rem;
  }
  
  .nav-toggle.open .nav-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.open .nav-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-sand) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(198, 93, 59, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero__content {
  animation: fadeInUp 0.8s ease-out;
}

.hero__tagline {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-terracotta);
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background-color: rgba(198, 93, 59, 0.1);
  border-radius: var(--radius-sm);
}

.hero__title {
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: 1.35rem;
  color: var(--color-espresso-light);
  margin-bottom: var(--space-lg);
  max-width: 500px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero__image {
  position: relative;
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

.hero__image-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.hero__image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-terracotta-light);
  border-radius: var(--radius-xl);
  transform: translate(12px, 12px);
  z-index: -1;
}

/* Image placeholder styling */
.image-placeholder {
  background: linear-gradient(135deg, var(--color-sand) 0%, var(--color-terracotta-light) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg);
  color: var(--color-espresso-light);
  font-size: 0.9rem;
  min-height: 300px;
}

.image-placeholder__icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
  opacity: 0.6;
}

.image-placeholder--hero {
  aspect-ratio: 4/5;
  min-height: 450px;
}

.image-placeholder--square {
  aspect-ratio: 1/1;
}

.image-placeholder--wide {
  aspect-ratio: 16/9;
}

@media (max-width: 968px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero__cta {
    justify-content: center;
  }
  
  .hero__image {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn--primary:hover {
  background-color: var(--color-terracotta-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(198, 93, 59, 0.3);
}

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

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

.btn--outline-light {
  background-color: transparent;
  color: var(--color-terracotta);
  border: 2px solid var(--color-terracotta);
}

.btn--outline-light:hover {
  background-color: var(--color-terracotta);
  color: white;
}

/* --------------------------------------------------------------------------
   Feature Cards / USP Section
   -------------------------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.feature-card {
  background-color: var(--color-warm-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: var(--space-xs);
  color: var(--color-espresso);
}

.feature-card__text {
  color: var(--color-espresso-light);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   About Preview Section
   -------------------------------------------------------------------------- */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-preview__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.about-preview__content {
  padding: var(--space-md) 0;
}

.about-preview__title {
  margin-bottom: var(--space-md);
}

.about-preview__text {
  margin-bottom: var(--space-lg);
}

.about-preview:has(.about-preview__content:only-child) {
  display: block;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.about-preview:has(.about-preview__content:only-child) .about-preview__highlights {
  justify-content: center;
}

.about-preview:has(.about-preview__content:only-child) .btn {
  display: inline-block;
  margin: 0 auto;
}

.about-preview__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.highlight {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
  color: var(--color-espresso);
}

.highlight__icon {
  color: var(--color-olive);
  font-size: 1.25rem;
}

@media (max-width: 868px) {
  .about-preview {
    grid-template-columns: 1fr;
  }
  
  .about-preview__image {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   Course Cards
   -------------------------------------------------------------------------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.course-card {
  background-color: var(--color-warm-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.course-card__image {
  height: 200px;
  overflow: hidden;
}

.course-card__image .image-placeholder {
  height: 100%;
  min-height: unset;
}

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

.course-card__badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-olive);
  background-color: rgba(92, 107, 74, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.course-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.course-card__description {
  color: var(--color-espresso-light);
  margin-bottom: var(--space-md);
}

.course-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.course-card__detail {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-espresso-light);
}

.course-card__price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-terracotta);
  font-weight: 600;
}

@media (max-width: 768px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-dark) 100%);
  color: white;
  text-align: center;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '☕';
  position: absolute;
  font-size: 20rem;
  opacity: 0.05;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.cta-section__title {
  color: white;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.cta-section__text {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-section .btn--primary {
  background-color: white;
  color: var(--color-terracotta);
  position: relative;
  z-index: 1;
}

.cta-section .btn--primary:hover {
  background-color: var(--color-cream);
  color: var(--color-terracotta);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--color-espresso);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: white;
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: white;
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
}

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

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: white;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer__brand {
    max-width: none;
  }
  
  .footer__contact-item {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Page Header (for subpages)
   -------------------------------------------------------------------------- */
.page-header {
  padding-top: 120px;
  padding-bottom: var(--space-xl);
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-sand) 100%);
  text-align: center;
}

.page-header__title {
  margin-bottom: var(--space-sm);
}

.page-header__subtitle {
  font-size: 1.25rem;
  color: var(--color-espresso-light);
  max-width: 600px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Content Sections (for subpages)
   -------------------------------------------------------------------------- */
.content-section {
  padding: var(--space-xl) 0;
}

.content-section__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.prose {
  max-width: 700px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.prose h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

/* --------------------------------------------------------------------------
   Contact Form
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info {
  padding: var(--space-lg);
  background-color: var(--color-sand);
  border-radius: var(--radius-xl);
}

.contact-info__title {
  margin-bottom: var(--space-md);
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.contact-info__icon {
  font-size: 1.5rem;
  color: var(--color-terracotta);
  flex-shrink: 0;
}

.contact-info__label {
  font-weight: 600;
  color: var(--color-espresso);
  display: block;
  margin-bottom: 0.2rem;
}

.contact-info__value {
  color: var(--color-espresso-light);
}

.form {
  background-color: var(--color-warm-white);
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.form__group {
  margin-bottom: var(--space-md);
}

.form__label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-espresso);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--color-sand);
  border-radius: var(--radius-md);
  background-color: white;
  transition: border-color var(--transition-fast);
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-terracotta);
}

.form__textarea {
  min-height: 150px;
  resize: vertical;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Staggered animations for elements */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

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

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.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;
}
