/* ==========================================================================
   TEMUGE CMS — Main Theme
   Utility classes for preview renderers.
   Loaded once, cached by browser. Replaces inline styles in PHP renderers.
   ========================================================================== */

/* --- Text truncation ---------------------------------------------------- */
.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

/* --- Font sizes --------------------------------------------------------- */
.fs-xs   { font-size: 0.65rem; }
.fs-sm   { font-size: 0.75rem; }
.fs-md   { font-size: 0.85rem; }
.fs-base { font-size: 0.9rem; }
.fs-lg   { font-size: 1.125rem; }
.fs-xl   { font-size: 1.5rem; }
.fs-2xl  { font-size: 1.75rem; }

/* --- Cover images ------------------------------------------------------- */
.cover-img {
    background-size: cover;
    background-position: center;
    border-radius: 0.375rem;
    overflow: hidden;
}

/* --- Thumbnail sizes ---------------------------------------------------- */
.thumb-sm  { width:  60px; height:  40px; flex-shrink: 0; }
.thumb-md  { width:  80px; height:  56px; flex-shrink: 0; }
.thumb-lg  { width: 100px; height:  68px; flex-shrink: 0; }
.thumb-xl  { width: 120px; height:  80px; flex-shrink: 0; }

/* --- Image heights (for card-img-top etc.) ------------------------------ */
.img-h-sm  { height: 130px; object-fit: cover; }
.img-h-md  { height: 160px; object-fit: cover; }
.img-h-base{ height: 180px; object-fit: cover; }
.img-h-lg  { height: 200px; object-fit: cover; }
.img-h-xl  { height: 220px; object-fit: cover; }
.img-h-hero{ height: 400px; object-fit: cover; }

/* --- Avatar circles ----------------------------------------------------- */
.avatar      { border-radius: 50%; object-fit: cover; }
.avatar-xs   { width: 24px; height: 24px; }
.avatar-sm   { width: 36px; height: 36px; }
.avatar-md   { width: 48px; height: 48px; }
.avatar-lg   { width: 56px; height: 56px; }
.avatar-xl   { width: 80px; height: 80px; }

/* --- Section title accent bar ------------------------------------------- */
.section-bar {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    margin-right: 10px;
    background: var(--color-primary, #4f46e5);
}

/* --- Gradient overlays -------------------------------------------------- */
.overlay-bottom {
    background: linear-gradient(transparent 30%, rgba(0,0,0,0.85));
}
.overlay-bottom-light {
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.7));
}
.overlay-radial {
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

/* --- Trending number ---------------------------------------------------- */
.trending-num {
    font-size: 1.5rem;
    line-height: 1;
    white-space: nowrap;
    min-width: 28px;
    opacity: 0.3;
}

/* --- Video player ------------------------------------------------------- */
.video-dark-bg {
    background: #0f0f1a;
}
.video-playlist-bg {
    background: #1a1a2e;
}
.video-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-play-btn-sm {
    width: 24px;
    height: 24px;
}

/* --- Ticker / Marquee --------------------------------------------------- */
.ticker-bar {
    background: #1a1a2e;
    color: #fff;
    overflow: hidden;
}
.ticker-label {
    flex-shrink: 0;
    z-index: 1;
}
.ticker-track {
    height: 24px;
    overflow: hidden;
}

/* --- Badge style override (fit-content) --------------------------------- */
.badge-fit {
    width: fit-content;
}

/* --- Countdown ---------------------------------------------------------- */
.countdown-unit {
    background: rgba(255,255,255,0.1);
    min-width: 70px;
}

/* --- Classified / Product image placeholder ----------------------------- */
.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Icon box ----------------------------------------------------------- */
.icon-box-md {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Whitespace --------------------------------------------------------- */
.nowrap { white-space: nowrap; }

/* --- Aspect ratio helpers ----------------------------------------------- */
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3  { aspect-ratio: 4 / 3; }

/* --- Container (tenant-configurable max-width) ------------------------- */
.zetta-container {
    width: 100%;
    max-width: var(--zetta-container-width, 1320px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    min-height: 60px;
}
.zetta-container:empty {
    min-height: 80px;
    border: 1px dashed #cbd5e1;
    background: rgba(203, 213, 225, .08);
    border-radius: 6px;
}
@media (min-width: 576px) {
    .zetta-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* --- Article content typography ----------------------------------------- */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}
.article-content p {
    margin-bottom: 1.5rem;
}
.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.article-content img {
    max-width: 100%;
    height: auto;
}
.article-content blockquote {
    font-style: italic;
}
.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}

/* --- Header behavior styles --------------------------------------------- */
.header-shrunk {
    transition: all 0.3s ease;
}
.header-shrunk .header-logo span {
    font-size: 1.25rem !important;
}

/* Mega menu */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
}
.nav-item.dropdown:hover .mega-menu {
    display: block;
}

/* Sidebar header */
.header-sidebar nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Header transition */
[data-gjs-type^="header-"] {
    transition: all 0.3s ease;
}

/* Hamburger menu animation */
.hamburger-btn svg {
    transition: transform 0.3s ease;
}
.hamburger-btn:hover svg {
    transform: scale(1.1);
}

/* --- Topbar responsive -------------------------------------------------- */
@media (max-width: 575.98px) {
    .bg-dark.text-white.py-1 { font-size: 0.7rem !important; }
    .bg-dark.text-white.py-1 .zetta-container { flex-wrap: wrap; gap: 0.25rem; justify-content: center !important; }
    .bg-dark.text-white.py-1 .gap-3 { gap: 0.5rem !important; }
}

/* --- Utility ------------------------------------------------------------ */
.min-w-0 { min-width: 0; }
