/* Colombia Linux News — Custom Modern Styles */

:root {
    --cl-bg: #f8fafc;
    --cl-surface: #ffffff;
    --cl-text-primary: #0f172a;
    --cl-text-muted: #64748b;
    --cl-border: #e2e8f0;
    --cl-border-hover: #cbd5e1;
    --cl-radius-sm: 0.375rem;
    --cl-radius-md: 0.625rem;
    --cl-radius-lg: 0.875rem;
    --cl-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    --cl-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --cl-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);

    /* Typography Experiment: Roboto & Open Sans */
    --cl-font-titles: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --cl-font-body: 'Open Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
    background-color: var(--cl-bg);
    color: var(--cl-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Public Site Typography (Scoped to prevent affecting admin dashboard) */
body.site-public {
    font-family: var(--cl-font-body);
    --bs-body-font-family: var(--cl-font-body);
    line-height: 1.6;
}

/* Titles, Headings, and Display Text */
body.site-public h1,
body.site-public h2,
body.site-public h3,
body.site-public h4,
body.site-public h5,
body.site-public h6,
body.site-public .h1,
body.site-public .h2,
body.site-public .h3,
body.site-public .h4,
body.site-public .h5,
body.site-public .h6,
body.site-public .display-1,
body.site-public .display-2,
body.site-public .display-3,
body.site-public .display-4,
body.site-public .display-5,
body.site-public .display-6,
body.site-public .card-title,
body.site-public .article-prose h1,
body.site-public .article-prose h2,
body.site-public .article-prose h3,
body.site-public .article-prose h4,
body.site-public .post-wide-prose h1,
body.site-public .post-wide-prose h2,
body.site-public .post-wide-prose h3,
body.site-public .post-wide-prose h4,
body.site-public #heroCarousel .carousel-caption h2 {
    font-family: var(--cl-font-titles);
    letter-spacing: -0.015em;
    font-weight: 700;
}

/* Navbar & Brand Link */
body.site-public .navbar-brand,
body.site-public .navbar-nav .nav-link,
body.site-public .dropdown-menu,
body.site-public .dropdown-item {
    font-family: var(--cl-font-titles);
}

body.site-public .navbar-nav .nav-link {
    font-weight: 500;
    letter-spacing: -0.01em;
}

body.site-public .dropdown-item {
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6, .display-5 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Public Heading Scale & Breadcrumb Sizing */
body.site-public h1,
body.site-public .h1 {
    font-size: clamp(1.75rem, 1.45rem + 1.1vw, 2.15rem);
}

body.site-public h2,
body.site-public .h2 {
    font-size: clamp(1.45rem, 1.28rem + 0.65vw, 1.75rem);
}

body.site-public h3,
body.site-public .h3 {
    font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.45rem);
}

body.site-public h4,
body.site-public .h4 {
    font-size: 1.15rem;
}

body.site-public h5,
body.site-public .h5 {
    font-size: 1.0625rem;
}

body.site-public h6,
body.site-public .h6 {
    font-size: 1rem;
    font-weight: 700;
}

body.site-public .breadcrumb {
    font-size: 0.8125rem;
}

/* Card Modernization */
.card {
    border-color: var(--cl-border);
    border-radius: var(--cl-radius-md);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease;
}

.card:hover {
    box-shadow: var(--cl-shadow-md) !important;
    border-color: var(--cl-border-hover);
}

.card-title a {
    color: var(--cl-text-primary);
    transition: color 0.15s ease-in-out;
}

.card-title a:hover {
    color: var(--bs-primary, #0d6efd);
}

.card-cover-img {
    height: 195px;
    object-fit: cover;
    border-top-left-radius: calc(var(--cl-radius-md) - 1px);
    border-top-right-radius: calc(var(--cl-radius-md) - 1px);
}

/* Hero Carousel */
.hero-carousel-section {
    background-color: #0f172a !important; /* solid deep slate background spanning full width */
    border-bottom: 1px solid var(--cl-border);
}

.hero-carousel-container {
    background-color: #0f172a;
    border-radius: var(--cl-radius-lg);
    overflow: hidden;
    box-shadow: var(--cl-shadow-md);
}

.hero-carousel-img {
    height: 420px;
    object-fit: cover;
    background-color: #0f172a;
}

.carousel-caption-backdrop {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.88) 100%);
    border-radius: var(--cl-radius-md);
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Carousel Controls */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 0.95;
    z-index: 5;
    padding: 0;
}

#heroCarousel .carousel-control-prev {
    left: 1.25rem;
}

#heroCarousel .carousel-control-next {
    right: 1.25rem;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    width: 44px;
    height: 44px;
    background-size: 50% 50%;
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), 0 0 10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.9));
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

#heroCarousel .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M10 2.5L4.5 8l5.5 5.5'/%3e%3c/svg%3e");
}

#heroCarousel .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 2.5l5.5 5.5-5.5 5.5'/%3e%3c/svg%3e");
}

#heroCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#heroCarousel .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(15, 23, 42, 0.95);
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.85);
}

@media (max-width: 576px) {
    #heroCarousel .carousel-control-prev {
        left: 0.5rem;
    }
    #heroCarousel .carousel-control-next {
        right: 0.5rem;
    }
    #heroCarousel .carousel-control-prev-icon,
    #heroCarousel .carousel-control-next-icon {
        width: 36px;
        height: 36px;
    }
}

/* Wide Post Hero Frame */
.wide-hero-frame {
    width: 100%;
    height: clamp(260px, 38vw, 480px);
    background-color: #0f172a;
    border-radius: var(--cl-radius-lg);
    overflow: hidden;
}

@media (max-width: 768px) {
    .wide-hero-frame {
        height: 260px;
    }
}

.wide-hero-frame picture {
    display: block;
    width: 100%;
    height: 100%;
}

.wide-hero-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Prose & Typography */
.article-prose {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #1e293b;
}

.article-prose p {
    margin-bottom: 1.35rem;
}

.article-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--cl-radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--cl-shadow-sm);
}

.article-prose table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--cl-radius-sm);
    overflow: hidden;
    border: 1px solid var(--cl-border);
}

.article-prose th,
.article-prose td {
    border-bottom: 1px solid var(--cl-border);
    padding: 0.65rem 0.9rem;
}

.article-prose thead th {
    background-color: #f1f5f9;
    font-weight: 600;
}

.article-prose tr:last-child td {
    border-bottom: none;
}

.article-prose .codehilite {
    background-color: #f8fafc;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-md);
    padding: 1.1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: var(--cl-shadow-sm);
}

.article-prose .codehilite pre {
    margin: 0;
}

.post-wide-prose {
    max-width: 860px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
}

/* Post Summary Link */
.post-summary-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.post-summary-link:hover,
.post-summary-link:focus {
    color: var(--bs-primary, #0d6efd);
    text-decoration: none;
}

/* Navbar & Footer accents */
.navbar {
    border-bottom: 1px solid var(--cl-border);
}

.site-navbar-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 576px) {
    .site-navbar-logo {
        height: 28px;
    }
}


footer,
.site-footer {
    background-color: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.site-footer a.text-white-50:hover,
.site-footer .hover-white:hover {
    color: #ffffff !important;
}

/* Typesense Search Highlights & Modal */
#searchModal mark {
    background-color: #fef08a;
    color: #854d0e;
    font-weight: 600;
    padding: 1px 3px;
    border-radius: 2px;
}

#searchHitsList .list-group-item {
    border-color: var(--cl-border) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

#searchHitsList .list-group-item:hover {
    background-color: #f8fafc !important;
    border-color: var(--cl-border-hover) !important;
    box-shadow: var(--cl-shadow-sm);
    transform: translateY(-1px);
}

