:root {
    --premium-bg: #F8F9FA;
    --premium-navy: #0D1B2A;
    --premium-gold: #D4AF37;
    --premium-brown: #3B2403;
    --premium-light-brown: #806C5F;
    --mobile-card: #FEFCE8;
    --mobile-text: #422006;
    --premium-text: #2D3436;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body { background-color: var(--premium-bg); color: var(--premium-text); font-family: 'Cairo', sans-serif; overflow-x: hidden; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }

img { max-width: 100%; height: auto; }

/* Mobile-Inspired Header */
.artifact-hero {
    position: relative;
    height: 400px;
    background: linear-gradient(to bottom, var(--premium-light-brown), #000000);
    overflow: visible; /* To allow 360 button to overflow */
    display: flex;
    align-items: center;
    justify-content: center;
}

.artifact-main-img {
    position: relative;
    z-index: 2;
    max-height: 280px;
    max-width: 90%;
    margin-bottom: 40px; /* Moves image up slightly */
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

h1, h2, h3, h4, h5, h6 {
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
}
#audio-section h3 {
    font-size: clamp(1rem, 4vw, 1.5rem) !important;
}

.artifact-main-img:hover { transform: scale(1.1) rotate(2deg); }

.back-nav {
    position: absolute;
    top: 30px;
    inset-inline-start: 30px;
    z-index: 10;
}

.btn-premium-back {
    width: 45px;
    height: 45px;
    background: var(--mobile-card);
    color: var(--mobile-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.btn-premium-back:hover { 
    background: var(--premium-brown); 
    color: white; 
    transform: scale(1.1);
}

/* 360 Button */
.btn-360-wrap {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}

.btn-360 {
    width: 75px;
    height: 75px;
    background: var(--mobile-card);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    color: var(--mobile-text);
    transition: 0.3s;
    cursor: pointer;
}

.btn-360 i { font-size: 1.5rem; margin-bottom: 2px; }
.btn-360 span { font-size: 0.65rem; font-weight: 800; }

.btn-360:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* Hero Title Info */
.hero-title-info {
    position: absolute;
    bottom: 30px;
    inset-inline-start: 25px; /* Right in Arabic, Left in English/French */
    text-align: start;
    color: white;
    z-index: 10;
    max-width: 40%; /* Prevent clash with centered 360 button */
}

.hero-title-info h1 {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    word-wrap: break-word;
}

.hero-title-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
    word-wrap: break-word;
}

/* Content Section */
.details-container {
    max-width: 900px;
    margin: 60px auto 50px;
    position: relative;
    z-index: 5;
    padding: 0 20px;
}

.main-card {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.03);
}

.section-title {
    position: relative;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--mobile-text);
    margin-bottom: 25px;
    padding-inline-start: 15px;
    border-inline-start: 4px solid var(--premium-brown);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--premium-bg);
    padding: 15px 20px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s;
}

.info-item:hover { border-color: var(--premium-brown); background: var(--mobile-card); }

.info-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-text);
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.info-content .label { font-size: 0.75rem; color: #888; display: block; margin-bottom: 2px; }
.info-content .value { font-size: 0.95rem; font-weight: 700; color: var(--mobile-text); }

.description-text {
    font-size: 1.05rem;
    line-height: 2;
    color: #444;
    text-align: justify;
    margin-bottom: 40px;
    padding: 0 5px;
}

/* Sleek & Professional Audio Player */
.mobile-audio-box {
    background: var(--mobile-card);
    border-radius: 24px;
    padding: 25px 30px 45px 30px;
    color: var(--mobile-text);
    box-shadow: 0 12px 30px rgba(66, 32, 6, 0.06);
    max-width: 520px;
    margin: 0 auto;
    border: 1px solid rgba(66, 32, 6, 0.08);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    direction: ltr; /* Layout starts left for all languages (play button on left) */
}

.audio-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--premium-brown);
    border: none;
    color: white;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(59, 36, 3, 0.2);
    flex-shrink: 0;
    cursor: pointer;
}

.audio-play-btn:hover { transform: scale(1.08); background: #4B3413; }

.waveform-slider-container {
    flex: 1;
    position: relative;
    height: 60px;
}

.waveform-slider {
    position: relative;
    width: 100%;
    height: 45px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.waveform-bars {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
}

.waveform-bar {
    flex: 1;
    background: rgba(59, 36, 3, 0.12);
    border-radius: 3px;
    transition: background 0.1s ease;
}

.waveform-bar.active {
    background: var(--premium-brown);
}

.seeker-head {
    position: absolute;
    top: 0;
    height: 45px;
    width: 0;
    pointer-events: none;
    transform: translateX(-50%);
}

.seeker-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--premium-brown);
    height: 100%;
}

.seeker-knob {
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--premium-brown);
    border-radius: 50%;
    transform: translateX(-50%);
}

.seeker-time {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--premium-brown);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}

.geology-detail-block {
    margin-top: 28px;
}

.geology-gallery {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gallery-track-wrap {
    flex: 1;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.gallery-track-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-nav {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--mobile-card);
    color: var(--mobile-text);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
}

.gallery-dot.active {
    background: var(--mobile-text);
}

@media (max-width: 768px) {
    .artifact-hero { height: 300px; padding-top: 50px; }
    .artifact-main-img { max-height: 200px; }
    .hero-title-info { bottom: 15px; inset-inline-start: 15px; max-width: 38%; }
    .hero-title-info h1 { font-size: clamp(0.95rem, 4vw, 1.15rem); }
    .hero-title-info p { font-size: clamp(0.7rem, 3vw, 0.8rem); }
    .main-card { padding: 25px 20px; border-radius: 25px; }
    .details-container { margin-top: 50px; padding: 0 15px; }
    .btn-360-wrap { bottom: -25px; }
    .btn-360 { width: 60px; height: 60px; }
    .btn-360 i { font-size: 1.2rem; }
    .btn-360 span { font-size: 0.55rem; }
    .info-grid { grid-template-columns: 1fr; gap: 10px; }
    
    /* Responsive Audio Player */
    .mobile-audio-box {
        padding: 20px 15px 45px 15px;
        border-radius: 20px;
    }
    .audio-controls {
        gap: 12px;
    }
    .audio-play-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        box-shadow: 0 4px 10px rgba(59, 36, 3, 0.15);
    }
    .waveform-slider-container {
        height: 50px;
    }
    .waveform-slider {
        height: 35px;
    }
    .waveform-bars {
        gap: 2px;
    }
    .seeker-head {
        height: 35px;
    }
    .seeker-line {
        width: 1.5px;
    }
    .seeker-knob {
        width: 8px;
        height: 8px;
        bottom: -5px;
    }
    .seeker-time {
        top: 42px;
        font-size: 0.68rem;
    }
}

/* Zoology Detail Cards */
.zoology-detail-card {
    background: var(--mobile-card);
    border: 1.2px solid rgba(66, 32, 6, 0.15);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.zoology-detail-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.zoology-detail-divider {
    height: 1px;
    background-color: rgba(66, 32, 6, 0.1);
    margin: 5px 0;
}

.zoology-detail-icon {
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-text);
    font-size: 1.05rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.zoology-detail-content {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-grow: 1;
}

.zoology-detail-label {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    color: var(--mobile-text);
    font-size: 0.95rem;
    white-space: nowrap;
}

.zoology-detail-value {
    font-family: 'Cairo', sans-serif;
    color: #4b5563; /* grey.shade700 */
    font-size: 0.9rem;
}

.zoology-detail-value.scientific {
    font-style: italic;
    font-weight: 700;
}

