/* ===========================
   VARIABILI CSS E RESET
   =========================== */
:root {
    --primary-blue: #0066B3;
    --primary-orange: #FF8C00;
    --dark-blue: #004080;
    --light-blue: #E6F2FF;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   HEADER E NAVBAR
   =========================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

/* Il container dell'header è full-width per dare spazio alla navbar */
.header .container {
    max-width: 100%;
    padding: 0 30px;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    position: relative;
    gap: 20px;
}

.logo img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

/* Menu Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-item {
    position: relative;
    white-space: nowrap;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 13px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-item > a:hover {
    color: var(--primary-blue);
    background-color: var(--light-blue);
}

.nav-item.active > a {
    color: var(--primary-orange);
    font-weight: 600;
}

.dropdown-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 240px;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 24px;
    color: var(--primary-blue);
    font-size: 14px;
    transition: var(--transition);
    border-left: 3px solid transparent;
	font-weight:600;
}

.dropdown-menu a:hover {
    background-color: var(--light-blue);
    color: var(--primary-orange);
    border-left-color: var(--primary-blue);
    padding-left: 28px;
}

/* Menu Toggle per Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================
   PULSANTE DONA
   =========================== */
.donate-btn-wrapper {
    margin-left: 0;
    flex-shrink: 0;
}

.btn-donate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--primary-orange), #FF6B00);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-donate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-donate:hover::before {
    left: 100%;
}

.btn-donate:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 140, 0, 0.5);
}

.btn-donate:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-donate i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.1); }
    20% { transform: scale(1); }
    30% { transform: scale(1.1); }
    40% { transform: scale(1); }
}

/* ===========================
   MAIN CONTENT
   =========================== */
.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 20px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-orange);
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section ul li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-section ul li a {
    opacity: 0.9;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-section ul li i {
    margin-right: 10px;
    color: var(--primary-orange);
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-orange);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--primary-orange);
    margin-left: 15px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* Tablet */
@media (max-width: 1200px) {
    .nav-item > a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .btn-donate {
        padding: 9px 16px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        gap: 0;
    }

    .nav-item > a {
        padding: 8px 8px;
        font-size: 13px;
    }

    .btn-donate {
        padding: 8px 14px;
        font-size: 13px;
        gap: 6px;
    }

    .logo img {
        height: 42px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 30px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--gray-border);
    }
    
    .nav-item > a {
        width: 100%;
        padding: 15px 0;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: var(--gray-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0;
        margin-top: 0;
    }
    
    .has-dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 10px 0;
    }
    
    .has-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }
    
    .dropdown-menu a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .donate-btn-wrapper {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
        margin: 0;
    }
    
    .btn-donate {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        box-shadow: 0 4px 20px rgba(255, 140, 0, 0.4);
    }
    
    .btn-donate span {
        display: none;
    }
    
    .btn-donate i {
        font-size: 24px;
        margin: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Overlay per il menu mobile */
.nav-menu.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

/* Animazioni di ingresso */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.mwidth-300 {
	min-width:300px;
}

