/* Global Styles */
:root {
    --primary-color: #8e735b;
    /* Bronze/Brown */
    --secondary-color: #f9f7f2;
    /* Off-white */
    --dark-bg: #2c2926;
    --text-color: #4a4a4a;
    --accent-color: #d4af37;
    /* Gold */
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.8;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    margin: 0 0 20px 0;
    font-weight: 400;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto 30px auto;
}

.divider-gold {
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 0 auto 30px auto;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: background 0.3s, padding 0.3s;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    z-index: 1001;
    /* Ensure logo is above mobile menu */
    white-space: nowrap;
}

nav.scrolled .logo {
    color: var(--primary-color);
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav.scrolled .nav-links a {
    color: var(--text-color);
}

nav.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

.btn-rsvp-nav {
    border: 1px solid var(--white);
    padding: 8px 20px;
    border-radius: 30px;
}

nav.scrolled .btn-rsvp-nav {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
}

nav.scrolled .btn-rsvp-nav:hover {
    background: var(--primary-color);
    color: white !important;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    transition: all 0.3s ease;
}

nav.scrolled .hamburger span {
    background-color: var(--text-color);
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background-color: var(--text-color);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background-color: var(--text-color);
}

/* Hero Section */
.hero {
    /* Using one of the new images likely better suited for background */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('IMG_6316.jpg') no-repeat center center scroll;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.btn-hero {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

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

/* Utility */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Sections */
section {
    padding: 100px 0;
}

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

.section-dark {
    background: var(--dark-bg);
    color: #f0f0f0;
}

.section-dark h2 {
    color: var(--accent-color);
}

/* Gli Sposi */
.intro-text {
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 1.2rem;
    color: #666;
}

.couple-names-large {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-top: 30px;
    display: flex;
    flex-direction: column !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.couple-names-large span {
    display: block;
    width: 100%;
    text-align: center;
}

.amp {
    font-style: italic;
    color: var(--accent-color);
    font-size: 3rem;
}

/* Location */
.location-name {
    font-size: 2rem;
    margin: 0;
}

.location-address {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 40px;
}

.location-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

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

.map-wrapper {
    height: 400px;
    width: 100%;
    margin-top: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
}

iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* RSVP Section */
.section-rsvp {
    background: url('sfondo.jpg') center center fixed;
    /* Using the old background for this section */
    background-size: cover;
    padding: 100px 0;
}

.rsvp-card {
    background: white;
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Forms */
.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    text-align: left;
}

.form-group.half {
    width: 50%;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

input.text-center {
    text-align: center;
}

/* Radio Pills */
.radio-group-center {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.radio-pill {
    position: relative;
    cursor: pointer;
}

.radio-pill input {
    display: none;
}

.radio-pill span {
    display: block;
    padding: 10px 25px;
    border: 1px solid #ddd;
    border-radius: 30px;
    transition: all 0.3s;
    font-weight: bold;
    color: #777;
}

.radio-pill input:checked+span {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

button.btn-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 20px;
    transition: background 0.3s;
    width: 100%;
}

button.btn-submit:hover {
    background: #705b46;
}

/* Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.5s;
}

.delay-2 {
    animation-delay: 1s;
}

.delay-3 {
    animation-delay: 1.5s;
}

.delay-4 {
    animation-delay: 2s;
}

.deadline-hero {
    font-size: 1.2rem !important;
    /* Smaller than main hero text */
    margin-top: -15px;
    font-style: italic;
    opacity: 0.9;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hamburger {
        display: block;
        z-index: 2000;
    }

    .hamburger.active span {
        background-color: var(--text-color);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding-top: 100px;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--text-color);
        font-size: 1.5rem;
        display: block;
        margin: 20px 0;
    }

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

    .btn-rsvp-nav {
        border-color: var(--primary-color);
        color: var(--primary-color);
        display: inline-block;
        margin-top: 20px;
    }

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

    .location-gallery {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group.half {
        width: 100%;
    }

    .couple-names-large {
        flex-direction: column;
        gap: 5px;
    }

    .amp {
        display: none;
    }
}

/* Gli Sposi Layout */
.sposi-layout {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.sposi-img {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.sposi-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Adjust height if necessary or keep auto */
}

.sposi-text {
    flex: 1;
    padding: 20px;
}

/* Responsive adjustment for Sposi layout */
@media (max-width: 768px) {
    .sposi-layout {
        flex-direction: column;
        gap: 30px;
    }

    .sposi-img {
        width: 100%;
        max-width: 400px;
        /* Limit image size on mobile */
        margin: 0 auto;
    }
}

/* Gift / IBAN Section */
.iban-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--primary-color);
    margin-top: 20px;
}

.iban-number {
    font-family: monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 10px 0;
    font-weight: bold;
    letter-spacing: 1px;
}

.btn-copy {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

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

@media (max-width: 600px) {
    .iban-number {
        font-size: 1.1rem;
        word-break: break-all;
    }
}