/*
Theme Name: BWI Theme
Theme URI: https://digilines.co.id/
Author: Digilines Creative
Author URI: https://digilines.co.id/
Description: Tema khusus untuk Badan Wakaf Indonesia dengan pendekatan tata letak maksimal 720px bergaya aplikasi (app-like experience). Dioptimalkan untuk navigasi yang cepat, bersih, dan elegan pada perangkat smartphone maupun desktop.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bwi-theme
Tags: one-column, custom-colors, custom-logo, flexible-header, mobile-first, app-layout
*/

/* ==========================================================================
   1. CSS RESET & GLOBAL VARIABLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --bwi-cyan: #2cc8b3;
    --bwi-green: #2a8947;
    --bwi-blue: #4db2ec;
    --bwi-light-bg: #eff3f4;
    
    /* Typography & Text Colors */
    --bwi-text-dark: #222222;
    --bwi-text-muted: #666666;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout & UI */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-soft: 0 4px 24px rgba(44, 200, 179, 0.12);
    --shadow-hover: 0 10px 30px rgba(44, 200, 179, 0.2);
    --transition-standard: all 0.3s ease;
}

body {
    background-color: var(--bwi-light-bg);
    font-family: var(--font-body);
    color: var(--bwi-text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-standard);
}

/* ==========================================================================
   2. MAIN WRAPPER (720px App Layout)
   ========================================================================== */
.bwi-app-wrapper {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3. HEADER 
   ========================================================================== */
.bwi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

.bwi-header-logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--bwi-green);
    letter-spacing: -0.5px;
}

.bwi-header-menu {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--bwi-text-dark);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-standard);
}

.bwi-header-menu:hover {
    color: var(--bwi-cyan);
}

/* ==========================================================================
   4. HERO BANNER
   ========================================================================== */
.bwi-hero-slider {
    padding: 24px 24px 12px 24px;
}

.bwi-hero-card {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(-60deg, var(--bwi-cyan), var(--bwi-blue));
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px 24px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(77, 178, 236, 0.3);
    transition: transform 0.3s ease;
}

.bwi-hero-card:hover {
    transform: scale(0.98);
}

.bwi-hero-card h2 {
    font-family: var(--font-heading);
    margin: 0 0 8px 0;
    font-size: 28px;
    line-height: 1.2;
    z-index: 2;
}

.bwi-hero-card p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    z-index: 2;
}

/* ==========================================================================
   5. GENERAL SECTION SETTINGS
   ========================================================================== */
.bwi-section {
    padding: 24px;
}

.bwi-section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--bwi-text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bwi-section-title .bwi-link-all {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--bwi-cyan);
}

/* ==========================================================================
   6. PROGRAM WAKAF (Grid Component)
   ========================================================================== */
.bwi-program-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.bwi-program-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.bwi-program-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--bwi-cyan);
}

.bwi-program-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.bwi-program-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--bwi-text-muted);
    margin: 0 0 20px 0;
}

.bwi-btn {
    margin-top: auto;
    background-color: var(--bwi-light-bg);
    color: var(--bwi-green);
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-standard);
}

.bwi-program-card:hover .bwi-btn {
    background-color: var(--bwi-cyan);
    color: #ffffff;
}

/* ==========================================================================
   7. LAYANAN BWI (Swipeable Row Component)
   ========================================================================== */
.bwi-service-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.bwi-service-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.bwi-service-item {
    flex: 0 0 85px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.bwi-service-icon {
    width: 64px;
    height: 64px;
    background-color: var(--bwi-light-bg);
    color: var(--bwi-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 28px;
    transition: var(--transition-standard);
}

.bwi-service-item:hover .bwi-service-icon {
    background-color: var(--bwi-cyan);
    color: #ffffff;
    transform: scale(1.05);
}

.bwi-service-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--bwi-text-dark);
}

/* ==========================================================================
   8. ARTIKEL TERBARU (List Component)
   ========================================================================== */
.bwi-article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bwi-article-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.bwi-article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bwi-article-item:hover .bwi-article-thumb {
    opacity: 0.85;
}

.bwi-article-item:hover h3 {
    color: var(--bwi-cyan);
}

.bwi-article-thumb {
    flex: 0 0 120px;
    aspect-ratio: 4 / 3;
    background-color: var(--bwi-light-bg);
    border-radius: var(--radius-sm);
    object-fit: cover;
    transition: var(--transition-standard);
}

.bwi-article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bwi-article-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-family: var(--font-heading);
    line-height: 1.4;
    color: var(--bwi-text-dark);
    transition: var(--transition-standard);
}

.bwi-article-content p {
    margin: 0;
    font-size: 13px;
    color: var(--bwi-text-muted);
}

/* ==========================================================================
   9. CTA CAMPAIGN & FOOTER
   ========================================================================== */
.bwi-cta-section {
    background: linear-gradient(135deg, var(--bwi-blue), var(--bwi-green));
    padding: 40px 24px;
    text-align: center;
    color: #ffffff;
    margin-top: auto; 
}

.bwi-cta-section h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin: 0 0 12px 0;
}

.bwi-cta-section p {
    font-size: 15px;
    margin: 0 0 24px 0;
    opacity: 0.9;
}

.bwi-cta-btn {
    display: inline-block;
    background-color: #ffffff;
    color: var(--bwi-green);
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bwi-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.bwi-footer {
    background-color: #ffffff;
    padding: 24px;
    text-align: center;
    border-top: 1px solid #eaeaea;
}

.bwi-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--bwi-text-muted);
}

/* ==========================================================================
   10. MEDIA QUERIES (Responsivitas Smartphone)
   ========================================================================== */
@media screen and (max-width: 576px) {
    
    /* Menghilangkan efek melayang pada layar smartphone */
    .bwi-app-wrapper {
        box-shadow: none;
    }

    /* Penyesuaian padding global */
    .bwi-header, 
    .bwi-hero-slider, 
    .bwi-section, 
    .bwi-cta-section, 
    .bwi-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .bwi-hero-card {
        padding: 24px 20px;
    }

    .bwi-hero-card h2 {
        font-size: 24px;
    }

    /* Mengubah grid program dari 2 kolom menjadi 1 kolom yang menumpuk */
    .bwi-program-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Mengecilkan ukuran gambar artikel untuk ruang baca yang lebih luas */
    .bwi-article-thumb {
        flex: 0 0 100px;
    }
    
    .bwi-article-content h3 {
        font-size: 15px;
    }
    
    .bwi-cta-section h2 {
        font-size: 20px;
    }
}