/* =========================================================
   VIEWS.CSS - TATA LETAK HALAMAN
   1. Home Page (Hero Section)
   2. Home Page (About Section)
========================================================= */

/* =========================================================
   1. HOME PAGE - HERO SECTION
========================================================= */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 55vh;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-text h1 {
    font-size: 40px;
    color: var(--color-black);
}

.hero-text h2 {
    font-size: 45px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-image {
    position: relative;
    width: 400px;
    height: 450px;
}

.image-bg {
    position: absolute;
    bottom: 30px;
    width: 370px;
    height: 330px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-image);
    z-index: 1;
}

#slide-img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 110%;
    object-fit: contain;
    z-index: 2;
    transition: all var(--transition-slow);
}

@media screen and (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: auto;
        gap: 10px;
    }
    .hero-left {
        display: contents;
    }
    .hero-text {
        order: 1;
        margin-top: 35px;
        margin-bottom: -10px;
    }
    .hero-text h1, .hero-text h2 {
        font-size: 27px;
    }
    .hero-image {
        order: 2;
        width: 200px;
        height: 250px;
        margin: 0 auto;
    }
    .image-bg {
        width: 180px;
        height: 170px;
        bottom: 30px;
        border-radius: var(--radius-xl);
    }
}

/* =========================================================
   2. HOME PAGE - ABOUT SECTION
========================================================= */
.about {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--color-black);
}

.section-title h2 span {
    color: var(--color-primary);
}

.section-title p {
    color: #666;
    margin-top: 10px;
    font-size: 16px;
}

.about-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 50px;
}

.about-text {
    flex: 1.2;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--color-black);
}

.about-text p {
    line-height: 1.8;
    color: var(--color-text);
    font-size: 16px;
    margin-bottom: 15px;
    text-align: justify;
}

.about-info {
    flex: 1;
    background-color: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid #eee;
}

@media screen and (max-width: 768px) {
    .about {
        padding: 50px 0;
    }
    .about-container {
        flex-direction: column;
        gap: 30px;
    }
    .about-info {
        padding: 20px;
    }
}

/* =========================================================
   3. HOME PAGE - TIMELINE SECTION
========================================================= */
.timeline {
    padding: 80px 0;
}

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Garis tengah vertikal */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-top: -70px; /* <-- INI KUNCINYA: Menarik kotak naik ke atas */
}

.timeline-item:first-child {
    margin-top: 0;
}

/* Lingkaran di tengah garis */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-white);
    border: 4px solid var(--color-primary);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.left { left: 0; }
.right { left: 50%; }
.right::after { left: -10px; }

/* Desain Kartu & Bingkai Foto */
.timeline-content {
    padding: 20px;
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid #eee;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.timeline-year {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
}

.timeline-image-frame {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

.timeline-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.timeline-content:hover .timeline-image-frame img {
    transform: scale(1.1); /* Efek zoom saat di-hover */
}

.timeline-content h4 {
    color: var(--color-black);
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.click-hint {
    font-size: 12px;
    color: var(--color-secondary);
    font-weight: bold;
}

/* RESPONSIVE TIMELINE (Mobile) */
@media screen and (max-width: 768px) {
    .timeline-container::after { left: 20px; }
    
    .timeline-item { 
        width: 100%; 
        padding-left: 50px; 
        padding-right: 0; 
        margin-top: 20px; /* <-- Kembalikan jarak normal agar tidak bertumpuk di HP */
    }
    
    .timeline-item:first-child {
        margin-top: 0;
    }

    .right { left: 0; }
    .timeline-item::after, .right::after { left: 10px; }
}