/* Doge's Palace Tickets Guide - Global Styles */
:root {
  --primary: #1a4d6d;
  --primary-dark: #0f3347;
  --accent: #c9a227;
  --accent-hover: #b8921f;
  --text: #2c2c2c;
  --text-muted: #5a5a5a;
  --bg: #faf9f6;
  --white: #fff;
  --border: #e5e2dc;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 8px;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}
.site-logo img { height: 40px; width: auto; max-width: 280px; }

/* Nav */
.nav-main { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-main a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
}
.nav-main a:hover { background: var(--bg); text-decoration: none; }

/* Language switcher – collapsed by default, opens on click */
.lang-switcher {
  position: relative;
  display: inline-block;
}
.lang-switcher .lang-switcher-label,
.lang-switcher summary {
  display: block;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  background: var(--primary);
  color: var(--white);
  font-size: 0.9rem;
}
.lang-switcher summary { list-style: none; cursor: pointer; }
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-switcher ul {
  display: none;
  margin: 0.25rem 0 0;
  padding: 0.5rem 0;
  min-width: 180px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
}
.lang-switcher details[open] ul { display: block; }
.lang-switcher a { display: block; padding: 0.4rem 1rem; }
.lang-switcher a:hover { background: var(--bg); }
/* On non-English pages: switcher on the left side of the screen */
html:not([lang="en"]) .lang-switcher {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  margin: 0;
}
html:not([lang="en"]) .lang-switcher ul {
  max-height: 60vh;
}
html:not([lang="en"]) .site-header .header-inner .lang-switcher {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
html:not([lang="en"]) body { padding-left: 200px; }
@media (max-width: 768px) {
  html:not([lang="en"]) .lang-switcher { max-height: 50vh; top: auto; bottom: 0; transform: none; }
  html:not([lang="en"]) body { padding-left: 0; padding-bottom: 280px; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2a6b8f 100%);
  color: var(--white);
  padding: 2rem 1.25rem 3rem;
  position: relative;
}
.hero.has-hero-image {
  background-color: var(--primary-dark);
  background-image: url('/images/hero.jpg'), linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2a6b8f 100%);
  background-size: cover, auto;
  background-position: center center, 0 0;
  background-repeat: no-repeat, repeat;
}
.hero.has-hero-image .hero-inner { position: relative; z-index: 1; }
.hero.has-hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 51, 71, 0.75);
  z-index: 0;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 { margin: 0 0 0.5rem; font-size: clamp(1.5rem, 4vw, 2.25rem); }
.hero .lead { margin: 0 0 1.5rem; opacity: 0.95; font-size: 1.05rem; }
.cta-button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.cta-button:hover { background: var(--accent-hover); text-decoration: none; color: #1a1a1a; }
.hero-widget { min-height: 200px; background: rgba(255,255,255,0.08); border-radius: var(--radius); padding: 1rem; }

/* Main content */
.main { max-width: 900px; margin: 0 auto; padding: 2rem 1.25rem; }
.main h2 { color: var(--primary); margin-top: 2rem; }
.main h3 { margin-top: 1.5rem; }
.content-section { margin-bottom: 2rem; }

/* In-content images – organic placement */
.content-figure {
  margin: 2rem 0;
  clear: both;
}
.content-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.content-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}
@media (min-width: 600px) {
  .content-figure--right { float: right; width: 45%; margin: 1rem 0 1rem 1.5rem; }
  .content-figure--left { float: left; width: 45%; margin: 1rem 1.5rem 1rem 0; }
}

/* Cards grid for internal links */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.card a { font-weight: 600; }

/* Tiqets discovery widget container */
.widget-discovery { margin: 2.5rem 0; padding: 1rem 0; }

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 2rem 1.25rem;
  margin-top: 3rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-disclaimer {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.footer-links a { color: rgba(255,255,255,0.85); }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.85rem; opacity: 0.75; }

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
