/* ============================================================
   PUB SELOSTAJATORPPA – MAMMA'S PUB OY
   Stylesheet – style.css
   ============================================================ */

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  --color-dark:        #1e1208;
  --color-mid:         #3a2010;
  --color-gold:        #c89a2e;
  --color-gold-light:  #e8bc55;
  --color-cream:       #f5ead8;
  --color-red:         #9b2020;
  --color-white:       #fff;

  --font-display:  'Rye', serif;
  --font-body:     'Poppins', sans-serif;

  --radius:     6px;
  --shadow:     0 4px 24px rgba(0,0,0,0.45);
  --transition: 0.25s ease;
  --header-h:   70px;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background-color: var(--color-cream);
  color: var(--color-dark);
  font-family: var(--font-body);
  line-height: 1.7;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-gold-light); }

ul { list-style: none; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--color-dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin-top: 0.4rem;
}

.section-title.centered { display: block; text-align: center; }
.section-title.centered::after { margin: 0.4rem auto 0; }

.section-sub {
  font-size: 1rem;
  color: var(--color-mid);
  margin-bottom: 2.5rem;
  font-weight: 300;
}
.section-sub.centered { text-align: center; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--color-dark);
  border-bottom: 2px solid var(--color-gold);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center; /* nav keskelle desktopilla */
  position: relative;
}

/* ── NAV LINKS ────────────────────────────────────────────── */
.main-nav ul {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-cream);
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 2px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width var(--transition);
}

.main-nav a:hover { color: var(--color-gold); }
.main-nav a:hover::after { width: 100%; }

/* ── HAMBURGER ────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 6px 8px;
  transition: background var(--transition);
  /* mobiilissa vasemmassa reunassa */
  position: absolute;
  left: 24px;
}

.hamburger:hover { background: rgba(200, 154, 46, 0.15); }

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-h);
  background:
    url('/images/1000017690hero.webp')
    center/cover no-repeat fixed;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(18,8,2,0.88) 0%,
    rgba(30,18,8,0.75) 50%,
    rgba(155,32,32,0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 24px;
  animation: fadeUp 1s ease both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem; /* tila logon ja Tervetuloa-tekstin välillä */
}

.hero-logo {
  width: 260px;
  height: 260px;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid var(--color-gold);
  background: rgba(245,234,216,0.92);
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.hero-pre {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--color-gold);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ── ABOUT ────────────────────────────────────────────────── */
.about { background: var(--color-cream); }

.about .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--color-mid);
  margin-bottom: 1rem;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 3px solid var(--color-gold);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ── DIVIDER BANNER ───────────────────────────────────────── */
.divider-banner {
  background: var(--color-red);
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 0;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  border-top: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
}

.divider-dot { color: var(--color-gold); }

/* ── EVENTS / SOCIAL ──────────────────────────────────────── */
.events { background: var(--color-cream); }

.social-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-mid);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 2rem 3rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-cream);
  transition: transform var(--transition), color var(--transition);
}

.social-btn svg {
  width: 52px;
  height: 52px;
}

.social-btn:hover {
  background: var(--color-cream);
  color: var(--color-gold);
  transform: translateY(-3px);
}

/* ── CONTACT ──────────────────────────────────────────────── */
.contact { background: var(--color-dark); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact .section-title { color: var(--color-cream); }
.contact .section-title::after { background: var(--color-gold); }

.contact-info p {
  color: var(--color-cream);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.contact-info a { color: var(--color-gold); }
.contact-info a:hover { color: var(--color-gold-light); }

.opening-hours { margin-top: 1.5rem; }

.opening-hours h3 {
  font-family: var(--font-display);
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.opening-hours table { width: 100%; border-collapse: collapse; }

.opening-hours td {
  padding: 0.4rem 0;
  color: var(--color-cream);
  font-size: 0.95rem;
}

.opening-hours td:last-child {
  text-align: right;
  color: var(--color-gold-light);
  font-weight: 600;
}

.opening-hours tr { border-bottom: 1px dashed rgba(255,255,255,0.1); }
.opening-hours tr:last-child { border-bottom: none; }

.map-placeholder {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--color-gold);
}

.map-placeholder iframe { display: block; }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: #100804;
  border-top: 2px solid var(--color-gold);
  padding: 2.5rem 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  background: var(--color-cream);
  padding: 3px;
}

.footer-copy {
  color: var(--color-cream);
  font-size: 0.85rem;
}

.footer-legal {
  color: rgba(133, 131, 132, 0.66);
  font-size: 0.55rem;
  letter-spacing: 3px;
}
.footer-legal a {
  color: rgba(133, 131, 132, 0.66);
  font-size: 0.55rem;
  letter-spacing: 3px;
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE – TABLET ──────────────────────────────────── */
@media (max-width: 900px) {
  .about .section-inner,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

/* ── EVENTS INFO (tapahtumat-sivu) ────────────────────────── */
.events-info { background: var(--color-cream); }

.events-info .section-inner {
  text-align: center;
}

.events-info .section-inner p {
  color: var(--color-mid);
  margin-bottom: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.events-info .social-links {
  margin-top: 2.5rem;
}

.events-info .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

/* ── KARUSELLI ────────────────────────────────────────────── */
.carousel-section {
  background: var(--color-cream);
  padding-bottom: 80px;
}

.carousel-section .section-inner {
  padding-bottom: 0;
}

.carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 24px;
}

.carousel-track {
  display: grid;
  transition: none;
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 4 / 3;
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Nuolipainikkeet */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 18, 8, 0.7);
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

.carousel-btn--prev { left: 32px; }
.carousel-btn--next { right: 32px; }

/* Kapeampi karuselli (tapahtumat-sivu) */
.carousel--narrow {
  max-width: 700px;
}

/* Pisteet */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.carousel-dot.active {
  background: var(--color-gold);
}

@media (max-width: 640px) {
  .carousel-slide { aspect-ratio: 4 / 3; }
  .carousel-btn { width: 38px; height: 38px; font-size: 1.1rem; }
  .carousel-btn--prev { left: 8px; }
  .carousel-btn--next { right: 8px; }
  .carousel { padding: 0; }
}

/* ── GALLERIA ─────────────────────────────────────────────── */
.gallery-section {
  background: var(--color-cream);
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 18, 8, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: 1; }

.gallery-item:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

/* ── LIGHTBOX ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.94);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: lbFadeIn 0.2s ease;
}

.lightbox[hidden] { display: none; }

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

.lightbox-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  border: 2px solid var(--color-gold);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  display: inline-block;
}

.lightbox-caption {
  font-family: var(--font-display);
  color: var(--color-gold-light);
  font-size: 0.95rem;
  margin-top: 1rem;
  letter-spacing: 0.06em;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--color-dark);
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 2100;
  line-height: 1;
}

.lightbox-close:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 18, 8, 0.7);
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 2100;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

/* ── HERO ALIPAGE ─────────────────────────────────────────── */
.hero--sub {
  min-height: 50vh;
}

/* ── RESPONSIVE – MOBILE ──────────────────────────────────── */
@media (max-width: 640px) {
  :root { --header-h: 60px; }

  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--color-dark);
    border-bottom: 2px solid var(--color-gold);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }

  .main-nav.open {
    max-height: 400px;
    padding: 1rem 0 1.5rem;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  .main-nav a {
    display: block;
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(200,154,46,0.2);
  }

  .main-nav a::after { display: none; }

  .hero-logo {
    width: 240px;
    height: 240px;
  }

  .hero-content { gap: 2rem; }

  .hero { min-height: 60vh; background-position: left center; }

  .divider-banner { gap: 0.75rem; font-size: 0.8rem; }

  .social-btn { padding: 1.5rem 2rem; }

  .hero--sub { min-height: 45vh; }

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

  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; font-size: 1.1rem; }
}