:root {
    --primary-color: #FFA500; /* Orange */
    --secondary-color: #FFC0CB; /* Pink */
    --accent-color: #FFD700; /* Yellow */
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --background-light: #FFF8E7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--background-light);
    color: var(--text-dark);
    font-size: 16px; /* Reverted font size */
    line-height: 1.6;
}

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

header {
    background: rgba(51, 51, 51, 0.9); /* Darker, semi-transparent background */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 15px 0;
    text-align: center;
    position: fixed; /* Make header sticky */
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensure it stays on top */
    transition: background 0.3s ease;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

header nav ul li a {
    color: var(--text-light); /* Light text for contrast */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s, border-bottom 0.3s;
    position: relative;
}

header nav ul li a:hover {
    color: var(--primary-color);
}

header nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

main {
    padding-top: 80px; /* Adjust based on header height */
    padding-bottom: 40px;
}

/* Hamburger menu styles */
.menu-toggle {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-light); /* Hamburger lines color */
    transition: all 0.3s ease-in-out;
}

/* Hamburger menu animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive navigation */
@media (max-width: 768px) {
    header nav ul {
        display: none; /* Hide nav by default on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        background: rgba(51, 51, 51, 0.95); /* Slightly darker background when open */
        border-top: 1px solid rgba(255,255,255,0.1);
        padding: 20px 0;
    }

    header nav ul.active {
        display: flex; /* Show nav when active */
    }

    header nav ul li {
        margin: 10px 0;
    }

    header nav ul li a {
        font-size: 1.2em;
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex; /* Show hamburger menu on mobile */
    }

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

    header nav {
        width: 100%;
    }
}

.hero {
    text-align: center;
    padding-bottom: 40px;
}

section {
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: relative;
}

#home {
    border-bottom: none;
}

#summersunsetfestival {
    background-image: 
        linear-gradient(to bottom, rgba(40, 40, 40, 1), rgba(40, 40, 40, 0.6) 20%, rgba(40, 40, 40, 0.6) 80%, rgba(40, 40, 40, 1)),
        url('../refs/laistorresfotografia-6.jpg');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 100px 0;
}

section:last-of-type {
    border-bottom: none;
}

section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2em; /* Slightly increased */
    margin-bottom: 20px;
    color: #555; /* Lightened black */
}

#summersunsetfestival h2 {
    color: var(--text-light);
}

.hero-countdown {
    margin-top: 40px;
}

.hero-countdown h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-countdown #countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.2em;
    color: var(--text-light);
}

.hero-countdown .countdown-item {
    background: rgba(0,0,0,0.25);
    padding: 15px 20px;
    border-radius: 8px;
    min-width: 90px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.countdown-item span:first-child {
    font-size: 2.8em;
    font-weight: 600;
    line-height: 1.1;
}

/* 3D Carousel Styles */
.carousel-container {
    position: relative;
    width: 550px; /* Adjusted size */
    margin: 50px auto 50px;
    perspective: 1600px; /* Increased perspective for less inclination */
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 340px; /* Adjusted size */
    transform-style: preserve-3d;
    transition: transform 1s;
}

.carousel-slide {
    position: absolute;
    width: 530px; /* Adjusted size */
    height: 320px; /* Adjusted size */
    top: 10px;
    left: 10px;
    backface-visibility: hidden;
    border: 2px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 5em;
    cursor: pointer;
    color: #333;
    text-shadow: none;
    z-index: 10;
    transition: color 0.3s;
}

.carousel-button:hover {
    color: var(--primary-color);
}

.prev-button {
    left: -450px; /* Adjusted button position */
}

.next-button {
    right: -450px; /* Adjusted button position */
}


#playlist {
    background-color: var(--text-light);
}

#fotos {
    padding-top: 0;
}

#map {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#map iframe {
    width: 100%;
    height: 450px;
    border: none;
}

#rsvp {
    padding: 20px 0;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.button:hover {
    background-color: #d68c00;
}

.decorative-wave {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    z-index: -1;
}

.decorative-sunset {
    width: 100px;
    margin-top: 20px;
}

#rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 30px auto 0;
}

#rsvp-form input {
    padding: 12px;
    border-radius: 25px;
    border: 1px solid #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
}

#rsvp-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#confirmation-message {
    margin-top: 20px;
    font-weight: 600;
}

/* Invitation Stack */
.invitation-stack {
    display: grid;
    justify-content: center;
    margin: 50px auto;
    /* align-items: center; */ /* This might be needed */
}

.invitation-stack > * {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.invitation-card {
    width: 80vw;
    max-width: 1000px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.invitation-card:nth-of-type(1) {
    transform: rotate(0deg);
    z-index: 3;
}

.invitation-card:nth-of-type(2) {
    transform: rotate(-5deg) translate(-10px, -10px);
    z-index: 2;
}

.invitation-card:nth-of-type(3) {
    transform: rotate(5deg) translate(10px, 10px);
    z-index: 1;
}

.invitation-stack:hover .invitation-card:nth-of-type(1) {
    transform: rotate(2deg) translateY(-20px);
    z-index: 4;
}

.invitation-stack:hover .invitation-card:nth-of-type(2) {
    transform: rotate(-3deg) translate(-20px, 0px);
}

.invitation-stack:hover .invitation-card:nth-of-type(3) {
    transform: rotate(3deg) translate(20px, 20px);
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Site Footer */
.site-footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 80px 0 20px;
    position: relative;
    text-align: center;
    margin-top: 0;
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-99%);
    z-index: 5;
}

.footer-wave img {
    width: 100%;
    display: block;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
    position: relative;
    z-index: 6;
}

.site-footer h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-social .social-icons a {
    color: var(--text-light);
    font-size: 1.8em;
    margin: 0 10px;
    transition: color 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 6;
}