/*
 * =============================================
 * CHIFFREX — Premium News Design
 * =============================================
 * Inspiré par les grands journaux new-yorkais classiques
 * avec une touche contemporaine, premium et dynamique
 */

/* ============================================= */
/* CSS Variables                                 */
/* ============================================= */
:root {
    /* Couleurs principales */
    --color-ink: #1a1a1a;
    --color-paper: #faf8f5;
    --color-paper-dark: #f0ece5;
    --color-accent: #8b2323;
    --color-accent-light: rgba(139, 35, 35, 0.08);
    --color-gold: #c9a84c;
    --color-gold-light: rgba(201, 168, 76, 0.15);
    --color-border: #2a2a2a;
    --color-border-light: rgba(0, 0, 0, 0.08);
    --color-text: #2d2d2d;
    --color-text-light: #6b6b6b;
    --color-white: #ffffff;

    /* Typographie */
    --font-display: 'Cinzel Decorative', cursive;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    --space-3xl: 4rem;

    /* Conteneur */
    --container-width: 1200px;
    --container-padding: 1.5rem;

    /* Rayons */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Ombres modernes */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================= */
/* Reset & Base                                  */
/* ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-paper);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Texture de papier subtile */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: -1;
}

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

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

a:hover {
    color: var(--color-ink);
}

/* ============================================= */
/* Typography                                    */
/* ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-ink);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-md);
}

/* ============================================= */
/* Container                                     */
/* ============================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================= */
/* Reading Progress Bar                          */
/* ============================================= */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
}

.reading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ============================================= */
/* Header                                        */
/* ============================================= */
.site-header {
    background: var(--color-paper);
    border-bottom: 3px double var(--color-border);
}

.header-top {
    background: var(--color-ink);
    color: var(--color-paper);
    padding: var(--space-xs) 0;
    font-size: 0.85rem;
}

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

.header-date {
    text-transform: capitalize;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.header-auth {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.auth-link {
    color: var(--color-paper);
    opacity: 0.85;
    transition: all var(--transition-fast);
    padding: 2px 0;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width var(--transition-base);
}

.auth-link:hover {
    color: var(--color-gold);
    opacity: 1;
}

.auth-link:hover::after {
    width: 100%;
}

.user-greeting {
    color: var(--color-gold);
    margin-right: var(--space-sm);
    font-weight: 600;
}

.header-main {
    padding: var(--space-xl) 0;
    text-align: center;
    position: relative;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
}

.header-ornament {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
    max-width: 200px;
}

.site-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform var(--transition-base);
}

.site-logo:hover {
    transform: scale(1.02);
}

.logo-text {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: var(--color-ink);
    letter-spacing: 2px;
    line-height: 1;
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: var(--space-sm);
}

/* ============================================= */
/* Navigation principale                         */
/* ============================================= */
.main-nav {
    background: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    flex-wrap: wrap;
}

.nav-link {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    color: rgba(248, 245, 240, 0.85);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    position: relative;
    transition: all var(--transition-base);
}

.nav-link-horoscope {
    color: var(--color-gold) !important;
    text-shadow: 0 0 10px rgba(201, 168, 76, 0.3);
}

.nav-link-horoscope::before {
    content: '🔮 ';
    margin-right: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-accent));
    transition: width var(--transition-base);
    border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ============================================= */
/* Main Content                                  */
/* ============================================= */
.site-main {
    padding: var(--space-xxl) 0;
    min-height: 60vh;
}

/* ============================================= */
/* Hero / Featured Article                       */
/* ============================================= */
.hero-section {
    margin-bottom: var(--space-3xl);
    position: relative;
}

.hero-article {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    align-items: stretch;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: box-shadow var(--transition-base);
}

.hero-article:hover {
    box-shadow: var(--shadow-xl);
}

.hero-image {
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-article:hover .hero-image img {
    transform: scale(1.04);
}

.hero-content {
    padding: var(--space-xl) var(--space-xxl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-category {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-white);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    padding: 6px 14px;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.hero-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: var(--space-md);
    line-height: 1.15;
}

.hero-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.hero-title a:hover {
    color: var(--color-accent);
}

.hero-excerpt {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.hero-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-lg);
}

.hero-meta .separator {
    color: var(--color-gold);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all var(--transition-base);
}

.hero-cta:hover {
    gap: var(--space-md);
    color: var(--color-ink);
}

.hero-cta svg {
    transition: transform var(--transition-base);
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* ============================================= */
/* Articles Grid                                 */
/* ============================================= */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-border);
}

.section-title {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    white-space: nowrap;
    font-weight: 700;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* ============================================= */
/* Article Card                                  */
/* ============================================= */
.article-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.article-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}

.article-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.05), transparent 50%);
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.article-card:hover .article-card-image::after {
    opacity: 0.6;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-card-image img {
    transform: scale(1.06);
}

.article-card-image .placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-paper-dark) 0%, var(--color-paper) 50%, var(--color-paper-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 2.5rem;
    opacity: 0.4;
}

.article-card-content {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-category {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    padding: 3px 8px;
    background: var(--color-accent-light);
    border-radius: var(--radius-sm);
    width: fit-content;
    transition: all var(--transition-fast);
}

.article-card:hover .article-card-category {
    background: var(--color-accent);
    color: var(--color-white);
}

.article-card-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    line-height: 1.35;
}

.article-card-title a {
    color: inherit;
    transition: color var(--transition-fast);
}

.article-card-title a:hover {
    color: var(--color-accent);
}

.article-card-excerpt {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.65;
    flex: 1;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    font-size: 0.78rem;
    color: var(--color-text-light);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-card-meta .reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
}

/* ============================================= */
/* Trending Section                              */
/* ============================================= */
.trending-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xxl);
    border-top: 2px solid var(--color-border);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.trending-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.trending-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.trending-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-gold);
    line-height: 1;
    min-width: 36px;
    opacity: 0.6;
}

.trending-content {
    flex: 1;
}

.trending-content h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.trending-content h4 a {
    color: inherit;
}

.trending-content h4 a:hover {
    color: var(--color-accent);
}

.trending-content .trending-meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* ============================================= */
/* Single Article                                */
/* ============================================= */
.article-single {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}

.article-header .article-category {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-white);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    padding: 5px 14px;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
}

.article-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-lg);
    line-height: 1.15;
}

.article-header .article-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.article-header .article-meta span {
    margin: 0 var(--space-xs);
}

.article-featured-image {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.article-featured-image img {
    width: 100%;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.article-content h2 {
    margin: var(--space-xl) 0 var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
}

.article-content h3 {
    margin: var(--space-lg) 0 var(--space-md);
}

.article-content p {
    margin-bottom: var(--space-lg);
    text-align: justify;
}

.article-content blockquote {
    border-left: 4px solid var(--color-gold);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-text-light);
    background: var(--color-gold-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-content ul,
.article-content ol {
    margin: var(--space-lg) 0;
    padding-left: var(--space-xl);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

/* ============================================= */
/* Share Buttons                                 */
/* ============================================= */
.share-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.share-buttons span {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-paper);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
    cursor: pointer;
    font-size: 0;
    text-decoration: none;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-btn--twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-btn--facebook:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-btn--copy:hover {
    background: var(--color-ink);
    color: white;
    border-color: var(--color-ink);
}

.share-btn--copy.copied {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

/* ============================================= */
/* Article Navigation (prev/next)                */
/* ============================================= */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-xxl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--color-border);
}

.article-nav-item {
    padding: var(--space-lg);
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

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

.article-nav-item.next {
    text-align: right;
}

.article-nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.article-nav-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-ink);
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.article-nav-item:hover .article-nav-title {
    color: var(--color-accent);
}

/* ============================================= */
/* Comments Section                              */
/* ============================================= */
.comments-section {
    margin-top: var(--space-xxl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--color-border);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xl);
}

.comment {
    padding: var(--space-lg);
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: box-shadow var(--transition-fast);
}

.comment:hover {
    box-shadow: var(--shadow-sm);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.comment-author {
    font-weight: 600;
    color: var(--color-ink);
}

.comment-date {
    font-size: 0.82rem;
    color: var(--color-text-light);
}

.comment-content {
    color: var(--color-text);
    line-height: 1.7;
}

.comment-form {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.comment-form h3 {
    margin-bottom: var(--space-lg);
}

.comment-form textarea {
    width: 100%;
    min-height: 140px;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    resize: vertical;
    margin-bottom: var(--space-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

/* ============================================= */
/* Buttons                                       */
/* ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px var(--space-xl);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-ink);
    color: var(--color-paper);
}

.btn-primary:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--color-ink);
    border: 2px solid var(--color-ink);
}

.btn-outline:hover {
    background: var(--color-ink);
    color: var(--color-paper);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-gold {
    background: var(--color-gold);
    color: var(--color-ink);
}

.btn-gold:hover {
    background: var(--color-ink);
    color: var(--color-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================= */
/* Scroll to Top                                 */
/* ============================================= */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--color-ink);
    color: var(--color-paper);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    font-size: 0;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

/* ============================================= */
/* Footer                                        */
/* ============================================= */
.site-footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
    color: var(--color-paper);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: var(--space-xxl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-paper);
    display: block;
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.6;
    line-height: 1.7;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-section h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--color-paper);
    opacity: 0.6;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
    padding-left: 0;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--color-gold);
    padding-left: 6px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
}

.footer-ornament {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    margin: 0 auto var(--space-lg);
}

.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-bottom: var(--space-xs);
}

.footer-credit {
    font-style: italic;
    font-size: 0.8rem !important;
}

/* ============================================= */
/* Sidebar                                       */
/* ============================================= */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: var(--space-xxl);
}

.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-gold);
    font-weight: 700;
}

.widget-categories ul {
    list-style: none;
}

.widget-categories li {
    border-bottom: 1px solid var(--color-border-light);
}

.widget-categories li:last-child {
    border-bottom: none;
}

.widget-categories a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.widget-categories a:hover {
    color: var(--color-accent);
    padding-left: 6px;
}

.widget-categories .count {
    color: var(--color-text-light);
    font-size: 0.82rem;
    background: var(--color-paper);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}

/* ============================================= */
/* Pagination                                    */
/* ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xxl);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.pagination a:hover {
    background: var(--color-ink);
    color: var(--color-paper);
    border-color: var(--color-ink);
    transform: translateY(-1px);
}

.pagination .current {
    background: var(--color-ink);
    color: var(--color-paper);
    border-color: var(--color-ink);
    font-weight: 700;
}

/* ============================================= */
/* Admin Styles                                  */
/* ============================================= */
.admin-header {
    background: var(--color-ink);
    color: var(--color-paper);
    padding: var(--space-md) 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    gap: var(--space-md);
}

.admin-nav a {
    color: var(--color-paper);
    opacity: 0.8;
}

.admin-nav a:hover,
.admin-nav a.active {
    opacity: 1;
    color: var(--color-gold);
}

.admin-content {
    padding: var(--space-xl) 0;
}

.admin-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.admin-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    background: var(--color-paper);
}

.admin-table tr:hover {
    background: var(--color-paper);
}

.admin-actions {
    display: flex;
    gap: var(--space-sm);
}

.admin-actions a {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.85rem;
    border: 1px solid;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.admin-actions .edit {
    color: #2563eb;
    border-color: #2563eb;
}

.admin-actions .delete {
    color: #dc2626;
    border-color: #dc2626;
}

.admin-actions .edit:hover {
    background: #2563eb;
    color: white;
}

.admin-actions .delete:hover {
    background: #dc2626;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-ink);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.form-group textarea {
    min-height: 300px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

/* ============================================= */
/* Alerts & Messages                             */
/* ============================================= */
.alert {
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border-left: 4px solid;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* ============================================= */
/* Empty States                                  */
/* ============================================= */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--color-text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.25;
}

.empty-state h3 {
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

/* ============================================= */
/* Responsive Design                             */
/* ============================================= */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-lg);
    }

    .sidebar-widget {
        margin-bottom: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-navigation {
        grid-template-columns: 1fr;
    }
}

/* ============================================= */
/* Burger Menu                                   */
/* ============================================= */
.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-paper);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    .burger-menu {
        display: block;
        position: absolute;
        right: var(--container-padding);
        top: 50%;
        transform: translateY(-50%);
        padding: 10px;
    }

    .main-nav {
        position: relative;
    }

    .main-nav .container {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-paper);
        border-bottom: 1px solid var(--color-border-light);
        flex-direction: column;
        padding: 0;
        box-shadow: var(--shadow-lg);
        z-index: 9999;
        margin-top: 0;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .nav-link {
        display: block;
        padding: var(--space-md);
        font-size: 1rem;
        border-bottom: 1px solid var(--color-border-light);
        background: var(--color-paper);
        color: var(--color-ink);
    }

    .nav-link:hover {
        background: var(--color-white);
        color: var(--color-accent);
    }

    .nav-list li:last-child .nav-link {
        border-bottom: none;
    }

    .hero-article {
        grid-template-columns: 1fr;
    }

    .hero-image {
        min-height: 220px;
    }

    .hero-content {
        padding: var(--space-lg);
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .header-top .container {
        flex-direction: column;
        gap: var(--space-xs);
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: var(--space-lg) 0;
    }

    .header-ornament {
        display: none;
    }

    .logo-text {
        font-size: 2rem;
    }

    .article-card-content {
        padding: var(--space-md);
    }

    .hero-title {
        font-size: 1.5rem;
    }
}

/* ============================================= */
/* Animations                                    */
/* ============================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll reveal — controlled by JS */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hero animation */
.hero-article {
    animation: fadeInScale 0.7s ease forwards;
}

/* Card stagger */
.article-card {
    animation: fadeIn 0.5s ease forwards;
}

.article-card:nth-child(2) { animation-delay: 0.08s; }
.article-card:nth-child(3) { animation-delay: 0.16s; }
.article-card:nth-child(4) { animation-delay: 0.24s; }
.article-card:nth-child(5) { animation-delay: 0.32s; }
.article-card:nth-child(6) { animation-delay: 0.4s; }

/* ============================================= */
/* Print Styles                                  */
/* ============================================= */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .comments-section,
    .admin-header,
    .share-buttons,
    .scroll-to-top,
    .reading-progress-container,
    .article-navigation {
        display: none;
    }

    .site-main {
        padding: 0;
    }

    .article-single {
        max-width: 100%;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}