/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://arshaka.jasawebsalatiga.my.id/
 Description:  Custom Child Theme untuk Blog Arshaka Rental - Desain Mewah Gold & Dark.
 Author:       Arshaka Team
 Author URI:   https://arshaka.jasawebsalatiga.my.id/
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  hello-elementor-child
*/

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-gold: #D4AF37;
    --primary-gold-hover: #b5952f;
    --dark-bg: #151515;
    --light-bg: #FFFFFF;
    --text-main: #333333;
    --text-light: #f5f5f5;
    --text-muted: #666666;
    --border-gray: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 80px 0; }

/* =========================================
   2. PAGE HEADER (Hero Blog)
   ========================================= */
.page-header {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1449965408869-eaa3f722e40d?auto=format&fit=crop&q=80&w=1920');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-gold);
}

.page-header p {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   3. BLOG GRID & CARDS (home.php)
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }

/* 1. KUNCI CARD: Memaksa tinggi card sama rata dalam 1 baris */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-gray);
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; 
}

.blog-card:hover { transform: translateY(-10px); }

/* 2. KUNCI GAMBAR: Memaksa semua ukuran gambar SAMA PERSIS 220px */
.blog-img { 
    position: relative; 
    height: 220px !important; 
    width: 100% !important;
    overflow: hidden; 
    flex-shrink: 0 !important; 
}

.blog-img img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; /* Anti-gepeng & anti-melar */
    object-position: center !important;
    transition: transform 0.5s ease; 
}

.blog-card:hover .blog-img img { transform: scale(1.1); }

.blog-category {
    position: absolute; top: 15px; right: 15px;
    background: var(--primary-gold);
    color: white; padding: 5px 15px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 600;
    z-index: 2;
}

/* 3. KUNCI KONTEN: Memaksa area teks untuk merenggang ke bawah */
.blog-content { 
    padding: 25px; 
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; 
}

.blog-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }

/* 4. KUNCI JUDUL: Maksimal 2 baris. Lebih dari itu jadi titik-titik (...) */
.blog-content h3 { 
    font-family: 'Poppins', sans-serif; 
    font-size: 1.3rem; 
    margin-bottom: 15px; 
    line-height: 1.4;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 2.8em; /* Menjaga tinggi awal meski judul cuma 1 baris */
}

.blog-content h3 a { color: var(--dark-bg); text-decoration: none; transition: 0.3s; }
.blog-content h3 a:hover { color: var(--primary-gold); }

/* 5. KUNCI KUTIPAN TEKS: Maksimal 3 baris. Lebih dari itu jadi titik-titik (...) */
.blog-content p { 
    color: var(--text-muted); 
    line-height: 1.6; 
    margin-bottom: 20px; 
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 6. KUNCI TOMBOL: Selalu didorong ke posisi paling bawah */
.btn-readmore {
    color: var(--primary-gold); 
    text-decoration: none;
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    transition: 0.3s;
    margin-top: auto !important; /* Ini sihir yang mendorongnya ke bawah */
    align-self: flex-start !important;
}
.btn-readmore:hover { gap: 12px; color: var(--primary-gold-hover); }
/* =========================================
   4. SINGLE ARTICLE LAYOUT (single.php)
   ========================================= */
.article-container {
    display: grid; 
    grid-template-columns: 8fr 4fr; 
    gap: 40px; 
    padding: 60px 20px;
}
@media (max-width: 992px) { .article-container { grid-template-columns: 1fr; } }

.breadcrumb { margin-bottom: 20px; color: var(--text-muted); font-size: 0.9rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.breadcrumb a:hover { color: var(--primary-gold); }

.entry-title { font-family: 'Poppins', sans-serif; font-size: 2.5rem; color: var(--dark-bg); margin-bottom: 20px; line-height: 1.3; }

.article-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.meta-item { display: flex; align-items: center; font-size: 0.9rem; color: var(--text-muted); }
.meta-item i { color: var(--primary-gold); } /* Jika masih pakai FontAwesome */
.meta-item .ar-icon { color: var(--primary-gold); } /* Jika pakai SVG icons.js kita */

/* KUNCI: Memaksa Gambar Unggulan Seragam */
.featured-image { 
    width: 100%; 
    height: 450px !important; /* Paksa tinggi gambar di desktop */
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 30px; 
    background-color: #f5f5f5; /* Warna dasar jika gambar loading lambat */
}

.featured-image img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; /* Sihir anti-gepeng / melar */
    object-position: center !important; /* Fokuskan potongan di tengah gambar */
    display: block; 
}

/* Penyesuaian agar di HP gambarnya tidak terlalu tinggi */
@media (max-width: 768px) {
    .entry-title { font-size: 1.8rem; }
    .featured-image { height: 250px !important; }
}

/* Styling isi teks agar enak dibaca (Typography) */
.article-body { line-height: 1.8; color: #444; font-size: 1.1rem; }
.article-body h2, .article-body h3, .article-body h4 { margin: 35px 0 15px; font-family: 'Poppins', sans-serif; color: var(--dark-bg); line-height: 1.4; }
.article-body p { margin-bottom: 20px; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; } /* Gambar di DALAM teks artikel biarkan auto menyesuaikan */
.article-body ul, .article-body ol { margin-bottom: 20px; padding-left: 20px; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote {
    border-left: 4px solid var(--primary-gold);
    padding: 15px 20px;
    background: #fdfbf5;
    font-style: italic;
    color: #555;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

/* =========================================
   5. SIDEBAR STYLES (sidebar.php)
   ========================================= */
.sidebar-widget { 
    background: #f9f9f9; 
    padding: 25px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    border: 1px solid var(--border-gray); 
}

.widget-title { 
    font-family: 'Poppins', sans-serif; 
    font-size: 1.2rem; 
    margin-bottom: 20px; 
    padding-bottom: 10px; 
    border-bottom: 2px solid var(--primary-gold); 
}

.category-list { list-style: none; padding: 0; }
.category-list li { margin-bottom: 12px; }
.category-list a { 
    text-decoration: none; 
    color: var(--text-main); 
    display: flex; 
    justify-content: space-between; 
    transition: 0.3s; 
}
.category-list a:hover { color: var(--primary-gold); padding-left: 5px; }

/* KUNCI: Membuat item postingan terbaru rapi dan sejajar */
.recent-post-item { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 20px; 
    align-items: center; /* Menjaga teks dan gambar sejajar secara vertikal */
}

/* KUNCI: Memaksa ukuran thumbnail sidebar SAMA PERSIS 80x80 */
.recent-post-img {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0 !important; /* Mencegah gambar menyusut saat judul terlalu panjang */
    border-radius: 8px;
    overflow: hidden;
    background-color: #eee;
}

.recent-post-img img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; /* Anti-gepeng */
    object-position: center !important;
    display: block;
}

.recent-post-info h4 { 
    font-size: 0.95rem; 
    margin: 0 0 5px 0; 
    line-height: 1.4; 
    /* Membatasi judul sidebar maksimal 2 baris agar tidak merusak grid */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-post-info h4 a { color: var(--dark-bg); text-decoration: none; transition: 0.3s; }
.recent-post-info h4 a:hover { color: var(--primary-gold); }
.recent-post-date { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; }
/* =========================================
   6. PAGINATION & SHARE
   ========================================= */
.pagination-wrapper { margin-top: 50px; text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: 10px; }
.pagination .page-numbers {
    padding: 10px 18px; border-radius: 6px; border: 1px solid var(--border-gray);
    text-decoration: none; color: var(--text-main); transition: 0.3s;
}
.pagination .page-numbers.current { background: var(--primary-gold); color: white; border-color: var(--primary-gold); }
.pagination .page-numbers:hover:not(.current) { background: #eee; }

.share-article { 
    margin-top: 50px; 
    padding-top: 30px; 
    border-top: 1px solid #eee; 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}
.share-article h4 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: var(--dark-bg);
}
.share-links { display: flex; gap: 12px; }

/* Desain tombol share baru yang simpel, kotak dengan sedikit border radius */
.share-btn { 
    width: 40px; 
    height: 40px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #f5f5f5; 
    color: var(--dark-bg); 
    text-decoration: none; 
    transition: all 0.3s ease; 
    font-size: 1.2rem;
}
.share-btn:hover { 
    background: var(--dark-bg); 
    color: var(--primary-gold); 
    transform: translateY(-3px); 
}

/* =========================================
   7. CUSTOM SVG ICONS
   ========================================= */
.ar-icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
    display: inline-block;
}