/* components.css - UI Components */

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-md);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.card-meta {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Hero */
.hero {
    position: relative;
    padding: 6rem 0;
    /* Fallback */
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: var(--space-md);
}

.breadcrumbs a {
    color: var(--color-primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Meteo Box */
.meteo-box {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.9);
    padding: var(--space-sm) var(--space-md);
    border-radius: 99px;
    backdrop-filter: blur(4px);
    color: var(--text-main);
    font-weight: 600;
}

/* Tabs */
.tabs-nav {
    display: flex;
    gap: var(--space-lg);
    border-bottom: 2px solid #eee;
    margin-bottom: var(--space-lg);
    overflow-x: auto;
}

.tab-link {
    padding: var(--space-md) 0;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-link:hover,
.tab-link.active {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* PAGINATION TRICOLORE (Universal) */
.page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    line-height: 1;
    /* Ensure alignment */
}

/* Override for spans that might not be links */
span.page-numbers {
    cursor: default;
}

/* Dots - Reset Style */
.page-numbers.dots {
    background-color: transparent !important;
    color: #333 !important;
    border: none !important;
    box-shadow: none !important;
}

/* 1. Verde */
.page-numbers:not(.next):not(.prev):not(.dots):nth-child(3n+1) {
    background-color: #009246;
    color: white;
    border-color: #009246;
}

/* 2. Bianco */
.page-numbers:not(.next):not(.prev):not(.dots):nth-child(3n+2) {
    background-color: #ffffff;
    color: #333;
    border-color: #ccc;
}

/* 3. Rosso */
.page-numbers:not(.next):not(.prev):not(.dots):nth-child(3n+3) {
    background-color: #ce2b37;
    color: white;
    border-color: #ce2b37;
}


/* Next/Prev Buttons - Neutral Style or Tricolor? Keep Neutral for clarity or green */
.page-numbers.next,
.page-numbers.prev {
    background-color: white !important;
    color: #333 !important;
    border-color: #ddd !important;
}

/* Hover Effect */
.page-numbers:hover {
    opacity: 0.8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* HUB SCROLL COMPONENTS (Requested "Richiamabili") */

/* 1. Region Pills Scrolling */
.region-filter-scroll {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 12px;
    overflow-x: auto;
    width: 100%;
    padding: 5px 5px 20px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, black 90%, transparent);
}

/* Force buttons not to shrink */
.region-filter-scroll>a,
.region-filter-scroll>.btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* 2. Cards Horizontal Scroll */
.hub-horizontal-scroll {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 2rem;
    overflow-x: auto;
    padding: 20px 20px 40px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
    width: 100%;
    /* Ensure width */
}

/* Force cards to keep width */
.hub-horizontal-scroll>.card,
.hub-horizontal-scroll>.card-link,
.hub-horizontal-scroll>div {
    flex: 0 0 320px !important;
    display: block !important;
    max-width: 320px;
}

/* Hide Scrollbars */
.no-scrollbar::-webkit-scrollbar,
.region-filter-scroll::-webkit-scrollbar,
.hub-horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.no-scrollbar,
.region-filter-scroll,
.hub-horizontal-scroll {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ==========================================================================
   LCAI FAQ Accordion Style
   ========================================================================== */
.lcai-faq {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #009246;
}

.lcai-faq h3 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lcai-faq h3::before {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #009246;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50%;
}

.lcai-faq ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lcai-faq li {
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
}

.lcai-faq li:last-child {
    margin-bottom: 0;
}

.lcai-faq strong {
    display: block;
    padding: 18px 25px;
    background: white;
    cursor: pointer;
    font-size: 1.1rem;
    color: #334155;
    position: relative;
    padding-right: 50px;
    transition: background 0.2s ease;
    user-select: none;
}

.lcai-faq strong:hover {
    background: #f1f5f9;
}

.lcai-faq strong::after {
    content: '+';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #cbd5e1;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.lcai-faq li.active strong {
    background: #009246;
    color: white;
}

.lcai-faq li.active strong::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
    color: white;
}

.lcai-faq-content {
    display: none;
    padding: 20px 25px;
    color: #475569;
    line-height: 1.7;
    background: white;
    border-top: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease-out;
}

.lcai-faq li.active .lcai-faq-content {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Paragraph-based FAQ support */
.lcai-faq .faq-item {
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.lcai-faq .faq-item .faq-question {
    display: block;
    padding: 18px 50px 18px 25px;
    background: white;
    cursor: pointer;
    font-size: 1.1rem;
    color: #334155;
    position: relative;
    transition: background 0.2s ease;
    user-select: none;
    margin: 0;
}

.lcai-faq .faq-item .faq-question:hover {
    background: #f1f5f9;
}

.lcai-faq .faq-item.active .faq-question {
    background: #009246;
    color: white;
}

.lcai-faq .faq-item.active .lcai-faq-content {
    display: block;
}

/* Smart Links */
.smart-link,
.smart-geo-link {
    text-decoration: none;
    border-bottom: 2px solid #009246;
    color: inherit;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0 2px;
}

.smart-link:hover,
.smart-geo-link:hover {
    background: rgba(0, 146, 70, 0.1);
    color: #007835;
}

/* Cosa Vedere section links - slightly bolder */
.cosa-vedere-link {
    font-weight: 600;
    border-bottom-width: 3px;
}

.cosa-vedere-link:hover {
    background: rgba(0, 146, 70, 0.15);
}
/* Postcard Component Styles */
:root {
    --pc-accent: #ff4757;
    --pc-bg: #f8fafc;
}

.pc-hero {
    background: #1e293b;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.pc-breadcrumb {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.pc-breadcrumb a {
    color: var(--pc-accent);
    text-decoration: none;
}

.pc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.pc-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    text-decoration: none;
    color: inherit;
    position: relative;
    display: block;
}

.pc-card:hover {
    transform: translateY(-10px);
}

.pc-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.pc-card-content {
    padding: 1.5rem;
}

.pc-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--pc-accent);
}

.single-pc {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.pc-photo-wrap {
    position: relative;
    border: 12px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pc-stamp {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 110px;
    height: 130px;
    background: white;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 2px dashed #cbd5e1;
    transform: rotate(8deg);
    z-index: 10;
}

.pc-share-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

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