/* ===================================
   Accademia Digitale Italiana - CSS
   =================================== */

/* === Importazione Font Poppins === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* === Reset e Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #28a745;
    --primary-hover: #218838;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-color: #333333;
    --gray-text: #6c757d;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

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

/* === Header === */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--dark-color);
    font-weight: 400;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* === Hero Section === */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 400;
    font-size: 1rem;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* === Sections === */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--gray-text);
    font-size: 1.1rem;
}

/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

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

.card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.card p {
    color: var(--gray-text);
    margin-bottom: 0;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* === About Section === */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* === Statistics === */
.stats {
    background-color: var(--light-bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--gray-text);
}

/* === CTA Section === */
.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* === Team Grid === */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.team-member h3 {
    margin-bottom: 0.5rem;
}

.team-member .role {
    color: var(--primary-color);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

/* === Blog Grid === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.blog-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

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

.blog-meta {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-card h3 {
    margin-bottom: 1rem;
}

.blog-card p {
    color: var(--gray-text);
    margin-bottom: 1rem;
}

/* === Article Page === */
.article-hero {
    height: 400px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 20px;
}

.article-meta {
    color: var(--gray-text);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content img {
    margin: 2rem 0;
    border-radius: var(--border-radius);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gray-text);
}

/* === Contact Form === */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.2rem;
}

.contact-form {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* === Map === */
.map-container {
    margin-top: 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* === FAQ === */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-question {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.faq-answer {
    color: var(--gray-text);
}

/* === Legal Pages === */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 20px;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* === Footer === */
footer {
    background-color: var(--dark-color);
    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 h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* === Cookie Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-color);
    color: var(--white);
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text a {
    color: var(--primary-color);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

/* === Disclaimer Banner === */
.disclaimer-banner {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.disclaimer-banner p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
}

.disclaimer-banner strong {
    color: #856404;
    font-weight: 600;
}

/* === Responsive Design === */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .header-content nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .header-content nav.active {
        left: 0;
    }

    .header-content nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

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

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    section {
        padding: 50px 0;
    }

    .hero {
        height: 500px;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

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

    .card-grid,
    .blog-grid,
    .team-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-buttons .btn {
        width: 100%;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .card {
        padding: 1.5rem;
    }
}
