/* Modern Premium Theme - 2026 Remake */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Palette - Purple & White Brand */
    --primary: #695aa6;
    --primary-dark: #584a8f;
    --primary-light: #8e7cc9;
    --primary-subtle: #ede9fe;
    --accent: #695aa6;

    /* Neutrals */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

    /* Layout */
    --container-width: 1140px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

section[id], header[id] {
    scroll-margin-top: 80px;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.25;
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

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

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.92rem;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(105, 90, 166, 0.25);
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--text-main);
    transform: translateY(-2px);
}

/* Navbar */
.navbar,
.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.navbar.scrolled,
.site-navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.navbar .container,
.site-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo,
.site-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.logo span,
.site-logo span {
    color: #695aa6;
}

.nav-links,
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-link,
.nav-item-link {
    font-weight: 500;
    font-size: 0.92rem;
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
    padding: 6px 0;
    position: relative;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-link:hover,
.nav-link.active,
.nav-item-link:hover,
.nav-item-link.active {
    color: #695aa6;
}

.nav-link::after,
.nav-item-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #695aa6;
    transition: width 0.2s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-item-link:hover::after,
.nav-item-link.active::after {
    width: 100%;
}

.nav-btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-btn-admin:hover {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* Mobile Toggle */
.menu-toggle,
.mobile-hamburger {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 4px;
}

@media (max-width: 991px) {
    .nav-menu,
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid #e2e8f0;
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
        box-sizing: border-box;
    }

    .nav-menu.open,
    .nav-links.open {
        display: flex;
    }

    .mobile-hamburger,
    .menu-toggle {
        display: block;
    }
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    background: #ffffff;
    padding: 120px 0 60px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-text {
    max-width: 580px;
}

.hero-subtitle {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-img-wrap {
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 360px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.section-head {
    margin-bottom: 48px;
    text-align: center;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.about-text p {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #000000;
    box-shadow: var(--shadow-sm);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.service-card {
    background: #ffffff;
    padding: 32px 26px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    background: var(--primary-subtle);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.service-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Portfolio & Commercial Apps Grids */
.portfolio-grid,
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.portfolio-item,
.store-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover,
.store-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.portfolio-img-wrap,
.store-img-wrap {
    height: 210px;
    overflow: hidden;
    background: #f1f5f9;
}

.portfolio-img,
.store-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-img,
.store-card:hover .store-img {
    transform: scale(1.05);
}

.portfolio-info,
.store-info {
    padding: 22px;
    background: #ffffff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-cat,
.store-cat {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px;
}

.portfolio-title,
.store-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-body p {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h5 {
    margin-bottom: 2px;
    font-size: 1rem;
}

.user-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contact */
.contact-wrapper {
    background: var(--white);
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e1e1e1;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: #f9f9f9;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(105, 90, 166, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        /* Space for fixed navbar */
        padding-bottom: 60px;
        overflow: visible;
    }

    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        padding-top: 20px;
    }

    .hero-img-wrap {
        justify-content: center;
        width: 100%;
        margin-bottom: 30px;
    }

    .hero-text {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img-wrap {
        order: -1;
    }

    /* Image on top in mobile */
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }

    /* Smaller font for mobile to fit screen */
    .hero-desc {
        font-size: 1rem;
    }

    .section {
        padding: 60px 0;
    }

    /* Less padding on mobile */
    .section-title {
        font-size: 2rem;
    }

    .contact-wrapper {
        padding: 30px 20px;
    }

    .navbar .container {
        padding: 0 20px;
    }

    /* Better portfolio grid on small screens */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Fix: Add background to navbar on mobile to prevent overlap issues */
    .navbar {
        background: var(--white);
        box-shadow: var(--shadow-sm);
        padding: 15px 0;
    }

    /* App Page Hero Fixes */
    .app-hero {
        min-height: auto !important;
        height: auto !important;
        padding-top: 120px !important;
        padding-bottom: 30px !important;
    }

    .app-hero .hero-title {
        font-size: 2.2rem !important;
        margin-bottom: 10px;
    }

    /* Fix: Add gap to buttons on mobile */
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
}

/* Fix Mobile Navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        color: var(--primary-dark);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        /* Adjust based on navbar height */
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        gap: 15px;
    }

    .nav-links.active {
        /* Class toggled by JS */
        display: flex !important;
        /* Force display flex when active */
    }

    .nav-link {
        display: block;
        padding: 10px;
        text-align: center;
    }

    .nav-link::after {
        bottom: 0;
        width: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 50px;
    }
}

/* App Page Navbar Fixes */
.back-btn {
    padding: 8px 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn i {
    font-size: 1rem;
}

@media (max-width: 600px) {
    .navbar.scanned .container {
        justify-content: space-between;
    }

    .navbar.scanned .logo {
        font-size: 1.2rem;
        max-width: 70%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .back-btn span {
        display: none;
    }

    .back-btn {
        padding: 8px 12px;
    }
}

/* ==========================================================================
   Admin Panel Modern Sidebar & Layout Styles
   ========================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-body, #f7f9fc);
}

.admin-sidebar {
    width: 270px;
    background: #191929;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.admin-sidebar-brand {
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-main, linear-gradient(135deg, #695aa6, #8e44ad));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(105, 90, 166, 0.4);
}

.brand-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    margin: 0;
    line-height: 1.2;
}

.brand-info span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.admin-sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

.menu-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    padding: 10px 14px 6px;
    letter-spacing: 1px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s ease;
    margin-bottom: 4px;
    position: relative;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.sidebar-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.sidebar-nav-item.active {
    background: var(--gradient-main, linear-gradient(135deg, #695aa6, #8e44ad));
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(105, 90, 166, 0.35);
}

.sidebar-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
}

.sidebar-nav-item.active .sidebar-badge {
    background: rgba(255, 255, 255, 0.25);
}

.admin-sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 15, 26, 0.5);
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-mini {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(105, 90, 166, 0.3);
    border: 2px solid var(--primary-light, #9b87f5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-text-mini h5 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.user-text-mini span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.logout-icon-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-icon-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}

/* Main Content Area */
.admin-main-wrap {
    flex: 1;
    margin-left: 270px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--text-main, #1e293b);
    cursor: pointer;
    padding: 6px;
}

.topbar-title-box h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    margin: 0;
}

.topbar-title-box p {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-content-area {
    padding: 30px 32px 60px;
    flex: 1;
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1040;
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-sidebar-backdrop.open {
        display: block;
    }
    .admin-main-wrap {
        margin-left: 0;
    }
    .sidebar-toggle-btn {
        display: block;
    }
    .admin-topbar {
        padding: 0 18px;
    }
    .admin-content-area {
        padding: 20px 18px 40px;
    }
}

/* Enhanced Dashboard Grid Cards */
.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(105, 90, 166, 0.12);
}

.overview-card .card-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.card-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.card-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.card-icon.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.card-icon.amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.overview-card .card-info h3 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
    line-height: 1.1;
}

.overview-card .card-info p {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin: 4px 0 0;
}

/* Toast Notifications */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 4000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.admin-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.admin-toast.success { border-left: 4px solid #10b981; }
.admin-toast.error { border-left: 4px solid #ef4444; }


/* ==========================================================================
   Blog & Blog Admin Styles
   ========================================================================== */
.blog-header {
    background: #ffffff !important;
    color: var(--text-main);
    padding: 130px 0 60px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.blog-header h1 {
    color: #0f172a !important;
}

.blog-header p {
    color: #64748b !important;
}

.blog-header::after {
    display: none;
}

.blog-search-box {
    position: relative;
    max-width: 550px;
    margin: 26px auto 0;
}

.blog-search-box input {
    width: 100%;
    padding: 12px 20px 12px 46px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.95rem;
    background: #ffffff;
    box-shadow: none;
    transition: all 0.2s ease;
}

.blog-search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(105, 90, 166, 0.15);
}

.blog-search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1rem;
}

.category-filter-wrap {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}

.category-pill {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    user-select: none;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: none;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.blog-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(105, 90, 166, 0.15);
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: 0 6px 18px rgba(105, 90, 166, 0.08);
}

.blog-thumb-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}

.blog-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-thumb {
    transform: scale(1.04);
}

.blog-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-subtle);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(105, 90, 166, 0.15);
}

.blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.4;

    /* 2-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;

    /* 3-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.tag-pill {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--primary);
    font-weight: 500;
}

.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
    margin-top: auto;
}

.read-more-btn {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: gap 0.2s ease;
}

.read-more-btn:hover {
    gap: 10px;
}

/* Single Article Reader Modal */
.article-modal-backdrop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#admin-message-modal.active {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 20px;
}

.article-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.article-modal-close:hover {
    background: var(--primary-subtle);
    color: var(--primary);
    border-color: var(--primary);
}

.article-hero-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.article-body-content {
    padding: 40px;
}

.article-body-content h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.article-body-content .post-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-text p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #333;
    line-height: 1.8;
}

.article-text code {
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.95rem;
}

.article-text pre {
    background: #1e1e2f;
    color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
}

/* ==========================================================================
   Admin Dashboard Layout
   ========================================================================== */
.admin-container {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.admin-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.admin-metric-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.metric-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    background: rgba(105, 90, 166, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-data h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-data p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-table-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

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

.admin-table th,
.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-table th {
    background: #fafbfc;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.admin-table tbody tr:hover {
    background: #fcfdfe;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.published {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.status-badge.draft {
    background: rgba(241, 196, 15, 0.15);
    color: #d35400;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-icon.delete:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

/* Admin Lock Overlay */
.lock-screen-overlay {
    position: fixed;
    inset: 0;
    background: var(--gradient-dark);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lock-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    width: 420px;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.lock-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(105, 90, 166, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(105, 90, 166, 0.15);
}

/* ==========================================================================
   Consolidated Unified Site Footer
   ========================================================================== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 45px 0 30px;
    border-top: 1px solid #1e293b;
    margin-top: auto;
}

.site-footer .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-footer .footer-brand {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.site-footer .footer-brand span {
    color: var(--primary-light, #8e7cc9);
}

.site-footer .footer-subtitle {
    font-size: 0.82rem;
    margin-top: 4px;
    color: #64748b;
}

.site-footer .footer-links {
    display: flex;
    gap: 22px;
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.site-footer .footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
    color: #ffffff;
}

.site-footer .footer-social {
    display: flex;
    gap: 16px;
    font-size: 1.15rem;
}

.site-footer .footer-social a {
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-footer .footer-social a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.site-footer .footer-social a:hover .fa-linkedin { color: #0a66c2; }
.site-footer .footer-social a:hover .fa-github { color: #f0f6fc; }
.site-footer .footer-social a:hover .fa-youtube { color: #ff0000; }
.site-footer .footer-social a:hover .fa-instagram { color: #e4405f; }
.site-footer .footer-social a:hover .fa-tiktok { color: #00f2fe; }

.site-footer .footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    color: #475569;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
}

/* ==========================================================================
   MARKDOWN TYPOGRAPHY & COMPONENT STYLES
   ========================================================================== */

.markdown-content,
.article-body,
#art-body {
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.85;
}

.markdown-content h1, .markdown-content .md-h1,
.article-body h1, #art-body h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 2.2rem 0 1rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.markdown-content h2, .markdown-content .md-h2,
.article-body h2, #art-body h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    margin: 2rem 0 0.9rem;
    line-height: 1.35;
    letter-spacing: -0.4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.markdown-content h3, .markdown-content .md-h3,
.article-body h3, #art-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.75rem 0 0.75rem;
    line-height: 1.4;
}

.markdown-content h4, .markdown-content .md-h4,
.article-body h4, #art-body h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.5rem 0 0.65rem;
    line-height: 1.45;
}

.markdown-content h5, .markdown-content .md-h5,
.article-body h5, #art-body h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.25rem 0 0.5rem;
}

.markdown-content h6, .markdown-content .md-h6,
.article-body h6, #art-body h6 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.25rem 0 0.5rem;
}

.markdown-content p, .markdown-content .md-p,
.article-body p, #art-body p {
    margin-bottom: 1.2rem;
    color: #334155;
    line-height: 1.85;
}

.markdown-content ul, .markdown-content ol,
.markdown-content .md-list,
.article-body ul, .article-body ol,
#art-body ul, #art-body ol {
    margin: 0.8rem 0 1.4rem;
    padding-left: 1.6rem;
}

.markdown-content li,
.article-body li,
#art-body li {
    margin-bottom: 0.45rem;
    line-height: 1.75;
    color: #334155;
}

.markdown-content .md-list-nested,
.article-body .md-list-nested,
#art-body .md-list-nested {
    margin: 0.4rem 0 0.4rem;
    padding-left: 1.4rem;
}

.markdown-content strong,
.article-body strong,
#art-body strong,
.md-strong {
    font-weight: 700;
    color: #0f172a;
}

.markdown-content em,
.article-body em,
#art-body em {
    font-style: italic;
    color: #475569;
}

.markdown-content a,
.article-body a,
#art-body a,
.md-link {
    color: #695aa6;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.markdown-content a:hover,
.article-body a:hover,
#art-body a:hover,
.md-link:hover {
    color: #4c3d82;
}

.markdown-content blockquote,
.article-body blockquote,
#art-body blockquote {
    margin: 1.5rem 0;
    padding: 14px 20px;
    border-left: 4px solid #695aa6;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    color: #475569;
    font-style: italic;
    line-height: 1.75;
}

.markdown-content pre, .markdown-content .md-pre,
.article-body pre, #art-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.65;
    border: 1px solid #1e293b;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.markdown-content pre code,
.article-body pre code,
#art-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

.markdown-content code, .markdown-content .md-inline-code,
.article-body code, #art-body code,
.md-inline-code {
    background: #ede9fe;
    color: #695aa6;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88em;
    font-weight: 500;
}

.markdown-content hr, .markdown-content .md-hr,
.article-body hr, #art-body hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

.markdown-content img, .markdown-content .md-img,
.article-body img, #art-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.md-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    padding: 10px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.md-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.md-table tr:hover td {
    background: #fbfbfe;
}

/* Inline description formatting in cards */
.blog-excerpt .md-inline-code,
.item-desc .md-inline-code {
    font-size: 0.82em;
    padding: 1px 5px;
}

.blog-excerpt a,
.item-desc a {
    color: #695aa6;
    text-decoration: underline;
}