/* 
   Modern News Website - Main Stylesheet
   Author: Informator Dev
   Version: 2.0 
*/

:root {
    /* Color Palette - Light Mode */
    --primary: #6d0606;
    --primary-dark: #820000;
    --secondary: #ff0404;
    --accent: #ef4444;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-muted2: #fafafa;
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-lg: 24px;
    --font-main: 'Segoe UI', system-ui, sans-serif;
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --primary: #990505;
    --primary-dark: #9b0101;
    --secondary: #990505;
    --accent: #f87171;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-muted2: #fafafa;
    --border-color: #334155;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color var(--transition), color var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

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

.hidden {
    display: none;
}

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

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

/* --- TOP BAR --- */
.top-info-bar {
    background: var(--secondary);
    color: var(--bg-body);
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-info-bar .top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-site-name {
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-links {
    display: flex;
    gap: 15px;
}

.top-links a {
    color: var(--text-muted2);
    font-weight: 600;
    font-size: 12px;
}

.top-links a:hover {
    color: var(--primary);
}

.top-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    font-weight: 600;
    color: var(--text-muted2);
}

.top-actions i {
    color: var(--text-muted2);
    margin-right: 5px;
}

/* --- HEADER & NAV --- */
header {
    background: var(--bg-card);
    padding: 15px 0;
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: -1px;
    margin-right: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.logo img {
    height: 34px;
    width: auto;
    display: block;
}
.logo-text {
    display: inline-block;
}

/* Desktop Menu */
.desktop-menu {
    display: none;
    gap: 20px;
    align-items: center;
    flex: 1;
}

.desktop-menu a {
    font-weight: 600;
    color: var(--text-main);
    font-size: 15px;
    transition: 0.2s;
}

.desktop-menu a:hover {
    color: var(--primary);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icons i {
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-icons i:hover {
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 35px;
    height: 35px;
    justify-content: center;
    background: var(--bg-body);
    border-radius: 50%;
}

/* Search Box */
.search-wrapper {
    position: relative;
}

.search-box {
    position: absolute;
    top: 45px;
    right: 0;
    background: var(--bg-card);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-color);
    width: 250px;
    animation: slideDown 0.2s ease;
}

.search-box.active {
    display: flex;
}

.search-box input {
    border: none;
    background: var(--bg-body);
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    color: var(--text-main);
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- SIDEBAR MENU --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.15);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 800;
}

.sidebar-section-title {
    padding: 20px 25px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: var(--text-main);
    font-weight: 500;
    border-left: 4px solid transparent;
}

.sidebar-menu a i {
    margin-right: 15px;
    width: 20px;
    font-size: 18px;
    color: var(--text-muted);
}

.sidebar-menu a:hover {
    background: var(--border-color);
    color: var(--primary);
    border-left-color: var(--primary);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1500;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

/* --- PROFILE DROPDOWN --- */
.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-card);
    width: 220px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    z-index: 2000;
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown.active {
    display: flex;
}

.profile-dropdown a {
    padding: 14px 20px;
    color: var(--text-main);
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-dropdown a:hover {
    background: var(--bg-body);
    color: var(--primary);
}

.role-tag {
    font-size: 10px;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    text-transform: uppercase;
    font-weight: bold;
}

/* --- SLIDER (Base Styles) --- */
/* (Responsive sizing handled in .slider-container override below) */
.slider-container {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: grab;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
}

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

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 40px 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: #fff;
}

/* Dots */
.slider-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: 0.3s;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* --- MAIN LAYOUT --- */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

@media (min-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr 350px;
    }

    /* Show Desktop Menu, Hide Mobile Toggle */
    .desktop-menu {
        display: flex;
    }

    #openMenu {
        display: none;
    }
}

.top-section-no-padding {
    margin-bottom: 30px;
    position: relative;
}

/* --- NEWS CARDS --- */
.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 35px;
    border: 1px solid var(--border-color);
    transition: 0.4s ease;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.news-image {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}


.news-content {
    padding: 30px;
}

.news-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* --- SIDEBAR RIGHT --- */
.sidebar-right {
    display: block;
}

@media (min-width: 992px) {
    .sidebar-right {
        display: block;
    }
}

.side-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.side-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trend-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.trend-img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.trend-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
}

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

/* --- ADS --- */
.reklam-skyscraper {
    position: fixed;
    top: 110px;
    width: 180px;
    height: 620px;
    z-index: 10;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}
.reklam-skyscraper.reklam-hide {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.reklam-sol {
    left: 24px;
}

.reklam-sag {
    right: 24px;
}

@media (max-width: 1400px) {
    .reklam-skyscraper {
        display: none;
    }
}

/* --- FOOTER --- */
footer {
    background: var(--bg-card);
    padding: 60px 0 30px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p,
.footer-col a {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.footer-col ul li {
    margin-bottom: 12px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

/* --- DETAIL META --- */
.detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 320px;
}

.detail-author__info {
    min-width: 0;
}

.detail-author__name {
    font-weight: 800;
    color: var(--text-main);
    font-size: 15px;
    margin-bottom: 6px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.detail-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.detail-tag {
    font-weight: 800;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.detail-tag--category {
    background: #eef2ff;
    color: #3730a3;
    border-color: rgba(55, 48, 163, 0.15);
}

.detail-tag--special {
    background: #f59e0b;
    color: #fff;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .top-container {
        flex-direction: column;
        gap: 10px;
    }

    .slide-content h2 {
        font-size: 20px;
    }

    .logo {
        font-size: 24px;
        margin-right: 0;
    }

    .detail-head {
        align-items: flex-start;
    }

    .detail-tags {
        width: 100%;
        justify-content: flex-start;
    }

    .detail-author {
        flex-basis: 100%;
    }

    /* Hide top links on very small screens if needed, or stack them */
}

/* --- UTILS --- */
.media-wrapper {
    position: relative;
}

.media-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 86, 179, 0.85);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 5;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- TOP GRID SECTION --- */
.top-section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

@media (min-width: 992px) {
    .top-section-grid {
        grid-template-columns: minmax(0, 1fr) 350px;
    }
}

.trend-card-top {
    /* Match slider height */
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Custom scrollbar for trend card */
.trend-card-top::-webkit-scrollbar {
    width: 6px;
}

.trend-card-top::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.trend-item.small {
    margin-bottom: 15px;
}

.trend-img.small {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.trend-text.small {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.weather-widget {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
