/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #009246 0%, #ffffff 50%, #ce2b37 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.flag-animation {
    margin-bottom: 2rem;
}

.italian-flag {
    display: block;
    margin: 0 auto 1rem auto;
    animation: flagWave 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: all 0.3s ease;
}

.italian-flag:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

.italian-flag svg {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.main-title {
    margin-bottom: 2rem;
}

.ciao {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8), 1px 1px 2px rgba(0,0,0,0.6);
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.ciao:hover {
    transform: translateY(-3px);
    text-shadow: 4px 4px 8px rgba(0,0,0,0.9), 2px 2px 4px rgba(0,0,0,0.7);
}

.subtitle {
    font-size: 1.8rem;
    color: #fff;
    font-weight: 300;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8), 1px 1px 2px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.subtitle:hover {
    transform: translateY(-2px);
    text-shadow: 4px 4px 8px rgba(0,0,0,0.9), 2px 2px 4px rgba(0,0,0,0.7);
}

.teacher-intro {
    margin-bottom: 3rem;
}

.teacher-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.teacher-avatar:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.teacher-avatar:hover img {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.teacher-name {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.teacher-name:hover {
    transform: translateY(-2px);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}

.teacher-desc {
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.teacher-desc:hover {
    transform: translateY(-2px);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}

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

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.btn-primary {
    background: #ce2b37;
    color: white;
    box-shadow: 0 4px 15px rgba(206, 43, 55, 0.3);
}

.btn-primary:hover {
    background: #a0222c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(206, 43, 55, 0.4);
}

.btn-secondary {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-secondary:hover {
    background: #1ea952;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-video {
    background: #ffd700;
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-video:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.coffee {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.book {
    top: 30%;
    right: 15%;
    animation-delay: 1.5s;
}

.smile {
    top: 60%;
    left: 20%;
    animation-delay: 3s;
}

.vespa {
    top: 70%;
    right: 10%;
    animation-delay: 4.5s;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.feature-card i {
    font-size: 3rem;
    color: #ce2b37;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #009246, #ce2b37);
    color: white;
}

.quiz-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.quiz-question h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 15px 20px;
    background: rgba(255,255,255,0.2);
    border: 2px solid transparent;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: rgba(255,255,255,0.3);
    border-color: white;
}

.quiz-option.correct {
    background: #25D366;
    border-color: #25D366;
}

.quiz-option.incorrect {
    background: #e74c3c;
    border-color: #e74c3c;
}

.quiz-result {
    text-align: center;
}

.result-content i {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.result-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

/* Word of the Day */
.word-of-day {
    padding: 80px 0;
    background: #fff;
}

.word-of-day h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.word-card {
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #009246, #ce2b37);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.word-italian {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.word-english {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.word-pronunciation {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.8;
}

/* Mini Game */
.mini-game {
    padding: 80px 0;
    background: #f8f9fa;
}

.mini-game h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.game-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.game-image {
    font-size: 5rem;
    margin-bottom: 2rem;
    color: #ce2b37;
}

.game-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-option {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-option:hover {
    background: #e9ecef;
    border-color: #ce2b37;
}

.game-option.correct {
    background: #d4edda;
    border-color: #25D366;
    color: #155724;
}

.game-option.incorrect {
    background: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.game-result {
    text-align: center;
}

.game-result h3 {
    font-size: 2rem;
    color: #25D366;
    margin-bottom: 1rem;
}

.game-result p {
    font-size: 1.2rem;
    color: #666;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #333;
    color: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #ce2b37;
}

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

.contact-item a:hover {
    color: #ce2b37;
}

.map-container {
    max-width: 800px;
    margin: 0 auto;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#map {
    width: 100%;
    height: 100%;
}

/* Special Offer */
.special-offer {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
}

.offer-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.offer-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.offer-card p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #666;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.countdown-item {
    text-align: center;
}

.countdown-item span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ce2b37;
}

.countdown-item label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.video-content {
    max-width: 800px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #ce2b37;
}

/* Booking Modal */
.booking-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem;
}

.booking-form-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.time-slot {
    padding: 10px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot:hover {
    background: #e9ecef;
    border-color: #ce2b37;
}

.time-slot.selected {
    background: #ce2b37;
    color: white;
    border-color: #ce2b37;
}

.custom-time-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-time-form input,
.custom-time-form textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #ffffff;
    color: #333;
}

.custom-time-form input[type="date"],
.custom-time-form input[type="time"] {
    position: relative;
    background-color: #ffffff;
    color: #333;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

/* Style the calendar/clock icon */
.custom-time-form input[type="date"]::-webkit-calendar-picker-indicator,
.custom-time-form input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: brightness(0) saturate(100%) invert(21%) sepia(80%) saturate(2468%) hue-rotate(343deg) brightness(90%) contrast(90%);
}

/* Mobile devices (iOS + Android) - Fix visibility on touch screens */
@media (hover: none) and (pointer: coarse) {
    /* Apply only on touch devices (mobile/tablet) */
    .custom-time-form input[type="date"],
    .custom-time-form input[type="time"] {
        -webkit-appearance: none;
        -moz-appearance: textfield;
        appearance: none;
    }
    
    /* iOS Safari specific */
    .custom-time-form input[type="date"]::-webkit-date-and-time-value,
    .custom-time-form input[type="time"]::-webkit-date-and-time-value {
        text-align: left;
        color: #333;
    }
    
    /* Android Chrome specific */
    .custom-time-form input[type="date"]::-webkit-inner-spin-button,
    .custom-time-form input[type="time"]::-webkit-inner-spin-button {
        display: none;
    }
}

.custom-time-form input:focus,
.custom-time-form textarea:focus {
    outline: none;
    border-color: #ce2b37;
}

.custom-time-form textarea {
    min-height: 100px;
    resize: vertical;
}

.selected-slot {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 2rem;
}

/* Video Modal */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-top: 1rem;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flagWave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(-8px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .italian-flag svg {
        width: 45px;
        height: 30px;
    }
    
    .ciao {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.6rem; /* Manteniamo una dimensione più grande */
    }
    
    .teacher-name {
        font-size: 1.6rem; /* Stessa dimensione del subtitle */
    }
    
    .teacher-desc {
        font-size: 1.6rem; /* Stessa dimensione del subtitle */
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .countdown {
        gap: 1rem;
    }
    
    .countdown-item span {
        font-size: 2rem;
    }
    
    .booking-form-container {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .italian-flag svg {
        width: 40px;
        height: 27px;
    }
    
    .ciao {
        font-size: 2.5rem;
    }
    
    .teacher-avatar {
        font-size: 4rem;
    }
    
    .features h2,
    .quiz-section h2,
    .word-of-day h2,
    .mini-game h2,
    .contact h2 {
        font-size: 2rem;
    }
    
    .word-italian {
        font-size: 2.5rem;
    }
    
    .game-image {
        font-size: 4rem;
    }
}

/* Media Query per schermi molto piccoli */
@media (max-width: 480px) {
    .ciao {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.4rem; /* Manteniamo proporzioni */
    }
    
    .teacher-name {
        font-size: 1.4rem; /* Stessa dimensione del subtitle */
    }
    
    .teacher-desc {
        font-size: 1.4rem; /* Stessa dimensione del subtitle */
    }
}
