:root {
    --color-primary: #1a5d1a;
    /* Verde speranza */
    --color-primary-dark: #144a14;
    --color-secondary: #d93025;
    /* Rosso urgenza */
    --color-secondary-dark: #b5261d;
    --color-text: #202124;
    --color-text-light: #5f6368;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-white: #ffffff;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --container-width: 1200px;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--color-secondary-dark);
}

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

.btn-secondary:hover {
    background-color: var(--color-primary-dark);
}

.btn-outline {
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-text);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-text .highlight {
    color: var(--color-primary);
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.main-nav a:not(.btn) {
    font-weight: 500;
}

.main-nav a:not(.btn):hover {
    color: var(--color-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    position: relative;
    background-color: #2c3e50;
    /* Fallback */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?auto=format&fit=crop&q=80&w=1600');
    /* Placeholder image */
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding: 8rem 0;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-tag {
    display: inline-block;
    background-color: var(--color-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Sections Generic */
section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* Cards */
.card {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

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

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.img-placeholder {
    background-color: #ddd;
    height: 400px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: 600;
}

.check-list li {
    margin-bottom: var(--spacing-sm);
    padding-left: 1.5rem;
    position: relative;
}

.check-list li::before {
    content: '✓';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Donate Section */
.section-donate {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.donate-card {
    background-color: var(--color-white);
    color: var(--color-text);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.donation-options {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
}

.donation-amount {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    background: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
}

.donation-amount.selected,
.donation-amount:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    background-color: #fff0f0;
}

.donation-custom {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    min-width: 120px;
}

.secure-note {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: var(--spacing-md);
}

/* Footer */
.site-footer {
    background-color: #202124;
    color: #fff;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-col h4 {
    margin-bottom: var(--spacing-md);
    color: var(--color-bg-light);
}

.footer-col p {
    color: #aaa;
    margin-bottom: var(--spacing-sm);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    color: #fff;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: var(--spacing-md);
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        padding: var(--spacing-md);
        box-shadow: var(--shadow);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }

    .main-nav .btn {
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .split-image {
        order: -1;
    }
}

/* IBAN Section */
.section-iban {
    background-color: var(--color-bg-light);
    padding: var(--spacing-xl) 0;
}

.iban-card {
    background: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    border-left: 5px solid var(--color-primary);
}

.iban-box {
    background-color: #f0f7f0;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
    text-align: left;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--spacing-sm);
    align-items: center;
}

.iban-label {
    font-weight: 600;
    color: var(--color-text-light);
}

.iban-value {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--color-text);
}

.tax-note {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
}

@media (max-width: 600px) {
    .iban-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .iban-label {
        margin-top: var(--spacing-sm);
    }
}

/* Page Headers */
.page-header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Sections */
.section-content {
    padding: var(--spacing-xl) 0;
}

.text-block {
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.text-block h2 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-bg-light);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.team-member {
    background: var(--color-bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
}

.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.team-member .role {
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.activity-item {
    display: flex;
    gap: var(--spacing-md);
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid #eee;
}

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

.activity-text h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
}

/* Documents */
.documents-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.doc-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    font-weight: 600;
    border: 1px solid #ddd;
}

.doc-link:hover {
    background: #fff;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
}

.info-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.info-item .icon {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.contact-form-wrapper {
    background: var(--color-bg-light);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 93, 26, 0.1);
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .activity-item {
        flex-direction: column;
    }
}

/* 
   -----------------------------------------
   BLOG STYLES (ADDED)
   -----------------------------------------
*/
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.blog-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}
.blog-card:hover {
    transform: translateY(-5px);
}
.blog-content {
    padding: 1.5rem;
}
.blog-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: block;
}
.blog-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.blog-excerpt {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.post-header {
    margin-bottom: 2rem;
    text-align: center;
}
.post-meta {
    color: #666;
    margin-bottom: 2rem;
}
.post-body {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* 
   -----------------------------------------
   MODAL & ALERTS & FORMS (NEW)
   -----------------------------------------
*/

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Checkbox Custom */
.checkbox-group {
    margin: 1.5rem 0;
}
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    color: var(--color-primary);
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 4px;
    transition: all 0.2s;
}
.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-secondary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Hidden Field Animation */
.hidden {
    display: none;
}
#donation_amount_group {
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 2rem;
    border: 1px solid #888;
    width: 90%; 
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-header h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}
.modal-body p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.live-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2100;
}

.live-chat-button {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.1rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.live-chat-button:hover {
    background: var(--color-primary-dark);
}

.live-chat-panel {
    width: 320px;
    max-width: calc(100vw - 40px);
    background: var(--color-white);
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: absolute;
    right: 0;
    bottom: 60px;
    display: none;
}

.live-chat-panel.open {
    display: block;
}

.live-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: var(--color-primary);
    color: var(--color-white);
}

.live-chat-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

.live-chat-close {
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.live-chat-body {
    padding: 1rem;
}

.live-chat-alert {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.live-chat-alert-success {
    background: rgba(26, 93, 26, 0.12);
    color: var(--color-primary-dark);
}

.live-chat-alert-error {
    background: rgba(217, 48, 37, 0.12);
    color: var(--color-secondary-dark);
}

.live-chat-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.live-chat-field label {
    font-weight: 600;
    color: var(--color-text);
}

.live-chat-field input,
.live-chat-field textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-family: var(--font-body);
}

.live-chat-submit {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: var(--color-secondary);
    color: var(--color-white);
    font-weight: 700;
    cursor: pointer;
}

.live-chat-submit:hover {
    background: var(--color-secondary-dark);
}
