/* Reset e base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #5A5A5A;
    background-color: #fefefe;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Dancing Script', cursive;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    color: #5B8AAE;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.8rem;
    color: #5B8AAE;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #B8D4E3, #E8F4F8);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    text-align: center;
    padding: 2rem;
}

.couple-names {
    color: #5B8AAE;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.wedding-date {
    font-size: 1.5rem;
    color: #5A5A5A;
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.wedding-location {
    font-size: 1.2rem;
    color: #5A5A5A;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.image-placeholder {
    width: 300px;
    height: 400px;
    background: #DDD;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 1.2rem;
    color: #666;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.countdown-item {
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 80px;
}

.countdown-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #5B8AAE;
    font-family: 'Dancing Script', cursive;
}

.countdown-label {
    font-size: 0.9rem;
    color: #5A5A5A;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.main-nav {
    background: rgba(91, 138, 174, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem 0;
}

.main-nav li {
    margin: 0 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: #B8D4E3;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #B8D4E3;
    transition: all 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
    left: 0;
}

/* Sections */
section {
    padding: 4rem 0;
}

.story-section {
    background: #F8FBFC;
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.story-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.story-timeline {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.timeline-item {
    padding: 1rem 0;
    border-left: 3px solid #7BA7C7;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7BA7C7;
}

.timeline-item h4 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #5A5A5A;
}

.timeline-item span {
    color: #5A5A5A;
    font-size: 0.9rem;
}

/* Event Section */
.event-section {
    background: linear-gradient(135deg, #B8D4E3, #E8F4F8);
}

.event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.event-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.event-item:hover {
    transform: translateY(-5px);
}

.event-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.event-item h3 {
    color: #5B8AAE;
    margin-bottom: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.event-item p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.map-link {
    color: #5B8AAE;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid #5B8AAE;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.map-link:hover {
    background: #5B8AAE;
    color: white;
}

/* RSVP Section */
.rsvp-section {
    background: #F8FBFC;
}

.rsvp-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #5A5A5A;
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #5A5A5A;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7BA7C7;
}

.submit-btn {
    width: 100%;
    background: #7BA7C7;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #5B8AAE;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(123, 167, 199, 0.3);
}

/* Info Section */
.info-section {
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-item {
    background: #B8D4E3;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.info-item h3 {
    font-family: 'Open Sans', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-item p {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #5B8AAE;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
}

.close:hover {
    color: #7BA7C7;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content,
    .hero-image {
        flex: none;
        width: 100%;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .countdown {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .countdown-item {
        min-width: 60px;
        padding: 0.8rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav li {
        margin: 0;
    }

    .story-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .event-details {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 2rem 0;
    }

    .rsvp-form {
        padding: 1.5rem;
    }

    .image-placeholder {
        width: 250px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .wedding-date {
        font-size: 1.2rem;
    }

    .wedding-location {
        font-size: 1rem;
    }

    .countdown-number {
        font-size: 1.2rem;
    }

    .event-item,
    .info-item {
        padding: 1.5rem;
    }

    .rsvp-form {
        padding: 1rem;
    }

    .modal-content {
        margin: 25% auto;
        padding: 1.5rem;
    }
}

/* Media query specifica per smartphone - Navbar e Countdown migliorati */
@media (max-width: 576px) {
    /* Navbar in linea per smartphone */
    .main-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.8rem 0;
        gap: 0.5rem;
    }

    .main-nav li {
        margin: 0 0.3rem;
    }

    .main-nav a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
        border-radius: 15px;
        transition: all 0.3s ease;
    }

    .main-nav a:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    /* Countdown ottimizzato per smartphone - sempre in linea */
    .countdown {
        display: flex;
        justify-content: center;
        gap: 0.8rem;
        margin-top: 1.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 1rem;
    }

    .countdown-item {
        text-align: center;
        background: white;
        padding: 0.6rem 0.4rem;
        border-radius: 8px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        min-width: 65px;
        flex-shrink: 0;
    }

    .countdown-number {
        font-size: 1.3rem;
        font-weight: bold;
        color: #5B8AAE;
    }

    .countdown-label {
        font-size: 0.7rem;
        color: #5A5A5A;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Hero section ottimizzato */
    .hero-content {
        padding: 1.5rem 1rem;
    }

    /* Container con padding ridotto per smartphone */
    .container {
        padding: 0 0.8rem;
    }

    /* Miglioramenti generali per smartphone */
    section {
        padding: 1.5rem 0;
    }

    .image-placeholder {
        width: 200px;
        height: 250px;
    }
}
