/* =========================================================
   MyBlog Professional Theme
   Light/Dark + Responsive + Animation Support
========================================================= */

:root {
    --font-main: 'Inter', Arial, sans-serif;
    --font-heading: 'Plus Jakarta Sans', Arial, sans-serif;
    --transition: all 0.3s ease;
}

/* =========================================================
   Professional Typography
========================================================= */

body {
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.navbar .nav-link,
.section-title,
.hero-title,
.hero-badge,
.btn,
.card-title,
.post-card .card-title a,
.footer-brand,
.footer-title,
.sidebar-brand,
.stat-card {
    font-family: var(--font-heading);
}

h1,
h2,
h3 {
    letter-spacing: -0.02em;
}

.navbar .nav-link {
    letter-spacing: 0.01em;
}

.btn {
    letter-spacing: 0.01em;
}

.article-content {
    font-size: 1.075rem;
    line-height: 1.95;
    letter-spacing: 0.005em;
}

.meta-item {
    font-family: var(--font-main);
    letter-spacing: 0.01em;
}

[data-bs-theme="light"] {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-soft: #eef2ff;
    --text: #111827;
    --muted: #6b7280;
    --primary: #6366f1;
    --primary-2: #8b5cf6;
    --secondary: #0ea5e9;
    --accent: #22c55e;
    --border: #e5e7eb;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    --input-bg: #ffffff;
    --card-hover-shadow: 0 18px 45px rgba(99, 102, 241, 0.16);
}

[data-bs-theme="dark"] {
    --bg: #0b1220;
    --surface: #111827;
    --surface-soft: #1f2937;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #818cf8;
    --primary-2: #a78bfa;
    --secondary: #38bdf8;
    --accent: #4ade80;
    --border: #233043;
    --nav-bg: rgba(3, 7, 18, 0.9);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --input-bg: #0f172a;
    --card-hover-shadow: 0 18px 45px rgba(129, 140, 248, 0.18);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    max-width: 100%;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

.text-muted {
    color: var(--muted) !important;
}

/* =========================
   Navbar
========================= */


.navbar {
    background: var(--nav-bg) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 14px;
    padding-bottom: 14px;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text) !important;
}

.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.28);
}

.brand-gradient {
    background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar .nav-link {
    color: var(--text) !important;
    font-weight: 600;
    margin: 0 4px;
    padding: 9px 12px !important;
    border-radius: 12px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.dropdown-menu {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 10px;
}

.dropdown-item {
    color: var(--text);
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 600;
}

.dropdown-item:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
}

.custom-toggler {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-toggler:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.search-form {
    min-width: 280px;
}

.search-form .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 18px;
        margin-top: 15px;
        box-shadow: var(--shadow);
    }

    .search-form {
        width: 100%;
        min-width: auto;
    }

    .navbar .nav-link {
        margin-bottom: 5px;
    }
}

/* =========================
   Buttons
========================= */

.btn {
    border-radius: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-primary,
.btn-gradient {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    border: none;
    color: #fff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25);
    height: 50px;
    align-content: center;
}

.btn-primary:hover,
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(99, 102, 241, 0.35);
    color: #fff;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* =========================
   Hero
========================= */

.hero-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: 30px;
    padding: 90px 30px;
    background: linear-gradient(135deg, #111827 0%, #1e1b4b 45%, #312e81 78%, #4f46e5 100%);
    box-shadow: 0 25px 70px rgba(79, 70, 229, 0.25);
}

[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #111827 30%, #1e1b4b 65%, #312e81 100%);
}

.hero-section:before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -110px;
    right: -80px;
    filter: blur(5px);
}

.hero-section:after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -60px;
    left: -40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: 3.1rem;
    line-height: 1.12;
    font-weight: 900;
}

.hero-subtitle {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.88);
}

.hero-feature {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 18px;
    backdrop-filter: blur(8px);
    height: 100%;
}

.hero-feature i {
    font-size: 26px;
    margin-bottom: 10px;
    color: #fff;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
        border-radius: 22px;
    }

    .hero-title {
        font-size: 2.15rem;
    }
}

/* =========================
   Cards
========================= */

.card,
.page-header,
.comment-box,
.feature-card,
.category-card,
.contact-card,
.auth-card {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
}

.post-card .image-wrapper {
    overflow: hidden;
}

.post-card img {
    height: 225px;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.post-card:hover img {
    transform: scale(1.07);
}

.post-card .card-title a {
    color: var(--text);
    font-weight: 800;
}

.post-card .card-title a:hover {
    color: var(--primary);
}

.post-card .card-text {
    color: var(--muted);
}

.badge-category {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 999px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* =========================
   Section Titles
========================= */

.section-title {
    position: relative;
    display: inline-block;
    font-weight: 900;
    margin-bottom: 30px;
}

.section-title:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 55px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

/* =========================
   Category / Feature Cards
========================= */

.category-card,
.feature-card,
.contact-card {
    height: 100%;
    padding: 26px;
}

.category-card:hover,
.feature-card:hover,
.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
}

.category-icon,
.feature-icon,
.contact-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.24);
    margin-bottom: 16px;
}

.category-card .badge {
    background: color-mix(in srgb, var(--secondary) 14%, transparent);
    color: var(--secondary);
    font-weight: 800;
}

/* =========================
   CTA Section
========================= */

.cta-section {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 60px 30px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2), var(--secondary));
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.28);
}

.cta-section:before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    top: -80px;
    right: -50px;
}

.cta-section:after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    bottom: -50px;
    left: -30px;
}

/* =========================
   Forms
========================= */

.form-control,
.form-select {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 12px 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 14%, transparent);
    background: var(--input-bg);
    color: var(--text);
}

.form-label {
    font-weight: 700;
    color: var(--text);
}

/* =========================
   Article Page
========================= */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    z-index: 99999;
    background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--secondary));
    transition: width 0.1s linear;
}

.article-content {
    font-size: 1.06rem;
    line-height: 1.95;
    color: var(--text);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 900;
    margin-top: 1.7rem;
    margin-bottom: 0.9rem;
}

.article-content a {
    color: var(--primary);
    font-weight: 700;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content blockquote {
    border-left: 5px solid var(--primary);
    background: var(--surface-soft);
    padding: 18px 22px;
    border-radius: 0 18px 18px 0;
    margin: 22px 0;
}

.article-content pre {
    background: var(--surface-soft);
    color: var(--text);
    padding: 18px;
    border-radius: 16px;
    overflow-x: auto;
}

.article-content code {
    color: var(--primary);
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    margin-right: 8px;
    transition: var(--transition);
}

.social-share a:hover {
    transform: translateY(-3px);
    opacity: 0.92;
}

.facebook { background: #1877f2; }
.twitter { background: #111111; }
.whatsapp { background: #25d366; }

[data-bs-theme="dark"] .twitter {
    background: #333;
}

.comment-item {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 15px;
}

/* =========================
   Page Header
========================= */

.page-header {
    padding: 30px;
    margin-bottom: 30px;
}

.page-header h1 {
    font-weight: 900;
}

/* =========================
   Footer
========================= */

.footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), #0f172a);
    color: #cbd5e1;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    margin-top: 70px;
    padding: 30px 0px 20px 0px;
}

.footer a {
    color: #cbd5e1;
}

.footer a:hover {
    color: #fff;
}

.footer-title {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 900;
    margin-bottom: 18px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.footer-brand {
    color: #fff;
    font-weight: 900;
    font-size: 1.3rem;
}

/* =========================
   Back To Top
========================= */

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.35);
    z-index: 9999;
    transition: var(--transition);
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* =========================
   Auth
========================= */

.auth-card {
    max-width: 440px;
    margin: 60px auto;
    padding: 35px;
}

/* =========================
   Pagination
========================= */

.pagination .page-link {
    border-radius: 12px;
    margin: 0 4px;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
    font-weight: 700;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
}

/* =========================
   Utility
========================= */

.rounded-xl {
    border-radius: 22px !important;
}

.shadow-custom {
    box-shadow: var(--shadow) !important;
}

.hover-up {
    transition: var(--transition);
}

.hover-up:hover {
    transform: translateY(-7px);
}

/* =========================================================
   Featured Slider
========================================================= */

.featured-slide {
    min-height: 430px;
    background-size: cover;
    background-position: center;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.featured-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.35));
}

.featured-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 430px;
    padding: 45px;
    color: #fff;
    text-align: left;
}

.featured-title {
    font-size: 2rem;
    font-weight: 900;
    max-width: 700px;
}

.featured-excerpt {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.82);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 14px;
    font-weight: 800;
}

#featuredCarousel .carousel-indicators {
    margin-bottom: 20px;
}

#featuredCarousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    border: none;
}

#featuredCarousel .carousel-indicators .active {
    background: #fff;
}

#featuredCarousel .carousel-control-prev,
#featuredCarousel .carousel-control-next {
    width: auto;
    top: auto;
    bottom: 25px;
}

#featuredCarousel .carousel-control-prev {
    left: 35px;
}

#featuredCarousel .carousel-control-next {
    left: 95px;
}

.featured-control {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* =========================================================
   Contact Page Fix
========================================================= */

.contact-page .contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    height: 100%;
    text-align: left;
}

.contact-page .contact-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    margin-bottom: 0;
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.24);
}

.contact-page .contact-card h2 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.contact-page .contact-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.contact-form-card {
    border-radius: 24px;
    overflow: hidden;
}

.contact-form-card .form-label {
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-form-card .form-control {
    padding: 13px 15px;
}

.contact-form-card textarea.form-control {
    min-height: 190px;
    resize: vertical;
}

/* =========================================================
   Cookie Consent
========================================================= */

.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 99998;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.cookie-consent .cookie-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

@media (max-width: 991px) {
    .contact-page .contact-card {
        padding: 20px;
    }

    .contact-form-card .card-body {
        padding: 22px !important;
    }

    .cookie-consent {
        right: auto;
        width: 430px;
    }
}

@media (max-width: 576px) {
    .contact-page .page-header {
        padding: 22px;
    }

    .contact-page .contact-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
        font-size: 20px;
    }

    .contact-form-card .btn-lg {
        width: 100%;
    }

    .btn-lg {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .featured-slide,
    .featured-content {
        min-height: 360px;
    }

    .featured-content {
        padding: 25px;
    }

    .featured-title {
        font-size: 1.45rem;
    }

    #featuredCarousel .carousel-control-prev {
        left: 20px;
    }

    #featuredCarousel .carousel-control-next {
        left: 80px;
    }
}
