
/* =======================================================================
   Almira Tavern - Unified Stylesheet (site.css)
   Combines layout styles + responsive slideshow + gallery normalization.
   Mobile-first, fully responsive.
   ======================================================================= */

/* 0) CSS RESET (light) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
:root {
  --text: #0b1220;
  --muted: #f8fafc;
  --border: #e5e7eb;
  --brand: #1d4ed8;
  --link: #0b1220;
}

/* 1) BASE TYPOGRAPHY */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background: #e1edffad;
}
.h2 { font-size: clamp(22px, 3.6vw, 32px); margin: 0 0 10px; }
.lead { color:#0b1220; font-size: clamp(16px, 2.2vw, 18px); line-height: 1.65; }

/* 2) LAYOUT HELPERS */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
section { padding: clamp(36px, 6vw, 56px) 0; }
.muted { background: var(--muted); }

/* 3) HEADER & NAV */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.479);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0;
}
.brand img { height: 48px; width: auto; }
.contact-inline { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.social { display: flex; gap: 10px; }
nav { border-top: 1px solid var(--border); }
.navlist {
  display: flex; gap: 32px; padding: 10px ;
  font-weight: 600; font-size: 15px; overflow-x: auto;
}

/* 4) BUTTONS */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 14px rgb(0, 75, 122);
}
.btn.outline {
  border: 1px solid #1d4ed8;
  color: #ffffff;
  background: #1d4ed8;
  transition: all .25s ease;
}

/* 5) GRID / CARDS */
.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}
.split img { width: 100%; border-radius: 16px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 14px;
}
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 10px;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

/* 6) HERO / SLIDESHOW (CrossFade) */
#CrossFade {
  position: relative;
  height: 88vh;            /* desktop default */
  max-height: 820px;
  min-height: 420px;
  overflow: hidden;
  background: #6286d4;        /* hides gaps while loading */
}
#CrossFade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  animation: imageAnimation 28s linear infinite 0s; animation-fill-mode: both;
  will-change: opacity, transform;
}
/* Ensure a visible fallback image (first) even if animations are disabled or not yet running */
#CrossFade img:first-of-type { opacity: 1; }

/* Respect reduced motion: stop animation, show first image statically */
@media (prefers-reduced-motion: reduce) {
  #CrossFade img { animation: none !important; opacity: 0; }
  #CrossFade img:first-of-type { opacity: 1 !important; }
}

/* sequence (supports 6 images; extend if needed) */
#CrossFade img:nth-of-type(1) { animation-delay: 0s; }
#CrossFade img:nth-of-type(2) { animation-delay: 7s; }
#CrossFade img:nth-of-type(3) { animation-delay: 14s; }
#CrossFade img:nth-of-type(4) { animation-delay: 21s; }
#CrossFade img:nth-of-type(5) { animation-delay: 28s; }
#CrossFade img:nth-of-type(6) { animation-delay: 35s; }
@keyframes imageAnimation {
  0%   { opacity: 0; transform: scale(1.02); }
  5%   { opacity: 1; transform: scale(1.00); }
  30%  { opacity: 1; transform: scale(1.00); }
  35%  { opacity: 0; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.02); }
}
/* overlay text */
#CrossFade .intro {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8%;
  z-index: 2;
  width: min(960px, 92%);
  margin: 0 auto;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
  padding: 0 8px;
}
#CrossFade .intro h1 { font-size: clamp(28px, 5vw, 56px); font-weight: 800; letter-spacing: .2px; margin: 0; }
#CrossFade .intro p  { font-size: clamp(16px, 2.4vw, 22px); margin: 8px 0 0; }
#CrossFade .cta-row  { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* HERO responsive heights */
@media (max-width: 1024px) {
  #CrossFade { height: 72vh; max-height: 700px; min-height: 380px; }
}
@media (max-width: 720px) {
  #CrossFade { height: 64vh; max-height: 560px; min-height: 340px; }
  #CrossFade img { animation-duration: 24s; }
}
@media (max-width: 480px) {
  #CrossFade { height: 56vh; max-height: 480px; min-height: 300px; }
  #CrossFade img { animation-duration: 20s; }
}

/* 7) GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;     /* consistent boxes irrespective of native ratio */
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

/* 8) FOOTER */
footer { background:#1e3a8a; color:#f8fafc; padding: 28px 0; margin-top: 20px; }
.footer-inner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.footer-logo { height: 44px; width: auto; }
.small { font-size: 13px; color:#475569; }

/* 9) ACCESSIBILITY / USABILITY */
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
a:hover { opacity: .9; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 10) IMAGE NORMALIZATION */
img { height: auto; }

/* --- Fallbacks for users who prefer reduced motion or if animations fail --- */
#CrossFade img:first-of-type { opacity: 1; } /* Ensure at least the first image is visible by default */

@media (prefers-reduced-motion: reduce) {
  #CrossFade img { animation: none !important; animation-fill-mode: both; opacity: 0; }
  #CrossFade img:first-of-type { opacity: 1 !important; }
}
