/* =========================================================
   KAMESA GROUP — Main Stylesheet
   Palet: dasar gelap + aksen merah (mengikuti identitas logo &
   referensi kamesa.co.id), dipadukan tipografi condensed-bold
   untuk judul (industrial/infrastruktur) + sans netral untuk teks.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-dark: #1a1a1a;
    --color-dark-2: #262626;
    --color-accent: #c8272c;
    --color-accent-dark: #a01f23;
    --color-light-bg: #f5f5f4;
    --color-white: #ffffff;
    --color-text: #232323;
    --color-text-muted: #6e6e6e;
    --color-border: #e4e2df;

    --font-display: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1200px;
    --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-white);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    text-align: center;
    color: var(--color-dark);
}

section { padding: 88px 0; }
section.bg-light { background: var(--color-light-bg); }

/* =========================== NAVBAR =========================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: rgba(0,0,0,0.5);
    transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
    background: rgba(0,0,0,0.8);
    padding: 10px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
}
.navbar-brand img { height: 34px; }

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.navbar-menu > li { position: relative; }
.navbar-menu > li > a {
    display: block;
    padding: 10px 16px;
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background var(--transition), color var(--transition);
}
.navbar-menu > li > a:hover,
.navbar-menu > li.active > a {
    background: var(--color-accent);
}

.navbar-dropdown {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    min-width: 260px;
    background: var(--color-white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 8px 0;
    border-radius: 2px;
}
.navbar-menu > li:hover .navbar-dropdown { display: block; }
.navbar-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    text-transform: none;
}
.navbar-dropdown li a:hover { background: var(--color-light-bg); color: var(--color-accent); }

.lang-switch {
    display: flex;
    gap: 6px;
    margin-left: 12px;
    font-family: var(--font-display);
    font-size: 13px;
}
.lang-switch a {
    color: rgba(255,255,255,0.6);
    padding: 4px 8px;
}
.lang-switch a.active { color: var(--color-white); border-bottom: 2px solid var(--color-accent); }

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 24px;
    cursor: pointer;
}

/* =========================== HERO / SLIDESHOW =========================== */
.hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    overflow-x: hidden;
    color: var(--color-white);
}
.hero .slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
}
.hero .slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}
.hero .slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    padding: 120px 0;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 3.3vw, 56px);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 24px;
}
.hero-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    max-width: 620px;
    margin: 0 0 28px;
}
.hero-content .btn {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Kontrol navigasi slideshow (hanya muncul jika slide > 1, lihat home.php) */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.35);
    color: var(--color-white);
    font-size: 16px;
    cursor: pointer;
    transition: background var(--transition);
}
.slide-nav:hover { background: var(--color-accent); }
.slide-prev { left: 24px; }
.slide-next { right: 24px; }

.slide-dots {
    position: absolute;
    left: 0; right: 0;
    bottom: 28px;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.slide-dot {
    width: 10px; height: 10px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.slide-dot.active { background: var(--color-accent); border-color: var(--color-accent); }

@media (max-width: 768px) {
    .slide-nav { width: 36px; height: 36px; font-size: 13px; }
    .slide-prev { left: 12px; }
    .slide-next { right: 12px; }
}
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--color-accent);
    color: var(--color-white);
    background: transparent;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}
.btn:hover { background: var(--color-accent); }
.btn-solid {
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.btn-solid:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }
.btn-spec {
    background: #c0392b;
    border-color: #c0392b;
    color: var(--color-white);
}
.btn-spec:hover { background: #a3291c; border-color: #a3291c; }

/* =========================== ABOUT / PROFIL =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
    margin-top: 40px;
}
.about-text p { color: var(--color-text-muted); margin-bottom: 16px; }
.about-readmore-wrap { margin-top: 24px; }
.about-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    background: transparent;
    border: 1.5px solid var(--color-accent);
    border-radius: 999px;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.about-readmore::after { content: '\2192'; transition: transform var(--transition); }
.about-readmore:hover { background: var(--color-accent); color: var(--color-white); }
.about-readmore:hover::after { transform: translateX(3px); }
.about-image img { border-radius: 4px; }
.about-image video.about-media {
    width: 100%;
    border-radius: 4px;
    display: block;
}

/* =========================== SERTIFIKASI =========================== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.cert-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.cert-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.cert-card img { max-height: 170px; margin: 0 auto 12px; object-fit: contain; }
.cert-card .cert-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; }

/* =========================== FASILITAS PABRIK (galeri) =========================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}
.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform var(--transition);
}
.gallery-item {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item-extra { display: none; }
.gallery-item-extra.gallery-item-show { display: block; }

.gallery-more-wrap {
    text-align: center;
    margin-top: 28px;
}

/* =========================== PRODUK =========================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.product-card-image {
    width: 100%;
    max-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
}
.product-card-image img {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.product-card-header {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 16px 20px;
}
.product-card-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
}
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-body p { color: var(--color-text-muted); font-size: 14px; margin: 0 0 8px; }
.product-card-body .btn { align-self: center; margin-top: 0; padding: 10px 20px; font-size: 12px; }

.spec-table-wrapper { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td {
    border: 1px solid var(--color-border);
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
}
.spec-table th {
    background: var(--color-dark);
    color: var(--color-white);
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
}
.spec-table tr:nth-child(even) { background: var(--color-light-bg); }

/* =========================== KLIEN =========================== */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 32px;
    align-items: center;
    margin-top: 40px;
}
.client-grid img {
    transition: transform var(--transition);
    margin: 0 auto;
}
.client-grid img:hover { transform: scale(1.08); }

/* =========================== KONTAK =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    margin-top: 40px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-family: var(--font-body);
    font-size: 14px;
}
.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200,39,44,0.12);
}
textarea.form-control { min-height: 140px; resize: vertical; }
.alert { padding: 14px 18px; border-radius: 3px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e7f5ea; color: #1e7b34; border: 1px solid #b9e3c2; }
.alert-error { background: #fbeaea; color: #a3262c; border: 1px solid #f1c0c2; }

.map-embed { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: 4px; }

/* =========================== FOOTER =========================== */
.footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.75);
    padding-top: 28px;
}
.footer-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-info .icon { color: var(--color-accent); font-size: 22px; margin-bottom: 10px; }
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}
.footer-social {
    display: inline-flex;
    gap: 14px;
    margin-left: 16px;
}
.footer-social a {
    color: rgba(255,255,255,0.6);
    font-weight: 700;
    font-size: 13px;
    transition: color var(--transition);
}
.footer-social a:hover { color: var(--color-accent); }

/* =========================== UTIL: fade-in on scroll =========================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }

/* =========================== MODAL SPESIFIKASI PRODUK =========================== */
.spec-modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,10,10,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.spec-modal.open { display: flex; }
.spec-modal-dialog {
    background: var(--color-white);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 4px;
    padding: 32px;
    position: relative;
}
.spec-modal-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-text-muted);
}
.spec-modal-body { margin-top: 8px; }
.spec-modal-body h2:first-child { margin-top: 0; }
.spec-modal-body h4 { font-family: var(--font-display); margin: 20px 0 4px; }

/* =========================== MODAL FOTO GALERI (Fasilitas Pabrik) =========================== */
.photo-modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,10,10,0.82);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.photo-modal.open { display: flex; }
.photo-modal-dialog {
    background: var(--color-white);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    position: relative;
}
.photo-modal-dialog img {
    width: 100%;
    display: block;
    border-radius: 4px 4px 0 0;
}
.photo-modal-caption {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--color-text-muted);
}
.photo-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: var(--color-white);
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* =========================== FLOATING CHAT WHATSAPP =========================== */
.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 26px rgba(0,0,0,0.32);
}

@media (max-width: 768px) {
    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
}

/* =========================== RESPONSIVE =========================== */
@media (max-width: 900px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-info { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
    .navbar-toggle { display: block; }
    .navbar-menu {
        position: fixed;
        top: 0; right: -280px;
        width: 280px; height: 100vh;
        background: var(--color-dark);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 0 20px;
        transition: right var(--transition);
        overflow-y: auto;
    }
    .navbar-menu.open { right: 0; }
    .navbar-dropdown { position: static; box-shadow: none; display: none; }
    .navbar-menu > li.open .navbar-dropdown { display: block; }
    .lang-switch { margin: 16px 20px 0; }
    .gallery-grid { grid-template-columns: 1fr; }
    .footer-bottom { display: flex; flex-direction: column; gap: 8px; }
    .footer-social { margin-left: 0; }
}

/* =========================== ARTIKEL (daftar & detail) =========================== */
/* Offset khusus halaman non-hero (artikel.php) supaya konten tidak tertutup navbar fixed. */
.article-page-offset { padding-top: 160px; }

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 40px;
}
.article-card {
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.article-card-image { height: 190px; overflow: hidden; background: var(--color-light-bg); }
.article-card-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 20px; }
.article-card-body h3 {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 0 0 10px;
    text-transform: uppercase;
    color: var(--color-dark);
}
.article-card-body p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 0 0 14px;
}
.article-card-link {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--color-accent);
    text-transform: uppercase;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb-sep { color: var(--color-border); }
.breadcrumb-current { color: var(--color-dark); font-weight: 600; }

.article-detail { max-width: 760px; margin: 0 auto; }
.article-detail-cover { margin-bottom: 28px; }
.article-detail-cover img { width: 100%; border-radius: 4px; object-fit: cover; max-height: 420px; }
.article-detail-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 38px);
    text-transform: uppercase;
    margin: 0 0 10px;
    color: var(--color-dark);
}
.article-detail-meta {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.article-detail-content {
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.8;
}
.article-detail-content p,
.article-detail-content div { margin: 0 0 16px; }
.article-detail-content a { color: var(--color-accent); text-decoration: underline; }
.article-detail-content strong, .article-detail-content b { font-weight: 700; }
.article-detail-content em, .article-detail-content i { font-style: italic; }
.article-detail-link { margin-top: 32px; }

@media (max-width: 768px) {
    .article-page-offset { padding-top: 120px; }
}

/* ---------- Honeypot anti-spam (form kontak) ---------- */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    overflow: hidden;
}
