/* ===================================
   Blog Pribadi - Custom Styles
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #f72585;
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #adb5bd;
    --gray-700: #495057;
    --gray-900: #212529;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* Global */
body {
    font-family: var(--font-body);
    color: var(--gray-900);
    background-color: var(--gray-100);
    line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== NAVBAR ===== */
.navbar-blog {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-blog.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-blog .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark) !important;
    letter-spacing: -0.5px;
}

.navbar-blog .navbar-brand span {
    color: var(--primary);
}

.navbar-blog .nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-blog .nav-link:hover,
.navbar-blog .nav-link.active {
    color: var(--primary) !important;
    background: rgba(67, 97, 238, 0.08);
}

.search-form .form-control {
    border-radius: 25px;
    border: 2px solid var(--gray-200);
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.search-form .btn {
    border-radius: 25px;
    padding: 0.5rem 1.2rem;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 50%, var(--primary) 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(247, 37, 133, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

/* ===== POST CARDS ===== */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.post-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.post-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.post-card .card-img-wrapper .category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.post-card .card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .card-title a {
    color: var(--dark);
}

.post-card .card-title a:hover {
    color: var(--primary);
}

.post-card .card-text {
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card .card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.post-card .card-meta i {
    margin-right: 4px;
}

/* ===== CATEGORY BADGE ===== */
.badge-category {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border-radius: 25px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-category:hover {
    background: var(--primary-dark);
    color: white;
}

/* ===== TAG BADGE ===== */
.badge-tag {
    background: var(--gray-200);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 25px;
    transition: var(--transition);
}

.badge-tag:hover {
    background: var(--primary);
    color: white;
}

/* ===== SIDEBAR ===== */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.sidebar-widget h5 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.sidebar-widget .list-group-item {
    border: none;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: var(--gray-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.sidebar-widget .list-group-item:hover {
    color: var(--primary);
    padding-left: 5px;
}

.sidebar-widget .list-group-item .badge {
    background: var(--gray-200);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== SINGLE POST ===== */
.single-post {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.single-post .post-header {
    padding: 2.5rem 2.5rem 1.5rem;
}

.single-post .post-header h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.single-post .post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--gray-500);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.single-post .post-meta i {
    margin-right: 5px;
    color: var(--primary);
}

.single-post .post-thumbnail {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.single-post .post-content {
    padding: 2rem 2.5rem 2.5rem;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--gray-900);
}

.single-post .post-content h2 {
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post .post-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.single-post .post-content p {
    margin-bottom: 1.2rem;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.single-post .post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--gray-100);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--gray-700);
}

.single-post .post-content code {
    background: var(--gray-200);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.single-post .post-content pre {
    background: var(--dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.single-post .post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.single-post .post-tags {
    padding: 1.5rem 2.5rem 2rem;
    border-top: 1px solid var(--gray-200);
}

/* ===== RELATED POSTS ===== */
.related-posts {
    margin-top: 3rem;
}

.related-posts h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.footer-blog {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-blog h5 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-blog a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-blog a:hover {
    color: var(--primary);
}

.footer-blog .footer-brand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.footer-blog .footer-brand span {
    color: var(--primary);
}

.footer-blog .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.85rem;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    border: none;
    color: var(--gray-700);
    padding: 0.6rem 1rem;
    margin: 0 3px;
    border-radius: 8px !important;
    font-weight: 500;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
}

/* ===== FLASH MESSAGES ===== */
.alert-flash {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* ===== SECTION HEADINGS ===== */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .single-post .post-header {
        padding: 1.5rem;
    }

    .single-post .post-header h1 {
        font-size: 1.6rem;
    }

    .single-post .post-content {
        padding: 1.5rem;
    }

    .single-post .post-tags {
        padding: 1rem 1.5rem;
    }

    .post-card .card-img-wrapper {
        height: 180px;
    }
}

/* ===== NO THUMBNAIL PLACEHOLDER ===== */
.no-thumbnail {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* ===== LOADING ANIMATION ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}