/* ============================================================
   DDE - Dynamic Dive Exhibition — Modern CSS Framework
   ============================================================ */

/* ---------- CSS Reset & Custom Properties ---------- */
:root {
  --primary: #0a4d8c;
  --primary-dark: #063561;
  --primary-light: #1a7fdb;
  --accent: #00b4d8;
  --accent-light: #90e0ef;
  --surface: #ffffff;
  --surface-alt: #f0f8ff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-inverse: #ffffff;
  --border: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --sidebar-w: 280px;
  --header-h: 70px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
  --wave-color: rgba(0, 180, 216, .08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--surface-alt);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--primary-dark); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
p { margin-bottom: 1rem; }

/* ---------- Utility Classes ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.6rem; border-radius: var(--radius-sm); font-weight: 600;
  font-size: .95rem; border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0096c7; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---------- Header / Top Bar ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center;
}
.header-inner {
  width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.header-brand {
  display: flex; align-items: center; gap: .75rem;
  color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem;
  text-decoration: none; letter-spacing: -.02em;
}
.header-brand img { height: 44px; width: auto; border-radius: 8px; }
.header-brand .brand-sub { font-size: .7rem; font-weight: 400; opacity: .85; display: block; margin-top: -2px; letter-spacing: .04em; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .9rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.15); color: #fff; font-weight: 600; font-size: .85rem;
  transition: background var(--transition);
}
.lang-switch:hover { background: rgba(255,255,255,.28); color: #fff; }
.lang-switch svg { width: 16px; height: 16px; }
.lang-switch.lang-active { background: rgba(255,255,255,.32); pointer-events: none; }

/* Hamburger */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; position: relative;
  border-radius: var(--radius-sm); transition: background var(--transition);
}
.menu-toggle:hover { background: rgba(255,255,255,.12); }
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  position: absolute; left: 9px; transition: all var(--transition);
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg); top: 19px; }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg); top: 19px; }

/* ---------- Layout ---------- */
.site-layout {
  display: flex; min-height: 100vh;
  padding-top: var(--header-h);
}

/* ---------- Sidebar Navigation ---------- */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--header-h));
  position: sticky; top: var(--header-h);
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  transition: transform var(--transition);
  z-index: 900;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.sidebar-inner { padding: 1rem 0; }

.nav-section { margin-bottom: .25rem; }
.nav-section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1.25rem; cursor: pointer;
  font-weight: 600; font-size: .88rem; color: var(--text);
  transition: all var(--transition); user-select: none;
  border-left: 3px solid transparent;
}
.nav-section-title:hover { background: var(--surface-alt); color: var(--primary); }
.nav-section-title.active { color: var(--primary); border-left-color: var(--accent); background: var(--surface-alt); }
.nav-section-title .arrow {
  width: 18px; height: 18px; transition: transform var(--transition); flex-shrink: 0;
}
.nav-section-title.active .arrow { transform: rotate(90deg); }

.nav-section-items {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease;
}
.nav-section-items.open { max-height: 800px; }

.nav-link {
  display: block; padding: .4rem 1.25rem .4rem 2rem;
  font-size: .82rem; color: var(--text-light);
  transition: all var(--transition); border-left: 3px solid transparent;
}
.nav-link:hover { color: var(--primary); background: var(--surface-alt); padding-left: 2.25rem; }
.nav-link.current { color: var(--primary); font-weight: 600; border-left-color: var(--primary); background: rgba(10,77,140,.04); }

/* Sub-menu items */
.nav-sub { padding-left: .75rem; }
.nav-sub .nav-link { font-size: .78rem; padding: .3rem 1.25rem .3rem 2.75rem; }

/* ---------- Main Content ---------- */
.main-content {
  flex: 1; min-width: 0;
  padding: 2rem 2.5rem 3rem;
}

.page-header {
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--accent-light);
}
.page-header h1 { margin-bottom: .35rem; }
.page-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
  font-size: .82rem; color: var(--text-light); margin-bottom: .75rem;
}
.page-breadcrumb a { color: var(--text-light); }
.page-breadcrumb a:hover { color: var(--primary); }
.page-breadcrumb .sep { opacity: .5; }

.content-card {
  background: var(--surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 2rem;
  margin-bottom: 1.5rem;
}

.content-body { font-size: .95rem; line-height: 1.8; }
.content-body strong { color: var(--primary-dark); }
.content-body ul, .content-body ol { margin: .75rem 0 1rem 1.5rem; }
.content-body li { margin-bottom: .35rem; }
.content-body img {
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  margin: 1rem auto; display: block;
}
.content-body a.pdf-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; background: #fef2f2; color: #dc2626;
  border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem;
  transition: all var(--transition);
}
.content-body a.pdf-link:hover { background: #fee2e2; transform: translateY(-1px); }
.content-body a.pdf-link::before { content: '📄'; }

/* ---------- Download Cards ---------- */
.download-card {
  display: flex; gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm); margin: 1.25rem 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.download-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.download-card-preview {
  flex-shrink: 0; width: 120px; min-height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc; border-radius: var(--radius-sm);
  overflow: hidden; padding: .5rem;
}
.download-card-preview img {
  max-width: 100%; max-height: 160px; object-fit: contain;
  border-radius: 4px; box-shadow: none; margin: 0;
}
.download-card-info { flex: 1; min-width: 0; }
.download-card-title {
  font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  color: var(--primary-dark); margin: 0 0 .35rem;
}
.download-card-desc {
  font-size: .85rem; color: var(--text-light); margin: 0 0 .75rem; line-height: 1.5;
}
.download-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem; background: linear-gradient(135deg, var(--accent), #e83e8c);
  color: #fff !important; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .88rem; text-decoration: none;
  transition: all var(--transition); border: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(232,62,140,.25);
}
.download-btn:hover {
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,62,140,.35);
  filter: brightness(1.05);
}
.download-btn svg { flex-shrink: 0; }

.download-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem; margin: 1rem 0;
}
.download-grid .download-card { margin: 0; }

@media (max-width: 600px) {
  .download-card { flex-direction: column; text-align: center; gap: 1rem; }
  .download-card-preview { width: 100%; max-width: 200px; margin: 0 auto; }
  .download-grid { grid-template-columns: 1fr; }
}

/* ---------- About / Su di Noi consolidated ---------- */
.about-section { margin-bottom: 2.5rem; }
.about-section h3 {
  font-family: var(--font-heading); font-size: 1.25rem; color: var(--primary);
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
}
.about-content {
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.about-img {
  flex-shrink: 0; width: 220px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); margin: 0;
}
.about-text { flex: 1; }
.about-text ul { margin: .5rem 0 .5rem 1.5rem; }
.about-text li { margin-bottom: .5rem; line-height: 1.7; }

@media (max-width: 768px) {
  .about-content { flex-direction: column; }
  .about-img { width: 100%; max-width: 300px; margin: 0 auto; }
}

/* ---------- Image Gallery ---------- */
.gallery-container { text-align: center; }
.gallery-img {
  max-width: 100%; border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); margin: 0 auto 1rem;
}
.gallery-nav {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin-top: 1.5rem;
}
.gallery-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  transition: all var(--transition);
}
.gallery-nav a:hover { background: var(--accent); transform: scale(1.1); }
.gallery-counter { font-weight: 600; color: var(--text-light); font-size: .9rem; }

/* ---------- Two-Column Content ---------- */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.content-grid.wide-left { grid-template-columns: 2fr 1fr; }

/* ---------- FAQ Section ---------- */
.faq-intro { font-size: 1.05rem; color: var(--text-light); margin-bottom: 2rem; line-height: 1.7; }
.faq-item {
  margin-bottom: .75rem; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem; background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.faq-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.faq-question {
  font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem;
  color: var(--primary); margin-bottom: .75rem;
  display: flex; align-items: flex-start; gap: .75rem;
}
.faq-question::before {
  content: 'Q'; display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: .75rem; font-weight: 700; margin-top: 2px; flex-shrink: 0;
}
.faq-answer { padding-left: 2.85rem; color: var(--text); font-size: .92rem; line-height: 1.8; }
.faq-answer p { margin-bottom: .5rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-signature {
  margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--surface);
  border-radius: var(--radius-md); border-left: 4px solid var(--accent);
  font-style: italic; color: var(--text-light); font-size: .95rem;
}
.faq-signature strong { color: var(--primary); font-style: normal; }

/* ---------- Vademecum Tips ---------- */
.vademecum-section { margin-bottom: 2rem; }
.vademecum-section h3 {
  font-family: var(--font-heading); font-size: 1.1rem; color: var(--primary);
  margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent);
  text-transform: uppercase; letter-spacing: .04em;
}
.vademecum-intro { color: var(--text); line-height: 1.8; margin-bottom: 1.5rem; font-size: .93rem; }
.vademecum-tip {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.25rem; margin-bottom: .5rem;
  border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.vademecum-tip:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.vademecum-tip .tip-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; margin-top: 2px;
}
.vademecum-tip .tip-body { color: var(--text); line-height: 1.8; font-size: .93rem; }
.vademecum-tip .tip-body strong { color: var(--primary); }
.vademecum-callout {
  margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--accent);
  color: #fff; border-radius: var(--radius-md); text-align: center;
  font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700;
  letter-spacing: .03em;
}

/* ---------- Contact Info ---------- */
.contact-card {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--surface); border-radius: var(--radius-md);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent); margin-bottom: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-icon svg { width: 24px; height: 24px; fill: #fff; }
.contact-info h3 { font-size: 1rem; margin-bottom: .15rem; }
.contact-info p { margin: 0; font-size: .9rem; color: var(--text-light); }
.contact-info a { font-weight: 600; }

/* ---------- Partners / Logos Grid ---------- */
.partner-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem; align-items: center;
}
.partner-grid img {
  max-height: 80px; width: auto; margin: 0 auto; opacity: .75;
  transition: opacity var(--transition);
}
.partner-grid img:hover { opacity: 1; }

/* ---------- Hero (Homepage) ---------- */
.hero {
  position: relative; min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 40%, #0096c7 100%);
  overflow: hidden; text-align: center; color: #fff;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('../bolle+logo.gif') center/contain no-repeat;
  opacity: .15;
}
.hero-content { position: relative; z-index: 2; padding: 2rem; max-width: 700px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: .75rem; }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 2rem; }
.hero .btn { font-size: 1.05rem; padding: .85rem 2.2rem; }

/* Bubbles animation */
.bubbles { position: absolute; width: 100%; height: 100%; overflow: hidden; top: 0; left: 0; pointer-events: none; }
.bubble {
  position: absolute; bottom: -80px; background: rgba(255,255,255,.08);
  border-radius: 50%; animation: float-up linear infinite;
}
@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: .6; }
  100% { transform: translateY(-110vh) scale(.5); opacity: 0; }
}

/* ---------- Section Cards (Homepage) ---------- */
.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem; padding: 3rem 0;
}
.section-card {
  background: var(--surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 1.75rem;
  transition: all var(--transition); border-top: 3px solid transparent;
  text-decoration: none; color: inherit;
}
.section-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-top-color: var(--accent); color: inherit;
}
.section-card-icon {
  width: 50px; height: 50px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.section-card-icon svg { width: 26px; height: 26px; fill: #fff; }
.section-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.section-card p { font-size: .88rem; color: var(--text-light); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark), #041e36);
  color: rgba(255,255,255,.8); padding: 3rem 0 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col a { display: block; color: rgba(255,255,255,.65); font-size: .85rem; padding: .2rem 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem;
  text-align: center; font-size: .82rem; opacity: .6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sidebar { width: 260px; min-width: 260px; }
  .main-content { padding: 1.5rem 1.5rem 2rem; }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .sidebar {
    position: fixed; top: var(--header-h); left: 0;
    width: 300px; height: calc(100vh - var(--header-h));
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 950;
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 940;
    padding-top: var(--header-h);
  }
  .sidebar-overlay.visible { display: block; }

  .main-content { padding: 1.25rem 1rem 2rem; }
  .content-card { padding: 1.25rem; }

  .hero { min-height: 70vh; }
  .hero h1 { font-size: 1.8rem; }

  .section-cards { grid-template-columns: 1fr; }
  .gallery-nav a { width: 38px; height: 38px; }
}

@media (max-width: 480px) {
  :root { --header-h: 60px; }
  .header-brand { font-size: 1.1rem; }
  .header-brand img { height: 36px; }
  .main-content { padding: 1rem .75rem 1.5rem; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  opacity: 0; animation: fadeInUp .6s ease forwards;
}
.animate-in:nth-child(2) { animation-delay: .1s; }
.animate-in:nth-child(3) { animation-delay: .2s; }
.animate-in:nth-child(4) { animation-delay: .3s; }

/* ---------- Wave divider ---------- */
.wave-divider {
  position: relative; height: 60px; overflow: hidden;
}
.wave-divider svg { position: absolute; bottom: 0; width: 100%; }

/* ---------- Print ---------- */
@media print {
  .site-header, .sidebar, .menu-toggle, .gallery-nav { display: none; }
  .site-layout { display: block; padding-top: 0; }
  .main-content { padding: 0; }
}
