/* :root CSS Variables */
:root {
    --primary-font: 'Poppins', sans-serif;
    --heading-color: #333;
    --text-muted: #6c757d;
    --light-orange: #fff8f0;
    --primary-color: #dc3545;
    --primary-color-hover: #c82333;
    --masthead-overlay: rgba(0, 0, 0, 0.1);
    --box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    --transition-duration: 0.3s;
    --section-padding: 8rem;
    --heading-margin-bottom: 2.5rem;
}

/* General Styles */
body {
    font-family: var(--primary-font);
    line-height: 1.7;
    color: var(--text-muted);
    background-color: var(--light-orange);
    font-size: 1.2rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--heading-color);
}

html {
    scroll-padding-top: var(--navbar-height);
}

/* Animation Keyframes */
.fade-in-text {
    animation: fadeIn 2s ease-in-out;
    /* Lebih cepat */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        /* Opacity normal */
        transform: translateY(0);
    }
}

/* Styling untuk Kolom yang Berisi Gambar */
.col-lg-6.gambar-full {
    /* Class tambahan untuk mempermudah penargetan */
    display: flex;
    align-items: stretch;
    /* Gambar mengisi ketinggian kolom */
    padding: 0;
    /* Hilangkan padding pada kolom */
}

/* Styling untuk Gambar */
.animated-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Gambar memenuhi area dengan memotong jika perlu */
    border-radius: 0;
    /* Hilangkan border radius */
    box-shadow: none;
    /* Hilangkan box shadow */
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    animation: none;
    /* Hilangkan animasi pulse */
}

.animated-image:hover {
    transform: scale(1.02);
    /* Zoom tipis saat di-hover */
}

/* Modified Styling */
.col-lg-6 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Text Styling */
.text-left {
    text-align: justify;
}

.text-left h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.text-left p {
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Masthead Styles */
.masthead {
    padding: 12rem 0;
    background: linear-gradient(to bottom, rgba(220, 53, 69, 0.8) 0%, rgba(220, 53, 69, 0.8) 100%), url('https://source.unsplash.com/1920x1080/?culture');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-size: cover;
    color: white;
    position: relative;
    overflow: hidden;
}

.masthead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--masthead-overlay);
    z-index: 1;
}

.masthead .container {
    position: relative;
    z-index: 2;
}

.masthead h1 {
    font-size: 4.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: wobble 5s infinite alternate ease-in-out;
}

@keyframes wobble {
    0% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(5px);
    }
}

.masthead p {
    font-size: 1.75rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Page Section Styles */
.page-section {
    padding: var(--section-padding) 0;
}

.page-section h2 {
    font-size: 3rem;
    margin-bottom: var(--heading-margin-bottom);
    color: var(--heading-color);
    text-align: center;
}

/* Divider Styles */
.divider {
    display: none;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 1.2rem 2.5rem;
    font-size: 1.4rem;
    transition: all var(--transition-duration) ease;
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

/* Feature Item Styles */
.feature-item {
    text-align: center;
    padding: 2.5rem;
    border-radius: 1.2rem;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-duration) ease;
    margin-bottom: 3rem;
}

.feature-item:hover {
    transform: translateY(-7px);
    box-shadow: var(--box-shadow-hover);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 3.5em;
    margin-bottom: 1.2rem;
}

.feature-item h4 {
    font-size: 1.7rem;
    margin-bottom: 1.2rem;
    color: var(--heading-color);
}

.feature-item p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Card Styles */
.card {
    border-radius: 1.2rem;
    transition: all var(--transition-duration) ease;
    border: none;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

/* Styling untuk Box Sejarah */
.sejarah-aksara-batak {
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 100%;
}

.sejarah-aksara-batak h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
    text-align: left;
}

.sejarah-aksara-batak p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.sejarah-aksara-batak a {
    color: var(--primary-color);
    text-decoration: none;
}

/* History-box styling */
.history-box {
    background-color: #e9ecef;
    border-radius: 1.2rem;
    padding: 2.5rem;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease, background-color var(--transition-duration) ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.history-box:hover {
    transform: translateY(-7px);
    box-shadow: var(--box-shadow-hover);
    background-color: var(--light-orange);
}

.history-box h4 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
}

.history-box p {
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.history-box a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Styling Tambahan untuk Kartu Sejarah */
.history-card {
    transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
    background-color: #f8f9fa;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Contact Section Styles */
#contact .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(230, 145, 56, 0.25);
}

#contact .form-floating>label {
    color: #e69138;
}

#contact .form-floating:focus-within>label {
    color: #495057;
}

#contact i {
    transition: color 0.2s ease-in-out;
}

#contact i:hover {
    color: #e69138;
    transition: color 0.2s ease-in-out;
}

/* Portfolio Styles (Gabungan) */
#portfolio {
    padding: 4rem 0;
    background-color: #f8f9fa;
    /* Latar belakang yang lebih netral */
}

.portfolio-grid {
    display: flex;
    /* Menggunakan Flexbox untuk animasi slider */
    overflow-x: auto;
    /* Membuat slider horizontal */
    scroll-snap-type: x mandatory;
    /* Efek snap saat scroll */
    padding-bottom: 1rem;
    /* Ruang untuk bayangan */
    -webkit-overflow-scrolling: touch;
    /* Untuk scrolling yang lebih halus di iOS */
}

.portfolio-item {
    flex: 0 0 300px;
    /* Ukuran item, sesuaikan dengan kebutuhan */
    width: 300px;
    height: 250px;
    /* Tinggi fix agar gambar proporsional */
    margin-right: 1rem;
    position: relative;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    scroll-snap-align: start;
    /* Item berhenti di awal */
    overflow: hidden;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.portfolio-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Memastikan gambar mengisi area dengan proporsi yang benar */
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
    /* Efek zoom halus saat dihover */
}

.portfolio-caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
    /* Mengikuti border item */
}

.portfolio-item:hover .portfolio-caption {
    opacity: 1;
}

.portfolio-category {
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.portfolio-name {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Media Queries for Responsiveness */

/* Extra small devices (phones, less than 768px) */
@media (max-width: 767.98px) {
    .col-md-6 {
        width: 100%;
    }

    .history-box {
        padding: 1.75rem;
    }

    .history-box h4 {
        font-size: 1.5rem;
    }

    .history-box p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .masthead h1 {
        font-size: 3.0rem;
    }

    .masthead p {
        font-size: 1.4rem;
    }

    .text-left h2 {
        font-size: 2.2rem;
    }

    .text-left p {
        font-size: 1.1rem;
    }

    .animated-image {
        max-width: 100%;
        animation: none;
    }

    .col-lg-6 {
        padding: 10px;
    }

    .animated-image:hover {
        transform: scale(1);
        filter: none;
    }

    /* Portfolio Responsiveness */
    .portfolio-grid {
        display: flex;
        /* Menggunakan Flexbox untuk animasi slider */
        overflow-x: auto;
        /* Membuat slider horizontal */
        scroll-snap-type: x mandatory;
        /* Efek snap saat scroll */
        padding-bottom: 1rem;
        /* Ruang untuk bayangan */
        -webkit-overflow-scrolling: touch;
        /* Untuk scrolling yang lebih halus di iOS */
    }

    .portfolio-item {
        flex: 0 0 60%;
        /* Ukuran item, sesuaikan dengan kebutuhan */
        width: 60%;
        height: 150px;
        /* Tinggi fix agar gambar proporsional */
        margin-right: 1rem;
        position: relative;
        border-radius: 10px;
        box-shadow: var(--box-shadow);
        scroll-snap-align: start;
        /* Item berhenti di awal */
        overflow: hidden;
        transition: transform 0.3s ease;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .masthead h1 {
        font-size: 4rem;
    }

    .portfolio-item {
        flex: 0 0 40%;
        /* Ukuran item, sesuaikan dengan kebutuhan */
        width: 40%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .page-section h2 {
        font-size: 2.8rem;
    }

    .col-md-6 {
        width: 100%;
    }

    .history-box {
        padding: 2rem;
        margin-top: 2rem;
    }

    .history-box h3 {
        font-size: 1.6rem;
    }

    .history-box p {
        font-size: 1.15rem;
    }

    /* Portfolio Responsiveness */

    .portfolio-item {
        flex: 0 0 40%;
        /* Ukuran item, sesuaikan dengan kebutuhan */
        width: 40%;
        height: 200px;
        /* Tinggi fix agar gambar proporsional */
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .page-section h2 {
        font-size: 2.9rem;
    }

    .history-box {
        padding: 2.25rem;
        margin-top: 2.25rem;
    }

    .history-box h3 {
        font-size: 1.7rem;
    }

    .history-box p {
        font-size: 1.2rem;
    }
}
.text-maroon {
    color: #7B241C;
}
#about p {
  color: #444;
  line-height: 1.8;
  font-size: 1.05rem;
}

#about img {
  max-height: 350px;
  object-fit: contain;
}

.animated-image {
    animation: zoomInOut 5s ease-in-out infinite;
}

.animated-image {
    animation: zoomInOut 8s ease-in-out infinite;
    /* Perpanjang durasi menjadi 8 detik */
}

@keyframes zoomInOut {
    0% {
        transform: scale(1);
    }

    50% {
        /* Pindahkan perubahan skala ke tengah animasi */
        transform: scale(1.02);
        /* Kurangi besar zoom menjadi 1.02 */
    }

    100% {
        transform: scale(1);
    }
}

