:root {
    --color-bg: #FDFCF8;
    --color-bg-alt: #F4F1EA;
    --color-primary: #535837; /* Jungle Green */
    --color-secondary: #D4C4A8; /* Beige */
    --color-text: #4A4A4A;
    --color-heading: #1A3C1B;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --max-width: 886px;
    --spacing-unit: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: #eae8db; /* Outer background */
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    background-color: var(--color-bg);
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header & Menu */
header {
    background-color: var(--color-bg);
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    margin-bottom: 1rem;
}

.logo {
    width: 120px;
}

nav {
    width: 100%;
}

.menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.menu li a {
    text-decoration: none;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
}

.menu li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.menu li a:hover::after {
    width: 100%;
}

.menu li a:hover {
    color: var(--color-secondary);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 0;
    background-color: var(--color-bg-alt);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-heading);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* General Section Styles */
section {
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: relative; /* Added for absolute positioning context */
}

section#pre-wedding,
section#casamento {
    margin: 3rem 2rem;
    background-color: var(--color-bg-alt);
    padding: 3rem 2rem 2rem;
    border-radius: 8px;
    border: 3px solid #929870;
    position: relative; /* Ensure specific sections have relative positioning */
}

.floating-icon {
    position: absolute;
    top: -24px;
    left: 70px;
    width: 120px;
    height: auto;
    z-index: 10;
    /* Optional: Add a subtle float animation */
    animation: float 3s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .floating-icon {
        width: 80px;
        top: -30px;
        left: -20px;
    }
    .hero {
    padding: 0;
}

}

section#presentes {
    padding: 4rem 2rem 2rem;
}

section#dicas {
    padding: 1rem 2rem 2rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--color-secondary);
    margin: 10px auto 0;
}

h3 {
    font-family: var(--font-body);
    font-size: 1.6rem;
    color: #cdb487;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    line-height: 1.9rem;
}

/* Message Section */
.welcome-image, .title-image {
    display: block;
    margin: 0 auto 2rem;
    max-width: 300px; /* Adjust as needed based on image size */
    height: auto;
}

.title-image.adicas {
    max-width: 550px;
}

.title-image.alista {
    max-width: 380px;
}

.title-image.apresenca {
    max-width: 420px;
}

.title-image.ainfo {
    max-width: 380px;
}

.message-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.message-text {
    flex: 1;
    margin-left: 20px;
}

.message-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.message-image img {
    max-width: 90%;
}

.message-text p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .message-container {
        flex-direction: column;
    }
    .title-image.ainfo, .title-image.alista, .title-image.apresenca, .title-image.adicas {
    max-width: 100%;
}
.welcome-image, .title-image {
    max-width: 100%;
}
.message-text {
    margin-left: 0px;
}
}

.signature {
    font-family: var(--font-heading);
    font-size: 1.5rem !important;
    margin-top: 2rem;
    color: var(--color-primary);
    font-style: italic;
}

/* Event Sections (Pre-Wedding & Casamento) */
.event-details p {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.note {
    font-size: 0.9rem !important;
    color: #888;
    margin-top: 0.5rem;
}

.btn-map {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: background-color 0.3s ease;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--color-secondary);
    color: #333;
}

.btn-map:hover {
    background-color: #FFFFFF;
}

/* Dress Code */
.dress-code {
    margin-top: 1rem;
    background-color: var(--color-bg-alt);
    padding: 2rem;
    border-radius: 8px;
}

.dress-code-images, .dress-code-grid {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dress-code-images img, .dc-item img {
    max-width: 50%;
    height: auto;
}

.dc-item {
    flex: 1 1 300px;
    max-width: 400px;
}

/* Countdown */
.countdown-section {
    background-color: #929870;
    background-image: linear-gradient(rgb(75 78 37 / 20%), rgb(71 72 35 / 50%)), url(img/siveira.jpg);
    background-size: cover;
    background-position: center;
    color: white;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.countdown-section h2 {
    color: white;
}

.countdown-section h2::after {
    background-color: var(--color-secondary);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    min-width: 80px;
}

.time-box span {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #FFFFFF;
}

/* Tips */
.tips-section {
    text-align: left;
}

.tips-section h2 {
    text-align: center;
    width: 100%;
}

.tips-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.tip-card {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid #eee;
    width: 300px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--color-secondary);
}

.tip-icon-img {
    width: 94px; /* Increased size for png icons */
    height: auto;
    margin-bottom: 0.5rem;
    display: block;
}

.tip-card h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.hidden-content {
    display: none;
}

.tips-modal-content {
    max-width: 600px; /* Larger width for text content */
    text-align: left;
    max-height: 80vh;
    overflow-y: auto;
}

.tips-modal-content h3 {
    text-align: center;
    border-bottom: 1px solid var(--color-secondary);
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.tips-modal-content h4 {
    color: var(--color-heading);
    margin: 1.5rem 0 0.5rem;
    font-size: 1.2rem;
}

.close-tips-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 5px;
    line-height: 1;
    z-index: 1;
}

.close-tips-modal:hover,
.close-tips-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

/* Gifts */
.gift-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-gift {
    padding: 1rem 2rem;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.gift-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.gift-item {
    background-color: white;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    font-size: 1rem;
    text-align: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gift-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--color-secondary);
}

.gift-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-color: #f0f0f0; /* Placeholder color while loading */
}

.gift-item span:first-of-type {
    font-weight: 500;
    line-height: 1.3;
}

.gift-item .price {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.btn-presentear {
    background-color: #d4c4a8;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    margin-top: 0.5rem;
}

.gift-item:hover .btn-presentear {
    background-color: var(--color-heading);
}

.qrcode-section {
    margin-top: 2rem;
}

.qrcode {
    max-width: 200px;
    margin-top: 1rem;
}

/* RSVP Section */
section#rsvp {
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--color-bg-alt);
}

.rsvp-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #535837; /* WhatsApp Green */
    color: white;
    padding: 1rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 300;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-whatsapp:hover {
    background-color: #44482a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Form & Contact */
.message-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-heading);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--color-heading);
}

.organization-info {
    padding-top: 1rem;
}

section#organizacao {
    padding: 2rem 2rem 4rem;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

svg.lucide.lucide-phone {
    margin-bottom: -7px;
}

/* Footer */
footer {
    padding: 1rem;
    text-align: center;
    background-color: var(--color-primary);
    color: white;
    font-size: 0.9rem;
}

footer a {
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .menu {
        display: none; /* Hide for now, or implement JS toggle */
        flex-direction: column;
        gap: 2rem;
        padding-top: 1rem;
        padding-bottom: 1.2rem;
    }

    .menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
        margin-top: 0.7rem;
        margin-left: 65px;
        z-index: 101; /* Ensure it's above the menu */
        transform: scale(1.5); /* Increase size by 80% */
        transform-origin: center;
    }

    .mobile-menu-toggle.active {
        position: fixed;
        top: 20px;
        right: 20px;
        margin-top: 0;
    }

    .mobile-menu-toggle .close-icon-wrapper {
        display: none;
    }

    .mobile-menu-toggle.active .menu-icon-wrapper {
        display: none;
    }

    .mobile-menu-toggle.active .close-icon-wrapper {
        display: block;
    }

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

    .countdown-timer {
        gap: 0.1rem;
    }

    .time-box span {
        font-size: 2rem;
    }

    .dress-code-images img, .dc-item img {
        max-width: 100%;
        width: 100%;
    }

    .btn-whatsapp svg {
        width: 40px;
        height: 40px;
    }
}

/* 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.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--color-bg);
    margin: auto;
    padding: 1rem;
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideIn 0.3s;
}

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

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 5px;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.modal-price {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
    margin: 0.5rem 0 1.5rem;
}

.modal-qrcode-container {
    margin-bottom: 1.5rem;
}

.modal-qrcode {
    width: 100%;
    /* height: 200px; */
    border: 1px solid #eee;
    padding: 10px;
    background: white;
}

.btn-copy-pix {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.btn-copy-pix:hover {
    background-color: var(--color-heading);
}

.pix-key-display {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #888;
    word-break: break-all;
    min-height: 1.2em;
}
