/* ==========================================================================
   Arikamedu Ancient Port Explorer - Stylesheet
   Pure Vanilla CSS matching Incredible India Explorer guidelines.
   ========================================================================== */

:root {
  --port-ocean: #110905;
  --port-ocean-light: #22130b;
  --port-gold: #facc15;
  --port-laterite: #b44c3c;
  --port-laterite-light: #d66453;
  --port-sand: #e6dfd3;
  --port-teal: #38bdf8;
  --port-glass: rgba(34, 19, 11, 0.6);
  --port-border: rgba(214, 100, 83, 0.25);
}

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

.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(17, 9, 5, 0.4), rgba(17, 9, 5, 0.95)), 
              url('../assets/arikamedu_ruins.png') center/cover no-repeat;
  text-align: center;
}

.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(214, 100, 83, 0.12);
  border: 1px solid rgba(214, 100, 83, 0.35);
  border-radius: 100px;
  color: var(--port-laterite-light);
  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-laterite-light);
  background: linear-gradient(135deg, var(--port-laterite-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;
}

.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-laterite-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;
}

.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-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-laterite-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;
}

/* 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-laterite-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-laterite-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;
  }
}

.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-laterite-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;
}

.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;
}

.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(17, 9, 5, 0.95) 0%, rgba(17, 9, 5, 0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0.9;
}

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

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

.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::before {
  content: '📖';
  position: absolute;
  left: 0;
  top: 2px;
}

.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-laterite-light);
  text-decoration: none;
  font-weight: 600;
}

.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-laterite-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-laterite-light);
  background: rgba(214, 100, 83, 0.1);
}

/* 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;
}

.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;
}

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

[data-theme="light"] .port-hero {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(248, 250, 252, 0.98));
}

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

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

[data-theme="light"] .port-card,
[data-theme="light"] .port-highlight-box,
[data-theme="light"] .timeline-step-card,
[data-theme="light"] .port-references,
[data-theme="light"] .museum-modal-card {
  background: #ffffff;
  border-color: rgba(214, 100, 83, 0.3);
  color: #334155;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .port-section-header h2,
[data-theme="light"] .port-card h3,
[data-theme="light"] .port-highlight-box h3,
[data-theme="light"] .port-references h3 {
  color: #0f172a;
}
