/* Villa Somosenranta - Modern Nordic Nature Theme */
/* ================================================ */

/* CSS Variables */
:root {
  /* Premium Lapland Luxury Color Palette */
  --color-forest-deep: #081a11;   /* Richer, darker midnight pine */
  --color-forest: #153223;        /* Elegant, cool deep evergreen */
  --color-forest-light: #24523a;  /* Brighter, distinguished green */
  --color-lake: #214050;          /* Deep ice/arctic blue */
  --color-lake-light: #446e82;
  --color-lake-pale: #b8d2de;
  --color-wood: #ba903c;          /* Elegant warm gold/brass */
  --color-wood-light: #d6af5d;    /* Bright gold for hover accent */
  --color-birch: #f4f1ea;         /* Very subtle warm gray/beige */
  --color-cream: #faf9f6;         /* Extremely crisp cream background */
  --color-snow: #ffffff;
  --color-charcoal: #111827;      /* Sharper text contrast */
  --color-slate: #374151;         /* Deep slate for subtitles */
  --color-muted: #6b7280;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-xxl: 8rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows - Softer and more premium */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

  /* Border Radius - Refined architecture (less rounded) */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* Reset & Base */
*, *::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: 1rem;
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-forest-deep);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--color-slate);
}

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

a:hover {
  color: var(--color-lake);
}

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

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }

/* Language Toggle System */
[lang="fi"] .lang-en,
[lang="en"] .lang-fi {
  display: none !important;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) 0;
  background: transparent;
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.header.scrolled .nav-link {
  color: var(--color-charcoal);
}

.header.scrolled .logo-text {
  color: var(--color-forest);
}

.header.scrolled .logo img {
  /* Transforms the white logo into the var(--color-forest) hex #153223 */
  filter: brightness(0) saturate(100%) invert(14%) sepia(25%) saturate(2206%) hue-rotate(108deg) brightness(97%) contrast(89%);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.logo img {
  height: 50px;
  width: auto;
  transition: filter var(--transition-normal);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-snow);
  transition: color var(--transition-normal);
}

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

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-snow);
  transition: color var(--transition-fast);
  padding: var(--space-xs) 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-wood-light);
  transition: width var(--transition-normal);
}

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.15);
  padding: 4px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(5px);
}

.header.scrolled .lang-switcher {
  background: rgba(45, 80, 22, 0.1);
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-snow);
}

.header.scrolled .lang-btn {
  color: var(--color-charcoal);
}

.lang-btn.active {
  background: var(--color-snow);
  color: var(--color-forest);
}

.header.scrolled .lang-btn.active {
  background: var(--color-forest);
  color: var(--color-snow);
}

.lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-snow);
  transition: all var(--transition-fast);
}

.header.scrolled .menu-toggle span {
  background: var(--color-charcoal);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-charcoal);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../../images/1_large.jpeg') center/cover no-repeat;
  opacity: 0.7;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 36, 16, 0.6) 0%,
    rgba(15, 36, 16, 0.4) 50%,
    rgba(250, 248, 244, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  max-width: 900px;
}

.hero-logo {
  width: 260px;
  height: auto;
  margin: 0 auto var(--space-md);
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.hero h1 {
  color: var(--color-snow);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
  font-weight: 300;
}

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

.scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  color: var(--color-snow);
  opacity: 0.7;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

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

.btn-primary {
  background: var(--color-wood);
  color: var(--color-snow);
  border-color: var(--color-wood);
}

.btn-primary:hover {
  background: var(--color-wood-light);
  border-color: var(--color-wood-light);
  color: var(--color-snow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-snow);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: var(--color-snow);
  color: var(--color-forest);
  border-color: var(--color-snow);
}

.btn-secondary {
  background: var(--color-forest);
  color: var(--color-snow);
  border-color: var(--color-forest);
}

.btn-secondary:hover {
  background: var(--color-forest-light);
  border-color: var(--color-forest-light);
  color: var(--color-snow);
}

/* Section Base */
.section {
  padding: var(--space-xxl) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.1rem;
}

/* About Section */
.about {
  background: var(--color-cream);
}

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

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-image:hover img {
  transform: scale(1.03);
}

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

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

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

/* Features Section */
.features {
  background: linear-gradient(135deg, var(--color-forest-deep) 0%, var(--color-forest) 100%);
  color: var(--color-snow);
}

.features .section-header h2 {
  color: var(--color-snow);
}

.features .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-sm);
  background: var(--color-wood);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-snow);
}

.feature-card h4 {
  color: var(--color-snow);
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Gallery Section */
.gallery {
  background: var(--color-birch);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-link {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}

/* Prices Section */
.prices {
  background: var(--color-cream);
}

.prices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.price-card {
  background: var(--color-snow);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.price-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.price-card.featured {
  border-color: var(--color-wood);
  position: relative;
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-wood);
  color: var(--color-snow);
  padding: 4px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
}

.price-period {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-birch);
}

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

.price-amount .value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-forest-deep);
  font-family: var(--font-heading);
}

.price-amount .unit {
  font-size: 1rem;
  color: var(--color-muted);
}

.price-details {
  list-style: none;
  margin-bottom: var(--space-md);
}

.price-details li {
  padding: var(--space-xs) 0;
  color: var(--color-slate);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.price-details li svg {
  width: 16px;
  height: 16px;
  color: var(--color-forest);
}

/* Calendar Section */
.calendar {
  background: var(--color-birch);
}

.calendar-wrapper {
  background: var(--color-snow);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calendar-wrapper iframe {
  border-radius: var(--radius-md);
}

/* Reserve Section */
.reserve {
  background: linear-gradient(135deg, var(--color-lake) 0%, var(--color-forest) 100%);
  color: var(--color-snow);
}

.reserve .section-header h2 {
  color: var(--color-snow);
}

.reserve .section-header p {
  color: rgba(255, 255, 255, 0.9);
}

.reserve-wrapper {
  background: var(--color-snow);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
}

.reserve-wrapper iframe {
  border-radius: var(--radius-md);
}

/* Map Section */
.map {
  height: 500px;
  position: relative;
}

.map iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(20%);
}

/* Contact Section */
.contact {
  background: var(--color-cream);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

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

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

.contact-item svg {
  width: 24px;
  height: 24px;
  color: var(--color-forest);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item p {
  margin: 0;
}

.contact-item a {
  color: var(--color-forest);
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-link {
  width: 44px;
  height: 44px;
  background: var(--color-forest);
  color: var(--color-snow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-lake);
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.footer {
  background: var(--color-forest-deep);
  color: var(--color-snow);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo img {
  height: 40px;
}

.footer-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

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

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

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--color-snow);
  cursor: pointer;
  padding: var(--space-xs);
}

.lightbox-close svg {
  width: 32px;
  height: 32px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--color-snow);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

.lightbox-nav svg {
  width: 24px;
  height: 24px;
}

/* Mobile Navigation */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-forest-deep);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--color-snow);
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1002;
}

.mobile-menu-close svg {
  width: 32px;
  height: 32px;
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
}

.mobile-nav-links li {
  margin-bottom: var(--space-md);
}

.mobile-nav-links a {
  font-size: 1.5rem;
  color: var(--color-snow);
  font-family: var(--font-heading);
}

.mobile-lang-switcher {
  margin-top: var(--space-lg);
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    height: 400px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .prices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-xxl: 5rem;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* Hide language switcher in header on mobile - it's in the mobile menu */
  .header .lang-switcher {
    display: none;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo img {
    height: 40px;
  }

  .hero-content {
    padding: var(--space-lg) var(--space-sm);
  }

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

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

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

  .price-card {
    padding: var(--space-sm);
  }
}

/* Print Styles */
@media print {
  .header,
  .scroll-indicator,
  .lightbox,
  .mobile-menu {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: var(--space-md);
  }

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