/* ==========================================================================
   Beypore Ancient Port Explorer - Stylesheet
   Pure Vanilla CSS matching Incredible India Explorer aesthetic standards.
   ========================================================================== */

:root {
  --beypore-ocean: #030d1a; /* Deep maritime ocean dark background */
  --beypore-ocean-light: #0b1e36;
  --beypore-teak: #c87d55; /* Rich Nilambur Teak timber tone */
  --beypore-teak-dark: #8b4513;
  --beypore-gold: #facc15; /* Brass and gold accents */
  --beypore-amber: #f59e0b;
  --beypore-terracotta: #b44c3c; /* Laterite terracotta stone */
  --beypore-teal: #38bdf8; /* Maritime sky teal */
  --beypore-sand: #e6dfd3;
  --beypore-glass: rgba(11, 30, 54, 0.65);
  --beypore-border: rgba(200, 125, 85, 0.22);
  --beypore-card-bg: rgba(15, 23, 42, 0.75);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --beypore-ocean: #f8fafc;
  --beypore-ocean-light: #ffffff;
  --beypore-glass: rgba(255, 255, 255, 0.85);
  --beypore-border: rgba(200, 125, 85, 0.3);
  --beypore-card-bg: #ffffff;
}

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

[data-theme="light"] .port-main {
  color: #1e293b;
}

/* Hero Section */
.port-hero {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 130px 0 70px;
  background: linear-gradient(180deg, rgba(3, 13, 26, 0.45), rgba(3, 13, 26, 0.95)), 
              url('../assets/beypore_port_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(200, 125, 85, 0.15), transparent 70%);
  z-index: 1;
}

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

.port-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 18px;
  background: rgba(200, 125, 85, 0.15);
  border: 1px solid rgba(200, 125, 85, 0.4);
  border-radius: 100px;
  color: var(--beypore-teak);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

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

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

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

[data-theme="light"] .port-hero h1 {
  color: #ffffff;
}

/* Sections General */
.port-section {
  padding: 85px 0;
  position: relative;
}

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

[data-theme="light"] .port-section:nth-of-type(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

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

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

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

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

[data-theme="light"] .port-section-header h2 {
  color: #0f172a;
}

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

[data-theme="light"] .port-section-header p {
  color: #64748b;
}

/* Grids */
.port-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

.port-text-block h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0 0 20px;
  color: #ffffff;
}

[data-theme="light"] .port-text-block h2 {
  color: #0f172a;
}

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

[data-theme="light"] .port-text-block p {
  color: #334155;
}

.port-highlight-box {
  background: var(--beypore-glass);
  border: 1px solid var(--beypore-border);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .port-highlight-box {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

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

.port-highlight-box li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  color: #e2e8f0;
  line-height: 1.5;
}

[data-theme="light"] .port-highlight-box li {
  color: #334155;
}

.port-highlight-box li::before {
  content: '⚓';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.9rem;
  color: var(--beypore-teak);
}

/* Feature Cards Grid */
.port-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.port-card {
  background: var(--beypore-card-bg);
  border: 1px solid var(--beypore-border);
  border-radius: 16px;
  padding: 30px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.port-card:hover {
  transform: translateY(-5px);
  border-color: var(--beypore-teak);
  box-shadow: 0 12px 30px rgba(200, 125, 85, 0.15);
}

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

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

[data-theme="light"] .port-card h3 {
  color: #0f172a;
}

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

[data-theme="light"] .port-card p {
  color: #64748b;
}

/* Interactive Uru Explorer Section */
.uru-explorer-wrapper {
  background: var(--beypore-glass);
  border: 1px solid var(--beypore-border);
  border-radius: 20px;
  padding: 35px;
  backdrop-filter: blur(12px);
}

.uru-nav-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
}

.uru-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.3s ease;
}

[data-theme="light"] .uru-tab-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

.uru-tab-btn:hover, .uru-tab-btn.active {
  background: linear-gradient(135deg, var(--beypore-teak-dark), var(--beypore-teak));
  border-color: var(--beypore-gold);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(200, 125, 85, 0.3);
}

.uru-display-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

@media (max-width: 768px) {
  .uru-display-panel {
    grid-template-columns: 1fr;
  }
}

.uru-panel-image-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--beypore-border);
}

.uru-panel-image-wrap img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.uru-panel-details h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--beypore-gold);
  margin-top: 0;
  margin-bottom: 12px;
}

.uru-badge {
  display: inline-block;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--beypore-gold);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.uru-panel-details p {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 1.02rem;
  margin-bottom: 20px;
}

[data-theme="light"] .uru-panel-details p {
  color: #334155;
}

.uru-spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.uru-spec-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--beypore-teak);
}

[data-theme="light"] .uru-spec-item {
  background: rgba(0, 0, 0, 0.03);
}

.uru-spec-label {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.uru-spec-val {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
}

[data-theme="light"] .uru-spec-val {
  color: #0f172a;
}

/* Khalasi Physics Interactive Calculator */
.khalasi-calc-card {
  margin-top: 40px;
  background: rgba(3, 13, 26, 0.6);
  border: 1px dashed var(--beypore-teak);
  border-radius: 16px;
  padding: 25px;
}

[data-theme="light"] .khalasi-calc-card {
  background: rgba(255, 255, 255, 0.8);
}

.khalasi-calc-header {
  text-align: center;
  margin-bottom: 20px;
}

.khalasi-calc-header h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--beypore-gold);
  margin: 0 0 5px;
}

.calc-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.calc-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cbd5e1;
}

[data-theme="light"] .calc-group label {
  color: #334155;
}

.calc-group input[type="range"] {
  width: 100%;
  accent-color: var(--beypore-teak);
}

.calc-output {
  background: rgba(200, 125, 85, 0.12);
  border: 1px solid var(--beypore-border);
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 15px;
  text-align: center;
}

.calc-res-item span {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.calc-res-item strong {
  font-size: 1.25rem;
  color: var(--beypore-gold);
}

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

.timeline-flow::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 3px;
  background: linear-gradient(180deg, var(--beypore-teak), var(--beypore-gold));
}

@media (min-width: 768px) {
  .timeline-flow::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-step {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .timeline-step:nth-child(odd) {
    flex-direction: row-reverse;
  }
}

.timeline-step-marker {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--beypore-gold);
  border: 4px solid var(--beypore-ocean);
  box-shadow: 0 0 10px var(--beypore-gold);
  z-index: 2;
}

@media (min-width: 768px) {
  .timeline-step-marker {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-step-card {
  width: calc(100% - 60px);
  margin-left: 60px;
  background: var(--beypore-card-bg);
  border: 1px solid var(--beypore-border);
  padding: 22px;
  border-radius: 14px;
}

@media (min-width: 768px) {
  .timeline-step-card {
    width: 44%;
    margin-left: 0;
  }
}

.timeline-step-year {
  display: inline-block;
  background: rgba(200, 125, 85, 0.2);
  color: var(--beypore-teak);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.timeline-step-card h3 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #ffffff;
}

[data-theme="light"] .timeline-step-card h3 {
  color: #0f172a;
}

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

[data-theme="light"] .timeline-step-card p {
  color: #64748b;
}

/* Gallery Grid & Modals */
.port-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.port-gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--beypore-border);
  cursor: pointer;
  height: 260px;
}

.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(3, 13, 26, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.port-gallery-overlay h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 0 0 4px;
  color: #ffffff;
}

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

/* Museum Modal */
.museum-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 13, 26, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.museum-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.museum-modal-card {
  background: var(--beypore-ocean-light);
  border: 1px solid var(--beypore-border);
  border-radius: 20px;
  width: min(650px, 92%);
  padding: 35px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .museum-modal-card {
  background: #ffffff;
}

.museum-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-category {
  color: var(--beypore-teak);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.museum-modal-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 8px 0;
  color: #ffffff;
}

[data-theme="light"] .museum-modal-card h2 {
  color: #0f172a;
}

.modal-description {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 1rem;
}

[data-theme="light"] .modal-description {
  color: #334155;
}

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

.port-references h3 {
  font-family: 'Playfair Display', serif;
  color: var(--beypore-gold);
  margin-top: 0;
  margin-bottom: 20px;
}

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

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

[data-theme="light"] .port-references li {
  color: #475569;
}

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

/* Bookmark Button */
.journey-bookmark-btn {
  background: rgba(200, 125, 85, 0.15);
  border: 1px solid var(--beypore-teak);
  color: var(--beypore-gold);
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.journey-bookmark-btn:hover {
  background: var(--beypore-teak);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(200, 125, 85, 0.4);
}

.journey-bookmark-btn[aria-pressed="true"] {
  background: var(--beypore-teak);
  color: #ffffff;
}

/* Footer */
.port-footer {
  padding: 35px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.port-footer a {
  color: var(--beypore-teak);
  text-decoration: none;
}

.port-footer a:hover {
  text-decoration: underline;
}
