@import './fonts/fonts.css';

/* =====================================================
   KOSMETIK-INSIDER.COM — Custom Theme
   Playfair Display (headings) + DM Sans (body)
   Primary: #d8759e  |  Secondary: #334849
   ===================================================== */

:root {
    --primary:        #d8759e;
    --primary-light:  #fceef5;
    --primary-mid:    #f0b8d0;
    --primary-dark:   #b85c82;
    --secondary:      #334849;
    --secondary-mid:  #4a6364;
    --secondary-light:#e8f0f0;
    --bg:             #faf8f6;
    --bg-card:        #ffffff;
    --text:           #1d2b2c;
    --text-muted:     #7a8a8b;
    --border:         #ece5de;
    --border-light:   #f4f0eb;
    --font-display:   'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:      'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-h:          68px;
    --shadow-sm:      0 1px 6px rgba(51,72,73,.07), 0 2px 12px rgba(51,72,73,.05);
    --shadow-md:      0 4px 18px rgba(51,72,73,.12), 0 2px 6px rgba(51,72,73,.07);
    --radius:         10px;
    --transition:     .22s cubic-bezier(.4,0,.2,1);
    --max-w:          1200px;
}

/* ── Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { transition: color var(--transition); }

/* Outer shell */
.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 1 auto;
}

/* Bootstrap container cap */
.container { max-width: var(--max-w); }

/* ── Navigation ──────────────────────────────────── */
.mainMenuWrapper {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm);
}

.mainMenuWrapper .container { max-width: var(--max-w); }

.mainMenuWrapper .navbar {
    padding: 0;
    min-height: var(--nav-h);
    align-items: center;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    padding: 8px 0;
}

.logo {
    height: 40px;
    width: auto;
}

.navbar-collapse { justify-content: flex-end; }

.navbar-nav {
    align-items: center;
    gap: 2px;
    margin: 0 !important;
}

.nav-item .nav-link {
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--secondary);
    padding: .45rem .9rem !important;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-toggler {
    border: 1.5px solid var(--border);
    padding: 5px 9px;
    border-radius: 6px;
    color: var(--secondary);
    transition: border-color var(--transition);
}

.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler:hover { border-color: var(--primary); }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23334849' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    margin-top: 6px !important;
    min-width: 180px;
}

.dropdown-item {
    font-size: .85rem;
    border-radius: 6px;
    padding: .42rem .8rem;
    color: var(--secondary);
    transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover,
.dropdown-item.active,
.dropdown-item:active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb-bar {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
}

.breadcrumb-bar .container { max-width: var(--max-w); }

.breadcrumb-bar nav,
.breadcrumb-bar p,
.breadcrumb-bar span {
    font-size: .76rem;
    color: var(--text-muted);
    margin: 0;
}

.breadcrumb-bar a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-bar a:hover { color: var(--primary); }

/* ── Page Layout ─────────────────────────────────── */
.inner-wrapper { padding: 44px 0 70px; }

/* ── Intro Block ─────────────────────────────────── */
.intro {
    margin-bottom: 52px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.intro h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 14px;
}

.intro p, .intro div {
    font-size: 1.03rem;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.85;
    margin-bottom: 0;
}

/* ── Article List ────────────────────────────────── */
.article-list {
    margin-bottom: 54px;
}

.article-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.article-list-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}

.article-list-title::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.article-list-excerpt {
    font-size: .88rem;
    color: var(--text-muted);
    margin: 6px 0 0;
}

.article-list-see-all {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: .35rem .75rem;
    border: 1.5px solid var(--primary-mid);
    border-radius: 30px;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.article-list-see-all:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.article-list-see-all::after { content: '→'; }

.article-list .row {
    --bs-gutter-x: 26px;
    --bs-gutter-y: 32px;
}

/* ── Article Card ────────────────────────────────── */
.article-item {
    height: 100%;
}

.article-item a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--border-light);
}

.article-item a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Fixed aspect ratio container prevents CLS */
.article-item .image {
    aspect-ratio: 33 / 20;
    overflow: hidden;
    background: var(--border);
    flex-shrink: 0;
}

.article-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
}

.article-item a:hover .image img {
    transform: scale(1.05);
}

.article-item .article-body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-item .date {
    font-size: .71rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.article-item h3,
.article-item h2 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.35;
    margin: 0 0 10px;
    flex-shrink: 0;
}

.article-item .excerpt {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex: 1;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 22px;
}

.sidebar-widget__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-widget__title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--primary);
}

.sidebar-categories__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories__list li { border-bottom: 1px solid var(--border-light); }
.sidebar-categories__list li:last-child { border-bottom: none; }

.sidebar-categories__list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 2px;
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 400;
    transition: color var(--transition), padding-left var(--transition);
}

.sidebar-categories__list a::after {
    content: '›';
    color: var(--primary);
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-categories__list a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* ── Article Page ────────────────────────────────── */
.article-header { margin-bottom: 28px; }

.article-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.22;
    margin-bottom: 14px;
}

.article-header .date {
    font-size: .77rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--primary);
}

.article-header .modified-date {
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: .77rem;
    margin-left: 8px;
}

/* Fixed aspect ratio prevents CLS on hero */
.article-hero {
    aspect-ratio: 97 / 50;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 38px;
    background: var(--border);
}

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

.article-content {
    font-size: 1.03rem;
    line-height: 1.88;
    color: var(--text);
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 40px 0 16px;
    line-height: 1.25;
}

.article-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 30px 0 12px;
}

.article-content h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 24px 0 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.article-content p { margin-bottom: 1.45em; }

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-content a:hover { color: var(--primary-dark); }

.article-content ul,
.article-content ol {
    margin: 0 0 1.45em 1.4em;
    padding: 0;
}

.article-content li { margin-bottom: .45em; }

.article-content img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    margin: 1.5em 0;
}

.article-content strong { color: var(--secondary); font-weight: 600; }

.article-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 14px 20px;
    margin: 1.8em 0;
    background: var(--primary-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Related articles section */
.related-articles {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-articles__title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 12px;
}

.related-articles__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* ── Category Page Header ────────────────────────── */
.category-intro {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-mid) 100%);
    border-radius: 14px;
    padding: 42px 44px;
    margin-bottom: 42px;
    position: relative;
    overflow: hidden;
}

.category-intro::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(216,117,158,.15);
    pointer-events: none;
}

.category-intro::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -30px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(216,117,158,.08);
    pointer-events: none;
}

.category-intro h1 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.category-intro p,
.category-intro div {
    color: rgba(255,255,255,.72);
    font-size: 1rem;
    max-width: 600px;
    margin: 0;
    line-height: 1.75;
    position: relative;
    z-index: 1;
}

/* ── Pagination ──────────────────────────────────── */
.pagination {
    gap: 5px;
    margin-top: 44px !important;
    flex-wrap: wrap;
}

.page-item .page-link {
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 8px !important;
    font-size: .85rem;
    padding: 7px 14px;
    line-height: 1.4;
    background: var(--bg-card);
    transition: all var(--transition);
    font-family: var(--font-body);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 500;
}

.page-item .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.page-item.disabled .page-link {
    opacity: .38;
    cursor: default;
}

/* ── Footer ──────────────────────────────────────── */
.footer-wrapper {
    background: var(--secondary);
    padding: 26px 0;
    margin-top: 0;
}

.footer-wrapper .container { max-width: var(--max-w); }

.footer-wrapper p {
    margin: 0;
    font-size: .82rem;
    color: rgba(255,255,255,.45);
    display: flex;
    align-items: center;
    height: 100%;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.footer-nav a {
    font-size: .8rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-nav a:hover { color: var(--primary); }

/* ── Misc ────────────────────────────────────────── */
/* No-image placeholder */
.article-item .image-placeholder {
    aspect-ratio: 33 / 20;
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 991.98px) {
    .inner-wrapper { padding: 28px 0 48px; }

    .sidebar {
        position: static;
        margin-top: 44px;
    }

    .navbar-collapse {
        background: #fff;
        border-radius: 10px;
        padding: 14px;
        margin-top: 8px;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--border);
    }

    .footer-nav { justify-content: flex-start; margin-top: 6px; }

    .category-intro { padding: 30px 24px; }
}

@media (max-width: 767.98px) {
    .article-list-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 575.98px) {
    .article-list .row { --bs-gutter-x: 16px; --bs-gutter-y: 22px; }
    .article-hero { aspect-ratio: 16 / 10; }
}
