/* ============================================
   STYLE.CSS - L'Appunto del Viaggiatore
   ============================================ */

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    cursor: pointer;
}

.nav-links a:hover {
    color: #ffd700;
}

/* VERSION SWITCHER */
.version-switcher {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1e3c72;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 999;
}

.version-switcher:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.version-switcher::before {
    content: '💻 ';
    margin-right: 0.3rem;
}

body.mobile-view .version-switcher::before {
    content: '📱 ';
}

/* ============================================
   PAGE SYSTEM
   ============================================ */
.page {
    display: none;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.page.active {
    display: block;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(rgba(30, 60, 114, 0.7), rgba(42, 82, 152, 0.7)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23164863" width="1200" height="600"/><path fill="%23427D9D" d="M0 300L50 280C100 260 200 220 300 200C400 180 500 180 600 200C700 220 800 260 900 280C1000 300 1100 300 1150 300L1200 300L1200 600L1150 600C1100 600 1000 600 900 600C800 600 700 600 600 600C500 600 400 600 300 600C200 600 100 600 50 600L0 600Z"/></svg>');
    background-size: cover;
    background-position: center;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero .tagline {
    font-size: 1rem;
    margin-bottom: 2rem;
    font-style: italic;
    color: #ffd700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #ffd700;
    color: #1e3c72;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 8rem 2rem 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#categorie-section {
    padding-top: 10rem;
    margin-top: 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #1e3c72;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #ffd700;
    margin: 1rem auto 0;
}

.section-subtitle {
    text-align: center;
    color: #333;
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 3rem;
    font-family: 'Georgia', serif;
}

/* ============================================
   CATEGORIES GRID
   ============================================ */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.category-icon {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-content {
    padding: 2rem;
}

.category-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.category-content p {
    color: #666;
    line-height: 1.8;
}

/* ============================================
   CATEGORY PAGE
   ============================================ */
.category-page {
    padding: 3rem 2rem;
}

.breadcrumb {
    max-width: 1200px;
    margin: 0 auto 2rem;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #1e3c72;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb a:hover {
    color: #ffd700;
}

.category-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    text-align: center;
}

.category-header h1 {
    font-size: 3rem;
    color: #1e3c72;
    margin-bottom: 1rem;
}

.category-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   ARTICLES GRID
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.article-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

.article-image img {
    border-radius: 0 !important;
}

.article-card .article-image {
    padding: 0 !important;
    overflow: hidden;
}

.article-info {
    padding: 2rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #999;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-info h3 {
    font-size: 1.5rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.article-subtitle {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.article-excerpt {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page {
    padding: 3rem 2rem;
}

.article-header {
    max-width: 900px;
    margin: 0 auto 3rem;
    text-align: center;
}

.article-header h1 {
    font-size: 3rem;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.article-header .subtitle {
    font-size: 1.3rem;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
}

.article-featured-image {
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin: 0 auto 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
    color: #444;
}

.article-content h2 {
    font-size: 2rem;
    color: #1e3c72;
    margin: 3rem 0 1.5rem;
    text-align: left;
}

.article-content h2::after {
    display: none;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: #1e3c72;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s;
    margin-bottom: 2rem;
    cursor: pointer;
}

.back-button:hover {
    background: #2a5298;
}

/* ============================================
   GUEST STORIES
   ============================================ */
.guest-stories {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 4rem;
    margin-top: 3rem;
}

.guest-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 4rem;
    text-align: center;
    color: white;
}

.about h2 {
    color: white;
}

.about h2::after {
    background: #ffd700;
}

.about p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.about .signature {
    margin-top: 2rem;
    font-size: 1.3rem;
    font-style: italic;
    color: #ffd700;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffd700;
}

/* ============================================
   INTRO ANIMATION
   ============================================ */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.intro-overlay.active {
    display: flex;
}

.intro-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.transport-vehicle {
    position: absolute;
    font-size: 4rem;
    opacity: 1;
}

@keyframes raceFromTopLeft {
    0% {
        top: -10%;
        left: -10%;
        transform: scale(0.6) rotate(-45deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes raceFromTopRight {
    0% {
        top: -10%;
        right: -10%;
        left: auto;
        transform: scale(0.6) rotate(45deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes raceFromBottomLeft {
    0% {
        bottom: -10%;
        top: auto;
        left: -10%;
        transform: scale(0.6) rotate(-135deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes raceFromBottomRight {
    0% {
        bottom: -10%;
        top: auto;
        right: -10%;
        left: auto;
        transform: scale(0.6) rotate(135deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
        opacity: 1;
    }
}

.vehicle-race-tl {
    animation: raceFromTopLeft 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.vehicle-race-tr {
    animation: raceFromTopRight 2.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.vehicle-race-bl {
    animation: raceFromBottomLeft 1.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.vehicle-race-br {
    animation: raceFromBottomRight 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes collisionShake {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    25% {
        transform: translate(-48%, -50%) scale(1.15);
    }
    50% {
        transform: translate(-50%, -48%) scale(1.2);
    }
    75% {
        transform: translate(-52%, -50%) scale(1.15);
    }
}

.vehicle-collision {
    animation: collisionShake 0.3s ease-in-out forwards;
}

@keyframes centralExplosion {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(5);
        opacity: 0;
    }
}

.vehicles-explode {
    animation: centralExplosion 1s ease-out forwards;
}

@keyframes particleExplosion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    animation: particleExplosion 0.8s ease-out forwards;
}

.overlay-fade-out {
    animation: fadeOutOverlay 0.5s ease-out forwards;
}

@keyframes fadeOutOverlay {
    to {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    .hero {
        padding: 2rem 0.5rem;
        min-height: calc(100vh - 70px);
    }

    .hero-content {
        padding: 2rem 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero .tagline {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    header {
        padding: 0.8rem 0;
    }

    nav {
        padding: 0.5rem 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }
    
   .nav-links {
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.3rem 0;
    flex-wrap: wrap;
    justify-content: center;
    }

    .nav-links li {
        white-space: nowrap;
    }

    .nav-links a {
        padding: 0.5rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .back-button {
        padding: 1rem 1.8rem;
        font-size: 0.95rem;
        margin: 0 0.5rem 1.5rem;
    }

    section {
        padding: 4rem 0.5rem 3rem 0.5rem;
    }

    #categorie-section {
        padding-top: 6rem;
    }

    h2 {
        font-size: 1.8rem;
        padding: 0 0.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .categories {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 0.5rem;
    }

    .category-icon {
        height: 200px;
    }

    .category-content {
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .category-content h3 {
        font-size: 1.3rem;
    }

    .category-content p {
        font-size: 0.95rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 0.5rem;
    }

    .article-card {
        margin: 0 auto;
        max-width: 100%;
    }

    .article-image {
        height: 220px;
    }

    .article-info {
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .article-info h3 {
        font-size: 1.4rem;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .article-excerpt {
        font-size: 1rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .article-header {
        padding: 0 0.5rem;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-header .subtitle {
        font-size: 1.1rem;
    }

    .article-featured-image {
        height: 250px;
        margin: 0 0.5rem 2rem;
    }

    .article-content {
        padding: 0 0.5rem;
    }

    .article-content h2 {
        font-size: 1.6rem;
        margin: 2.5rem 0 1.5rem;
        text-align: center;
    }

    .article-content h3 {
        font-size: 1.3rem;
        margin: 2rem 0 1rem;
        text-align: center;
    }

    .article-content p {
        font-size: 1.05rem;
        line-height: 1.7;
        text-align: justify;
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .category-header {
        padding: 0 0.5rem;
    }

    .category-header h1 {
        font-size: 2rem;
    }

    .guest-stories {
        padding: 2rem 1rem;
        margin: 0 0.5rem;
    }

    .about {
        padding: 3rem 1rem;
        margin: 0 0.5rem;
    }

    .about p {
        font-size: 1.05rem;
        line-height: 1.6;
    }

    .breadcrumb {
        padding: 0 0.5rem;
        font-size: 0.85rem;
    }

    footer {
        padding: 2rem 0.5rem;
    }

    .version-switcher {
        top: 75px;
        right: 0.5rem;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

@media only screen 
and (min-device-width: 375px) 
and (max-device-width: 428px) 
and (-webkit-min-device-pixel-ratio: 2) {
    .hero {
        background-attachment: scroll;
    }

    .hero-content {
        transform: none;
    }

    body {
        -webkit-font-smoothing: antialiased;
    }

    /* ============================================
   MIGLIORAMENTI MOBILE - LEGGIBILITÀ TESTI
   Da aggiungere ALLA FINE del file style.css
   ============================================ */

@media (max-width: 768px) {
    
    /* ========================================
       FIRENZE - GRID CARD SOTTOSEZIONI
       ======================================== */
    #article-firenze .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    #article-firenze .article-card {
        max-width: 100% !important;
        margin: 0 !important;
    }

    #article-firenze .article-image {
        height: 180px !important;
    }

    #article-firenze .article-image div {
        font-size: 3rem !important;
    }

    #article-firenze .article-info {
        padding: 1.5rem 1rem !important;
    }

    #article-firenze .article-info h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.8rem !important;
    }

    #article-firenze .article-excerpt {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* Testo introduttivo sopra le card */
    #article-firenze > div > p {
        font-size: 1rem !important;
        padding: 0 0.5rem !important;
        margin-bottom: 2rem !important;
    }

    /* ========================================
       FIRENZE - CITTÀ - BOX COLORATI
       ======================================== */
    #firenze-citta .article-content > div[style*="background"] {
        padding: 1rem !important;
        margin: 0 0 2rem 0 !important;
        border-radius: 10px !important;
    }
    
    #firenze-citta .article-content h3 {
        font-size: 1.4rem !important;
        text-align: center;
        padding: 0 !important;
    }
    
    #firenze-citta .article-content > div > div {
        flex-direction: column;
        align-items: center !important;
        gap: 0.8rem !important;
        text-align: center;
    }
    
    #firenze-citta .article-content > div span {
        font-size: 2rem !important;
    }

    #firenze-citta .article-content > div p {
        text-align: justify !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ========================================
       FIRENZE - COSA VEDERE - SEZIONI
       ======================================== */
    #firenze-cosa-vedere {
        padding: 3rem 0.5rem !important;
    }

    #firenze-cosa-vedere > div {
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    #firenze-cosa-vedere > div > div {
        margin: 0 0 3rem 0 !important;
        border-radius: 12px !important;
    }

    #firenze-cosa-vedere > div > div > div:first-child {
        padding: 1.2rem !important;
        font-size: 1.4em !important;
        line-height: 1.3 !important;
    }

    #firenze-cosa-vedere > div > div > div:last-child {
        padding: 1rem !important;
    }

    /* Padding interno per ogni monumento/luogo */
    #firenze-cosa-vedere > div > div > div:last-child > div {
        padding: 1rem 0 !important;
    }

    /* Titoli dei monumenti */
    #firenze-cosa-vedere h3 {
        font-size: 1.3rem !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
        line-height: 1.4 !important;
        padding: 0 !important;
    }

    /* Paragrafi con descrizioni */
    #firenze-cosa-vedere p {
        text-align: justify !important;
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }

    /* Immagini dei monumenti */
    #firenze-cosa-vedere img {
        max-width: 280px !important;
        width: 100% !important;
        margin: 1rem auto !important;
        display: block !important;
        border-radius: 8px !important;
    }

    /* Link di prenotazione dentro i box */
    #firenze-cosa-vedere .booking-link {
        margin: 1.5rem 0 !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        width: 100% !important;
        display: block !important;
    }

    /* Separatori tra monumenti */
    #firenze-cosa-vedere > div > div > div:last-child > div:not(:last-child) {
        border-bottom: 2px solid #e0e0e0;
        padding-bottom: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* ========================================
       FIRENZE - DOVE E COSA MANGIARE
       ======================================== */
    #firenze-dove-mangiare .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 0.5rem !important;
    }

    #firenze-dove-mangiare > div {
        padding: 0 0.5rem !important;
    }

    #firenze-dove-mangiare img {
        max-width: 280px !important;
    }

    #firenze-dove-mangiare h3 {
        font-size: 1.3rem !important;
    }

    #firenze-dove-mangiare p {
        text-align: justify !important;
        font-size: 1.05rem !important;
    }

    /* ========================================
       FIRENZE - ITINERARI
       ======================================== */
    #firenze-itinerari > div > div > div[style*="border: 2px solid"] {
        padding: 1.5rem 1rem 1.5rem 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    #firenze-itinerari > div > div > div[style*="border: 2px solid"] > div:first-child {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
        left: 1rem !important;
    }

    #firenze-itinerari > div > div > div[style*="border: 2px solid"] h3 {
        font-size: 1.2rem !important;
        margin-top: 0.5rem !important;
    }

    #firenze-itinerari > div > div > div[style*="border: 2px solid"] p {
        font-size: 1.05rem !important;
        text-align: justify !important;
    }

    /* Itinerari - Card selezione giorni */
    #firenze-itinerari .articles-grid {
        grid-template-columns: 1fr !important;
        padding: 0 0.5rem !important;
    }

    /* Itinerari singoli (1, 2, 3 giorni) */
    #firenze-itinerario-1giorno > div,
    #firenze-itinerario-2giorni > div,
    #firenze-itinerario-3giorni > div {
        padding: 0 0.5rem !important;
    }

    /* Badge info nelle tappe */
    #firenze-itinerario-1giorno div[style*="display: flex; gap: 1rem"],
    #firenze-itinerario-2giorni div[style*="display: flex; gap: 1rem"],
    #firenze-itinerario-3giorni div[style*="display: flex; gap: 1rem"] {
        flex-wrap: wrap !important;
    }

    /* ========================================
       MIGLIORAMENTI GENERALI TESTI
       ======================================== */
    
    /* Tutti i paragrafi dell'article-content */
    .article-content p {
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }

    /* Liste puntate e numerate */
    .article-content ul,
    .article-content ol {
        padding: 0 1.5rem !important;
        margin: 1rem 0 !important;
    }

    .article-content li {
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
        margin-bottom: 0.8rem !important;
    }

    /* Box colorati generici */
    .article-content > div[style*="background"] {
        margin: 0 0 2rem 0 !important;
        padding: 1rem !important;
        border-radius: 10px !important;
    }

    .article-content > div[style*="background"] p {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Strong e bold text */
    .article-content strong {
        font-weight: 600;
        color: #1e3c72;
    }

    /* Migliora leggibilità link */
    .article-content a {
        color: #2a5298;
        text-decoration: underline;
        word-break: break-word;
    }

    /* Immagini negli articoli */
    .article-content img {
        display: block;
        margin: 1.5rem auto !important;
        max-width: 100% !important;
        border-radius: 8px;
    }

    /* Featured image nelle pagine articolo */
    .article-featured-image div {
        font-size: 4rem !important;
        gap: 0.5rem !important;
    }

    /* ========================================
       BOX SPECIALI E SEZIONI
       ======================================== */
    
    /* Box con bordi e padding speciali */
    div[style*="border-radius: 15px"][style*="padding"] {
        padding: 1.5rem 1rem !important;
        margin: 0.5rem !important;
    }

    /* Titoli dentro box colorati */
    div[style*="background: linear-gradient"] h3 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
    }

    /* Paragrafi dentro sezioni con background */
    div[style*="background: linear-gradient"] p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }

    /* ========================================
       EASTER EGG - FIRENZE
       ======================================== */
    #firenze-easter-egg .article-content > div {
        margin-bottom: 3rem !important;
    }

    #firenze-easter-egg .article-content h2 {
        font-size: 1.6rem !important;
        padding: 0 0.5rem !important;
    }

    #firenze-easter-egg .article-content h3 {
        font-size: 1.2rem !important;
        padding: 0 0.5rem !important;
    }

    #firenze-easter-egg .article-content p {
        padding: 0 0.5rem !important;
    }

    #firenze-easter-egg .article-content img {
        max-width: 200px !important;
    }

    /* ========================================
       CONSIGLI UTILI - FIRENZE
       ======================================== */
    #firenze-consigli .article-content > div {
        margin-bottom: 2rem !important;
    }

    #firenze-consigli .article-content h3 {
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        padding: 0 0.5rem !important;
    }

    #firenze-consigli .article-content p {
        padding: 0 0.5rem !important;
    }

    /* ========================================
       IL MIO APPUNTO - FIRENZE
       ======================================== */
    #firenze-mio-appunto .article-content h2 {
        font-size: 1.6rem !important;
        padding: 0 0.5rem !important;
    }

    #firenze-mio-appunto .article-content p {
        padding: 0 0.5rem !important;
    }

    /* ========================================
       TABELLE E CONTENUTI STRUTTURATI
       ======================================== */
    
    /* Se hai tabelle */
    .article-content table {
        width: 100% !important;
        font-size: 0.9rem !important;
        overflow-x: auto !important;
        display: block !important;
    }

    /* Divisori e separatori */
    div[style*="border-top"] {
        margin: 2rem 0.5rem !important;
        padding-top: 1.5rem !important;
    }

    /* ========================================
       UTILITY - MARGINI E PADDING GLOBALI
       ======================================== */
    
    /* Max-width containers su mobile */
    div[style*="max-width: 1200px"] {
        max-width: 100% !important;
        padding: 0 0.5rem !important;
    }

    div[style*="max-width: 900px"] {
        max-width: 100% !important;
        padding: 0 0.5rem !important;
    }

    div[style*="max-width: 800px"] {
        max-width: 100% !important;
        padding: 0 0.5rem !important;
    }

    /* Centratura testi su mobile */
    .article-header p,
    .category-header p {
        padding: 0 1rem !important;
    }

    /* ========================================
       PISA - STESSO STILE DI FIRENZE
       ======================================== */
    
    /* Applica gli stessi miglioramenti a Pisa */
    #article-pisa .articles-grid,
    #pisa-citta .article-content,
    #pisa-cosa-vedere .article-content,
    #pisa-dove-mangiare .article-content,
    #pisa-itinerari .article-content,
    #pisa-consigli .article-content,
    #pisa-easter-egg .article-content,
    #pisa-mio-appunto .article-content {
        padding: 0 0.5rem !important;
    }

    #article-pisa .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* ========================================
       FIX OVERFLOW E SCROLL
       ======================================== */
    
    /* Previeni overflow orizzontale */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Fix per immagini che escono */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix per elementi con width fisso */
    * {
        max-width: 100% !important;
    }

    /* Eccezioni per elementi che devono mantenere dimensioni */
    .category-icon,
    .article-image,
    .hero,
    .intro-overlay {
        max-width: none !important;
    }

    /* ========================================
       FIX SPAZIATURA ECCESSIVA TRA PAROLE
       ======================================== */
    
    .article-content p,
    .article-excerpt,
    .category-content p,
    .about p,
    .guest-intro {
        text-align: justify !important;
        text-justify: inter-word !important;
        word-spacing: normal !important;
        hyphens: auto !important;
        -webkit-hyphens: auto !important;
        -moz-hyphens: auto !important;
    }
    
    /* Previeni giustificazione eccessiva */
    p {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
}

}

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .article-content,
    .category-header,
    .article-header {
        padding: 0 2rem !important;
    }

    h2 {
        font-size: 2.2rem !important;
    }

    .article-content h2 {
        font-size: 1.8rem !important;
    }

    .article-content p {
        font-size: 1.05rem !important;
    }
}