/* =========================================
   VARIABLES & RESET
========================================= */
:root {
    --color-primary: #B72D2C;
    --color-primary-light: #E93138;
    --color-text-dark: #000000;
    --color-text-gray: #5E5E60;
    --color-text-gray-light: #605F62;
    --color-background: #ffffff;
    --color-yellow: #F0AC20;
    --color-yellow-bullet: #E9B814;
    --gradient-about: linear-gradient(180deg, #E8EBEF 0%, #85898D 100%);
    
    --font-family-main: 'Poppins', sans-serif;
    --container-max-width: 1320px; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

body {
    font-family: var(--font-family-main);
    background-color: var(--color-background);
    color: var(--color-text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* =========================================
   UTILITIES & TYPOGRAPHY
========================================= */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem); 
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.text-primary { color: var(--color-primary); }
.text-primary-italic { color: var(--color-primary); font-style: italic; font-weight: 700; }
.text-gray { color: var(--color-text-gray); font-weight: 400; }
.text-dark { color: var(--color-text-dark); }
.text-dark-italic { color: var(--color-text-dark); font-style: italic; font-weight: 700; }

.section-label {
    color: var(--color-yellow);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* Base Buttons */
.btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    border-radius: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn--primary {
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem 2rem;
    box-shadow: 0 8px 20px rgba(183, 45, 44, 0.2);
}
.btn--primary:hover {
    background-color: #9c2524;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(183, 45, 44, 0.3);
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
.header { padding: 1.5rem 0; background-color: var(--color-background); }
.header__container { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.header__logo { max-width: 200px; }
.nav__list { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; gap: 1rem; }
.nav__link { text-decoration: none; color: var(--color-text-gray); font-size: 0.95rem; font-weight: 700; transition: 0.3s; }
.nav__link:hover { color: var(--color-primary); }
.nav__link--highlight { color: var(--color-primary); font-size: 1.1rem; }

/* =========================================
   HERO SECTION
========================================= */
.hero { padding: 2rem 0 4rem; overflow: hidden; }
.hero__container { display: flex; flex-direction: column; gap: 3rem; }
.hero__subtitle-wrapper { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.hero__subtitle { color: var(--color-text-gray-light); font-size: clamp(1rem, 2vw, 1.25rem); font-style: italic; }
.hero__title { margin-bottom: 1.5rem; line-height: 1.2; }
.hero__title-red { color: var(--color-primary); font-size: clamp(2rem, 5vw, 3.5rem); font-style: italic; font-weight: 700; }
.hero__title-black { color: var(--color-text-dark); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; }
.hero__description { color: var(--color-text-dark); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6; margin-bottom: 2rem; max-width: 600px; }

.hero__visual { width: 100%; display: flex; justify-content: center; }
.hero__images { position: relative; width: 100%; max-width: 550px; aspect-ratio: 1/1.1; }
.hero__img { position: absolute; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1); transition: 0.4s; }
.hero__img--back { width: 80%; right: 0; top: 0; border-radius: clamp(20px, 5vw, 50px); z-index: 1; }
.hero__img--front { width: 60%; left: 0; bottom: 5%; border-radius: clamp(15px, 3vw, 25px); z-index: 2; box-shadow: -15px 20px 50px rgba(0,0,0,0.15); }

/* =========================================
   ABOUT SECTION
========================================= */
.about { background: var(--gradient-about); padding: 4rem 0; overflow: hidden; }
.about__container { display: flex; flex-direction: column-reverse; gap: 3rem; align-items: center; }
.about__visual { position: relative; width: 100%; max-width: 450px; }
.about__img { border-radius: clamp(20px, 5vw, 60px); position: relative; z-index: 2; }
.about__decor-box { position: absolute; width: 80%; height: 50%; background-color: var(--color-primary); border-radius: 20px; bottom: -15px; left: -10px; z-index: 1; }
.about__content { width: 100%; max-width: 700px; }
.about__subtitle { font-size: 0.9rem; font-weight: 600; text-decoration: underline; margin-bottom: 1rem; }
.about__title { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.4; margin-bottom: 1.5rem; }
.about__description { font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.6; }

/* =========================================
   SYSTEM SECTION
========================================= */
.system { padding: 4rem 0; background-color: var(--color-background); }
.system__title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; margin-bottom: 1rem; }
.system__description { font-size: clamp(1rem, 1.5vw, 1.1rem); margin-bottom: 3rem; max-width: 800px; }
.system__grid { display: flex; flex-direction: column; gap: 4rem; }
.system__steps { display: flex; flex-direction: column; gap: 2rem; flex: 1; }

.step { display: flex; gap: 1rem; }
.step__bullet { width: 16px; height: 16px; min-width: 16px; background-color: var(--color-yellow-bullet); border-radius: 4px; margin-top: 6px; }
.step__title { color: var(--color-primary); font-size: clamp(1.1rem, 2vw, 1.25rem); font-style: italic; font-weight: 700; margin-bottom: 0.5rem; }
.step__desc { font-size: clamp(0.95rem, 1.5vw, 1.05rem); line-height: 1.6; }

/* PERBAIKAN ARSITEKTUR SYSTEM FLOW */
.system__architecture { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    background-color: #F8FAFC; /* Background abu-abu terang */
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
}

.architecture__title { 
    font-size: 1.15rem; 
    font-weight: 600; 
    text-decoration: underline; 
    text-align: center; 
    margin-bottom: 2.5rem; 
}

/* Base HP: Menumpuk ke bawah di tengah */
.architecture__flow { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 1.5rem; 
    width: 100%; 
}

/* Node (Kotak Gambar + Teks) */
.arch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Teks akan selalu rata bawah */
    gap: 0.75rem;
    width: 120px; /* Lebar dikunci agar rapi */
    text-align: center;
}

/* Gambar dikunci tingginya agar sejajar lurus */
.arch-node__img { 
    height: 60px; /* Tinggi seragam */
    width: auto;
    object-fit: contain;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1); 
    border-radius: 8px; 
    background-color: #fff;
    padding: 5px;
}

.arch-node__label { 
    color: var(--color-primary); 
    font-size: 0.85rem; 
    font-style: italic; 
    font-weight: 700; 
    line-height: 1.2;
}

/* Panah Base HP (Ke bawah) */
.arch-arrow { 
    width: 3px; 
    height: 30px; 
    background-color: var(--color-text-dark); 
    position: relative; 
    flex-shrink: 0;
}
.arch-arrow::after { 
    content: ''; 
    position: absolute; 
    bottom: -5px; 
    left: -4.5px; 
    border-width: 6px 6px 0; 
    border-style: solid; 
    border-color: var(--color-text-dark) transparent transparent transparent; 
}

/* Network Box (Wifi, Ethernet) */
.arch-network { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    gap: 0.5rem; 
    padding: 1rem;
    border: 1px dashed #CBD5E1;
    border-radius: 8px;
    background-color: #ffffff;
}
.arch-network__tag { 
    font-size: 0.8rem; 
    font-style: italic; 
    font-weight: 700; 
    color: #3B82F6;
    background-color: #EFF6FF;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
}
.arch-arrow--small { display: none; }

/* =========================================
   RESULT SECTION
========================================= */
.result { background: var(--gradient-about); padding: 4rem 0; overflow: hidden; }
.result__container { display: flex; flex-direction: column; gap: 3rem; align-items: center; }
.result__visual { width: 100%; max-width: 500px; }
.result__img { border-radius: clamp(20px, 4vw, 40px); box-shadow: 10px 15px 30px rgba(0,0,0,0.1); }
.result__content { width: 100%; max-width: 700px; }
.result__subtitle { font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 600; text-decoration: underline; margin: 0.5rem 0 1.5rem; }
.result__title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; margin-bottom: 1.5rem; }
.result__description { font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.6; }

/* =========================================
   HARDWARE, DATA FLOW, LOCATIONS (Reusables)
========================================= */
.hardware, .data-flow, .locations, .software { padding: 4rem 0; overflow: hidden; }
.locations { background-color: #E1E5E8; }
.hardware__header, .data-flow__header, .locations__header, .software__header { margin-bottom: 3rem; max-width: 900px; }
.hardware__title, .data-flow__title, .locations__title, .software__title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; margin-bottom: 1rem; }
.hardware__subtitle, .data-flow__subtitle, .locations__subtitle, .software__subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; text-decoration: underline; margin-bottom: 1rem; }
.hardware__description, .data-flow__description, .locations__description, .software__description { font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.6; }

/* Hardware Gallery & Timeline */
.hardware__gallery, .location-group__gallery { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 3rem; padding: 0 1rem; }
.hardware__card { position: relative; width: 100%; max-width: 400px; margin: 0 auto; }
.hardware__card-img { border-radius: 30px; box-shadow: 5px 10px 20px rgba(0,0,0,0.15); position: relative; z-index: 2; }
.hardware__card-bg { position: absolute; width: 100%; height: 100%; background-color: var(--color-primary); border-radius: 40px; top: -15px; left: -15px; z-index: 1; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 2rem; margin-top: 2rem; }
.timeline::before { content: ''; position: absolute; left: 28px; top: 10px; bottom: 10px; width: 2px; background-color: #D9D9D9; z-index: 1; }
.timeline__item { display: flex; gap: 1.5rem; position: relative; z-index: 2; }
.timeline__marker { width: 56px; height: 56px; min-width: 56px; background-color: var(--color-yellow-bullet); border: 2px solid #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--color-primary); font-size: 1.5rem; font-weight: 600; }
.timeline__title { color: var(--color-primary); font-size: clamp(1.1rem, 2vw, 1.25rem); font-weight: 600; margin-bottom: 0.5rem; }
.timeline__desc { font-size: clamp(0.95rem, 1.5vw, 1.05rem); line-height: 1.5; }

/* Banners (Wiring & Software) */
.wiring-banner { background: linear-gradient(90deg, #EC3237 0%, #B72D2C 100%); padding: 3rem 0; margin-bottom: 3rem; overflow: hidden; }
.wiring-banner__visual { position: relative; max-width: 600px; margin: 0 auto; width: 100%; }
.wiring-banner__img { border-radius: clamp(20px, 4vw, 40px); position: relative; z-index: 2; box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.wiring-banner__decor { position: absolute; width: 60px; height: 60px; border: 8px solid rgba(255,255,255,0.3); z-index: 1; }
.wiring-banner__decor--left { top: -15px; right: -15px; transform: rotate(15deg); }
.wiring-banner__decor--right { bottom: -15px; left: -15px; transform: rotate(-15deg); }
.wiring-details__list { display: flex; flex-direction: column; gap: 1.5rem; }

/* Locations specific */
.locations__list { display: flex; flex-direction: column; gap: 4rem; }
.location-group { display: flex; flex-direction: column; gap: 2rem; }
.location-group__header-card { background-color: #ffffff; border-radius: 20px; padding: 1.5rem; display: flex; gap: 1rem; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.location-group__title { color: var(--color-primary); font-size: 1.15rem; font-style: italic; font-weight: 700; margin-bottom: 0.5rem; }
.location-group__desc { font-size: 0.95rem; line-height: 1.5; }

/* Software Gallery */
.software-gallery { background-color: #D9D9D9; padding: 4rem 0; }
.software-gallery__container { display: flex; flex-direction: column; gap: 4rem; }
.gallery-item { display: flex; flex-direction: column; gap: 1rem; }
.gallery-item__header { background-color: #fff; padding: 1rem 1.5rem; border-radius: 12px; align-self: flex-start; max-width: 100%; box-shadow: 0 5px 10px rgba(0,0,0,0.05); }
.gallery-item__title { font-size: clamp(1.2rem, 3vw, 1.75rem); line-height: 1.3; }
.gallery-item__title--small { font-size: clamp(1rem, 2vw, 1.25rem); display: block; margin-top: 0.25rem; }
.gallery-item__img { border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid rgba(255,255,255,0.5); }

/* HKI */
.hki { padding: 4rem 0; }
.hki__container { display: flex; flex-direction: column; gap: 3rem; }
.hki-card { background-color: rgba(217, 217, 217, 0.7); border-radius: 24px; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.hki-card__img-main { max-width: 250px; border-radius: 16px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.hki-card__right { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; }
.hki-card__title { font-size: clamp(1.25rem, 3vw, 2rem); line-height: 1.3; text-align: center; }
.hki-card__img-sub { border-radius: 16px; align-self: center; }

/* Footer */
.footer { border-top: 1px solid #EAEAEA; padding-top: 4rem; }
.footer__container { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer__brand { display: flex; flex-direction: column; gap: 1rem; }
.footer__logo { max-width: 250px; }
.footer__address { font-size: 0.95rem; line-height: 1.6; }
.footer__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer__link { text-decoration: none; color: var(--color-text-dark); font-size: 1rem; transition: 0.3s; }
.footer__link:hover { color: var(--color-primary); }
.footer__map-wrapper { max-width: 100%; border: 1px solid #E0E0E0; border-radius: 12px; overflow: hidden; }
.footer__copyright { text-align: center; padding: 1.5rem 0; border-top: 1px solid #EAEAEA; font-size: 0.9rem; }

/* =========================================
   MEDIA QUERIES (TABLET & DESKTOP)
========================================= */
@media (min-width: 768px) {
    .header__container { flex-direction: row; justify-content: space-between; }
    .header__logo { max-width: 300px; }
    .nav__list { gap: 2rem; }
    .nav__link { font-size: 1rem; }

    .hero__container { flex-direction: row; align-items: center; }
    .hero__content { flex: 1.2; padding-right: 2rem; }
    .hero__visual { flex: 1; }
    
    .about__container { flex-direction: row; }
    .about__visual { flex: 1; }
    .about__content { flex: 1.2; }
    
    .system__grid { flex-direction: row; align-items: flex-start; }
    .system__steps { padding-right: 2rem; }
    
    /* MENGUBAH ALUR ARSITEKTUR JADI MENYAMPING DI PC */
    .architecture__flow { 
        flex-direction: row; 
        flex-wrap: wrap; 
    }
    
    /* Mengubah arah panah dari bawah ke kanan */
    .arch-arrow { 
        width: 30px; 
        height: 3px; 
    }
    .arch-arrow::after { 
        top: -4.5px; 
        right: -5px; 
        bottom: auto; 
        left: auto; 
        border-width: 6px 0 6px 6px; 
        border-color: transparent transparent transparent var(--color-text-dark); 
    }
    
    .hardware__gallery, .location-group__gallery { grid-template-columns: repeat(2, 1fr); gap: 3rem; padding: 0; }
    
    .hki-card { flex-direction: row; padding: 3rem; border-radius: 40px; }
    .hki-card__left { flex: 0 0 30%; }
    .hki-card__right { flex: 1; text-align: left; align-items: flex-start; }
    .hki-card__title { text-align: left; }
    .hki-card__img-sub { align-self: flex-start; max-width: 400px; }
    
    .footer__container { grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
}

@media (min-width: 1024px) {
    .result { padding: 0; }
    .result__container { flex-direction: row; align-items: stretch; gap: 4rem; padding-left: 0; }
    .result__visual { flex: 0 0 45%; max-width: 600px; }
    .result__img { border-radius: 0 40px 40px 0; height: 100%; object-fit: cover; }
    .result__content { flex: 1; justify-content: center; padding: 4rem 2rem 4rem 0; }
    
    .location-group__gallery { grid-template-columns: repeat(3, 1fr); }
    .gallery-item__img { border-radius: 20px; }
}