:root {
    --primary-color: #DC2626;
    --secondary-color: #B91C1C;
    --accent-color: #FFC107;
    --accent-light: #FFD54F;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --success-color: #10b981;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    position: relative;
}

/* Immagine di sfondo - solo desktop */
body::before {
    content: '';
    position: fixed;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('https://aitsamvenetoorientale.it/immagini/bg.gif');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}

/* Nascondi sfondo su tablet e mobile */
@media (max-width: 1024px) {
    body::before {
        display: none;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation - FISSO IN ALTO */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1.2rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(220, 38, 38, 0.05);
}

.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(220, 38, 38, 0.1);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero con Logo */
.hero-logo-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero-logo-wrapper {
    max-width: 100%;
}

.hero-logo {
    max-width: 600px;
    width: 90%;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-tagline {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Banner Progetto Top */
.banner-progetto-top {
    background: #ffffff;
    padding: 3rem 0;
}

.banner-progetto-wrapper {
	
    max-width: 500px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.banner-progetto-wrapper a {
    display: block;
    position: relative;
    text-decoration: none;
    transition: transform 0.3s;
}

.banner-progetto-wrapper a:hover {
    transform: scale(1.02);
}

.banner-progetto-wrapper img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.banner-progetto-wrapper .banner-overlay-link {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(220, 38, 38, 0.95) 0%, rgba(220, 38, 38, 0.7) 100%);
    padding: 1.5rem;
    text-align: center;
}

.banner-progetto-wrapper .banner-overlay-link span {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--secondary-color);
}

/* Sections */
.section {
    padding: 5rem 0;
    background: rgba(255, 255, 255, 0.7);
    position: relative;
}

.section-gray {
    background: rgba(243, 244, 246, 0.8);
}

.section-dark {
    background: rgba(31, 41, 55, 0.8);
    color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.section-dark .section-title {
    color: var(--accent-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.intro-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

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

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

/* History Blocks */
.history-block {
    margin-bottom: 4rem;
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.history-block.highlight {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 2px solid var(--accent-color);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.history-icon {
    font-size: 2.5rem;
}

.history-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.history-content.reverse {
    direction: rtl;
}

.history-content.reverse > * {
    direction: ltr;
}

.history-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 100%;
}

.history-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.history-text {
    line-height: 1.8;
}

.history-text p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.history-text ul {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}

.history-text li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

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

.history-text-only {
    line-height: 1.8;
}

.history-text-only p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--accent-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Projects - CSRP */
.project-csrp {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    border-left: 6px solid var(--accent-color);
}

.project-header h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.project-description {
    line-height: 1.8;
}

.project-description > p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-sections {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.project-section {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.project-section h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.project-section p {
    color: var(--text-dark);
    line-height: 1.7;
}

.project-conclusion {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-radius: 8px;
    font-weight: 500;
}

.projects-other {
    margin-top: 4rem;
}

.subsection-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Statuto */
.statuto-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.statuto-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.statuto-download {
    margin-top: 2rem;
}

/* Adempimenti */
.adempimenti-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.adempimenti-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.adempimenti-download {
    margin-top: 2rem;
}

/* CF 5x1000 */
.cf-5x1000 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Banner Regione Veneto */
.banner-regione {
    background: var(--bg-light);
    padding: 3rem 0;
    text-align: center;
}

.banner-regione h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.banner-regione p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.loghi-regione {
    max-width: 900px;
    margin: 0 auto;
}

.loghi-row-1,
.loghi-row-2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.logo-placeholder {
    width: 150px;
    height: 100px;
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-highlight.reverse {
    direction: rtl;
}

.project-highlight.reverse > * {
    direction: ltr;
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.placeholder-image {
    width: 100%;
    max-width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: var(--shadow);
}

/* Sedi */
.sede-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.sede-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--accent-color);
}

.sede-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary-color);
}

.sede-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.sede-card p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.sede-card strong {
    color: var(--text-dark);
}

.sede-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--bg-gray);
    color: var(--text-light);
    font-style: italic;
}

.residenze-info {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(255, 193, 7, 0.05) 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.residenze-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.residenze-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.residenze-banner {
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 100%;
}

.residenze-banner a {
    display: block;
    position: relative;
    text-decoration: none;
    transition: transform 0.3s;
}

.residenze-banner a:hover {
    transform: scale(1.02);
}

.residenze-banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.banner-overlay-link {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(220, 38, 38, 0.9) 0%, transparent 100%);
    padding: 1rem;
    text-align: center;
}

.banner-overlay-link span {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Contacts */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.contact-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.contact-item p {
    margin: 0;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent-color);
}

.contact-map {
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    max-width: 100%;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    max-width: 100%;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
    
    .hero-logo {
        max-width: 500px;
    }
    
    .hero-tagline {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .logo-img {
        height: 50px;
        max-width: 200px;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        display: none;
        gap: 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 0.75rem 1rem;
        border-radius: 0;
    }
    
    .hero-logo-section {
        padding: 3rem 0 2rem;
    }
    
    .hero-logo {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .banner-progetto-top {
        padding: 2rem 0;
    }
    
    .banner-progetto-wrapper .banner-overlay-link {
        padding: 1rem;
    }
    
    .banner-progetto-wrapper .banner-overlay-link span {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .history-content,
    .history-content.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .history-image {
        max-width: 100%;
    }
    
    .history-image img {
        width: 100%;
        max-width: 100%;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .project-highlight,
    .contact-grid,
    .sede-grid {
        grid-template-columns: 1fr;
    }
    
    .project-highlight.reverse {
        direction: ltr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .history-block {
        padding: 1.5rem;
    }
    
    .project-csrp {
        padding: 1.5rem;
    }
    
    .project-header h3 {
        font-size: 1.5rem;
    }
    
    .loghi-row-1,
    .loghi-row-2 {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .logo-placeholder {
        width: 120px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        padding: 1rem;
        max-width: 95%;
    }
    
    .hero-tagline {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .banner-progetto-wrapper .banner-overlay-link span {
        font-size: 0.9rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .history-block {
        padding: 1.25rem;
    }
    
    .history-header h3 {
        font-size: 1.4rem;
    }
    
    .history-image img {
        width: 100%;
        max-width: 100%;
    }
}