/*
 * iLegis Blog â€” suprascrieri custom
 * NU suprascriem layout-ul Metronic (layout.css) â€” il lasam sa functioneze
 */

/* ============================================================
   FIX: anulare overflow hidden care blocheaza scroll-ul
   Vine din template.css la @media max-width:767px
   ============================================================ */
html {
    overflow-y: scroll;
}
.page-content {
    overflow: visible !important;
    height: auto !important;
}
.page-content-wrapper .page-content {
    overflow: visible !important;
    height: auto !important;
    min-height: 300px;
}

/* ============================================================
   BODY â€” background tile
   ============================================================ */
body.page-boxed {
    background: #e5e5e5 url('/assets/img/bg-6-full.jpg') repeat !important;
}

/* ============================================================
   HEADER â€” culori corecte
   logo turcoaz + page-top alb
   ============================================================ */
.page-header.navbar .page-logo {
    background: #14B9D6 !important;
}
.page-header.navbar .page-top {
    background: #ffffff !important;
    box-shadow: 0 1px 10px rgba(50,50,50,.2);
}
.page-header.navbar .page-top .btn.btn-default {
    background: #f5f5f5;
    border-color: #ddd;
    color: #333;
}

/* ============================================================
   BOXED â€” header si container limitate la 1270px
   ============================================================ */
.page-header.navbar {
    max-width: 1270px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 1270px !important;
}
#schimbaWidthHeader {
    max-width: 1270px;
    margin: 0 auto;
    padding: 0;
}
#schimbWidth {
    max-width: 1270px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* ============================================================
   SEARCH â€” incadrat in header, pe dreapta, aliniat vertical
   ============================================================ */
.page-header.navbar .search-form {
    margin-top: 17px !important;
    margin-right: 10px !important;
    width: 220px !important;
}
.page-header.navbar .search-form.open {
    width: 220px !important;
}
.page-header.navbar .search-form .input-group .form-control {
    height: 34px !important;
    font-size: 13px;
}
.page-header.navbar .search-form .input-group .input-group-btn .btn {
    height: 34px !important;
    line-height: 34px;
    padding: 0 10px;
}

/* ============================================================
   SIDEBAR â€” culori exacte din tema grey
   ============================================================ */
.page-sidebar-closed.page-sidebar-fixed .page-sidebar:hover,
.page-sidebar {
    background-color: #3D4A53 !important;
}
.page-sidebar .page-sidebar-menu > li > a {
    color: #dce2e6 !important;
    border-top: 1px solid #43525c !important;
    font-size: 11.4px;
}
.page-sidebar .page-sidebar-menu > li > a:hover,
.page-sidebar .page-sidebar-menu > li.active > a,
.page-sidebar .page-sidebar-menu > li.open > a {
    background: #38474f !important;
    color: #fff !important;
}
.page-sidebar .page-sidebar-menu > li > a > i { color: #8298a4; }
.page-sidebar .page-sidebar-menu > li > a:hover > i,
.page-sidebar .page-sidebar-menu > li.active > a > i { color: #E8612B; }
.page-sidebar .page-sidebar-menu .sub-menu { background: #2e3a42 !important; }
.page-sidebar .page-sidebar-menu .sub-menu > li > a { color: #8da4ae !important; }
.page-sidebar .page-sidebar-menu .sub-menu > li > a:hover {
    background: #38474f !important;
    color: #fff !important;
}

/* iLegis.AI item */
.ilegis-ai-menu-item { position: relative; }
.ilegis-ai-menu-item > a {
    background: linear-gradient(135deg,rgba(99,102,241,.18),rgba(139,92,246,.12)) !important;
    border-left: 3px solid #6366f1 !important;
    border-top: 1px solid rgba(99,102,241,.3) !important;
}
.ilegis-ai-menu-item > a .title { color: #a5b4fc !important; font-weight: 600 !important; }
.ilegis-ai-menu-item .badge-nou {
    position: absolute; top: -3px; right: 4px;
    background: linear-gradient(135deg,#ef4444,#dc2626);
    color: #fff; font-size: 8px; font-weight: 700;
    padding: 1px 5px; border-radius: 3px; z-index: 5;
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
.robot-icon-wrapper { width: 22px; height: 22px; flex-shrink: 0; display: inline-block; }
.robot-icon-svg { width: 20px; height: 20px; animation: robotWalk 3s ease-in-out infinite; }
@keyframes robotWalk { 0%,100%{transform:translateX(-2px) rotate(-2deg)} 50%{transform:translateX(2px) rotate(2deg)} }
.sidebar-section-label {
    padding: 6px 14px 2px; font-size: 9px; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(255,255,255,.25);
    border-top: 1px solid rgba(255,255,255,.07); display: block;
}

/* Podcasturi â€” portocaliu */
.page-sidebar li > a.podcasturi-link .title,
.page-sidebar li > a.podcasturi-link { color: #E8612B !important; }
.page-sidebar li > a.podcasturi-link > i { color: #E8612B !important; }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.page-content-wrapper .page-content {
    background: #F1F3FA !important;
}

/* ============================================================
   ARTICOLE
   ============================================================ */
.article-full {
    background: #fff;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    display: flex;
    min-height: 145px;
    overflow: hidden;
}
.article-full .art-img {
    width: 185px; min-width: 185px; flex-shrink: 0; overflow: hidden;
}
.article-full .art-img img {
    width: 185px; height: 145px; object-fit: cover; display: block;
}
.article-full .art-body { padding: 10px 14px; flex: 1; min-width: 0; }

.articles-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-bottom: 8px;
}
.article-half {
    background: #fff; border: 1px solid #e0e0e0;
    display: flex; flex-direction: column; overflow: hidden;
}
.article-half .art-img img {
    width: 100%; height: 115px; object-fit: cover; display: block;
}
.article-half .art-body {
    padding: 8px 10px; flex: 1; display: flex; flex-direction: column;
}

.art-title { font-size: 14px; font-weight: bold; line-height: 1.3; margin-bottom: 4px; }
.art-title a { color: #1a2e45; font-weight: bold; }
.art-title a:hover { color: #E8612B; text-decoration: none; }
.article-half .art-title { font-size: 12.5px; }

.art-intro { font-size: 12.5px; color: #4a5a6a; line-height: 1.5; margin-bottom: 5px; flex: 1; }
.art-intro a { color: #E8612B; text-decoration: underline; }
.article-half .art-intro {
    display: -webkit-box; -webkit-line-clamp: 4;
    -webkit-box-orient: vertical; overflow: hidden;
}

.art-meta {
    font-size: 11px; color: #888; display: flex; flex-wrap: wrap;
    gap: 8px; align-items: center; margin-top: auto;
    padding-top: 4px; border-top: 1px solid #f2f2f2;
}
.art-meta .meta-author { color: #4D5B69; font-weight: bold; }
.art-meta .meta-cat a { color: #E8612B; font-weight: bold; text-transform: uppercase; font-size: 10px; }

.art-readmore {
    display: inline-block; font-size: 11px; font-weight: bold;
    padding: 2px 9px; background: #4D5B69; color: #fff !important;
    border-radius: 50px; white-space: nowrap; margin-left: auto;
    transition: background .15s; text-decoration: none !important;
}
.art-readmore:hover { background: #E8612B !important; }

/* ============================================================
   SINGLE ARTICLE
   ============================================================ */
.article-single {
    background: #fff; border: 1px solid #e0e0e0;
    padding: 15px 18px; margin-bottom: 12px;
}
.article-single-header { border-bottom: 2px solid #E8612B; padding-bottom: 8px; margin-bottom: 12px; }
.article-single-cat { font-size: 11px; color: #E8612B; font-weight: bold; text-transform: uppercase; margin-bottom: 4px; }
.article-single-title { font-size: 20px; font-weight: bold; color: #1a2e45; line-height: 1.3; margin-bottom: 7px; }
.article-single-meta { font-size: 11px; color: #888; display: flex; gap: 12px; flex-wrap: wrap; }
.article-featured-img { margin-bottom: 12px; }
.article-featured-img img { max-width: 100%; border: 1px solid #ddd; }
.article-body { font-size: 13.5px; line-height: 1.8; color: #333; }
.article-body p { margin-bottom: 10px; }
.article-body h1,.article-body h2,.article-body h3 { color: #1e3a5f; margin: 12px 0 6px; }
.article-body ul,.article-body ol { margin: 5px 0 10px 20px; }
.article-body li { margin-bottom: 3px; }
.article-body a { color: #E8612B; }
.article-body a:hover { text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 12.5px; }
.article-body table th,.article-body table td { border: 1px solid #ddd; padding: 5px 9px; }
.article-body table th { background: #1e3a5f; color: #fff; }
.article-body table tr:nth-child(even) { background: #f9f9f9; }

.related-articles { background: #fff; border: 1px solid #e0e0e0; padding: 10px 12px; margin-top: 10px; }
.related-articles h3 { font-size: 12px; font-weight: bold; color: #1e3a5f; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 8px; text-transform: uppercase; }
.related-articles ul { list-style: none; padding: 0; margin: 0; }
.related-articles ul li { border-bottom: 1px solid #f4f4f4; padding: 4px 0; }
.related-articles ul li:last-child { border-bottom: none; }
.related-articles ul li a { font-size: 12.5px; color: #333; font-weight: normal; }
.related-articles ul li a:hover { color: #E8612B; }

.category-bar {
    background: linear-gradient(to right, #1e3a5f, #2d6298);
    color: #fff; font-size: 14px; font-weight: bold;
    padding: 8px 14px; margin-bottom: 10px;
}

.breadcrumb-wrap {
    background: #fff; padding: 7px 10px; margin-bottom: 10px;
    border-radius: 4px; font-size: 12px; color: #888;
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.breadcrumb-wrap a { color: #1A86B6; font-weight: normal; }
.breadcrumb-wrap a:hover { color: #E8612B; }
.breadcrumb-wrap .sep { color: #ccc; }

.pagination-wrap {
    display: flex; justify-content: center;
    gap: 3px; margin: 15px 0; flex-wrap: wrap;
}
.pagination-wrap a, .pagination-wrap span {
    display: inline-block; padding: 5px 11px;
    border: 1px solid #ddd; background: #fff;
    color: #1A86B6; font-size: 12px; border-radius: 2px;
    font-weight: normal; transition: background .15s, color .15s;
}
.pagination-wrap a:hover { background: #1A86B6; color: #fff; border-color: #1A86B6; }
.pagination-wrap span.current { background: #E8612B; color: #fff; border-color: #E8612B; font-weight: bold; }

/* ============================================================
   FOOTER
   ============================================================ */
.page-footer {
    background: #fff !important;
    border-top: 1px solid #ddd;
    padding: 8px 20px 5px;
    font-size: 12px; color: #555;
    text-align: center; position: relative; z-index: 99999;
}
.page-footer a { color: #1A86B6; font-weight: normal; }
.page-footer a:hover { color: #E8612B; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
    .page-header.navbar {
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
    }
    #schimbWidth { max-width: 100% !important; }
}
@media (max-width: 991px) {
    .page-sidebar-wrapper { display: none; }
    .page-content-wrapper .page-content { margin-left: 0 !important; }
}
@media (max-width: 860px) { .articles-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
    .article-full { flex-direction: column; }
    .article-full .art-img { width: 100%; }
    .article-full .art-img img { width: 100%; height: 160px; }
}



/* ============================================================
   FIX CRITIC: template.css suprascrie margin-left cu 0
   Forteaza margin-left: 195px la >= 992px
   ============================================================ */
@media (min-width: 992px) {
    .page-sidebar-fixed .page-content-wrapper .page-content,
    .page-content-wrapper .page-content {
        margin-left: 195px !important;
        padding: 20px 20px 10px 20px !important;
        overflow: visible !important;
    }
}


/* ============================================================
   FIX LAYOUT - sidebar fixed + page-container overflow
   ============================================================ */
/* Anuleaza overflow-y:auto de pe page-container care taie sidebar-ul fixed */
.page-container,
.modal-open.page-overflow .page-container .navbar-fixed-bottom,
.modal-open.page-overflow .page-container .navbar-fixed-top {
    overflow: visible !important;
}

/* Sidebar fixed - z-index mai mic decat header (9995) */
.page-sidebar-fixed .page-sidebar {
    z-index: 9990 !important;
    top: 68px !important;
}

/* page-sidebar-wrapper - transparent, nu blocheaza continutul */
.page-sidebar-wrapper {
    position: static !important;
    float: none !important;
    width: 0 !important;
    padding: 0 !important;
}


/* Imagine float stanga in articol */
.article-img-float {
    float: left;
    max-width: 350px !important;
    width: auto;
    height: auto;
    padding: 20px;
    padding-left: 0;
}
@media (max-width: 600px) {
    .article-img-float {
        float: none;
        max-width: 100% !important;
        padding: 0 0 12px 0;
    }
}



/* ---- SIDEBAR SCROLL ---- */
.page-sidebar-fixed .page-sidebar .page-sidebar-menu { padding-bottom: 60px !important; }
/* Scroll pe meniu, nu pe wrapper - nu rupe layout-ul Metronic */
.page-sidebar-fixed .page-sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 68px) !important;
}
.page-sidebar-fixed .page-sidebar::-webkit-scrollbar { width: 4px; }
.page-sidebar-fixed .page-sidebar::-webkit-scrollbar-track { background: #2b3643; }
.page-sidebar-fixed .page-sidebar::-webkit-scrollbar-thumb { background: #4a6070; border-radius: 2px; }