/* ==========================================================================
   Kalingapatnam Ancient Port Explorer - Stylesheet
   Pure Vanilla CSS matching the application's premium aesthetic.
   ========================================================================== */

:root {
  --port-ocean: #050d11; /* Deep coastal marine black */
  --port-ocean-light: #0d1e26;
  --port-gold: #facc15;
  --port-coral: #cc5a43; /* Lighthouse Red/Coral color */
  --port-coral-light: #e57e6b;
  --port-coral-dark: #8c3b2b;
  --port-sand: #f5f0bb;
  --port-teal: #14b8a6;
  --port-glass: rgba(13, 30, 38, 0.5);
  --port-border: rgba(204, 90, 67, 0.15);
}

/* Page Main Container */
.port-main {
  background-color: var(--port-ocean);
  color: #f1f5f9;
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}

/* Hero Section */
.port-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 60px;
  background: linear-gradient(180deg, rgba(5, 13, 17, 0.4), rgba(5, 13, 17, 0.95)), 
              url('../assets/kalingapatnam_banner.png') center/cover no-repeat;
  text-align: center;
}

.port-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.12), transparent 60%);
  z-index: 1;
}

.port-hero-content {
  position: relative;
  z-index: 2;
  width: min(880px, 90%);
}

.port-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 16px;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 100px;
  color: var(--port-teal);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.port-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 700;
  color: #ffffff;
}

.port-hero h1 span {
  color: var(--port-coral-light);
  background: linear-gradient(135deg, var(--port-coral-light), var(--port-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.port-hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0 auto;
  max-width: 720px;
}

/* Sections General */
.port-section {
  padding: 80px 0;
}

.port-section:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

.port-container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.port-section-header {
  margin-bottom: 50px;
  text-align: center;
}

.port-eyebrow {
  color: var(--port-coral-light);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}

.port-section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 16px;
  color: #ffffff;
}

.port-section-header p {
  color: #94a3b8;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Content Grid / Two Columns */
.port-grid-2col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

@media (max-width: 900px) {
  .port-grid-2col {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.port-text-block p {
  line-height: 1.75;
  color: #cbd5e1;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.port-text-block p:last-child {
  margin-bottom: 0;
}

.port-highlight-box {
  background: var(--port-glass);
  border: 1px solid var(--port-border);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(12px);
}

.port-highlight-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: var(--port-coral-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.port-highlight-box ul {
  padding-left: 20px;
  margin: 0;
}

.port-highlight-box li {
  color: #cbd5e1;
  margin-bottom: 12px;
  line-height: 1.6;
}

.port-highlight-box li:last-child {
  margin-bottom: 0;
}

/* Interactive Timeline */
.timeline-flow {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-flow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--port-border) 10%, var(--port-border) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-step {
  display: flex;
  justify-content: flex-end;
  padding-right: 50%;
  position: relative;
  margin-bottom: 40px;
}

.timeline-step:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 50%;
}

.timeline-step-marker {
  position: absolute;
  left: 50%;
  top: 15px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--port-ocean);
  border: 3px solid var(--port-coral-light);
  transform: translateX(-50%);
  z-index: 2;
  transition: background 0.3s;
}

.timeline-step:hover .timeline-step-marker {
  background: var(--port-gold);
  box-shadow: 0 0 10px var(--port-gold);
}

.timeline-step-card {
  background: var(--port-glass);
  border: 1px solid var(--port-border);
  border-radius: 12px;
  padding: 24px;
  width: 85%;
  margin-right: 40px;
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
}

.timeline-step:nth-child(even) .timeline-step-card {
  margin-right: 0;
  margin-left: 40px;
}

.timeline-step-card:hover {
  transform: translateY(-2px);
  border-color: var(--port-coral-light);
}

.timeline-step-year {
  color: var(--port-gold);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 8px;
  display: block;
}

.timeline-step-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.timeline-step-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .timeline-flow::before {
    left: 20px;
  }
  .timeline-step {
    justify-content: flex-start;
    padding-left: 45px;
    padding-right: 0;
  }
  .timeline-step:nth-child(even) {
    padding-left: 45px;
  }
  .timeline-step-marker {
    left: 20px;
  }
  .timeline-step-card {
    width: 100%;
    margin-right: 0;
  }
  .timeline-step:nth-child(even) .timeline-step-card {
    margin-left: 0;
  }
}

/* Card Grid Styles for Trade and Heritage */
.port-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.port-card {
  background: var(--port-glass);
  border: 1px solid var(--port-border);
  border-radius: 16px;
  padding: 30px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(10px);
}

.port-card:hover {
  transform: translateY(-5px);
  border-color: var(--port-coral-light);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.port-card-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  display: block;
}

.port-card h3 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #ffffff;
}

.port-card p {
  margin: 0;
  line-height: 1.6;
  color: #cbd5e1;
  font-size: 0.95rem;
}

/* Visual Gallery Grid */
.port-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.port-gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--port-border);
  cursor: pointer;
  group: true;
}

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

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

.port-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 13, 17, 0.95) 0%, rgba(5, 13, 17, 0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.port-gallery-overlay h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.port-gallery-overlay p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--port-coral-light);
}

/* References Section */
.port-references {
  background: var(--port-glass);
  border: 1px solid var(--port-border);
  border-radius: 16px;
  padding: 40px;
}

.port-references h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin: 0 0 20px;
  color: #ffffff;
}

.port-references ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.port-references li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 16px;
  line-height: 1.6;
  color: #cbd5e1;
  font-size: 0.98rem;
}

.port-references li:last-child {
  margin-bottom: 0;
}

.port-references li::before {
  content: '📖';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.9rem;
}

/* Page Footer */
.port-footer {
  padding: 40px 0;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.port-footer a {
  color: var(--port-coral-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.port-footer a:hover {
  color: var(--port-gold);
}

/* Bookmark UI Integration */
.port-bookmark-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.port-bookmark-btn {
  background: var(--port-glass);
  border: 1px solid var(--port-border);
  color: var(--port-coral-light);
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.port-bookmark-btn:hover {
  border-color: var(--port-coral-light);
  background: rgba(204, 90, 67, 0.1);
  transform: translateY(-1px);
}

.port-bookmark-btn.is-saved {
  background: var(--port-coral-light);
  color: var(--port-ocean);
  border-color: var(--port-coral-light);
}

/* Interactive Detail Modal */
.museum-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.museum-modal.open {
  display: grid;
}

.museum-modal-card {
  position: relative;
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--port-border);
  border-radius: 22px;
  background: var(--port-ocean-light);
  color: #f1f5f9;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.museum-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--port-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 1.45rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.museum-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modal-category {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--port-coral-light);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.museum-modal-card h2 {
  margin: 0 42px 7px 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.modal-location {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-weight: 600;
}

.modal-description {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

body.modal-open {
  overflow: hidden;
}
