/*
 Theme Name:   Pro
 Theme URI:    http://example.com/pro
 Description:  Child theme dari ProMax (customisasi CSS & template)
 Author:       Pro
 Template:     promax
 Version:      1.0.1
*/

/* ===== Custom Overrides ===== */

h1 { font-size: clamp(2rem,5vw,3.5rem); line-height:1.2; color:#111; font-weight:700; }
h2 { font-size: clamp(1.75rem,4vw,3rem); line-height:1.3; color:#111; font-weight:700; }
h3 { font-size: clamp(1.5rem,3vw,2.5rem); line-height:1.4; color:#222; font-weight:600; }
h4 { font-size: clamp(1.25rem,2.5vw,2rem); line-height:1.4; color:#333; font-weight:600; }
h5 { font-size: clamp(1.125rem,2vw,1.5rem); line-height:1.5; color:#444; font-weight:500; }
h6 { font-size: clamp(1rem,1.5vw,1.25rem); line-height:1.5; color:#444; font-weight:500; }

/* Archive page title */
.page-title.titlepage {
    font-size: clamp(1.5rem,3vw,2.5rem); line-height:1.4; color:#222; font-weight:600; /* ganti sesuai kebutuhan */
}

/* Body text modern */
body {
  font-size: clamp(1rem, 1.2vw, 1.125rem); /* 16–18px */
  line-height: 1.6;
  color: #333;
  font-family: 'open_sansregular', sans-serif;
}

/* Modern Table Font Size */
#pagecont table,
#singlecontent table {
    font-size: 15px;      /* lebih proporsional */
    color: #555;          /* mengikuti body text modern */
    border-collapse: collapse;
    margin: 20px 0;
}

#pagecont table th,
#singlecontent table th {
    font-size: 16px;      /* setara body, lebih jelas */
    font-weight: 600;
    color: #FFF;
    background: #595959;
}

#pagecont table td,
#singlecontent table td {
    font-size: 15px;      /* sedikit lebih kecil dari th */
    color: #333;          /* mengikuti body */
    line-height: 1.5;
    padding: 8px 10px;
}

/* Featured image */
img.attachment-promax_singlefull.size-promax_singlefull.wp-post-image {
    opacity: 1 !important;
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: cover; /* contain → cover agar rapi */
}

/* Entry header: acuan posisi untuk overlay */
.entry-header {
    position: relative;  /* acuan absolute */
    width: 100%;         /* pastikan lebar parent sama dengan gambar */
    display: block;      /* pastikan parent menghitung lebar 100% */
}

/* Overlay title */
h1.entry-title.featured {
    position: absolute;        /* overlay di atas gambar */
    bottom: 41px;              /* jarak dari bottom image */
    left: 50%;
    transform: translateX(-50%);
    width: 98%;                 /* full width parent */
    margin: 0;
    background: #fdd314;
    color: #000 !important;
    font-size: 2rem;           /* desktop */
    line-height: 1.2;
    padding: 6px 10px;
    text-align: center;
    z-index: 2;                 /* tetap di atas gambar */
}

/* Navigation prev/next */
.nav-previous a,
.nav-next a {
    background: #555555;
}

/* Latest post link */
.latest-post a {
    color: #333333;
}

/* Sidebar h4 */
#sidebar h4,
#sidebar h4 a {
    background: #555555;
    padding: 11px 0px 7px 12px;
}

#populars img {
    height: auto; /* otomatis proporsional */
}

/* Pagination */
#pagenavi a,
#pagenavi span {
    background-color: #555555;
}

/* Top menu */
.promaxtopmenu {
    background: #444444;
}

/* Entry title (non-featured) */
.entry-title {
    color: #ff0000;
    font-size: clamp(18px, 3vw, 32px);
}

/* Header & banner */
#header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    min-height: auto; 
}
#header #logo { float: none; margin: 0; }
#banner-top { float: none; width: auto; max-width: 100%; margin: 10px 0; }
#banner-top img { max-width: 100%; height: auto; }
.header-navigation-wrapper { display: flex; justify-content: center; flex-wrap: wrap; }

/* Featured Image Homepage */
.home .thumbnail img { width: 100%; height: auto; max-width: 100%; display: block; }

/* Global fix: all images keep aspect ratio */
img {
    max-width: 100%;
    height: auto;
}

/* Autohide Header */
#header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 30;
  transition: transform 0.3s ease-in-out;
}

.promaxtopmenu {
  position: fixed;
  /* top di-set via JS */
  width: 100%; /* Pastikan full width */
  z-index: 25;
  background: #444;
  transition: top 0.3s ease-in-out;
}

/* Optional: Smooth body scroll jika needed */
body {
  transition: padding-top 0.3s ease-in-out;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    /* Header */
    #header-inner { flex-direction: column; align-items: center; }
    #banner-top { order: 2; margin-top: 10px; }
    #header #logo { order: 1; margin-bottom: 10px; }
    .primari-menu, .primary-menu { text-align: center; }

    /* Home post grid */
    .home .post { width: 100%; margin-bottom: 20px; }

    /* Overlay title responsive */
    h1.entry-title.featured {
        font-size: 1.2rem;
        padding: 4px 6px;
        max-width: 97.5%;
    }

    /* Hide latest post in single post & page */
    body.single-post #ltpost,
    body.page #ltpost {
        display: none !important;
    }

    #populars img {
        height: auto; /* biar proporsional di mobile */
    }

    /* Thumbnail responsive */
    .thumbnail img {
        width: 100%;
        height: auto;   /* menjaga proporsi */
        object-fit: contain; /* opsional */
    }

}

