/*
Theme Name: Gatti di Fuoco
Theme URI: https://example.com/gatti-di-fuoco
Description: Tema child di Cronache Antiche con palette infuocata per il gruppo "Gatti di Fuoco". Fiamme, arancioni accesi e rossi vivaci per un'atmosfera ardente e leggendaria.
Author: Il Cronista
Author URI: https://example.com
Template: cronache-antiche
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gatti-di-fuoco
*/

/* ====================================
   PALETTE FOCOSA - GATTI DI FUOCO
   ==================================== */

:root {
    /* Palette Focosa Equilibrata e Raffinata */
    --parchment: #faf6f0;
    --parchment-dark: #f0e6d6;
    --ink-black: #1a1410;
    --gold: #c97706; /* Oro brunito */
    --gold-dark: #b8660a;
    --crimson: #a91c1c; /* Rosso mattone */
    --forest: #92400e;
    --stone: #78594a;
    --shadow: rgba(0, 0, 0, 0.5);
    
    /* Nuovi colori fuoco - più caldi e meno intensi */
    --flame-orange: #d97706;
    --flame-red: #b91c1c;
    --flame-yellow: #d97706;
    --ember: #b8660a;
}

/* ====================================
   CONTAINER WIDTH OVERRIDE
   ==================================== */

.site-container,
.container {
    max-width: 1080px;
}

/* ====================================
   EFFETTI FUOCO E BAGLIORI
   ==================================== */

body::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(234, 88, 12, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(185, 28, 28, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(217, 119, 6, 0.03) 0%, transparent 60%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(240, 230, 214, 0.02) 2px,
            rgba(240, 230, 214, 0.02) 4px
        );
}

/* ====================================
   HEADER CON FIAMME
   ==================================== */

.site-header {
    background: linear-gradient(180deg, 
        rgba(26, 20, 16, 0.98) 0%, 
        rgba(146, 64, 14, 0.1) 50%,
        rgba(26, 20, 16, 0.98) 100%);
    border-bottom: 3px solid var(--flame-orange);
    box-shadow: 
        0 4px 20px rgba(234, 88, 12, 0.25),
        inset 0 -50px 50px -20px rgba(234, 88, 12, 0.06);
}

.site-header .site-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Contenitore logo + branding */
.site-branding {
    display: flex;
    align-items: center;
    gap: 25px;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
}

/* Logo quadrato (stemma) */
.site-logo {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
}

.custom-logo-link {
    display: block;
    line-height: 0;
    width: 100%;
    height: 100%;
}

.custom-logo {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    display: block;
}

.custom-logo:hover {
    filter: drop-shadow(0 6px 12px rgba(217, 119, 6, 0.6));
    transform: scale(1.05);
}

/* Contenitore testo (titolo + descrizione) */
.site-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
}

/* Titolo - dimensione normale quando non c'è logo */
.site-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 2.2rem;
    font-weight: 900;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

/* Titolo ridotto quando c'è il logo */
.has-custom-logo .site-title {
    font-size: 2.2rem;
    line-height: 1.3;
}

.site-title a {
    color: var(--flame-orange);
    text-shadow: 
        0 0 12px rgba(217, 119, 6, 0.3),
        0 0 25px rgba(217, 119, 6, 0.2),
        2px 2px 6px rgba(0, 0, 0, 0.8);
    animation: fireGlow 3s ease-in-out infinite;
    text-decoration: none;
}

@keyframes fireGlow {
    0%, 100% { 
        text-shadow: 
            0 0 12px rgba(217, 119, 6, 0.3),
            0 0 25px rgba(217, 119, 6, 0.2),
            2px 2px 6px rgba(0, 0, 0, 0.8);
    }
    50% { 
        text-shadow: 
            0 0 16px rgba(217, 119, 6, 0.4),
            0 0 30px rgba(217, 119, 6, 0.25),
            2px 2px 6px rgba(0, 0, 0, 0.8);
    }
}

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

/* Descrizione più piccola quando c'è il logo */
.has-custom-logo .site-description {
    font-size: 0.95rem;
}

/* Layout responsive per logo + testo */
@media (max-width: 768px) {
    .site-branding {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Logo rimane a 150px anche su mobile */
    .site-logo {
        width: 150px;
        height: 150px;
    }
    
    .custom-logo {
        width: 150px !important;
        height: 150px !important;
        max-width: 150px !important;
        max-height: 150px !important;
        min-width: 150px !important;
        min-height: 150px !important;
    }
    
    /* Testo più piccolo su mobile */
    .has-custom-logo .site-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .site-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .has-custom-logo .site-description {
        font-size: 0.85rem;
    }
    
    .site-title-wrapper {
        max-width: 90%;
    }
}

.site-header::before {
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--flame-orange) 30%,
        var(--flame-yellow) 50%, 
        var(--flame-orange) 70%,
        transparent 100%);
    animation: flameGlow 3s ease-in-out infinite;
}

.site-header::after {
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--crimson) 30%,
        var(--flame-orange) 50%, 
        var(--crimson) 70%,
        transparent 100%);
}

@keyframes flameGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.site-title a {
    color: var(--flame-orange);
    text-shadow: 
        0 0 12px rgba(217, 119, 6, 0.3),
        0 0 25px rgba(217, 119, 6, 0.2),
        2px 2px 6px rgba(0, 0, 0, 0.8);
    animation: fireGlow 3s ease-in-out infinite;
}

@keyframes fireGlow {
    0%, 100% { 
        text-shadow: 
            0 0 12px rgba(217, 119, 6, 0.3),
            0 0 25px rgba(217, 119, 6, 0.2),
            2px 2px 6px rgba(0, 0, 0, 0.8);
    }
    50% { 
        text-shadow: 
            0 0 16px rgba(217, 119, 6, 0.4),
            0 0 30px rgba(217, 119, 6, 0.25),
            2px 2px 6px rgba(0, 0, 0, 0.8);
    }
}

.site-description {
    color: var(--flame-yellow);
}

/* ====================================
   NAVIGATION BAR (full-width)
   ==================================== */

.site-navbar {
    background: linear-gradient(180deg,
        rgba(26, 20, 16, 0.95) 0%,
        rgba(92, 40, 8, 0.85) 50%,
        rgba(26, 20, 16, 0.95) 100%);
    border-top: 2px solid var(--ember);
    border-bottom: 2px solid var(--ember);
    box-shadow:
        0 4px 16px rgba(234, 88, 12, 0.2),
        inset 0 1px 0 rgba(255, 140, 0, 0.1),
        inset 0 -1px 0 rgba(255, 140, 0, 0.1);
    position: relative;
    z-index: 100;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 50px;
}

/* --- Main navigation (horizontal bar) --- */

.main-navigation {
    display: flex;
    justify-content: center;
}

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

.main-navigation li {
    margin: 0;
    position: relative;
}

/* Items that have children: flex so the toggle arrow sits next to the link */
.main-navigation .menu-item-has-children,
.main-navigation .page_item_has_children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.main-navigation a {
    font-family: 'Cinzel', serif;
    color: var(--parchment);
    text-decoration: none;
    padding: 14px 22px;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    box-shadow: none;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--flame-orange);
    transition: width 0.3s ease;
}

.main-navigation a:hover {
    color: var(--flame-yellow);
    background: rgba(217, 119, 6, 0.12);
    transform: none;
    box-shadow: none;
    border: none;
}

.main-navigation a:hover::before {
    width: 80%;
    left: 50%;
}

/* Active / current page highlight */
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a {
    color: var(--flame-orange);
    background: rgba(217, 119, 6, 0.1);
}

.main-navigation .current-menu-item > a::before,
.main-navigation .current_page_item > a::before {
    width: 80%;
}

/* --- Dropdown toggle arrow button --- */

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--parchment);
    cursor: pointer;
    padding: 14px 10px 14px 0;
    font-size: 0.7rem;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
}

.dropdown-toggle:hover {
    color: var(--flame-orange);
}

.dropdown-toggle .dropdown-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* --- Sub-menus (dropdown) --- */

.main-navigation .sub-menu,
.main-navigation .children {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: linear-gradient(180deg,
        rgba(26, 20, 16, 0.98) 0%,
        rgba(50, 28, 12, 0.98) 100%);
    border: 2px solid var(--ember);
    border-top: 2px solid var(--flame-orange);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(217, 119, 6, 0.15);
    z-index: 200;
    flex-direction: column;
    padding: 4px 0;
}

/* Desktop hover open */
.main-navigation li.hover-open > .sub-menu,
.main-navigation li.hover-open > .children {
    display: flex;
}

/* Sub-menu items */
.main-navigation .sub-menu li,
.main-navigation .children li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.main-navigation .sub-menu a,
.main-navigation .children a {
    padding: 10px 20px;
    font-size: 0.8rem;
    width: 100%;
    white-space: normal;
    text-transform: none;
    letter-spacing: 0.5px;
}

.main-navigation .sub-menu a::before,
.main-navigation .children a::before {
    display: none;
}

.main-navigation .sub-menu a:hover,
.main-navigation .children a:hover {
    background: rgba(217, 119, 6, 0.15);
    padding-left: 24px;
}

/* Sub-menu dropdown toggle (inside dropdowns) */
.main-navigation .sub-menu .dropdown-toggle,
.main-navigation .children .dropdown-toggle {
    padding: 10px 12px 10px 0;
}

/* Nested sub-menus (level 3+): open to the right */
.main-navigation .sub-menu .sub-menu,
.main-navigation .children .children {
    top: 0;
    left: 100%;
    border-top: 2px solid var(--ember);
}

/* Nested dropdown arrow points right on desktop */
.main-navigation .sub-menu .dropdown-toggle .dropdown-arrow {
    transform: rotate(-90deg);
}

.main-navigation .sub-menu .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(0deg);
}

/* --- Hamburger button (hidden on desktop) --- */

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--ember);
    border-radius: 4px;
    cursor: pointer;
    padding: 8px 10px;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 42px;
    transition: border-color 0.3s ease;
    position: relative;
    z-index: 110;
}

.menu-toggle:hover {
    border-color: var(--flame-orange);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--parchment);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

/* Hamburger → X animation */
.menu-toggle.is-active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--flame-orange);
}

.menu-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--flame-orange);
}

/* ====================================
   RESPONSIVE NAVIGATION
   ==================================== */

@media (max-width: 968px) {
    .menu-toggle {
        display: flex;
    }

    .navbar-inner {
        justify-content: center;
    }

    /* Mobile: nav hidden by default, shown as vertical panel */
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg,
            rgba(26, 20, 16, 0.98) 0%,
            rgba(50, 28, 12, 0.98) 100%);
        border-bottom: 2px solid var(--ember);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        max-height: 80vh;
        overflow-y: auto;
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        border-bottom: 1px solid rgba(184, 102, 10, 0.2);
    }

    .main-navigation a {
        padding: 14px 20px;
        font-size: 0.9rem;
        max-width: none;
        width: auto;
        text-align: left;
    }

    .main-navigation a::before {
        display: none;
    }

    /* Sub-menus on mobile: accordion style */
    .main-navigation .sub-menu,
    .main-navigation .children {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        min-width: auto;
        width: 100%;
        padding: 0;
    }

    .main-navigation .sub-menu.is-open,
    .main-navigation .children.is-open {
        display: flex;
    }

    .main-navigation .sub-menu a,
    .main-navigation .children a {
        padding-left: 40px;
        font-size: 0.85rem;
    }

    .main-navigation .sub-menu .sub-menu a,
    .main-navigation .children .children a {
        padding-left: 60px;
        font-size: 0.8rem;
    }

    /* Nested sub-menus: same position rules on mobile */
    .main-navigation .sub-menu .sub-menu,
    .main-navigation .children .children {
        top: auto;
        left: auto;
    }

    /* Dropdown toggle on mobile */
    .dropdown-toggle {
        padding: 14px 16px;
        margin-left: auto;
    }

    .main-navigation .sub-menu .dropdown-toggle .dropdown-arrow {
        transform: none;
    }

    .main-navigation .sub-menu .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Disable hover-open on mobile */
    .main-navigation li.hover-open > .sub-menu,
    .main-navigation li.hover-open > .children {
        display: none;
    }
    .main-navigation li.hover-open.is-open > .sub-menu,
    .main-navigation li.hover-open.is-open > .children {
        display: flex;
    }

    /* Prevent body scroll when nav is open */
    body.nav-open {
        overflow: hidden;
    }
}

/* ====================================
   HERO SECTION FOCOSA
   ==================================== */

.hero-section {
    background: 
        linear-gradient(rgba(26, 20, 16, 0.75), rgba(146, 64, 14, 0.2), rgba(26, 20, 16, 0.75)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><linearGradient id="fire" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%23ea580c;stop-opacity:0.2"/><stop offset="50%" style="stop-color:%23d97706;stop-opacity:0.15"/><stop offset="100%" style="stop-color:%23dc2626;stop-opacity:0.2"/></linearGradient></defs><rect fill="url(%23fire)" width="1200" height="600"/><path fill="%231a1410" opacity="0.4" d="M0 300 Q300 200 600 300 T1200 300 V600 H0 Z"/><circle cx="200" cy="100" r="3" fill="%23d97706" opacity="0.5"><animate attributeName="opacity" values="0.3;0.7;0.3" dur="2s" repeatCount="indefinite"/></circle><circle cx="800" cy="150" r="2.5" fill="%23ea580c" opacity="0.4"><animate attributeName="opacity" values="0.2;0.6;0.2" dur="1.5s" repeatCount="indefinite"/></circle><circle cx="1000" cy="80" r="3.5" fill="%23f59e0b" opacity="0.4"><animate attributeName="opacity" values="0.3;0.6;0.3" dur="2.5s" repeatCount="indefinite"/></circle></svg>');
    background-size: cover;
    border: 3px solid var(--flame-orange);
    box-shadow: 
        inset 0 0 60px rgba(234, 88, 12, 0.2),
        0 8px 30px rgba(234, 88, 12, 0.3),
        0 0 60px rgba(217, 119, 6, 0.15);
}

.hero-section::before {
    content: '🔥';
    color: var(--flame-orange);
    text-shadow: 
        0 0 12px rgba(217, 119, 6, 0.4),
        0 0 20px rgba(217, 119, 6, 0.25);
    filter: drop-shadow(0 0 10px rgba(217, 119, 6, 0.3));
    animation: flameDance 1.5s ease-in-out infinite;
}

@keyframes flameDance {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        filter: drop-shadow(0 0 10px rgba(217, 119, 6, 0.3));
    }
    50% { 
        transform: translateX(-50%) scale(1.1);
        filter: drop-shadow(0 0 12px rgba(217, 119, 6, 0.4));
    }
}

.hero-section h1 {
    color: var(--flame-orange);
    text-shadow: 
        0 0 10px rgba(217, 119, 6, 0.3),
        0 0 20px rgba(217, 119, 6, 0.2),
        3px 3px 8px rgba(0, 0, 0, 0.9);
}

.hero-section p {
    text-shadow: 
        0 0 10px rgba(255, 165, 0, 0.5),
        1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* ====================================
   ARTICOLI CON BORDI INFUOCATI
   ==================================== */

article.post,
article.page {
    background: linear-gradient(135deg, 
        var(--parchment) 0%, 
        rgba(240, 230, 214, 0.95) 50%,
        var(--parchment-dark) 100%);
    border: 3px solid var(--ember);
    box-shadow: 
        0 10px 30px rgba(234, 88, 12, 0.2),
        inset 0 0 0 1px rgba(217, 119, 6, 0.2);
}

article.post:hover {
    border-color: var(--flame-orange);
    box-shadow: 
        0 15px 40px rgba(234, 88, 12, 0.3),
        inset 0 0 0 1px rgba(217, 119, 6, 0.3),
        0 0 20px rgba(234, 88, 12, 0.2);
}

article.post::before {
    content: '🔥';
    filter: drop-shadow(0 2px 6px rgba(234, 88, 12, 0.4));
    animation: emberPulse 2s ease-in-out infinite;
}

@keyframes emberPulse {
    0%, 100% { 
        filter: drop-shadow(0 2px 6px rgba(234, 88, 12, 0.4));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 2px 8px rgba(217, 119, 6, 0.6));
        transform: scale(1.05);
    }
}

article.post::after,
article.page::after {
    border: 1px solid rgba(255, 69, 0, 0.3);
}

.entry-title a {
    color: var(--crimson);
}

.entry-title a:hover {
    color: var(--flame-orange);
}

.entry-meta {
    color: var(--ember);
    border-bottom: 2px solid var(--flame-orange);
}

.entry-content a {
    color: var(--crimson);
}

.entry-content a:hover {
    color: var(--flame-orange);
}

.more-link {
    color: var(--crimson);
    border: 2px solid var(--crimson);
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 36, 0, 0.1) 100%);
}

.more-link:hover {
    background: var(--crimson);
    color: var(--parchment);
    border-color: var(--flame-orange);
    box-shadow: 
        0 4px 20px rgba(255, 36, 0, 0.5),
        inset 0 0 20px rgba(255, 140, 0, 0.3);
}

/* ====================================
   SIDEBAR INFUOCATA
   ==================================== */

.widget {
    background: linear-gradient(135deg, 
        rgba(146, 64, 14, 0.3) 0%, 
        rgba(26, 20, 16, 0.5) 100%);
    border: 2px solid var(--ember);
    box-shadow: 
        0 8px 20px rgba(234, 88, 12, 0.2),
        inset 0 0 20px rgba(234, 88, 12, 0.06);
}

.widget::before {
    background: linear-gradient(90deg, 
        var(--flame-red), 
        var(--flame-orange), 
        var(--flame-yellow),
        var(--flame-orange),
        var(--flame-red));
    animation: fireFlow 3s linear infinite;
}

@keyframes fireFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.widget-title {
    color: var(--flame-orange);
    text-shadow: 
        0 0 8px rgba(217, 119, 6, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.8);
}

.widget li:hover {
    border-color: var(--flame-orange);
}

.widget a::before {
    content: '▸';
    color: var(--flame-orange);
}

.widget a:hover {
    color: var(--flame-yellow);
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.6);
}

/* ====================================
   FOOTER FOCOSO
   ==================================== */

.site-footer {
    background: linear-gradient(180deg, 
        rgba(26, 20, 16, 0.9) 0%, 
        rgba(146, 64, 14, 0.15) 50%,
        rgba(26, 20, 16, 0.95) 100%);
    border-top: 3px solid var(--flame-orange);
    box-shadow: 
        0 -4px 20px rgba(234, 88, 12, 0.2),
        inset 0 50px 50px -20px rgba(234, 88, 12, 0.06);
}

.site-footer::before {
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--flame-orange) 30%,
        var(--flame-yellow) 50%,
        var(--flame-orange) 70%,
        transparent 100%);
    animation: flameGlow 3s ease-in-out infinite;
}

.footer-widget h3 {
    color: var(--flame-orange);
}

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

.footer-ornament {
    color: var(--flame-orange);
    animation: emberPulse 2s ease-in-out infinite;
}

.site-info {
    color: var(--parchment-dark);
}

/* ====================================
   ORNAMENTI FOCOSI
   ==================================== */

.scroll-ornament {
    color: var(--flame-orange);
    text-shadow: 
        0 0 10px rgba(217, 119, 6, 0.3),
        0 0 20px rgba(217, 119, 6, 0.2);
    animation: floatAndGlow 3s ease-in-out infinite;
}

@keyframes floatAndGlow {
    0%, 100% { 
        transform: translateY(0);
        text-shadow: 
            0 0 10px rgba(217, 119, 6, 0.3),
            0 0 20px rgba(217, 119, 6, 0.2);
    }
    50% { 
        transform: translateY(-10px);
        text-shadow: 
            0 0 12px rgba(217, 119, 6, 0.4),
            0 0 25px rgba(217, 119, 6, 0.25);
    }
}

/* ====================================
   COMMENTI
   ==================================== */

.comments-area {
    background: linear-gradient(135deg, 
        var(--parchment) 0%, 
        rgba(255, 224, 179, 0.95) 100%);
    border: 3px solid var(--ember);
}

.comments-title {
    color: var(--crimson);
}

.comment-author {
    color: var(--crimson);
}

/* ====================================
   EFFETTI AGGIUNTIVI
   ==================================== */

/* Link generali - stati completi */
a {
    color: var(--crimson);
    transition: color 0.3s ease;
}

a:visited {
    color: var(--ember);
}

a:hover {
    color: var(--flame-orange);
}

a:active {
    color: var(--gold-dark);
}

/* Aggiunge un leggero effetto fiamma sui contenuti */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--crimson);
}

/* Immagini con bordo focoso */
.entry-content img,
.post-thumbnail img {
    border: 3px solid var(--ember);
    box-shadow: 
        0 4px 12px rgba(234, 88, 12, 0.2),
        inset 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.entry-content img:hover,
.post-thumbnail img:hover {
    box-shadow: 
        0 6px 20px rgba(234, 88, 12, 0.3),
        inset 0 0 0 1px rgba(217, 119, 6, 0.25);
}

/* ====================================
   FIX TITOLO IN SINGLE POST
   ==================================== */

.single .entry-title,
.page .entry-title {
    color: var(--crimson);
}

/* ====================================
   PATHFINDER CUSTOM POST TYPES STYLING
   ==================================== */

/* Character Pages */
.character-single .character-subtitle {
    margin-bottom: 20px;
}

.character-single .character-info {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--stone);
    font-style: italic;
}

.character-single .character-titles {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--flame-yellow);
    font-style: italic;
}

/* Character / Location Portrait Widgets in Sidebar */
.character-portrait-widget,
.location-image-widget {
    text-align: center;
    overflow: hidden;
}

.character-portrait-widget img,
.faction-emblem-widget img,
.location-image-widget img {
    width: 100%;
    height: auto;
    border: 3px solid var(--ember);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
    object-fit: cover;
    max-height: 400px;
}

.character-info-widget .character-meta,
.character-personal-widget .character-meta,
.character-geography-widget .character-meta,
.character-combat-widget .combat-stats,
.character-abilities-widget .ability-scores,
.faction-details-widget .character-meta {
    margin-top: 15px;
}

.character-info-widget .meta-row,
.character-personal-widget .meta-row,
.character-geography-widget .meta-row,
.faction-details-widget .meta-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(217, 119, 6, 0.2);
    gap: 10px;
}

.character-info-widget .meta-row:last-child,
.character-personal-widget .meta-row:last-child,
.character-geography-widget .meta-row:last-child,
.faction-details-widget .meta-row:last-child {
    border-bottom: none;
}

/* Faction Affiliations in Sidebar */
.character-factions-list {
    margin-top: 15px;
}

.faction-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(217, 119, 6, 0.2);
}

.faction-item:last-child {
    border-bottom: none;
}

.faction-item .faction-name {
    margin-bottom: 5px;
}

.faction-item .faction-name a {
    color: var(--crimson);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.faction-item .faction-name a:hover {
    color: var(--flame-orange);
}

.faction-item .faction-rank {
    font-size: 0.85rem;
    color: var(--parchment-dark);
    margin: 3px 0;
}

.faction-item .faction-status {
    margin-top: 5px;
}

.faction-item .status-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
}

/* Faction Goals Widget */
.faction-goals-widget .faction-goals-text {
    margin-top: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--parchment-dark);
}

/* Faction Members Section */
.faction-members-section {
    margin-top: 40px;
}

.faction-members-section h2 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--flame-orange);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.member-group {
    margin-bottom: 40px;
}

.member-group h3 {
    font-family: 'Cinzel', serif;
    color: var(--flame-orange);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--ember);
    padding-bottom: 10px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.member-card {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(146, 64, 14, 0.15) 100%);
    border: 2px solid var(--ember);
    border-radius: 5px;
    padding: 15px;
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
}

.member-card.former {
    opacity: 0.7;
}

.member-portrait {
    margin-bottom: 12px;
}

.member-portrait img {
    width: 100%;
    border: 2px solid var(--ember);
    border-radius: 3px;
}

.member-info h4 {
    margin: 0 0 8px 0;
    font-family: 'Cinzel', serif;
}

.member-info h4 a {
    color: var(--crimson);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.member-info h4 a:hover {
    color: var(--flame-orange);
}

.member-rank,
.member-status {
    font-size: 0.9rem;
    margin-top: 5px;
}

.member-rank strong {
    color: var(--ember);
}

.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid;
}

.status-badge.current {
    background: rgba(34, 120, 50, 0.2);
    color: #6abf7b;
    border-color: rgba(34, 120, 50, 0.5);
}

.status-badge.former {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border-color: rgba(100, 116, 139, 0.4);
}

.status-badge.expelled {
    background: rgba(180, 40, 40, 0.2);
    color: #e87171;
    border-color: rgba(180, 40, 40, 0.5);
}

.status-badge.honorary {
    background: rgba(217, 119, 6, 0.2);
    color: var(--flame-orange);
    border-color: rgba(217, 119, 6, 0.5);
}

/* Faction Type */
.faction-type {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--stone);
    font-style: italic;
    margin-top: 10px;
}

.meta-label {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--ember);
}

.meta-value {
    color: var(--parchment);
}

.stat-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid;
}

.stat-badge.active {
    background: rgba(34, 120, 50, 0.2);
    color: #6abf7b;
    border-color: rgba(34, 120, 50, 0.5);
}

.stat-badge.retired {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border-color: rgba(100, 116, 139, 0.4);
}

.stat-badge.deceased {
    background: rgba(180, 40, 40, 0.2);
    color: #e87171;
    border-color: rgba(180, 40, 40, 0.5);
}

.stat-badge.missing {
    background: rgba(217, 119, 6, 0.2);
    color: var(--flame-orange);
    border-color: rgba(217, 119, 6, 0.5);
}

.combat-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-box {
    background: rgba(217, 119, 6, 0.2);
    border: 2px solid var(--flame-orange);
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-family: 'Cinzel', serif;
    color: var(--flame-orange);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.stat-box span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--parchment);
}

.ability-scores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ability-score {
    background: rgba(26, 20, 16, 0.3);
    border: 1px solid var(--ember);
    border-radius: 3px;
    padding: 10px;
    text-align: center;
}

.ability-score .ability-name {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: var(--flame-yellow);
    display: block;
    margin-bottom: 5px;
}

.ability-score .ability-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--parchment);
}

.ability-score .ability-modifier {
    font-size: 0.85rem;
    color: var(--parchment-dark);
}

/* Location Pages */
.location-breadcrumb {
    background: rgba(217, 119, 6, 0.1);
    border-left: 3px solid var(--flame-orange);
    padding: 12px 20px;
    margin-bottom: 25px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
}

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

.location-breadcrumb a:hover {
    color: var(--flame-orange);
}

.location-breadcrumb .separator {
    margin: 0 8px;
    color: var(--flame-orange);
}

.location-type {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--stone);
    font-style: italic;
    margin-top: 10px;
}

/* Location details widget spacing */.location-details-widget .character-meta {
    margin-top: 15px;
}

/* Child Locations Section */
.child-locations-section {
    margin-top: 40px;
}

.child-locations-section h2 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--flame-orange);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.child-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.child-location-card {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(146, 64, 14, 0.15) 100%);
    border: 2px solid var(--ember);
    border-radius: 5px;
    padding: 20px;
    transition: all 0.3s ease;
}

.child-location-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
}

.child-location-image {
    margin-bottom: 15px;
}

.child-location-image img {
    width: 100%;
    border: 2px solid var(--ember);
    border-radius: 3px;
}

.child-location-info h3 {
    margin: 0 0 10px 0;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
}

.child-location-info h3 a {
    color: var(--crimson);
    text-decoration: none;
    transition: color 0.3s ease;
}

.child-location-info h3 a:hover {
    color: var(--flame-orange);
}

.child-location-type {
    font-size: 0.9rem;
    color: var(--stone);
    font-style: italic;
    margin-bottom: 10px;
}

.child-location-children {
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    color: var(--parchment-dark);
    margin-bottom: 10px;
}

.child-location-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--parchment-dark);
}

/* Session Pages */
.session-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.session-meta-item {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(146, 64, 14, 0.15) 100%);
    border: 2px solid var(--ember);
    border-radius: 5px;
    padding: 20px;
    text-align: center;
}

.session-meta-item .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.session-meta-item strong {
    display: block;
    font-family: 'Cinzel', serif;
    color: var(--flame-orange);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.session-meta-item span {
    color: var(--parchment);
    font-size: 1.1rem;
}

/* History Pages */
.history-meta {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(146, 64, 14, 0.15) 100%);
    border: 2px solid var(--ember);
    border-radius: 5px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.history-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.history-badge.era {
    background: var(--flame-orange);
    color: var(--ink-black);
}

.importance-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.importance-badge.minor {
    background: #64748b;
    color: white;
}

.importance-badge.moderate {
    background: #3b82f6;
    color: white;
}

.importance-badge.major {
    background: #f59e0b;
    color: white;
}

.importance-badge.critical {
    background: #ef4444;
    color: white;
}

.history-date {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--parchment);
}

/* ====================================
   FULL-WIDTH PAGE TEMPLATE
   ==================================== */

.site-content.full-width {
    display: block;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.site-content.full-width .posts-wrapper {
    width: 100%;
}

/* ====================================
   ARCHIVE PAGES (CPT Grid)
   ==================================== */

.archive-header {
    text-align: center;
    padding: 40px 20px 10px;
}

.archive-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 2.5rem;
    color: var(--flame-orange);
    text-shadow:
        0 0 10px rgba(217, 119, 6, 0.3),
        3px 3px 8px rgba(0, 0, 0, 0.9);
}

.archive-description {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    color: var(--parchment-dark);
    font-size: 1.1rem;
    margin-top: 10px;
}

.cpt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0 40px;
    max-width: 1080px;
    margin: 0 auto;
}

.cpt-card {
    background: var(--parchment);
    border: 2px solid var(--ember);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cpt-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(217, 119, 6, 0.25),
        0 0 30px rgba(217, 119, 6, 0.1);
}

.cpt-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.cpt-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.cpt-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cpt-card-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.2rem;
    margin: 0 0 10px;
}

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

.cpt-card-title a:hover {
    color: var(--flame-orange);
}

.cpt-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.cpt-meta-tag {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    background: rgba(146, 64, 14, 0.12);
    color: var(--ember);
    border: 1px solid rgba(146, 64, 14, 0.3);
    border-radius: 3px;
}

.cpt-meta-children {
    display: inline-block;
    font-family: 'IM Fell English', serif;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--stone);
    padding: 2px 8px;
}

.cpt-card-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink-black);
    margin-bottom: 15px;
    flex: 1;
}

.cpt-card .more-link {
    align-self: flex-start;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cpt-card .stat-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--parchment-dark);
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .cpt-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .archive-title {
        font-size: 1.8rem;
    }
}

/* Responsive for Pathfinder Templates */
@media (max-width: 968px) {
    .session-meta-grid,
    .members-grid,
    .child-locations-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================================
   HERO SLIDER
   ==================================== */

.hero-slider {
    position: relative;
    background: 
        linear-gradient(rgba(26, 20, 16, 0.75), rgba(146, 64, 14, 0.2), rgba(26, 20, 16, 0.75)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><linearGradient id="fire" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%23ea580c;stop-opacity:0.2"/><stop offset="50%" style="stop-color:%23d97706;stop-opacity:0.15"/><stop offset="100%" style="stop-color:%23dc2626;stop-opacity:0.2"/></linearGradient></defs><rect fill="url(%23fire)" width="1200" height="600"/><path fill="%231a1410" opacity="0.4" d="M0 300 Q300 200 600 300 T1200 300 V600 H0 Z"/></svg>');
    background-size: cover;
    background-position: center;
    padding: 80px 20px;
    margin: 40px 0;
    border: 3px solid var(--flame-orange);
    box-shadow: 
        inset 0 0 60px rgba(234, 88, 12, 0.2),
        0 8px 30px rgba(234, 88, 12, 0.3),
        0 0 60px rgba(217, 119, 6, 0.15);
    /*overflow: hidden;*/
}

.hero-slider::before {
    content: '🔥';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    text-shadow: 
        0 0 12px rgba(217, 119, 6, 0.4),
        0 0 20px rgba(217, 119, 6, 0.25);
    filter: drop-shadow(0 0 10px rgba(217, 119, 6, 0.3));
    animation: flameDance 1.5s ease-in-out infinite;
    z-index: 10;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 300px;
    max-width: 900px;
    margin: 0 auto;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content {
    max-width: 700px;
    padding: 0 20px;
}

.slide-content h1 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 2.5rem;
    color: var(--flame-orange);
    margin-bottom: 15px;
    text-shadow: 
        0 0 10px rgba(217, 119, 6, 0.3),
        0 0 20px rgba(217, 119, 6, 0.2),
        3px 3px 8px rgba(0, 0, 0, 0.9);
    animation: fadeInDown 1s ease-out;
}

.slide-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(217, 119, 6, 0.3);
    border: 2px solid var(--flame-orange);
    color: var(--parchment);
    font-size: 3rem;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.slider-arrow:hover {
    background: rgba(217, 119, 6, 0.6);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.5);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

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

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(217, 119, 6, 0.3);
    border: 2px solid var(--flame-orange);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot:hover {
    background: rgba(217, 119, 6, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: var(--flame-orange);
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.6);
}

/* Responsive Slider */
@media (max-width: 968px) {
    .slider-container {
        height: 250px;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .slider-arrow.prev {
        left: 10px;
    }
    
    .slider-arrow.next {
        right: 10px;
    }
}

@media (max-width: 600px) {
    .hero-slider {
        padding: 60px 20px;
    }
    
    .slider-container {
        height: 220px;
    }
    
    .slide-content h1 {
        font-size: 1.6rem;
    }
    
    .slide-content p {
        font-size: 0.95rem;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
    }
}
