/*
Theme Name: Cronache Antiche
Theme URI: https://example.com/cronache-antiche
Author: Il Cronista
Author URI: https://example.com
Description: Un tema WordPress dal sapore fantasy medievale, perfetto per blog di narrativa, giochi di ruolo e contenuti fantasy. Con tipografia evocativa, decorazioni gotiche e un'atmosfera magica.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cronache-antiche
Tags: fantasy, medieval, blog, two-columns, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
    --parchment: #f4e8d0;
    --parchment-dark: #d4c5a8;
    --ink-black: #1a1410;
    --gold: #d4af37;
    --gold-dark: #b8941f;
    --crimson: #8b0000;
    --forest: #2d4a2b;
    --stone: #5a5046;
    --shadow: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IM Fell English', serif;
    background: var(--ink-black);
    color: var(--parchment);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 0, 0, 0.05) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(212, 197, 168, 0.02) 2px,
            rgba(212, 197, 168, 0.02) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.site-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header & Navigation */
.site-header {
    background: linear-gradient(180deg, rgba(26, 20, 16, 0.95) 0%, rgba(26, 20, 16, 0.85) 100%);
    border-bottom: 3px solid var(--gold);
    position: relative;
    padding: 30px 0;
    box-shadow: 0 4px 20px var(--shadow);
}

.site-header::before,
.site-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--gold) 50%, 
        transparent 100%);
}

.site-header::before { top: 0; }
.site-header::after { bottom: 0; }

.site-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 3.5rem;
    font-weight: 900;
    text-align: center;
    margin: 0;
}

.site-title a {
    color: var(--gold);
    text-decoration: none;
    text-shadow: 
        0 0 20px rgba(212, 175, 55, 0.5),
        2px 2px 4px var(--shadow);
    letter-spacing: 4px;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 2px 2px 4px var(--shadow); }
    50% { text-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 2px 2px 4px var(--shadow); }
}

.site-description {
    font-family: 'Cinzel', serif;
    text-align: center;
    font-size: 1.1rem;
    color: var(--parchment-dark);
    letter-spacing: 2px;
    font-style: italic;
    margin: 10px 0 25px;
}

.main-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    font-family: 'Cinzel', serif;
    color: var(--parchment);
    text-decoration: none;
    padding: 12px 25px;
    background: linear-gradient(180deg, rgba(90, 80, 70, 0.4) 0%, rgba(45, 74, 43, 0.4) 100%);
    border: 2px solid var(--gold-dark);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s ease;
}

.main-navigation a:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.main-navigation a:hover::before {
    left: 100%;
}

/* Hero/Featured Section */
.hero-section {
    background: 
        linear-gradient(rgba(26, 20, 16, 0.7), rgba(26, 20, 16, 0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%232d4a2b" width="1200" height="600"/><path fill="%231a1410" opacity="0.3" d="M0 300 Q300 200 600 300 T1200 300 V600 H0 Z"/><circle cx="200" cy="100" r="3" fill="%23d4af37" opacity="0.6"/><circle cx="800" cy="150" r="2" fill="%23d4af37" opacity="0.4"/><circle cx="1000" cy="80" r="2.5" fill="%23d4af37" opacity="0.5"/></svg>');
    background-size: cover;
    background-position: center;
    padding: 120px 20px;
    text-align: center;
    position: relative;
    margin: 40px 0;
    border: 3px solid var(--gold-dark);
    box-shadow: 
        inset 0 0 50px rgba(0, 0, 0, 0.5),
        0 8px 30px var(--shadow);
}

.hero-section::before {
    content: '⚔';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

.hero-section h1 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px var(--shadow);
    animation: fadeInDown 1s ease-out;
}

.hero-section p {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content */
.site-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

/* Posts */
.posts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

article.post,
article.page {
    background: linear-gradient(135deg, var(--parchment) 0%, var(--parchment-dark) 100%);
    padding: 35px;
    border: 3px solid var(--stone);
    border-radius: 5px;
    position: relative;
    box-shadow: 
        0 10px 30px var(--shadow),
        inset 0 0 0 1px rgba(212, 175, 55, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease-out backwards;
}

article.post:nth-child(1) { animation-delay: 0.1s; }
article.post:nth-child(2) { animation-delay: 0.2s; }
article.post:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

article.post:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px var(--shadow),
        inset 0 0 0 1px rgba(212, 175, 55, 0.4);
}

article.post::before {
    content: '❖';
    position: absolute;
    top: -15px;
    left: 30px;
    font-size: 1.8rem;
    color: var(--gold);
    text-shadow: 0 2px 4px var(--shadow);
}

article.post::after,
article.page::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(139, 0, 0, 0.2);
    pointer-events: none;
    border-radius: 3px;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    margin: 0 0 15px;
}

.entry-title a {
    color: var(--crimson);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--gold-dark);
}

.entry-meta {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--stone);
    margin-bottom: 20px;
    font-style: italic;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-dark);
}

.entry-content {
    color: var(--ink-black);
    line-height: 1.8;
    font-size: 1.05rem;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: 'Cinzel', serif;
    color: var(--crimson);
    margin: 25px 0 15px;
}

.entry-content a {
    color: var(--crimson);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.entry-content a:hover {
    color: var(--gold-dark);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border: 3px solid var(--stone);
    border-radius: 3px;
    margin: 20px 0;
}

.more-link {
    display: inline-block;
    font-family: 'Cinzel', serif;
    color: var(--crimson);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid var(--crimson);
    border-radius: 3px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-top: 10px;
}

.more-link:hover {
    background: var(--crimson);
    color: var(--parchment);
    transform: translateX(5px);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: linear-gradient(135deg, rgba(45, 74, 43, 0.3) 0%, rgba(26, 20, 16, 0.5) 100%);
    padding: 30px;
    border: 2px solid var(--gold-dark);
    border-radius: 5px;
    position: relative;
    box-shadow: 0 8px 20px var(--shadow);
    animation: fadeIn 0.6s ease-out backwards;
}

.widget:nth-child(1) { animation-delay: 0.4s; }
.widget:nth-child(2) { animation-delay: 0.5s; }

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark), var(--gold));
}

.widget-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.6rem;
    color: var(--gold);
    margin: 0 0 20px;
    text-align: center;
    text-shadow: 0 2px 4px var(--shadow);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.widget li:hover {
    padding-left: 10px;
    border-color: var(--gold);
}

.widget a {
    color: var(--parchment);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.widget a::before {
    content: '▸';
    color: var(--gold);
    font-size: 1.2rem;
}

.widget a:hover {
    color: var(--gold);
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, rgba(26, 20, 16, 0.85) 0%, rgba(26, 20, 16, 0.95) 100%);
    border-top: 3px solid var(--gold);
    padding: 50px 0 30px;
    margin-top: 60px;
    text-align: center;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--gold) 50%, 
        transparent 100%);
}

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

.footer-widget h3 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.footer-widget p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: var(--parchment-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--gold);
}

.site-info {
    padding-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    font-family: 'Cinzel', serif;
    color: var(--parchment-dark);
    font-size: 0.9rem;
}

.footer-ornament {
    font-size: 2rem;
    color: var(--gold);
    margin: 20px 0;
    opacity: 0.6;
}

/* Decorative Elements */
.scroll-ornament {
    text-align: center;
    font-size: 2.5rem;
    color: var(--gold);
    margin: 40px 0;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

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

/* Comments */
.comments-area {
    background: linear-gradient(135deg, var(--parchment) 0%, var(--parchment-dark) 100%);
    padding: 35px;
    border: 3px solid var(--stone);
    border-radius: 5px;
    margin-top: 30px;
}

.comments-title {
    font-family: 'Cinzel', serif;
    color: var(--crimson);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

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

.comment {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--stone);
    border-radius: 3px;
}

.comment-author {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--crimson);
}

.comment-content {
    color: var(--ink-black);
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 968px) {
    .site-content {
        grid-template-columns: 1fr;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }

    .main-navigation a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

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

/* Utility Classes */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
