/*
 * Khambhat Ancient Port Explorer Styles
 * Supports Dark and Light themes via .light-theme body class
 */

:root {
    --khambhat-primary: #d4a373;
    --khambhat-secondary: #283618;
    --khambhat-accent: #bc6c25;
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg: #2d2d2d;
    --border-color: #444;
}

[data-theme="light"] {
    --khambhat-primary: #bc6c25;
    --khambhat-secondary: #606c38;
    --khambhat-accent: #dda15e;
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
}

.port-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-color);
}

.port-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--khambhat-secondary), var(--khambhat-primary));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 20px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 10px;
}

.port-tabs-container {
    margin-bottom: 40px;
}

.port-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 1.1rem;
    color: var(--text-color);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: var(--khambhat-primary);
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

.trade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.trade-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.exports-list {
    line-height: 1.8;
    padding-left: 20px;
}

.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 3px solid var(--khambhat-primary);
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--khambhat-accent);
    border-radius: 50%;
}

.timeline-date {
    font-weight: bold;
    color: var(--khambhat-primary);
    display: block;
    margin-bottom: 5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    background: var(--card-bg);
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

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

.gallery-img-placeholder {
    font-size: 1.5rem;
    color: var(--khambhat-primary);
}

.port-quiz {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.quiz-question {
    margin-bottom: 20px;
}

.quiz-question label {
    display: block;
    margin: 5px 0;
    cursor: pointer;
}

.quiz-result {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.btn-scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--khambhat-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.btn-scroll-top.visible {
    display: block;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .port-tabs {
        flex-direction: column;
        border-bottom: none;
    }

    .tab-btn {
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }
}
