/**
 * ItaliaGov COMTem Theme - Custom Styles
 * Vanilla CSS without build process
 * 
 * Color Palette based on user specification:
 * - Lighter Blue: #16395e
 * - Darker Blue: #0f2b48
 * - White: #ffffff
 * - Light Gray: #f8f9fa / #e9ecef
 * - Red (Accent): #dc3545
 * - Purple: #6f42c1
 * - Green: #28a745
 * - Light Blue: #17a2b8
 */

/* ==========================================================================
   CUSTOM COLOR VARIABLES - Updated with user specification
   ========================================================================== */

:root {
    /* Primary Dark Blue Palette (user specification) */
    --blue-50: #e3f2fd;
    --blue-100: #bbdefb;
    --blue-200: #90caf9;
    --blue-300: #64b5f6;
    --blue-400: #42a5f5;
    --blue-500: #2196f3;
    --blue-600: #1e88e5;
    --blue-700: #1976d2;
    --blue-800: #16395e;
    /* Lighter blue from user specification */
    --blue-900: #0f2b48;
    /* Darker blue from user specification */

    /* Theme colors based on user specification */
    --primary-color: var(--blue-800);
    /* #16395e - Lighter blue */
    --primary-hover: var(--blue-900);
    /* #0f2b48 - Darker blue */
    --secondary-color: var(--blue-700);
    /* #1976d2 - Secondary blue */
    --accent-color: #dc3545;
    /* Red for COMTem logo */

    /* Supporting colors from screenshot */
    --success: #28a745;
    /* Green */
    --warning: #ffc107;
    /* Yellow/Orange */
    --danger: #dc3545;
    /* Red */
    --info: #17a2b8;
    /* Light blue */

    /* Neutral colors from screenshot */
    --gray-50: #f8f9fa;
    /* Light gray backgrounds */
    --gray-100: #e9ecef;
    /* Very light gray */
    --gray-200: #dee2e6;
    /* Light gray borders */
    --gray-300: #ced4da;
    /* Medium light gray */
    --gray-400: #adb5bd;
    /* Medium gray */
    --gray-500: #6c757d;
    /* Medium dark gray */
    --gray-600: #495057;
    /* Dark gray text */
    --gray-700: #343a40;
    /* Very dark gray */
    --gray-800: #212529;
    /* Almost black */
    --gray-900: #000000;
    /* Black */

    /* Product card accent colors from screenshot */
    --purple-accent: #6f42c1;
    /* Purple for first product card */
    --blue-accent: #007bff;
    /* Blue for second product card */
    --green-accent: #28a745;
    /* Green for third product card */
}

/* ==========================================================================
   HEADER STYLES - Updated with improved menu spacing
   ========================================================================== */

.custom-header-wrapper {
    background: var(--primary-hover);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Top Utility Bar */
.header-utility {
    background: var(--primary-hover);
    padding: 1rem 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1031;
}

.region-name {
    font-weight: 600;
}

.utility-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: end;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.language-selector:hover {
    opacity: 0.8;
}

.user-access {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Main Header */
.header-main {
    padding: 1.5rem 0;
    background: #16395E;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-square {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
    text-align: center;
}

.logo-text {
    color: white;
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.brand-subtitle {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.social-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-icons a {
    color: white;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-icons a:hover {
    opacity: 1;
}

.search-section {
    position: relative;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1rem;
}

.search-input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 200px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
}

/* Navigation - Updated with improved spacing */
.header-navigation {
    background: var(--primary-color);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    /* Reset gap to use padding instead */
}

.nav-item {
    position: relative;
    margin: 0;
    /* Reset margin */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem !important;
    /* Increased horizontal padding for better spacing */
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.nav-item.active .nav-link {
    border-bottom: 2px solid;
}

.nav-item:last-child .nav-link {
    border-right: none;
    /* Remove border from last item */
}

.dropdown-toggle::after {
    display: none;
}

/* Dropdown on hover for desktop */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.custom-footer-wrapper {
    background: var(--primary-hover);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    width: 100%;
}

.footer-top {
    margin-bottom: 2rem;
}

.footer-logos {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.secondary-logos {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.agenda-digitale {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.ad-icon {
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
}

.ad-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.er-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.lepida {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--blue-200);
}

.footer-navigation {
    display: flex;
    justify-content: flex-end;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a,
.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.footer-section .social-icons {
    display: flex;
    gap: 1rem;
}

.footer-section .social-icons a {
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section .social-icons a:hover {
    opacity: 1;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    margin-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.footer-bottom-left span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.cookie-settings {
    color: var(--blue-200);
    text-decoration: none;
    font-size: 0.9rem;
}

.cookie-settings:hover {
    color: white;
    text-decoration: none;
}

/* ==========================================================================
   HOMEPAGE STYLES
   ========================================================================== */

/* Hero Section */
.hero-section {
    background-color: #D9D9D9;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-buttons .btn {
    margin: 0 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    background-color: var(--primary-hover);
    /* Use darker blue for buttons */
    border-color: var(--primary-hover);
    color: white;
}

.hero-buttons .btn:hover {
    background-color: var(--primary-color);
    /* Lighter blue on hover */
    border-color: var(--primary-color);
    color: white;
}

/* Section Styles */
.events-section,
.surveys-section,
.comtem-products-section,
.news-section {
    padding: 60px 0;
}

.comtem-products-section {
    display: none;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.section-header .btn {
    font-weight: 600;
    background-color: var(--primary-hover);
    /* Use darker blue for section buttons */
    border-color: var(--primary-hover);
    color: white;
    width: auto;
}

.section-header .btn:hover {
    background-color: var(--primary-color);
    /* Lighter blue on hover */
    border-color: var(--primary-color);
    color: white;
    width: auto;
}

/* COMTem Products Section */
.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.product-card-purple::before {
    background-color: #B980B5
}

.product-card-blue::before {
    background-color: #1F5BA4;
}

.product-card-green::before {
    background-color: #24B1A3;
}

.product-image {
    height: 200px;
    background-color: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder {
    font-size: 3rem;
    color: var(--gray-300);
}

.product-content {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-description {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ==========================================================================
   DASHBOARD STYLES
   ========================================================================== */

.dashboard-page {
    background: var(--gray-50);
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 2rem 0;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.welcome-content {
    flex: 1;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.last-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.last-login i {
    color: var(--blue-200);
}

.user-avatar {
    text-align: center;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
}

/* Dashboard Content */
.dashboard-content {
    padding: 2rem 0;
}

/* Widget Styles */
.widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
}

.widget-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background-color: var(--primary-hover);
    /* Use darker blue for widget buttons */
    border-color: var(--primary-hover);
    color: white;
}

.widget-actions .btn:hover {
    background-color: var(--primary-color);
    /* Lighter blue on hover */
    border-color: var(--primary-color);
    color: white;
}

/* Stats Widget */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Activity Feed */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.activity-description {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.activity-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Community Cards */
.community-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.community-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.community-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.community-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.community-body {
    padding: 1rem;
}

.community-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.community-stat {
    text-align: center;
}

.community-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.community-stat-label {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.community-actions {
    display: flex;
    gap: 0.5rem;
}

.community-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    background-color: var(--primary-hover);
    /* Use darker blue for community buttons */
    border-color: var(--primary-hover);
    color: white;
}

.community-actions .btn:hover {
    background-color: var(--primary-color);
    /* Lighter blue on hover */
    border-color: var(--primary-color);
    color: white;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.action-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.2rem;
}

.action-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.action-description {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.progress-icon {
    width: 40px;
    height: 40px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.progress-content {
    flex: 1;
}

.progress-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.progress-bar {
    background: var(--gray-200);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: var(--primary-color);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */

.layout-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout-container main {
    flex: 1;
}

/* ==========================================================================
   BOOTSTRAP ITALIA OVERRIDES
   ========================================================================== */

/* Ensure Bootstrap Italia styles don't conflict */
.custom-header-wrapper .container,
.custom-footer-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Override any conflicting Bootstrap Italia styles */
.custom-header-wrapper *,
.custom-footer-wrapper * {
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .search-input {
        width: 150px;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        /* Reduced padding on mobile */
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .footer-navigation {
        justify-content: flex-start;
        margin-top: 2rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom-left {
        flex-direction: column;
        gap: 1rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header {
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-buttons .btn {
        display: block;
        margin: 0.5rem 0;
        width: 100%;
    }
}

/* ==========================================================================
   EVENTS SLIDER STYLES
   ========================================================================== */

.events-slider-container {
    padding: 2rem 0;
}

.events-slider-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    text-align: center;
}

.events-slider-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 2rem;
}

/* Carousel wrapper styles */
.it-carousel-wrapper {
    margin-top: 2rem;
}

.it-single-slide-wrapper {
    padding: 0 0.5rem;
}

.card-wrapper {
    height: 100%;
}

.card-bg {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card-bg:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-big {
    min-height: 300px;
}

.card-big .card-body {
    padding: 1.5rem;
}

/* Event category and date styles */
.category-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 600;
}

.event-category {
    color: var(--gray-600);
}

.event-date-range {
    color: var(--gray-600);
}

/* Card content styles */
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.card-text {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Event meta styles */
.event-meta {
    margin-bottom: 1rem;
}

.event-meta>div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.event-meta i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Read more link styles */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.read-more .icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.read-more:hover .icon {
    transform: translateX(3px);
}

/* Card image styles */
.card-img-wrapper {
    height: 200px;
    overflow: hidden;
    background-color: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    color: var(--gray-400);
    font-size: 3rem;
}

.placeholder-image i {
    opacity: 0.5;
}

/* Splide carousel customizations */
.splide__arrow {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.splide__arrow:hover {
    background: var(--primary-hover);
}

.splide__pagination__page {
    background: var(--gray-300);
    border: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 0.25rem;
    transition: background-color 0.3s ease;
}

.splide__pagination__page.is-active {
    background: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .events-slider-title {
        font-size: 1.5rem;
    }

    .events-slider-subtitle {
        font-size: 1rem;
    }

    .card-big {
        min-height: 250px;
    }

    .card-big .card-body {
        padding: 1rem;
    }
}

/* Fallback styles for when JavaScript fails */
.it-carousel-wrapper:not(.splide) {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.it-carousel-wrapper:not(.splide) .splide__slide {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.it-carousel-wrapper:not(.splide) .splide__track {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.it-carousel-wrapper:not(.splide) .splide__list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

/* Spacing between sections */
.events-section {
    background-color: #F5F5F5;
}

.surveys-section {
    background-color: #FFF;
}

.comtem-products-section {
    background-color: white;
}

.news-section {
    background-color: #F5F5F5;
}

/* ==========================================================================
   CHI SIAMO PAGE STYLES
   ========================================================================== */

/* Breadcrumb styles */
.breadcrumb-container {
    background-color: transparent;
    padding: 1rem 0 0.5rem 0;
}

.breadcrumb-container .breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.breadcrumb-container .breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    color: #6c757d;
    padding: 0 0.5rem;
}

.breadcrumb-container .breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-container .breadcrumb-item a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumb-container .breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

.chi-siamo-content {
    padding: 3rem 0;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.intro-text p {
    margin-bottom: 1.5rem;
}

.intro-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.chi-siamo-content .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.section-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.section-description strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Statistics Section */
.statistics-section {
    text-align: center;
}

.stat-item {
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--gray-600);
    font-weight: 500;
}

.strategy-card,
.digital-skill-card,
.data-card,
.technology-and-infrastructure-card,
.featured-news-card {
    border-radius: 4px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.strategy-card:hover,
.digital-skill-card:hover,
.data-card:hover,
.technology-and-infrastructure-card:hover,
.featured-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.strategy-cards .card-title,
.digital-skill-cards .card-title,
.data-cards .card-title,
.technology-and-infrastructure-cards .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.strategy-cards .card-title a,
.digital-skill-cards .card-title a,
.data-cards .card-title a,
.technology-and-infrastructure-cards .card-title a {
    text-decoration: none;
    color: #16395E;
}

.strategy-cards .card-description,
.digital-skill-cards .card-description,
.data-cards .card-description,
.technology-and-infrastructure-cards .card-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.strategy-cards .card-link,
.digital-skill-cards .card-link,
.data-cards .card-link,
.technology-and-infrastructure-cards .card-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.strategy-cards .card-link:hover {
    color: var(--primary-hover);
}

/* Competenze Cards */
.competenze-cards .competenze-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.competenze-cards .card-c {
    border-left-color: #3EB5E6;
    background: linear-gradient(135deg, rgba(62, 180, 230, 0.05) 0%, rgba(62, 180, 230, 0.02) 100%);
}

.competenze-cards .card-i {
    border-left-color: #009AB1;
    background: linear-gradient(135deg, rgba(0, 153, 177, 0.05) 0%, rgba(0, 153, 177, 0.02) 100%);
}

.competenze-cards .card-fd {
    border-left-color: #E85F3D;
    background: linear-gradient(135deg, rgba(232, 95, 61, 0.05) 0%, rgba(232, 95, 61, 0.02) 100%);
}

.competenze-cards .competenze-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.competenze-cards .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.competenze-cards .card-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.competenze-cards .card-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.competenze-cards .card-link:hover {
    color: var(--primary-hover);
}

/* Data Cards */
.data-cards .data-card {
    border-radius: 0.75rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.data-cards .data-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.data-cards .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.data-cards .card-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.data-cards .card-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.data-cards .card-link:hover {
    color: var(--primary-hover);
}

/* Tech Cards */
.tech-cards .tech-card {
    border-radius: 0.75rem;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.tech-cards .tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.tech-cards .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tech-cards .card-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tech-cards .card-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.tech-cards .card-link:hover {
    color: var(--primary-hover);
}

/* Section Header for Chi Siamo */
.chi-siamo-content .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.chi-siamo-content .section-header .section-title {
    margin-bottom: 0;
}

.chi-siamo-content .section-header .btn-primary {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chi-siamo-content .section-header .btn-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive adjustments for Chi Siamo */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .chi-siamo-content .section-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .chi-siamo-content .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ==========================================================================
   LE COMUNITÀ PAGE STYLES
   ========================================================================== */

.le-comunita-content {
    padding: 3rem 0;
}

.le-comunita-content .page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.le-comunita-content .page-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.le-comunita-content .intro-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.le-comunita-content .intro-text p {
    margin-bottom: 1.5rem;
}

.le-comunita-content .intro-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.le-comunita-content .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* Products Cards for Le Comunità */
.products-cards .product-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.products-cards .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.products-cards .product-image {
    height: 200px;
    background: var(--gray-100);
    position: relative;
    overflow: hidden;
}

.products-cards .product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-400);
}

.products-cards .product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.products-cards .product-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.products-cards .product-card-purple .product-category {
    background: var(--purple-accent);
}

.products-cards .product-card-blue .product-category {
    background: var(--blue-accent);
}

.products-cards .product-card-green .product-category {
    background: var(--green-accent);
}

.products-cards .product-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    margin-top: 1rem;
}

.products-cards .product-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.products-cards .product-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.products-cards .product-link:hover {
    color: var(--primary-hover);
}

/* Section Header for Le Comunità */
.le-comunita-content .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.le-comunita-content .section-header .section-title {
    margin-bottom: 0;
}

.le-comunita-content .section-header .btn-primary {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.le-comunita-content .section-header .btn-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive adjustments for Le Comunità */
@media (max-width: 768px) {
    .le-comunita-content .page-title {
        font-size: 2.5rem;
    }

    .le-comunita-content .section-title {
        font-size: 2rem;
    }

    .le-comunita-content .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.breadcrumb-section {
    margin-top: 3rem;
}

.breadcrumb-section .breadcrumb {
    margin-bottom: 0;
}

.stat-item {
    border: 1px solid #C5C7C9;
    border-radius: 0.75rem;
}

.stat-item .stat-number {
    font-size: 3rem;
}

.competenze-cards .card-i {
    background: linear-gradient(135deg, rgba(36, 177, 163, 0.05) 0%, rgba(36, 177, 163, 0.02) 100%);
}

.card-ad {
    border-left: 4px solid #B980B5;
    background: linear-gradient(135deg, rgba(185, 128, 181, 0.05) 0%, rgba(185, 128, 181, 0.02) 100%);
}

.card-dgg {
    border-left: 4px solid #24B1A3;
    background: linear-gradient(135deg, rgba(36, 177, 163, 0.05) 0%, rgba(36, 177, 163, 0.02) 100%);
}

.card-id {
    border-left: 4px solid #1F5BA4;
    background: linear-gradient(135deg, rgba(31, 91, 164, 0.05) 0%, rgba(31, 91, 164, 0.02) 100%);
}

.card-da {
    border-left: 4px solid #00A45B;
    background: linear-gradient(135deg, rgba(0, 164, 90, 0.05) 0%, rgba(0, 164, 90, 0.02) 100%);
}

.card-do {
    border-left: 4px solid #7B347E;
    background: linear-gradient(135deg, rgba(124, 52, 126, 0.05) 0%, rgba(124, 52, 126, 0.02) 100%);
}

.card-cec {
    border-left: 4px solid #F5A533;
    background: linear-gradient(135deg, rgba(245, 164, 51, 0.05) 0%, rgba(245, 164, 51, 0.02) 100%);
}

.card-iot {
    border-left: 4px solid #A2AF43;
    background: linear-gradient(135deg, rgba(162, 175, 67, 0.05) 0%, rgba(162, 175, 67, 0.02) 100%);
}

.news-card {
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
}

.news-card .news-title {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.news-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.news-content,
.surveys-content,
.article-content,
.events-content {
    padding: 3rem 0;
}

.category-card h3 {
    font-size: 2rem;
    font-weight: 700;
}

.category-card:after {
    margin-top: 0px !important;
}

.card.card-big .card-body {
    padding: 1.5rem !important;
}

.event-title {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

@media screen and (max-width: 767px) {
    .logo-icon {
        width: 100%;
    }

    .explore-content-cards {
        flex-wrap: wrap;
    }

    .views-view-responsive-grid {
        --views-responsive-grid--column-count: 1 !important;
    }

    .oa-gap-mobile-column {
        gap: 30px;
    }
}

.working-group-card,
.featured-tutorial-card,
.featured-survey-card,
.featured-announcement-card,
.member-card,
.featured-article-card,
.featured-event-card,
.featured-insight-card {
    border-radius: 4px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    background: #FFF;
}

.featured-article-card p,
.featured-event-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.working-group-card:hover,
.featured-tutorial-card:hover,
.featured-survey-card:hover,
.featured-announcement-card:hover,
.member-card:hover,
.featured-article-card:hover,
.featured-event-card:hover,
.featured-insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.view-working-group-cards .views-row {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0.75rem;
    box-sizing: border-box;
}

.working-group-card h3>a,
.featured-tutorial-card h3>a,
.featured-survey-card h3>a,
.featured-announcement-card h3>a,
.featured-article-card h3>a,
.featured-event-card h3>a,
.featured-insight-card h3>a,
.featured-document-repository-card h3>a {
    text-decoration: none !important;
    color: #16395E;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.working-group-card .read-more,
.featured-survey-card .read-more,
.featured-tutorial-card .read-more,
.featured-announcement-card .read-more,
.featured-article-card .read-more,
.featured-event-card .read-more,
.featured-insight-card .read-more,
.featured-document-repository-card .read-more {
    font-size: 1rem;
    color: #16395E;
}

#a-cura-di .card:after,
.referent-section .card:after {
    display: none;
}

#a-cura-di .card,
.referent-section .card {
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #FFF !important;
}

.prose>p,
#descrizione>p {
    font-family: Lora;
}

.oa-sidebar button {
    text-decoration: none;
}

@media screen and (min-width: 992px) {

    .oa-news-content,
    .oa-comtem-content {
        padding-top: 3rem;
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }

    .oa-sidebar {
        border-right: 2px solid #ECEFF1;
        padding-top: 1.5rem;
    }

    .oa-sidebar>div {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }

    .custom-header-wrapper .container,
    .custom-footer-wrapper .container {
        max-width: 1320px;
    }
}

.member-card-badge,
.keyword-badge {
    border-radius: 1rem;
    width: fit-content;
    padding: 0.2rem 0.5rem 0.2rem 0.5rem;
}

.keyword-badge {
    border: 1px solid #16395e;
    color: #16395e;
}

.member-card-badge span {
    color: #FFF !important;
}

.member-card h3,
.member-card .member-card-name {
    color: #16395E;
    font-weight: 700;
}

.member-card h3 a {
    text-decoration: none;
}

.member-card span {
    font-weight: 600;
    color: #16395E;
}

.member-card p {
    color: #16395E;
}

/* Rubrica: 3 card per riga, distanza 30px */
.rubrica-users-row {
    --bs-gutter-x: 30px;
    --bs-gutter-y: 30px;
}

.oa-bg-cards {
    background: #F5F5F5;
    padding: 3rem 0 3rem 0;
}

.oa-bg-add-new {
    background: rgba(22, 57, 94, 0.15);
    padding: 3rem 0 3rem 0;
}

.working-group-card {
    height: 16rem;
}

.oa-featured-survey-card-date {
    position: absolute;
    background: #FFF;
    width: fit-content;
    top: 30%;
    left: 87%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    padding: 0.8rem;
    text-align: center;
}

.featured-survey-card-image {
    background: #d1d1d1;
    height: 12rem;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    position: relative;
}

.oa-featured-survey-card-day {
    font-size: 1.4rem;
    font-weight: 700;
    color: #16395E;
}

.card-date {
    text-transform: uppercase;
}

.featured-event-card img,
.featured-survey-card img,
.featured-tutorial-card img,
.featured-article-card img,
.featured-insight-card img {
    height: 12rem;
    object-fit: cover;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

/*.view-featured-event-cards,
.view-event-cards,
.view-featured-tutorial-cards,
.view-tutorial-cards,
.view-featured-announcement-cards,
.view-announcement-cards,
.view-featured-survey-cards,
.view-survey-cards,
.view-featured-article-cards,
.view-article-cards,
.view-featured-insight-cards,
.view-insight-cards,
.view-insight-dashboard-cards,
.view-announcement-dashboard-cards,
.view-article-dashboard-cards,
.view-members-group,
.view-survey-homepage-cards,
.view-product-cards {
    display: flex;
    gap: 2rem;
    justify-content: flex-start;
}*/

.view-featured-event-cards .views-row,
.view-event-cards .views-row,
.view-featured-tutorial-cards .views-row,
.view-tutorial-cards .views-row,
.view-featured-announcement-cards .views-row,
.view-announcement-cards .views-row,
.view-featured-survey-cards .views-row,
.view-survey-cards .views-row,
.view-featured-article-cards .views-row,
.view-article-cards .views-row,
.view-featured-insight-cards .views-row,
.view-insight-cards .views-row,
.view-insight-dashboard-cards .views-row,
.view-announcement-dashboard-cards .views-row,
.view-article-dashboard-cards .views-row,
.view-members-group .views-row,
.view-survey-homepage-cards .views-row,
.view-product-cards .views-row {
    flex: 0 0 calc(33.333% - 1.33rem);
    box-sizing: border-box;
}

@media screen and (max-width: 767px) {

    .view-featured-event-cards,
    .view-event-cards,
    .view-featured-tutorial-cards,
    .view-tutorial-cards,
    .view-featured-announcement-cards,
    .view-announcement-cards,
    .view-featured-survey-cards,
    .view-survey-cards,
    .view-featured-article-cards,
    .view-article-cards,
    .view-featured-insight-cards,
    .view-insight-cards,
    .view-insight-dashboard-cards,
    .view-announcement-dashboard-cards,
    .view-article-dashboard-cards,
    .view-members-group,
    .view-survey-homepage-cards,
    .view-product-cards {
        flex-wrap: wrap;
    }

    .view-featured-event-cards .views-row,
    .view-event-cards .views-row,
    .view-featured-tutorial-cards .views-row,
    .view-tutorial-cards .views-row,
    .view-featured-announcement-cards .views-row,
    .view-announcement-cards .views-row,
    .view-featured-survey-cards .views-row,
    .view-survey-cards .views-row,
    .view-featured-article-cards .views-row,
    .view-article-cards .views-row,
    .view-featured-insight-cards .views-row,
    .view-insight-cards .views-row,
    .view-insight-dashboard-cards .views-row,
    .view-announcement-dashboard-cards .views-row,
    .view-article-dashboard-cards .views-row,
    .view-members-group .views-row,
    .view-survey-homepage-cards .views-row,
    .view-product-cards .views-row {
        flex: auto;
    }

    .header-utility .utility-actions {
        display: none !important;
    }

    .header-utility .utility-actions-mobile {
        display: flex !important;
    }

    .header-navigation .nav-menu {
        display: none !important;
    }

    .mobile-nav a {
        color: #FFF;
        text-decoration: none;
    }

    .mobile-nav button {
        background: none;
        border: none;
        font-weight: 600;
    }

    .mobile-nav ul ul a {
        font-size: 0.95rem;
    }

    .mobile-search .search-container {
        display: flex;
    }

    .mobile-search .search-input {
        flex: 1;
        padding: 0.5rem;
    }

    .mobile-search .search-button {
        padding: 0.5rem 1rem;
    }
}

.explore-content h3,
.explore-content p {
    color: #16395E !important;
}

.splide__arrows {
    display: block !important;
}

.splide__pagination {
    display: none !important;
}

.user-dropdown {
    margin-top: 0.5rem;
}

h5>a {
    text-decoration: none;
    color: #16395E;
}

.field--name-field-attachments>div:first-child,
.field--name-field-n-attachments>div:first-child,
.field--name-field-comtem-attachments>div:first-child {
    display: none;
}

.file--application-pdf .card-title {
    margin-bottom: 0 !important;
}

#edit-body-format--3,
#edit-field-e-description-format--3,
#edit-field-e-description-format,
#edit-body-format {
    display: none;
}

.pagination {
    margin-top: 3rem;
    margin-bottom: 0;
}

#search-form {
    display: none;
}

#it-block-italiagov-content ol {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

#it-block-italiagov-content ol li h3 a {
    text-decoration: none;
    color: #16395E;
}

#it-block-italiagov-content ol li p:nth-child(3) {
    display: none;
}

#it-block-italiagov-content ol li p:nth-child(2) {
    border-bottom: 1px solid;
    padding-bottom: 1.5rem;
}

.pagination .active .page-link {
    color: #FFF !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
}

.pagination .page-item .page-link {
    border: 1px solid #06c;
}

.form-group label.active {
    transform: none !important;
}

.form-group label,
.select-wrapper label {
    position: relative !important;
    line-height: normal !important;
    padding: 0 !important;
    transform: none !important;
}

.form-group,
.form-check,
.select-wrapper {
    margin-bottom: 2rem !important;
}

.js-text-format-wrapper {
    margin-bottom: 0 !important;
}

#dashboard .section-header {
    border-bottom: 1px solid #dedede;
    margin-bottom: 2rem !important;
}

.explore-content-cards .featured-insight-card {
    min-height: auto !important;
}

.explore-content-cards a {
    width: 100%;
}

.views-view-responsive-grid__item-inner {
    height: 100%;
}

.btn-primary {
    border-radius: 4px !important;
}

/* Calendar Styles */
.calendar-wrapper {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.calendar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066cc;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #666;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #eee;
    border: 1px solid #eee;
    flex-grow: 1;
}

.calendar-day {
    background: #fff;
    min-height: 120px;
    padding: 0.5rem;
    position: relative;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.empty {
    background: #fdfdfd;
}

.calendar-day.today {
    background: #e7f1ff;
}

.calendar-day.today .day-number {
    background: #0066cc;
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.day-events-indicators {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 4px;
}

.day-event-dot {
    width: 8px;
    height: 8px;
    background: #0066cc;
    border-radius: 50%;
}

.calendar-day.selected {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
    z-index: 1;
}

.calendar-day:not(.empty) {
    cursor: pointer;
}

.event-detail-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.event-detail-item .event-time,
.event-detail-item .event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.1rem;
}

.event-detail-item .event-time i,
.event-detail-item .event-location i {
    color: #0066cc;
}

.event-detail-item .event-comtems {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.event-detail-item .event-comtem-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #444;
}

.event-detail-item .event-comtem-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.event-detail-item .event-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #16395E;
    text-decoration: none;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.event-detail-item .event-title:hover {
    color: #0066cc;
}

#calendar-events-details.calendar-details-overlay {
    background: #fff;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    border-top: none;
    margin-top: 0;
}

.btn-close-details {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #666;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-details:hover {
    color: #dc3545;
}

#calendar-events-details .details-date {
    color: #0066cc;
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
    }

    .event-title {
        display: none;
    }

    .event-item {
        width: 8px;
        height: 8px;
        padding: 0;
        border-radius: 50%;
        display: inline-block;
    }
}

/* Calendar Loading State */
#events-calendar {
    transition: opacity 0.3s ease;
}

#events-calendar.is-loading {
    pointer-events: none;
    cursor: wait;
}

/* Small Calendar Variant */
.calendar-wrapper.calendar-small {
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.calendar-wrapper.calendar-small .calendar-header {
    margin-bottom: 1rem;
}

.calendar-wrapper.calendar-small .calendar-header h3 {
    font-size: 1.1rem;
}

.calendar-wrapper.calendar-small .calendar-header .btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
}

.calendar-wrapper.calendar-small .calendar-weekday {
    font-size: 0.75rem;
    padding-bottom: 0.2rem;
}

.calendar-wrapper.calendar-small .calendar-day {
    min-height: 40px;
    padding: 0.2rem;
}

.calendar-wrapper.calendar-small .day-number {
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
}

.calendar-wrapper.calendar-small .day-events-indicators {
    gap: 1px;
    margin-top: 2px;
}

.calendar-wrapper.calendar-small .day-event-dot {
    width: 6px;
    height: 6px;
}

.calendar-wrapper.calendar-small .calendar-day.today .day-number {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   NO CONTENT MESSAGE STYLES
   ========================================================================== */

.no-content-message {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gray-600);
    font-size: 1.1rem;
    font-weight: 500;
    background: var(--gray-50);
    border-radius: 0.5rem;
    margin: 2rem 0;
}

/* Nascondi il messaggio empty di default - verrà mostrato/nascosto da JavaScript */
.view-empty-message {
    display: none;
}

/* Mostra il messaggio quando il wrapper è marcato come vuoto */
.view-wrapper-empty .view-empty-message {
    display: block !important;
}

h3 a {
    overflow-wrap: break-word;
}

/* ==========================================================================
   ENTITY AUTOCOMPLETE DROPDOWN
   ========================================================================== */

/* Ensure the dropdown renders above everything, including the submit button */
.ui-autocomplete {
    z-index: 9999 !important;
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 0.25rem 0;
    max-height: 280px;
    overflow-y: auto;
    list-style: none;
}

/* Normalize suggestion text — remove theme's global link underline */
.ui-autocomplete .ui-menu-item a,
.ui-autocomplete .ui-menu-item-wrapper {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none !important;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    background: transparent;
    border: none;
}

/* Hover / keyboard-focus state */
.ui-autocomplete .ui-menu-item a:hover,
.ui-autocomplete .ui-menu-item a.ui-state-focus,
.ui-autocomplete .ui-menu-item a.ui-state-active,
.ui-autocomplete .ui-state-active .ui-menu-item-wrapper,
.ui-autocomplete .ui-state-focus .ui-menu-item-wrapper {
    background-color: #f0f6ff;
    color: #0066cc;
    text-decoration: none !important;
}

.js-text-format-wrapper .js-filter-wrapper {
    display: none;
}

/* Modal Styling Overrides for Announcement Deletion */
body.modal-open,
html.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

.modal.show {
    overflow: hidden !important;
}

.modal-backdrop.show {
    opacity: 0.4 !important;
}

.card-description p,
.card-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Numero di righe */
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}

#views-exposed-form-article-cards-block-1 {
    display: inline-flex;
    align-items: end;
    width: 100%;
    gap: 1rem;
    margin-bottom: 3rem;
}

#views-exposed-form-article-cards-block-1 .form-item-title {
    margin-bottom: 0 !important;
    width: 100%;
}

#views-exposed-form-article-cards-block-1 .form-actions {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   COMTEM CHECKBOXES INLINE — form evento / notizia
   ========================================================================== */

/* Il wrapper div.comtem-checkboxes-inline contiene il fieldset di Drupal */
.comtem-checkboxes-inline fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Le singole voci (div.form-type-checkbox) vanno in riga con gap 2rem */
.comtem-checkboxes-inline fieldset>div,
.comtem-checkboxes-inline>div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.comtem-checkboxes-inline .form-type-checkbox {
    margin: 0;
}


.comtem-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* Nascondi il checkbox nativo */
.comtem-pill-group .form-type-checkbox {
    margin: 0;
    padding: 0;
    border: none;
}

.comtem-pill-group .form-type-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border: 2px solid var(--primary-color, #16395e);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color, #16395e);
    background: #fff;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
    white-space: nowrap;
    line-height: 1.4;
}

.comtem-pill-group .form-type-checkbox label::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color, #16395e);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.18s ease, border-color 0.18s ease;
}

/* Nascondi checkbox nativo ma mantieni accessibilità */
.comtem-pill-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Stato: selezionato */
.comtem-pill-group input[type="checkbox"]:checked+label {
    background: var(--primary-color, #16395e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(22, 57, 94, 0.25);
}

.comtem-pill-group input[type="checkbox"]:checked+label::before {
    background: #fff;
    border-color: #fff;
    /* checkmark via clip-path */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%2316395e' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* Hover su non-selezionato */
.comtem-pill-group .form-type-checkbox label:hover {
    background: rgba(22, 57, 94, 0.06);
    box-shadow: 0 1px 4px rgba(22, 57, 94, 0.12);
}

/* Focus accessibile */
.comtem-pill-group input[type="checkbox"]:focus-visible+label {
    outline: 3px solid #64b5f6;
    outline-offset: 2px;
}

/* Campo solo selezione singola (se solo 1 opzione): nascondi checkbox, mostra come badge statico */
.comtem-pill-group--single .form-type-checkbox label {
    background: var(--primary-color, #16395e);
    color: #fff;
    border-color: var(--primary-color, #16395e);
    cursor: default;
    pointer-events: none;
}

.comtem-pill-group--single .form-type-checkbox label::before {
    display: none;
}

/* =========================================
   NOTIFICATIONS BELL
   ========================================= */

.notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   NOTIFICATIONS INBOX
   ========================================= */

.notifications-inbox__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notifications-inbox__item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.15s;
}

.notifications-inbox__item:last-child {
    border-bottom: none;
}

.notifications-inbox__item.is-unread {
    background: #f0f4ff;
    border-left: 3px solid #16395e;
    padding-left: 0.75rem;
    border-radius: 0 4px 4px 0;
}

.notifications-inbox__item .notification-title {
    text-decoration: none;
}

.notifications-inbox__item .notification-title:hover {
    text-decoration: underline;
}

.italiagov-notifications-form fieldset legend,
.italiagov-notifications-form .description {
    padding: 0 !important;
    font-size: 1rem !important;
}

.italiagov-notifications-form #edit-actions {
    margin-top: 1rem !important;
}

.italiagov-notifications-form .form-check {
    margin-bottom: 1rem !important;
}

#edit-frequency--wrapper {
    margin-top: 1rem;
}

/* =========================================
   NOTIFICATIONS – TABS
   ========================================= */

.notifications-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.notifications-tabs .nav-link {
    color: #495057;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0;
    transition: color 0.15s, border-color 0.15s;
}

.notifications-tabs .nav-link:hover {
    color: #16395e;
    border-bottom-color: #adb5bd;
}

.notifications-tabs .nav-link.active {
    color: #16395e;
    border-bottom: 2px solid #16395e;
    background: transparent;
}

/* =========================================
   NOTIFICATIONS – TOOLBAR (SEARCH + SORT)
   ========================================= */

.notifications-toolbar {
    margin-bottom: 1rem;
}

.notifications-search-group {
    max-width: 420px;
    flex: 1 1 260px;
}

.notifications-search-group .input-group-text {
    border-right: none;
}

.notifications-search-group .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.notifications-sort-select {
    width: auto;
    min-width: 160px;
    flex-shrink: 0;
}

/* =========================================
   NOTIFICATIONS – LIST HEADER
   ========================================= */

.notifications-list-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* =========================================
   NOTIFICATIONS – BULK ACTIONS BAR
   ========================================= */

.notifications-bulk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    animation: bulkBarIn 0.15s ease;
}

@keyframes bulkBarIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-bulk-bar .bulk-bar__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

/* =========================================
   NOTIFICATIONS – ACTION ICONS
   ========================================= */

.notification-actions {
    opacity: 0.5;
    transition: opacity 0.15s;
}

.notifications-inbox__item:hover .notification-actions {
    opacity: 1;
}

.notification-actions .btn-link {
    line-height: 1;
    font-size: 1rem;
}

.notification-actions .btn-link:hover i.bi-trash,
.notification-actions .btn-link:hover i.bi-trash-fill {
    color: #dc3545 !important;
}

.notification-actions .btn-link:hover i.bi-arrow-counterclockwise {
    color: #198754 !important;
}

/* =========================================
   NOTIFICATIONS – TRASH ITEMS
   ========================================= */

.notifications-trash__item {
    opacity: 0.8;
}

.notifications-trash__item .notification-title {
    text-decoration: line-through;
    text-decoration-color: #adb5bd;
}

.notifications-trash-notice {
    font-size: 0.875rem;
    border-radius: 6px;
}

/* =========================================
   NOTIFICATIONS – PAGINATION
   ========================================= */

.notifications-inbox .pagination {
    gap: 0.25rem;
}

.notifications-inbox .page-link {
    border-radius: 4px !important;
    min-width: 2.25rem;
    text-align: center;
    color: #16395e;
    border-color: #dee2e6;
    transition: background 0.15s, color 0.15s;
}

.notifications-inbox .page-item.active .page-link {
    background-color: #16395e;
    border-color: #16395e;
    color: #fff;
}

.notifications-inbox .page-item.disabled .page-link {
    color: #adb5bd;
}

.notifications-inbox .page-link:hover:not(.disabled) {
    background-color: #f0f4ff;
    color: #16395e;
}

.notifications-trash-notice {
    background-size: 30px !important;
    background-position: 1rem !important;
}

.dropdown-divider {
    border-top: 1px solid #f5f5f5 !important;
    margin: 0 !important;
}

.user-access .dropdown-item:hover {
    background-color: #f5f5f5 !important;
}

.user-access .dropdown-item:nth-child(1):hover {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

#edit-field-e-visibility-info .badge,
#edit-field-n-visibility-info .badge {
    --bs-badge-color: #000 !important
}