/* ============================================================
   Tower of London — Tickets & Tours Guide
   styles.css — Mobile-first responsive design
   ============================================================ */

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

:root {
  --navy:   #1a1a2e;
  --gold:   #c9a227;
  --gold-h: #a07d1a;
  --bg:     #f8f6f0;
  --white:  #ffffff;
  --text:   #2d2d2d;
  --muted:  #6b6b6b;
  --border: #e2ddd4;
  --shadow: 0 2px 12px rgba(0,0,0,.12);
  --radius: 8px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-w: 1200px;
  --trans: .2s ease;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--gold-h); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.3;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 2rem 0 .8rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); margin: 1.5rem 0 .6rem; }
h4 { font-size: 1rem; margin: 1rem 0 .4rem; }
p  { margin-bottom: 1rem; max-width: 72ch; }

.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; }

/* ---------- Layout ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1rem; }
.section    { padding: 3rem 0; }
.section--alt { background: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; gap: .75rem;
}
.logo-link { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.logo-link img { height: 40px; width: auto; }
.logo-text {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  display: none;
}

/* Mobile menu toggle */
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--trans);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Navigation */
.main-nav {
  display: none; position: absolute; top: 100%;
  left: 0; right: 0; background: var(--navy);
  padding: 1rem; border-top: 1px solid rgba(255,255,255,.1);
}
.main-nav.open { display: block; }
.main-nav ul { list-style: none; padding: 0; margin: 0; }
.main-nav li { margin: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.main-nav a {
  display: block; padding: .65rem .5rem;
  color: rgba(255,255,255,.85); font-size: .9rem;
  transition: color var(--trans);
}
.main-nav a:hover, .main-nav a.active { color: var(--gold); }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: var(--white); padding: .4rem .7rem; border-radius: var(--radius);
  cursor: pointer; font-size: .85rem; display: flex; align-items: center; gap: .35rem;
  transition: background var(--trans);
}
.lang-btn:hover { background: rgba(255,255,255,.2); }
.lang-btn .flag { font-size: 1rem; }
.lang-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 160px; z-index: 200; overflow: hidden;
}
.lang-dropdown.open { display: block; }
.lang-dropdown a {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem; color: var(--text); font-size: .85rem;
  transition: background var(--trans);
}
.lang-dropdown a:hover { background: var(--bg); color: var(--navy); }
.lang-dropdown a.active { font-weight: 700; color: var(--gold); }

/* Header CTA */
.header-cta {
  display: none;
  background: var(--gold); color: var(--navy);
  padding: .45rem 1rem; border-radius: var(--radius);
  font-weight: 700; font-size: .85rem;
  transition: background var(--trans);
  white-space: nowrap;
}
.header-cta:hover { background: var(--gold-h); color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  min-height: 420px;
  display: flex; align-items: center;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: .45;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,26,46,.85) 40%, rgba(26,26,46,.5));
}
.hero-content {
  position: relative; z-index: 2;
  padding: 2.5rem 1rem; max-width: 800px;
}
.hero-badge {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: .25rem .7rem; border-radius: 3px; margin-bottom: .75rem;
}
.hero h1 { color: var(--white); margin-bottom: .75rem; }
.hero-lead { color: rgba(255,255,255,.85); font-size: 1.05rem; margin-bottom: 1.5rem; max-width: 60ch; }

/* Hero disclaimer */
.hero-disclaimer {
  position: absolute; bottom: .75rem; right: 1rem;
  font-size: .7rem; color: rgba(255,255,255,.5);
  cursor: default; z-index: 3;
}
.hero-disclaimer:hover .disclaimer-tooltip { display: block; }
.disclaimer-tooltip {
  display: none; position: absolute; bottom: 100%; right: 0;
  background: rgba(0,0,0,.85); color: #fff;
  font-size: .72rem; padding: .5rem .75rem; border-radius: 5px;
  width: 240px; line-height: 1.5; margin-bottom: 4px;
}

/* ---------- Quick Summary Table ---------- */
.quick-summary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(201,162,39,.4);
  border-radius: var(--radius); padding: 1rem;
  margin-bottom: 1.5rem; overflow-x: auto;
}
.quick-summary table { width: 100%; border-collapse: collapse; font-size: .9rem; color: var(--white); }
.quick-summary th { padding: .5rem .75rem; text-align: left; color: var(--gold); font-weight: 700; white-space: nowrap; }
.quick-summary td { padding: .5rem .75rem; border-top: 1px solid rgba(255,255,255,.1); }

/* ---------- Booking Widget ---------- */
.widget-wrap {
  background: rgba(255,255,255,.95); border-radius: var(--radius);
  padding: 1rem; margin-top: 1rem; overflow-x: auto;
}
.widget-label {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); margin-bottom: .5rem;
}

/* ---------- Discovery Section ---------- */
.discovery-section { padding: 2rem 0; }
.discovery-section .section-label {
  font-size: .8rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: .5rem;
}

/* ---------- Content + Sidebar Layout ---------- */
.content-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
}

/* ---------- Article Content ---------- */
.article-content { min-width: 0; }
.article-content h2 { border-bottom: 2px solid var(--border); padding-bottom: .4rem; }

/* Pros/Cons & Tip Boxes */
.box {
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.box--tip   { background: #fffbea; border-left: 4px solid var(--gold); }
.box--info  { background: #eef4ff; border-left: 4px solid #4a7fd4; }
.box--warn  { background: #fff3ed; border-left: 4px solid #e07a30; }
.box--expert{ background: #f0f7ee; border-left: 4px solid #4caf50; }
.box-title  { font-weight: 700; margin-bottom: .5rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }

/* Comparison Table */
.compare-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; overflow-x: auto; display: block; }
.compare-table th {
  background: var(--navy); color: var(--white);
  padding: .75rem 1rem; text-align: left;
}
.compare-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.compare-table tr:hover td { background: #f0ede7; }
.compare-table .check { color: #4caf50; font-weight: 700; }
.compare-table .cross { color: #e53935; }

/* Price Table */
.price-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.price-table th { background: var(--navy); color: var(--white); padding: .75rem 1rem; text-align: left; }
.price-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.price-table .price { font-weight: 700; color: var(--navy); }
.price-table tr:nth-child(even) td { background: rgba(0,0,0,.02); }

/* ---------- Sidebar ---------- */
.sidebar {}
.sidebar-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.sidebar-card h3 { margin-top: 0; font-size: 1rem; border-bottom: 2px solid var(--gold); padding-bottom: .4rem; }
.sidebar-cta {
  display: block; width: 100%;
  background: var(--gold); color: var(--navy);
  text-align: center; padding: .85rem 1rem;
  border-radius: var(--radius); font-weight: 700;
  font-size: 1rem; margin-top: .75rem;
  transition: background var(--trans), transform var(--trans);
}
.sidebar-cta:hover { background: var(--gold-h); transform: translateY(-1px); color: var(--navy); }
.sidebar-cta.secondary {
  background: transparent; border: 2px solid var(--gold);
  color: var(--gold); margin-top: .5rem;
}
.sidebar-cta.secondary:hover { background: var(--gold); color: var(--navy); }
.opening-hours li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.opening-hours li:last-child { border-bottom: none; }

/* ---------- FAQ Section ---------- */
.faq-section { padding: 2.5rem 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0; text-align: left;
  font-family: var(--font-serif); font-size: 1rem; color: var(--navy);
  font-weight: 700;
}
.faq-question:hover { color: var(--gold); }
.faq-icon { font-size: 1.2rem; transition: transform var(--trans); flex-shrink: 0; margin-left: .5rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1rem; color: var(--muted); line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }

/* ---------- Internal Links Section ---------- */
.related-links { padding: 2rem 0; }
.related-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem; margin-top: 1rem;
}
.related-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  transition: box-shadow var(--trans), transform var(--trans);
  color: var(--text);
}
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--navy); }
.related-card .icon { font-size: 1.5rem; flex-shrink: 0; }
.related-card .label { font-weight: 700; font-size: .95rem; color: var(--navy); }
.related-card .desc  { font-size: .82rem; color: var(--muted); }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 60%, #2a2a4e);
  color: var(--white); text-align: center; padding: 3rem 1rem;
}
.cta-banner h2 { color: var(--gold); margin-top: 0; }
.cta-banner p  { color: rgba(255,255,255,.8); max-width: 60ch; margin: 0 auto 1.5rem; }
.btn {
  display: inline-block; background: var(--gold); color: var(--navy);
  padding: .85rem 2rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem;
  transition: background var(--trans), transform var(--trans);
}
.btn:hover { background: var(--gold-h); transform: translateY(-2px); color: var(--navy); }
.btn--outline {
  background: transparent; border: 2px solid var(--white); color: var(--white);
  margin-left: .75rem;
}
.btn--outline:hover { background: var(--white); color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 2rem; margin-bottom: 2.5rem;
}
.footer-col h4 {
  color: var(--gold); font-size: .85rem; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: .75rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: rgba(255,255,255,.65); font-size: .88rem; }
.footer-col a:hover { color: var(--gold); }
.footer-disclaimer {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  font-size: .78rem; line-height: 1.6; color: rgba(255,255,255,.55);
  margin-bottom: 2rem;
}
.footer-disclaimer strong { color: rgba(255,255,255,.8); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .75rem;
  justify-content: space-between; align-items: center;
  font-size: .8rem; color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: .6rem 0;
}
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .82rem; }
.breadcrumbs li::after { content: ' /'; color: var(--muted); margin-left: .25rem; }
.breadcrumbs li:last-child::after { content: ''; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs li:last-child a, .breadcrumbs li:last-child span { color: var(--navy); font-weight: 600; }

/* ---------- Star Rating ---------- */
.stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }
.rating-wrap { display: flex; align-items: center; gap: .5rem; }
.rating-count { font-size: .85rem; color: var(--muted); }

/* ---------- Badge & Tag ---------- */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 3px; text-transform: uppercase; letter-spacing: .5px;
}
.badge--gold   { background: var(--gold); color: var(--navy); }
.badge--navy   { background: var(--navy); color: var(--white); }
.badge--green  { background: #4caf50; color: #fff; }
.badge--orange { background: #e07a30; color: #fff; }

/* ============================================================
   TABLET (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }
  .logo-text { display: block; }
  .nav-toggle { display: none; }
  .main-nav {
    display: block !important; position: static;
    padding: 0; border: none; background: transparent;
  }
  .main-nav ul { display: flex; gap: .25rem; align-items: center; }
  .main-nav li { border: none; }
  .main-nav a { padding: .4rem .65rem; border-radius: 5px; font-size: .85rem; }
  .main-nav a:hover { background: rgba(255,255,255,.1); }
  .header-cta { display: inline-block; }
  .hero { min-height: 500px; }
  .hero-content { padding: 3.5rem 2rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .content-wrap { grid-template-columns: 1fr 300px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-summary { display: inline-block; min-width: 400px; }
}

/* ============================================================
   DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
  .logo-link img { height: 48px; }
  .hero { min-height: 580px; }
  .hero-content { padding: 4rem 3rem; max-width: 860px; }
  .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
  .content-wrap { grid-template-columns: 1fr 320px; gap: 3rem; }
  .sidebar { position: sticky; top: 80px; align-self: start; }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .related-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-gold    { color: var(--gold); }
.text-navy    { color: var(--navy); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
