/* ===== IBEX SAILING — MAIN STYLESHEET ===== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:      #0b1f3a;
  --ocean:     #1a4a7c;
  --teal:      #0d7377;
  --teal-light:#14a9b0;
  --sky:       #87ceeb;
  --sand:      #f5e6c8;
  --sand-dark: #e8d5a3;
  --white:     #ffffff;
  --text:      #1e2d3d;
  --text-muted:#5a6e82;
  --radius:    8px;
  --shadow:    0 4px 24px rgba(11,31,58,.18);
  --transition:0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,31,58,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: .04em;
  margin-right: auto;
}

.nav-brand span {
  color: var(--teal-light);
}

.nav-link {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .875rem;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,.1);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: min(70vh, 580px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11,31,58,.15) 0%,
    rgba(11,31,58,.4)  50%,
    rgba(11,31,58,.88) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 40px;
}

.hero-badge {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  font-style: italic;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--sand);
  border-bottom: 1px solid var(--sand-dark);
}

.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--ocean);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb-sep { color: var(--text-muted); }

/* ===== MAIN CONTENT ===== */
.main {
  background: var(--white);
  min-height: 60vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== ARTICLE LAYOUT ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 0 64px;
}

@media (max-width: 820px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== STORY TEXT ===== */
.story h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  border-left: 4px solid var(--teal);
  padding-left: 16px;
  margin-bottom: 24px;
}

.story p {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1rem;
  text-align: justify;
  hyphens: auto;
}

.story p:last-child { margin-bottom: 0; }

.story a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-light);
}

.story a:hover { color: var(--ocean); }

.story h3.story-date {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 32px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.story-figure {
  margin: 20px 0;
  text-align: center;
}

.story-figure img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.story-figure figcaption {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-muted, #666);
  font-style: italic;
}

/* ===== SIDEBAR ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-card {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--sand-dark);
}

.info-card h3 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.info-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.info-row:last-child { margin-bottom: 0; }

.info-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-label {
  font-size: .8rem;
  color: var(--text-muted);
  display: block;
}

.info-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
}

/* ===== FEATURED IMAGE ===== */
.featured-image-section {
  background: #f8f9fa;
  padding: 32px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.featured-image-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

.featured-image-wrap img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.featured-caption {
  text-align: center;
  margin-top: 12px;
  font-size: .9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== GALLERY ===== */
.gallery-section {
  background: var(--white);
  padding: 48px 0 64px;
}

.gallery-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  aspect-ratio: 4/3;
  background: #ddd;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,31,58,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
  background: rgba(11,31,58,.35);
}

.gallery-item-overlay svg {
  color: var(--white);
  opacity: 0;
  transform: scale(.7);
  transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay svg {
  opacity: 1;
  transform: scale(1);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 64px rgba(0,0,0,.5);
}

.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
  transition: var(--transition);
}

.lightbox-close:hover { opacity: 1; transform: scale(1.1); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: .85rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 28px 24px;
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

.footer a {
  color: var(--teal-light);
  text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .nav-link { display: none; }
  .hero-content { padding: 0 20px 28px; }
  .container { padding: 0 20px; }
  .breadcrumb-inner { padding: 10px 20px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 1rem; }
}
