/* ===================================================================
   KONTAKAN THEME - MAIN STYLESHEET
   Version: 1.0.0
   ================================================================ */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Authority Meets Clarity */
    --deep-navy: #1a2332;
    --clean-white: #ffffff;
    --intelligent-teal: #0891b2;
    --soft-gray: #f3f4f6;
    --warm-coral: #f97316;
    --light-border: #e5e7eb;
    --text-secondary: #6b7280;
    
    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--deep-navy);
    background-color: var(--soft-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--intelligent-teal);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0e7490;
}

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

/* ===== HEADER & NAVIGATION ===== */
.header {
    background-color: var(--clean-white);
    border-bottom: 1px solid var(--light-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-navy);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--deep-navy);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--intelligent-teal);
    border-bottom-color: var(--intelligent-teal);
}

.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.search-container {
    position: relative;
    flex: 0 1 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--intelligent-teal);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.cta-button {
    background-color: var(--warm-coral);
    color: var(--clean-white);
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cta-button:hover {
    background-color: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.random-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: none !important;
}

.random-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    background: var(--clean-white);
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--light-border);
}

.breadcrumbs a {
    color: var(--intelligent-teal);
}

/* ===== HERO SECTION (Homepage) ===== */
.hero {
    background: linear-gradient(135deg, var(--deep-navy) 0%, #2d3e57 100%);
    color: var(--clean-white);
    padding: 5rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-tagline {
    font-size: 1.5rem;
    color: #a5b4c8;
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #d1dae6;
    margin-bottom: 2.5rem;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search .search-input {
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

.hero-search .search-icon {
    left: 1.25rem;
    font-size: 1.3rem;
}

/* ===== MAIN CONTENT CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.content-wrapper.no-sidebar {
    grid-template-columns: 1fr;
}

.main-content {
    background: var(--clean-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ===== SINGLE POST STYLES ===== */
.entry-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-border);
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.entry-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.entry-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem;
}

.entry-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul, 
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.75rem;
}

.entry-content img {
    margin: 2rem 0;
    border-radius: 8px;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--soft-gray);
    border-left: 4px solid var(--intelligent-teal);
    border-radius: 4px;
    font-style: italic;
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.post-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--soft-gray);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--deep-navy);
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: var(--intelligent-teal);
    color: var(--clean-white);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: var(--clean-white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--deep-navy);
    border-bottom: 2px solid var(--intelligent-teal);
    padding-bottom: 0.75rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--light-border);
}

.widget li:last-child {
    border-bottom: none;
}

/* Quick Facts Widget */
.quick-facts {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.quick-facts ul {
    padding-left: 1.5rem;
}

.quick-facts li {
    list-style: disc;
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}

/* ===== FEATURED SECTION ===== */
.featured-section {
    background-color: var(--clean-white);
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--deep-navy);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-card,
.post-card {
    background: var(--clean-white);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.featured-card:hover,
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: var(--intelligent-teal);
}

.card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--intelligent-teal) 0%, #0e7490 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--clean-white);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.75rem;
}

.card-category {
    color: var(--intelligent-teal);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.card-title {
    font-size: 1.5rem;
    color: var(--deep-navy);
    margin-bottom: 0.75rem;
}

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

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

.card-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== CATEGORIES SECTION ===== */
.categories-section {
    background-color: var(--soft-gray);
    padding: 4rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--clean-white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--intelligent-teal);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.4rem;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
}

.category-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== ARCHIVE PAGES ===== */
.archive-header {
    background: var(--clean-white);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 12px;
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ===== RELATED POSTS ===== */
.related-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--light-border);
}

.related-posts-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-card {
    background: var(--clean-white);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.related-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: var(--soft-gray);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    padding: 1.25rem;
}

.related-category {
    color: var(--intelligent-teal);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.related-card h4 {
    font-size: 1.1rem;
    margin: 0;
}

.related-card h4 a {
    color: var(--deep-navy);
}

/* ===== AFFILIATE NOTICE ===== */
.affiliate-notice {
    background: #fff8ed;
    border-left: 4px solid var(--warm-coral);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.affiliate-notice strong {
    color: var(--warm-coral);
}

/* ===== CONNECTION WEB SECTION ===== */
.connection-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 4rem 0;
}

.connection-visual {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

.node-diagram {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    background: linear-gradient(135deg, var(--deep-navy) 0%, #2d3e57 100%);
    color: var(--clean-white);
    padding: 4rem 2rem;
    text-align: center;
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter-description {
    font-size: 1.2rem;
    color: #d1dae6;
    margin-bottom: 2.5rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

/* ===== PAGINATION ===== */
.pagination {
    margin: 4rem 0 2rem;
}

.pagination ul {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: block;
    padding: 0.75rem 1.25rem;
    background: var(--clean-white);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    color: var(--deep-navy);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--intelligent-teal);
    color: var(--clean-white);
    border-color: var(--intelligent-teal);
}

.pagination .current {
    background: var(--intelligent-teal);
    color: var(--clean-white);
    border-color: var(--intelligent-teal);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--deep-navy);
    color: var(--clean-white);
    padding: 3rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    color: var(--intelligent-teal);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #d1dae6;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--clean-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: #a5b4c8;
    font-size: 0.9rem;
}

.footer-tagline {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--intelligent-teal);
}

/* ===== SEARCH RESULTS ===== */
.search-header {
    background: var(--clean-white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.search-results-count {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== 404 PAGE ===== */
.error-404 {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--clean-white);
    border-radius: 12px;
    margin: 4rem auto;
    max-width: 700px;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--intelligent-teal);
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .search-container {
        flex: 1;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

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

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .main-content {
        padding: 2rem 1.5rem;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}
