/* ==========================================
   Scuola di Lingue Firenze - Main Stylesheet
   ========================================== */

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

:root {
    --primary-color: #28a745;
    --primary-dark: #218838;
    --secondary-color: #6c757d;
    --text-color: #212529;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

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

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

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

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

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

ul {
    list-style-position: inside;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
}

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

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

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

.section {
    padding: 60px 0;
}

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

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
}

.nav a {
    color: var(--text-color);
    font-weight: 400;
    padding: 8px 0;
    position: relative;
}

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

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

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

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    padding: 80px 0;
}

.hero-content {
    max-width: 700px;
    color: var(--white);
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

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

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

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

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

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* === Section Titles === */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* === Grid Layouts === */
.capabilities-grid,
.numbers-grid,
.features-grid,
.why-us-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* === Cards === */
.capability-card,
.feature-card,
.value-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.capability-card:hover,
.feature-card:hover,
.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.capability-icon,
.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.capability-card h3,
.feature-card h3,
.value-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* === Number Cards === */
.number-card {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}

.number-value {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.number-label {
    font-size: 1.1rem;
}

/* === Two Column Layout === */
.content-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.content-two-col.reverse {
    direction: rtl;
}

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

.content-text {
    font-size: 1.05rem;
}

.content-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* === Why Us === */
.why-us-card {
    padding: 30px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.why-us-card:hover {
    box-shadow: var(--shadow-hover);
}

.why-us-number {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.3;
    margin-bottom: 10px;
}

/* === CTA Section === */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 60px 0 40px;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

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

.blog-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-image {
    height: 250px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-date,
.blog-category {
    display: inline-block;
}

.blog-category {
    color: var(--primary-color);
    font-weight: 400;
}

/* === Article === */
.article-header {
    background: var(--bg-light);
    padding: 60px 0 40px;
}

.article-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.article-header h1 {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 20px;
}

.article-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--text-light);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.article-body h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-body ul,
.article-body ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-image {
    margin: 40px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-cta {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    margin: 40px 0;
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* === Contact === */
.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.contact-form-wrapper h2,
.contact-info-wrapper h2 {
    margin-bottom: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    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);
}

.contact-info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-details h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-details p {
    margin: 0;
}

.contact-cta {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

/* === Map === */
.map-container {
    margin: 40px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.directions-info {
    margin-top: 40px;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.direction-item {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
}

.direction-item h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* === Quick FAQ === */
.quick-faq .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.faq-item {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.faq-cta {
    text-align: center;
    margin-top: 40px;
}

/* === Services === */
.service-item {
    margin-bottom: 80px;
}

.service-item:last-child {
    margin-bottom: 0;
}

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

/* === Gallery === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* === Legal Pages === */
.legal-content {
    line-height: 1.8;
}

.legal-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.legal-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal-content ul,
.legal-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.legal-content li {
    margin-bottom: 10px;
}

.legal-update {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* === FAQ Page === */
.faq-category {
    margin-bottom: 60px;
}

.faq-category-title {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.faq-item-expanded {
    background: var(--white);
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.faq-item-expanded h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.faq-item-expanded ul,
.faq-item-expanded ol {
    margin-left: 30px;
    margin-top: 15px;
}

.faq-item-expanded li {
    margin-bottom: 8px;
}

.faq-cta-section {
    background: var(--bg-light);
    padding: 60px;
    border-radius: 15px;
    text-align: center;
    margin-top: 60px;
}

.faq-cta-section h2 {
    margin-bottom: 20px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* === Footer === */
.footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-tagline {
    color: #b0b0b0;
    font-style: italic;
}

.footer-section p {
    margin-bottom: 10px;
    color: #d0d0d0;
}

.footer-section a {
    color: #d0d0d0;
}

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

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #b0b0b0;
}

/* === Cookie Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    color: var(--white);
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    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: 30px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
}

.btn-accept {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 400;
    transition: var(--transition);
}

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

.btn-more {
    color: var(--white);
    padding: 10px 25px;
    border: 1px solid var(--white);
    border-radius: 5px;
    transition: var(--transition);
}

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

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

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero-title { font-size: 2.5rem; }
    
    .content-two-col {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .content-two-col.reverse {
        direction: ltr;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .capabilities-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav.active {
        max-height: 400px;
    }
    
    .nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .nav li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav a {
        display: block;
        padding: 15px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .capabilities-grid,
    .numbers-grid,
    .features-grid,
    .why-us-grid,
    .values-grid,
    .blog-grid,
    .gallery-grid,
    .directions-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-accept,
    .btn-more {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .hero {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .container,
    .container-article,
    .container-legal {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 12px 25px;
        font-size: 1rem;
    }
}