/* ============================================================
   Permata Hati Insani — Main CSS
   ============================================================ */

/* Palet dari logo: biru tua (utama), merah (hati), oranye (bintang), abu perak (sekunder) */
:root {
    --phi-blue:       #0d1b4a;
    --phi-blue-mid:   #1a237e;
    --phi-blue-light: #283593;
    --phi-red:        #b71c1c;
    --phi-orange:     #E65100;
    --phi-orange-light:#FF8F00;
    --phi-silver:     #90a4ae;
    --phi-dark:       #0d1b4a;
    --phi-text:       #333;
    --phi-text-light: #666;
    --phi-bg-light:   #f5f6fa;
    --transition:     all .3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--phi-text);
    background: #fff;
}

/* ---- Brand Colors (logo) ---- */
.text-phi      { color: var(--phi-blue-mid) !important; }
.bg-phi        { background-color: var(--phi-blue-mid) !important; }
.bg-phi-dark   { background-color: var(--phi-blue) !important; }
.btn-phi       { background-color: var(--phi-blue-mid); color: #fff; border: none; }
.btn-phi:hover { background-color: var(--phi-blue); color: #fff; }
.btn-outline-phi { border: 2px solid var(--phi-blue-mid); color: var(--phi-blue-mid); background: transparent; }
.btn-outline-phi:hover { background: var(--phi-blue-mid); color: #fff; }

/* ---- Brand Icon ---- */
.brand-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--phi-blue), var(--phi-blue-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.4rem;
}
.brand-icon-white {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.4rem;
}

/* ---- Topbar ---- */
.topbar { font-size: 0.82rem; }

/* ---- Navbar ---- */
.navbar { padding: .75rem 0; }
.navbar-brand .fw-bold { font-size: 1.05rem; }
.nav-link { font-weight: 500; font-size: 0.92rem; color: var(--phi-text) !important; padding: 0.5rem 0.9rem; transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--phi-blue-mid) !important; }
.dropdown-item:hover { background: var(--phi-bg-light); color: var(--phi-blue-mid); }
.dropdown-menu { border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-radius: 12px; padding: 0.5rem; }

/* ---- Page Header ---- */
.page-header-section {
    background: linear-gradient(135deg, var(--phi-blue) 0%, var(--phi-blue-mid) 100%);
    padding: 2.5rem 0;
    color: #fff;
}
.page-header-section .page-header-title { color: #fff; }
.page-header-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-header-section .breadcrumb-item a { color: rgba(255,255,255,0.75); text-decoration: none; }
.page-header-section .breadcrumb-item.active { color: var(--phi-orange); }
.page-header-section .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ---- Section Titles ---- */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--phi-blue);
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 50px; height: 4px;
    background: var(--phi-orange);
    border-radius: 2px;
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

/* ---- Slider / Hero ---- */
.hero-slider .carousel-item { height: 560px; }
.hero-slider .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider .carousel-caption { bottom: auto; top: 50%; transform: translateY(-50%); text-align: left; }
.hero-slider .carousel-caption h2 { font-size: 2.5rem; font-weight: 800; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); }
.hero-slider .carousel-caption p  { font-size: 1.1rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.5); }
.hero-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(135deg, rgba(13,27,74,0.75) 0%, rgba(0,0,0,0.3) 100%); }
.hero-no-image { background: linear-gradient(135deg, var(--phi-blue) 0%, var(--phi-blue-light) 100%); height: 560px; display: flex; align-items: center; }

/* ---- Stats ---- */
.stat-card { text-align: center; padding: 2rem 1rem; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--phi-orange); line-height: 1; }
.stat-label  { font-size: 0.9rem; color: rgba(255,255,255,0.85); margin-top: 0.25rem; }

/* ---- Post Cards ---- */
.post-card { border: none; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.07); transition: var(--transition); }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(26,35,126,0.2); }
.post-card .card-img-top { height: 200px; object-fit: cover; }
.post-card .card-body { padding: 1.25rem; }
.post-card .post-type-badge { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.post-card .card-title { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.post-card .card-title a { color: var(--phi-text); text-decoration: none; }
.post-card .card-title a:hover { color: var(--phi-blue-mid); }
.post-meta { font-size: 0.78rem; color: var(--phi-text-light); }

/* ---- Gallery ---- */
.gallery-album-card { border: none; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.07); cursor: pointer; transition: var(--transition); }
.gallery-album-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(26,35,126,0.2); }
.gallery-album-card .album-cover { height: 200px; object-fit: cover; width: 100%; }
.gallery-album-card .album-cover-placeholder { height: 200px; background: linear-gradient(135deg, var(--phi-blue), var(--phi-blue-light)); display:flex; align-items:center; justify-content:center; color:#fff; font-size:3rem; }
.gallery-photo-item { border-radius: 12px; overflow: hidden; cursor: pointer; }
.gallery-photo-item img { width: 100%; height: 220px; object-fit: cover; transition: var(--transition); }
.gallery-photo-item:hover img { transform: scale(1.05); }

/* ---- Achievement Card ---- */
.achievement-card { border: none; border-radius: 16px; padding: 1.5rem; background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.07); transition: var(--transition); }
.achievement-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(26,35,126,0.15); }
.achievement-icon { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--phi-orange), var(--phi-orange-light)); display:flex; align-items:center; justify-content:center; font-size: 1.5rem; }

/* ---- Facility Card ---- */
.facility-card { border: none; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.07); transition: var(--transition); height: 100%; }
.facility-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(26,35,126,0.2); }
.facility-card .facility-img { height: 200px; object-fit: cover; width: 100%; }
.facility-card .facility-icon { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--phi-blue), var(--phi-blue-light)); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; margin: 0 auto 1rem; }

/* ---- Program Cards ---- */
.program-card { border: none; border-radius: 20px; padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.07); transition: var(--transition); height: 100%; }
.program-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(26,35,126,0.2); }
.program-card .program-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ---- Announcement Card ---- */
.announcement-card { border-left: 4px solid var(--phi-orange); border-radius: 0 12px 12px 0; padding: 1.25rem; background: #fff; box-shadow: 0 2px 15px rgba(0,0,0,0.06); transition: var(--transition); margin-bottom: 1rem; }
.announcement-card:hover { border-left-color: var(--phi-blue-mid); background: var(--phi-bg-light); }

/* ---- Footer ---- */
.footer-main {}
.footer-top { background: linear-gradient(135deg, var(--phi-blue) 0%, var(--phi-dark) 100%); }
.footer-bottom { background: var(--phi-dark); color: rgba(255,255,255,0.9); }
.footer-bottom small { color: rgba(255,255,255,0.9); }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--phi-orange); padding-left: 5px; }
.footer-contact li { display: flex; gap: 0.75rem; align-items: flex-start; color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 0.6rem; }
.footer-contact i { color: var(--phi-orange); flex-shrink: 0; margin-top: 2px; }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; margin-right: 0.4rem; transition: var(--transition); font-size: 1rem; }
.social-icons a:hover { background: var(--phi-orange); color: var(--phi-dark); }

/* ---- WhatsApp Float ---- */
.wa-float { position: fixed; bottom: 24px; right: 24px; z-index: 999; width: 56px; height: 56px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem; box-shadow: 0 4px 20px rgba(37,211,102,0.5); text-decoration: none; transition: var(--transition); }
.wa-float:hover { transform: scale(1.1); color: #fff; }

/* ---- Breadcrumb Section ---- */
.bg-phi-section { background: var(--phi-bg-light); }

/* ---- Content Detail ---- */
.post-detail-content { line-height: 1.9; font-size: 1.02rem; }
.post-detail-content h2, .post-detail-content h3, .post-detail-content h4 { color: var(--phi-blue); margin-top: 1.5rem; font-weight: 700; }
.post-detail-content img { max-width: 100%; border-radius: 12px; }
.post-detail-content ul, .post-detail-content ol { padding-left: 1.5rem; }
.post-detail-content li { margin-bottom: 0.4rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-slider .carousel-item { height: 380px; }
    .hero-slider .carousel-caption h2 { font-size: 1.5rem; }
    .hero-no-image { height: 380px; }
    .section-title { font-size: 1.4rem; }
    .stat-number { font-size: 2rem; }
}
