/* ============================================================ */
/* BASE STYLES */
/* ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #f5f7fb;
}

.dark body {
    background: #111827;
}

.magazine-font-title {
    font-family: "Playfair Display", serif;
}

/* ============================================================ */
/* DROPDOWN MENU */
/* ============================================================ */
.dropdown-menu {
    transition: all 0.25s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================================ */
/* CARD HOVER */
/* ============================================================ */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.15);
}

/* ============================================================ */
/* LINE CLAMP */
/* ============================================================ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================ */
/* CATEGORY BADGE */
/* ============================================================ */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================================================ */
/* TRENDING NUMBER */
/* ============================================================ */
.trending-number {
    font-family: "Playfair Display", serif;
}

/* ============================================================ */
/* IMAGE HOVER SCALE */
/* ============================================================ */
.hover-scale-img {
    overflow: hidden;
}

.hover-scale-img img {
    transition: transform 0.5s ease;
}

.hover-scale-img:hover img {
    transform: scale(1.05);
}

/* ============================================================ */
/* AD CONTAINER */
/* ============================================================ */
.ad-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px dashed #dee2e6;
}

.ad-label {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #adb5bd;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    z-index: 10;
}

/* ============================================================ */
/* STICKY SIDEBAR */
/* ============================================================ */
.sticky-sidebar {
    position: sticky;
    top: 100px;
}

/* ============================================================ */
/* TRENDING ITEM */
/* ============================================================ */
.trending-item:hover {
    color: var(--primary);
}

/* ============================================================ */
/* GRADIENT TEXT */
/* ============================================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), #f39c12);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================================ */
/* MOBILE MENU */
/* ============================================================ */
.mobile-menu {
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ============================================================ */
/* STICKY HEADER */
/* ============================================================ */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    transition: all 0.3s ease-in-out;
}

.dark .sticky-header {
    background: #1f2937;
}

.top-bar {
    transition: all 0.3s ease-in-out;
}

.main-logo-area {
    transition: all 0.3s ease-in-out;
}

.nav-wrapper {
    transition: all 0.3s ease-in-out;
}

.sticky-header.scrolled .main-logo-area {
    display: none;
}

.sticky-header.scrolled .compact-logo {
    display: block !important;
}

.sticky-header.scrolled .nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 55;
}

.dark .sticky-header.scrolled .nav-wrapper {
    background: #1f2937;
}

.sticky-header.scrolled .desktop-nav ul {
    justify-content: center;
    padding-left: 80px;
}

.compact-logo {
    display: none;
}

.compact-logo a {
    text-decoration: none;
}

.compact-logo h1 {
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0;
    white-space: nowrap;
}

.sticky-header * {
    transition: all 0.2s ease-in-out;
}

/* ============================================================ */
/* LAZY LOAD IMAGES */
/* ============================================================ */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy:not(.lazy) {
    opacity: 1;
}

/* ============================================================ */
/* DYNAMIC PRIMARY COLOR FROM SETTINGS */
/* ============================================================ */
:root {
    --primary: #dc2626;
    --primary-rgb: 220, 38, 38;
    --primary-dark: #dc2626dd;
    --primary-light: #dc262620;
}

.bg-primary {
    background-color: var(--primary);
}

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

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

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

.hover\:bg-primary:hover {
    background-color: var(--primary-dark);
}

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

.hover\:border-primary:hover {
    border-color: var(--primary);
}

.focus\:ring-primary:focus {
    ring-color: var(--primary);
}

.focus\:border-primary:focus {
    border-color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================================ */
/* LOGO AREA ANIMATIONS */
/* ============================================================ */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.main-logo-area img {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-logo-area img:hover {
    transform: scale(1.05) rotate(1deg);
}

.main-logo-area h1 span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-logo-area h1 span:hover {
    transform: scale(1.1);
}

.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.underline-animation:hover::after {
    width: 100%;
}

/* ============================================================ */
/* AD PULSE ANIMATION */
/* ============================================================ */
@keyframes ad-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0.1);
    }
}

.ad-container {
    animation: ad-pulse 3s ease-in-out infinite;
}

.ad-container:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* ============================================================ */
/* RESPONSIVE */
/* ============================================================ */
@media (max-width: 768px) {
    .sticky-header.scrolled .desktop-nav ul {
        padding-left: 0;
    }
}