/* Enhanced Sejarah Page Styles - Historical journey with cultural elements */

/* Sejarah Hero Section - Cultural Atmosphere */
.cultural-atmosphere-sejarah {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Highlight text styling */
.highlight {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #f39c12);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    position: relative;
    padding: 0 5px;
    white-space: nowrap;
}

.floating-elements-sejarah {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

.floating-char-sejarah {
    position: absolute;
    font-family: 'Noto Sans Batak', sans-serif;
    font-size: 3rem;
    color: var(--accent);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: floatHistorical 20s ease-in-out infinite;
}

.char-sejarah-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    font-size: 2.5rem;
}

.char-sejarah-2 {
    top: 25%;
    right: 15%;
    animation-delay: -4s;
    font-size: 3.2rem;
}

.char-sejarah-3 {
    top: 60%;
    left: 20%;
    animation-delay: -8s;
    font-size: 2.8rem;
}

.char-sejarah-4 {
    top: 35%;
    right: 25%;
    animation-delay: -12s;
    font-size: 3.5rem;
}

.char-sejarah-5 {
    top: 70%;
    right: 10%;
    animation-delay: -16s;
    font-size: 2.2rem;
}

@keyframes floatHistorical {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }

    25% {
        transform: translateY(-15px) rotate(2deg);
        opacity: 0.15;
    }

    50% {
        transform: translateY(0px) rotate(-1deg);
        opacity: 0.2;
    }

    75% {
        transform: translateY(-10px) rotate(1deg);
        opacity: 0.12;
    }
}

.mystical-particles-sejarah {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle-sejarah {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, var(--accent), transparent);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleHistorical 15s linear infinite;
}

.particle-sejarah-1 {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.particle-sejarah-2 {
    top: 40%;
    left: 70%;
    animation-delay: -5s;
}

.particle-sejarah-3 {
    top: 80%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes particleHistorical {

    0%,
    100% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    50% {
        transform: translate(20px, -30px) scale(1);
        opacity: 0.6;
    }

    80% {
        opacity: 0.3;
    }
}

/* Timeline Section Styling */
.timeline-section {
    margin: 60px 0;
    padding: 40px 0;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.timeline-container {
    max-width: 800px;
    margin: 40px auto 0;
    position: relative;
    padding: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), #f39c12, var(--accent));
    transform: translateX(-50%);
    border-radius: 3px;
}

.timeline-item {
    display: flex;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3);
    border: 4px solid white;
}

.timeline-item:nth-child(odd) .timeline-marker {
    margin-right: 40px;
}

.timeline-item:nth-child(even) .timeline-marker {
    margin-left: 40px;
}

.timeline-icon {
    width: 1.8em;
    height: 1.8em;
    filter: brightness(1.2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.timeline-content {
    flex: 1;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    position: relative;
    max-width: 350px;
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 30px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-right-color: var(--card-bg);
}

.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 30px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-left-color: var(--card-bg);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.cultural-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #f39c12);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

.badge-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge-icon {
    width: 1em;
    height: 1em;
    color: currentColor;
    flex-shrink: 0;
}

.badge-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.timeline-period {
    background: linear-gradient(135deg, var(--accent), #f39c12);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.timeline-title {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.timeline-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* Cultural Impact Section */
.cultural-impact-section {
    margin: 60px 0;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.impact-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #f39c12);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.impact-card:hover::before {
    transform: scaleX(1);
}

.impact-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.3);
    transition: all 0.3s ease;
}

.impact-card:hover .impact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(241, 196, 15, 0.4);
}

.impact-icon .batak-char {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.impact-title {
    color: var(--text-primary);
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.impact-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* Historical Figures Section */
.figures-section {
    margin: 60px 0;
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.figure-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.figure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

.figure-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.figure-initial {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.figure-info {
    flex: 1;
}

.figure-name {
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.figure-role {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.figure-desc {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

/* Modern Era Section */
.modern-section {
    margin: 60px 0;
}

.modern-efforts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.effort-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.effort-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.effort-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.effort-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.effort-content h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.effort-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 40px;
    }

    .timeline-item {
        flex-direction: row !important;
        margin-bottom: 40px;
    }

    .timeline-item:nth-child(even) .timeline-marker {
        margin-left: 0;
        margin-right: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-marker {
        margin-right: 20px;
    }

    .timeline-marker {
        width: 60px;
        height: 60px;
        margin-left: 10px !important;
        margin-right: 20px !important;
    }

    .timeline-content {
        max-width: none;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -15px;
        right: auto;
        border-left-color: transparent;
        border-right-color: var(--card-bg);
    }

    .impact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .figures-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modern-efforts {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .char-sejarah-1,
    .char-sejarah-2,
    .char-sejarah-3,
    .char-sejarah-4,
    .char-sejarah-5 {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 10px;
    }

    .timeline-marker {
        width: 50px;
        height: 50px;
        margin-right: 15px !important;
    }

    .timeline-icon {
        font-size: 1.3rem;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-title {
        font-size: 1.2rem;
    }

    .impact-card {
        padding: 25px 20px;
    }

    .figure-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .effort-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Dark theme support */
[data-theme="dark"] .timeline-container::before {
    background: linear-gradient(to bottom, var(--accent), #f39c12, var(--accent));
}

[data-theme="dark"] .timeline-content::before {
    border-right-color: var(--card-bg);
    border-left-color: var(--card-bg);
}

[data-theme="dark"] .timeline-section {
    background: var(--bg-secondary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}