/*
Theme Name: BiyografiTheme
Description: Modern, High-Performance, SEO-Optimized Biography Theme
Author: Assistant Developer
Version: 1.0.0
*/

:root {
    /* Color Palette - Light Mode Default */
    --color-bg: #eff6ee;
    --color-bg-secondary: #ffffff;
    --color-text: #273043;
    --color-text-muted: #9197ae;
    --color-primary: #dd0426;
    --color-primary-hover: #f02d3a;
    --color-accent: #f02d3a;
    --color-border: rgba(145, 151, 174, 0.3);

    --header-bg: rgba(239, 246, 238, 0.95);
    --footer-bg: #273043;
    --footer-text: #eff6ee;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;

    --transition-snappy: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Color Palette - Dark Mode */
        --color-bg: #273043;
        --color-bg-secondary: #1f2636;
        --color-text: #eff6ee;
        --color-text-muted: #9197ae;
        --color-primary: #f02d3a;
        --color-primary-hover: #dd0426;
        --color-accent: #dd0426;
        --color-border: rgba(145, 151, 174, 0.2);

        --header-bg: rgba(39, 48, 67, 0.95);
        --footer-bg: #191f2c;

        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
        --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.6);
    }
}

/* Base Default overrides */
[data-theme="light"] {
    --color-bg: #eff6ee;
    --color-bg-secondary: #ffffff;
    --color-text: #273043;
    --color-text-muted: #9197ae;
    --color-primary: #dd0426;
    --color-primary-hover: #f02d3a;
    --color-border: rgba(145, 151, 174, 0.3);
    --header-bg: rgba(239, 246, 238, 0.95);
    --footer-bg: #273043;
    --footer-text: #eff6ee;
}

[data-theme="dark"] {
    --color-bg: #273043;
    --color-bg-secondary: #1f2636;
    --color-text: #eff6ee;
    --color-text-muted: #9197ae;
    --color-primary: #f02d3a;
    --color-primary-hover: #dd0426;
    --color-border: rgba(145, 151, 174, 0.2);
    --header-bg: rgba(39, 48, 67, 0.95);
    --footer-bg: #191f2c;
    --footer-text: #eff6ee;
}

/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

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

.container-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 991px) {
    .container-with-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--color-text);
}

p {
    margin-bottom: 20px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40%;
    height: 4px;
    background: var(--color-primary);
    border-radius: 4px;
}

/* Buttons */
.button,
button,
input[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-snappy);
    text-align: center;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Header */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-navigation ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-navigation a {
    font-weight: 600;
    color: var(--color-text);
}

.main-navigation a:hover {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text);
    cursor: pointer;
    padding: 5px 10px;
}

.theme-toggle-btn {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 18px;
    transition: var(--transition-snappy);
}

.theme-toggle-btn:hover {
    background: var(--color-border);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
    }

    .main-navigation ul {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .theme-toggle-btn {
        margin-left: auto;
    }

    .slogan-text {
        font-size: 10px !important;
        margin-top: 2px !important;
    }

    .bio-info-table th,
    .bio-info-table td {
        padding: 10px 15px !important;
        font-size: 14px !important;
    }

    .age-text {
        display: block;
        font-size: 13px;
        opacity: 0.7;
        margin-top: 2px;
    }
}

/* Hero Section */
.hero-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -1px;
    background: -webkit-linear-gradient(45deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Live Search */
.biyografi-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    box-shadow: var(--shadow-md);
    border-radius: 50px;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.search-form input[type="search"] {
    flex: 1;
    padding: 15px 25px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 16px;
    outline: none;
}

.search-form button {
    border-radius: 0;
    padding: 15px 30px;
    font-size: 16px;
}

.live-search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius-md);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border: 1px solid var(--color-border);
    z-index: 100;
    text-align: left;
    overflow: hidden;
}

.live-search-list li {
    border-bottom: 1px solid var(--color-border);
}

.live-search-list li:last-child {
    border-bottom: none;
}

.live-search-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 15px;
    transition: background 0.2s;
    color: var(--color-text);
}

.live-search-item:hover {
    background: var(--color-bg);
    padding-left: 25px;
}

.live-search-item img {
    border-radius: 50%;
    object-fit: cover;
}

.no-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-border);
}

.live-search-footer {
    padding: 12px 20px;
    background: var(--color-bg);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 20px;
    text-align: center;
    color: var(--color-text-muted);
}

/* Horizontal Categories */
.home-categories-section {
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.category-scroll-container {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 15px 0;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: flex;
    gap: 15px;
    white-space: nowrap;
}

.category-list a {
    padding: 8px 20px;
    background: var(--color-bg);
    border-radius: 30px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition-snappy);
}

.category-list a:hover,
.category-list a.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.relative-category-container {
    position: relative;
    display: flex;
    align-items: center;
}

.cat-nav {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    transition: var(--transition-snappy);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.cat-nav:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.cat-prev {
    left: -18px;
}

.cat-next {
    right: -18px;
}

@media (max-width: 768px) {
    .cat-nav {
        display: none !important;
    }
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination-wrapper .nav-links {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    padding: 0 15px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text);
    font-weight: 600;
    transition: var(--transition-snappy);
}

.pagination-wrapper .page-numbers:hover,
.pagination-wrapper .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.pagination-wrapper .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* Grids */
.home-latest-posts-section,
.archive-page {
    padding: 60px 0;
}

.post-grid {
    display: grid;
    gap: 30px;
}

.grid-4-columns {
    grid-template-columns: repeat(4, 1fr);
}

.grid-3-columns {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2-columns {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1024px) {
    .grid-4-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-4-columns,
    .grid-3-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .grid-4-columns,
    .grid-3-columns,
    .grid-2-columns {
        grid-template-columns: 1fr;
    }
}

/* Card */
.grid-item-card {
    background: var(--color-bg-secondary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.grid-item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--color-bg);
}

.card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-item-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
}

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

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

.card-excerpt {
    font-size: 14px;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Single Page */
.single-post-page {
    padding: 40px 0;
}

.biography-article {
    background: var(--color-bg-secondary);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

@media (max-width:768px) {
    .biography-article {
        padding: 10px 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
}

.entry-title {
    font-size: 36px;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.entry-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.featured-hero-image {
    border-radius: var(--border-radius-md);
    margin-bottom: 40px;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 500px;
}

/* Meta Table */
.bio-info-table-wrapper {
    margin-bottom: 40px;
    background: var(--color-bg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.bio-info-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.bio-info-table th,
.bio-info-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
}

.bio-info-table tr:last-child th,
.bio-info-table tr:last-child td {
    border-bottom: none;
}

.bio-info-table th {
    width: 35%;
    background: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    color: var(--color-text);
}

/* Content Typography */
.entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text);
}

.entry-content h2 {
    font-size: 28px;
    margin: 40px 0 20px;
}

.entry-content h3 {
    font-size: 22px;
    margin: 30px 0 15px;
}

.entry-content p {
    margin-bottom: 24px;
}

.entry-content ul {
    padding-left: 20px;
    margin-bottom: 24px;
    list-style-type: disc;
}

.entry-content blockquote {
    padding: 20px 30px;
    border-left: 5px solid var(--color-primary);
    background: var(--color-bg);
    font-style: italic;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    margin-bottom: 24px;
}

/* Table of Contents */
.table-of-contents {
    background: var(--color-bg);
    padding: 25px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: 40px;
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list,
.toc-nested {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.toc-nested {
    padding-left: 20px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    display: block;
}

.toc-item {
    margin-bottom: 10px;
}

.toc-item a {
    color: var(--color-text-muted);
    font-size: 15px;
    display: inline-block;
    padding: 2px 0;
}

.toc-item a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.toc-h3 {
    font-size: 14px;
}

/* Sidebar */
.sidebar-sticky {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: var(--color-bg-secondary);
    padding: 25px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget__title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}

.widget-latest-posts ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.widget-latest-posts ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-latest-posts a {
    color: var(--color-text);
    font-weight: 500;
}

.widget-latest-posts a:hover {
    color: var(--color-primary);
}

.widget-sponsors .sponsor-banner {
    margin-bottom: 15px;
    display: block;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.widget-sponsors .sponsor-banner img {
    width: 100%;
    transition: transform 0.3s;
}

.widget-sponsors .sponsor-banner:hover img {
    transform: scale(1.03);
}

/* Comments */
.comments-area {
    background: var(--color-bg-secondary);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
}

.comment-body {
    display: flex;
    gap: 20px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-meta {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.comment-content p {
    font-size: 15px;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px 0;
    margin-top: 60px;
}

.footer-top .footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-top .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-widget-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text);
    transition: var(--transition-snappy);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

@media (max-width: 600px) {
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Footer Alignments & Fixes */
.footer-top .footer-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .footer-top .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
}

.footer-popular-category {
    text-align: center;
}

/* Hide WP Image Captions visually but keeping alt tag */
figcaption,
.wp-element-caption,
.wp-caption-text {
    display: none !important;
}

/* Comment Form Modern Styling */
.comment-respond {
    background: var(--color-bg);
    padding: 30px;
    border-radius: var(--border-radius-md);
    margin-top: 40px;
    border: 1px solid var(--color-border);
}

.comment-reply-title {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form input[type="number"],
.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background: var(--color-bg-secondary);
    color: var(--color-text);
    font-size: 15px;
    transition: var(--transition-snappy);
    margin-bottom: 15px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form .submit-comment-btn,
.form-submit input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-snappy);
    width: auto;
}

.comment-form .submit-comment-btn:hover,
.form-submit input[type="submit"]:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.comment-notes,
.logged-in-as {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}