/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Georgia', serif; color: #1a1a2e; background: #fafaf8; line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:root {
  --navy: #0d1b2a;
  --ocean: #1b4f72;
  --sky: #2e86ab;
  --sand: #f4e9d8;
  --gold: #c9a84c;
  --white: #ffffff;
  --off-white: #fafaf8;
  --text: #1a1a2e;
  --text-light: #5a6a7a;
  --border: #dde3ea;
}

#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  background: rgba(13,27,42,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  transition: all 0.3s ease;
}
#navbar.scrolled { height: 56px; background: rgba(13,27,42,0.98); }
.nav-brand { display: flex; flex-direction: column; }
.nav-title { font-size: 1rem; font-weight: bold; color: var(--gold); letter-spacing: 0.05em; }
.nav-sub { font-size: 0.7rem; color: rgba(255,255,255,0.5); letter-spacing: 0.08em; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links li a {
  color: rgba(255,255,255,0.8); font-size: 0.82rem; padding: 6px 10px;
  border-radius: 4px; transition: all 0.2s; letter-spacing: 0.03em;
  font-family: 'Georgia', serif;
}
.nav-links li a:hover { color: var(--gold); background: rgba(201,168,76,0.1); }
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; }

#hero {
  position: relative; min-height: 100vh;
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 40%, #0d4a6e 70%, #1a6b8a 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13,27,42,0.3) 0%, rgba(13,27,42,0.1) 50%, rgba(13,27,42,0.6) 100%); }
.hero-content { position: relative; text-align: center; padding: 80px 24px 40px; max-width: 800px; }
.hero-eyebrow { font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); color: #ffffff; line-height: 1.1; margin-bottom: 20px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.hero-tagline { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto 40px; line-height: 1.6; }
.hero-cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 14px 32px; border-radius: 4px; font-size: 0.9rem; letter-spacing: 0.05em; font-family: 'Georgia', serif; transition: all 0.3s; cursor: pointer; }
.btn-primary { background: var(--gold); color: var(--navy); font-weight: bold; }
.btn-primary:hover { background: #e8c060; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.4); }
.btn-outline { border: 2px solid rgba(255,255,255,0.6); color: white; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.hero-scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.4); font-size: 0.8rem; letter-spacing: 0.1em; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

section { padding: 80px 0; }
.alt-bg { background: var(--sand); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label { display: inline-block; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); background: rgba(201,168,76,0.1); padding: 4px 14px; border-radius: 20px; margin-bottom: 12px; border: 1px solid rgba(201,168,76,0.3); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--navy); margin-bottom: 16px; line-height: 1.2; }
.section-intro { font-size: 1.05rem; color: var(--text-light); max-width: 700px; margin: 0 auto; line-height: 1.8; }

.project-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 64px; }
.project-card { background: white; border-radius: 12px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); border: 1px solid var(--border); transition: transform 0.3s, box-shadow 0.3s; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.project-card-icon { font-size: 2.5rem; margin-bottom: 16px; }
.project-card h3 { font-size: 1.3rem; color: var(--navy); margin-bottom: 12px; }
.project-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; }
.project-stats { display: flex; gap: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.project-stats span { font-size: 0.85rem; color: var(--text-light); }
.project-stats strong { color: var(--ocean); font-size: 1.1rem; display: block; }

.summary-table-wrap { overflow-x: auto; margin-top: 48px; }
.summary-table-wrap h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 20px; }
.summary-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.summary-table thead tr { background: var(--navy); color: white; }
.summary-table th { padding: 12px 16px; text-align: left; font-weight: normal; letter-spacing: 0.05em; }
.summary-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.summary-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }
.summary-table tbody tr:hover { background: rgba(46,134,171,0.05); }
.summary-table tfoot tr { background: var(--ocean); color: white; }
.summary-table tfoot th { padding: 12px 16px; }

.vessel-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 40px 0; }
.spec-card { background: white; border-radius: 8px; padding: 20px; border: 1px solid var(--border); text-align: center; }
.alt-bg .spec-card { background: rgba(255,255,255,0.7); }
.spec-label { display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); margin-bottom: 6px; }
.spec-value { display: block; font-size: 1rem; font-weight: bold; color: var(--navy); }

.crew-duties-preview { margin-top: 48px; }
.crew-duties-preview h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 24px; }
.duties-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.duty-category { background: white; border-radius: 8px; padding: 24px; border: 1px solid var(--border); }
.duty-category h4 { font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ocean); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.duty-category li { font-size: 0.88rem; color: var(--text-light); padding: 3px 0; }
.duty-category li::before { content: '\2014 '; color: var(--gold); }

.goldfield-quote { border-left: 4px solid var(--gold); padding: 20px 28px; margin: 32px 0; background: rgba(201,168,76,0.05); border-radius: 0 8px 8px 0; font-style: italic; font-size: 1.05rem; color: var(--text); }
.goldfield-quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 0.85rem; color: var(--text-light); }

.gallery-category { margin-bottom: 56px; }
.gallery-cat-title { font-size: 1.3rem; color: var(--navy); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.gallery-tabs-wrap { margin-top: 32px; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab-btn { padding: 8px 18px; border: 1px solid var(--border); border-radius: 20px; background: white; color: var(--text-light); font-size: 0.85rem; cursor: pointer; transition: all 0.2s; font-family: 'Georgia', serif; }
.tab-btn:hover { border-color: var(--sky); color: var(--sky); }
.tab-btn.active { background: var(--ocean); color: white; border-color: var(--ocean); }
.gallery-panel { display: none; }
.gallery-panel.active { display: block; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; background: #eee; aspect-ratio: 4/3; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white; font-size: 0.75rem; padding: 20px 10px 8px; opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .gallery-caption { opacity: 1; }

.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.poster-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.poster-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.15); }
.poster-img-wrap { aspect-ratio: 3/2; overflow: hidden; }
.poster-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; cursor: pointer; }
.poster-card:hover .poster-img-wrap img { transform: scale(1.08); }
.poster-info { padding: 16px 20px; }
.poster-info h4 { font-size: 1rem; color: var(--navy); margin-bottom: 4px; }
.poster-info p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.poster-size { display: inline-block; font-size: 0.75rem; background: rgba(46,134,171,0.1); color: var(--ocean); padding: 3px 10px; border-radius: 12px; }
.poster-note { background: white; border-radius: 8px; padding: 24px; border: 1px solid var(--border); text-align: center; }
.poster-note p { color: var(--text-light); font-size: 0.95rem; }

.book-preview { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; margin-bottom: 56px; }
.book-cover-wrap { display: flex; justify-content: center; }
.book-cover { position: relative; width: 280px; height: 360px; }
.book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 28px; background: linear-gradient(to right, #0d1b2a, #1b4f72); border-radius: 4px 0 0 4px; }
.book-front { position: absolute; left: 28px; top: 0; right: 0; bottom: 0; border-radius: 0 8px 8px 0; overflow: hidden; box-shadow: 8px 8px 32px rgba(0,0,0,0.3); }
.book-cover-img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13,27,42,0.3) 0%, rgba(13,27,42,0.8) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; }
.book-cover-title { color: white; font-size: 1.1rem; line-height: 1.3; margin-bottom: 6px; }
.book-cover-sub { color: var(--gold); font-size: 0.85rem; margin-bottom: 4px; }
.book-cover-edition { color: rgba(255,255,255,0.5); font-size: 0.75rem; }
.book-details h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 16px; }
.book-details p { color: var(--text-light); margin-bottom: 24px; line-height: 1.8; }
.book-contents h4 { font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ocean); margin-bottom: 12px; }
.book-contents ul { margin-bottom: 24px; }
.book-contents li { font-size: 0.9rem; color: var(--text-light); padding: 6px 0; border-bottom: 1px solid var(--border); }
.book-contents li strong { color: var(--navy); }
.book-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.book-spec { display: flex; flex-direction: column; background: var(--sand); border-radius: 6px; padding: 12px 16px; }
.book-spec span:first-child { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); margin-bottom: 4px; }
.book-spec span:last-child { font-size: 0.95rem; font-weight: bold; color: var(--navy); }
.book-chapters h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 24px; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.chapter-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.07); transition: transform 0.3s; }
.chapter-card:hover { transform: translateY(-4px); }
.chapter-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; cursor: pointer; }
.chapter-info { padding: 16px; }
.chapter-num { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.chapter-info h4 { font-size: 1rem; color: var(--navy); margin: 4px 0 8px; }
.chapter-info p { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }

#footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; }
.footer-links h4 { color: white; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.88rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.4); }

.lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.92); align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lb-inner { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 80px rgba(0,0,0,0.8); }
.lb-caption { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-top: 12px; text-align: center; }
.lb-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.lb-close:hover { opacity: 1; }

@media (max-width: 900px) {
  .book-preview { grid-template-columns: 1fr; }
  .book-cover-wrap { margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 640px) {
  #navbar { padding: 0 16px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 16px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta-group { flex-direction: column; align-items: center; }
  section { padding: 56px 0; }
}

/* === GALLERY OVERVIEW CARDS (index.html) === */
.gallery-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.gallery-overview-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
}
.goc-header { display: flex; align-items: flex-start; gap: 16px; }
.goc-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.goc-header h3 { font-size: 1.15rem; color: var(--navy); margin: 0 0 4px; }
.goc-header h3 a { color: var(--navy); }
.goc-header h3 a:hover { color: var(--gold); }
.goc-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-light); font-weight: 600; }
.goc-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.65; margin: 0; }
.goc-thumbs { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
.goc-thumbs .gallery-caption { display: none; }
.goc-link { display: inline-block; font-size: 0.88rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; margin-top: 4px; }
.goc-link:hover { color: var(--navy); }

/* === GALLERY INDIVIDUAL PAGE HERO === */
.gallery-page-hero { padding: 80px 0 56px; border-bottom: 1px solid var(--border); }
.gallery-page-header { max-width: 760px; }
.gallery-page-header h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--navy); margin: 8px 0 20px; line-height: 1.15; }
.gallery-nav-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Override tab-btn for gallery pages (more prominent) */
.gallery-page-hero ~ section .tab-btn {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}
.gallery-page-hero ~ section .tab-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.gallery-page-hero ~ section .tab-btn.active {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}

/* Active link in nav */
.nav-links li a.active { color: var(--gold); }

@media (max-width: 900px) {
  .gallery-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .goc-thumbs { grid-template-columns: repeat(2, 1fr) !important; }
  .gallery-page-header h1 { font-size: 1.8rem; }
  .gallery-nav-links { flex-direction: column; }
}
