/* ===== CSS Variables ===== */
:root {
    --primary-color: #c9a86c;
    --primary-dark: #a88b4a;
    --secondary-color: #8b7355;
    --text-dark: #3d3d3d;
    --text-light: #6b6b6b;
    --text-white: #ffffff;
    --bg-light: #faf8f5;
    --bg-cream: #f5f0e8;
    --bg-dark: #2d2d2d;
    --accent-pink: #e8d4d4;
    --accent-sage: #c5d5c5;
    --border-color: #e0d5c5;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', Arial, sans-serif;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ===== Utility Classes ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-full {
    width: 100%;
}

/* ===== Section Styles ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header.light {
    color: var(--text-white);
}

.section-subtitle {
    display: block;
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-header.light .section-subtitle {
    color: var(--accent-pink);
}

.section-title {
    font-size: 48px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-header.light .section-title {
    color: var(--text-white);
}

.title-decoration {
    font-size: 14px;
    color: var(--primary-color);
    letter-spacing: 8px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--text-white);
    letter-spacing: 4px;
}

.navbar.scrolled .nav-logo {
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-menu a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-white);
    position: relative;
}

.navbar.scrolled .nav-menu a {
    color: var(--text-dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-white);
    transition: transform 0.28s ease, opacity 0.2s ease, background 0.2s ease;
    transform-origin: center;
    display: block;
}

.navbar.scrolled .nav-toggle span {
    background: var(--text-dark);
}


.nav-toggle.active span {
    background: var(--text-dark);
}

/* Hamburger -> X animation */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    min-height: 700px;
    background-image: url('images/main.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    /* keep hero background fixed when scrolling on desktop */
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.5)
    );
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--text-white);
    padding: 20px;
    margin-top: -60px;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 20px;
    font-style: italic;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-title {
    font-size: 80px;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 20px;
}

.hero-title span {
    font-style: italic;
    color: var(--primary-color);
}

.hero-date {
    font-size: 18px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.hero-divider {
    margin: 30px 0;
}

.hero-divider .flower {
    font-size: 24px;
    color: var(--primary-color);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-white);
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-white);
    border-bottom: 2px solid var(--text-white);
    transform: rotate(45deg);
    margin: 0 auto;
}

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

/* ===== Couple Section ===== */
.couple-section {
    padding: 120px 0;
    background: var(--bg-light);
}

.couple-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 60px;
}

.couple-card {
    text-align: center;
    max-width: 350px;
}

.couple-image {
    width: 250px;
    height: 250px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--border-color);
    box-shadow: var(--shadow);
}

.couple-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.couple-card h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.couple-role {
    font-size: 14px;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.couple-bio {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

.couple-heart {
    font-size: 40px;
    color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.love-story {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: var(--bg-cream);
    border-radius: 10px;
}

.love-story h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.love-story p {
    color: var(--text-light);
    font-size: 15px;
}

/* ===== Countdown Section ===== */
.countdown-section {
    padding: 120px 0;
    background: url('/images/main/image3.jpg') center/cover no-repeat fixed;
    position: relative;
}

.countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(45, 45, 45, 0.85);
}

.countdown-section .container {
    position: relative;
}

.countdown-date-text {
    font-size: 20px;
    margin-top: 10px;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

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

.countdown-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 72px;
    color: var(--primary-color);
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-white);
    margin-top: 10px;
    opacity: 0.8;
}

/* ===== Gallery Section ===== */
.gallery-section {
    padding: 120px 0;
    background: var(--bg-light);
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 20px;
}

.gallery-item {
    perspective: 1000px;
}

.polaroid {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.polaroid-frame {
    background: white;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-style: preserve-3d;
    width: 280px;
}

/* Random rotations are now generated by JavaScript on page load */

.polaroid-frame img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.polaroid-caption {
    font-family: 'Courier New', monospace;
    text-align: center;
    padding: 15px 10px 0;
    color: #555;
    font-size: 14px;
}

/* Hover effects */
.polaroid:hover .polaroid-frame {
    transform: rotate(0deg) translateY(-15px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* ===== Enhanced Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 85%;
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    object-fit: contain;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: var(--text-white);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--text-white);
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 2001;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-nav:hover {
    background: rgba(201, 168, 108, 0.8);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-white);
    font-family: var(--font-serif);
    font-size: 20px;
    font-style: italic;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 30px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* ===== Venue Section ===== */
.venue-section {
    padding: 150px 0;
    background: var(--bg-cream);
}

.venue-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.venue-info {
    display: flex;
    justify-content: center;
}

.venue-info-content {
    text-align: left;
}

.venue-info-content h3 {
    font-size: 36px;
    margin-bottom: 25px;
}

.venue-address,
.venue-date {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.venue-map {
    margin: 0 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.venue-map iframe {
    width: 100%;
    height: 400px;
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 80px 0 30px;
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 42px;
    font-weight: 300;
    margin-bottom: 10px;
}

.footer-date {
    font-size: 14px;
    letter-spacing: 3px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-hearts {
    font-size: 16px;
    color: var(--primary-color);
    letter-spacing: 10px;
    margin-bottom: 20px;
}

.footer-message {
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 13px;
    opacity: 0.6;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 60px;
    }

    .section-title {
        font-size: 40px;
    }

    .couple-container {
        flex-direction: column;
        gap: 40px;
    }

    .couple-heart {
        transform: rotate(90deg);
    }

    .countdown-timer {
        gap: 25px;
    }

    .countdown-number {
        font-size: 50px;
    }

    .venue-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .venue-info {
        justify-content: center;
    }

    .venue-info-content {
        text-align: center;
    }

    .gallery-grid {
        gap: 25px;
        padding: 15px;
    }

    .polaroid-frame {
        width: 240px;
    }

    .polaroid-frame img {
        height: 210px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 17px;
        line-height: 1.8;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

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

    .nav-menu a {
        color: var(--text-dark);
        font-size: 16px;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-content {
        margin-top: -150px;
    }

    .hero-title {
        font-size: 48px;
        letter-spacing: 4px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 18px;
        line-height: 1.6;
    }

    .hero-date {
        font-size: 16px;
        line-height: 1.6;
    }

    .section-title {
        font-size: 38px;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 18px;
    }

    .couple-bio {
        font-size: 16px;
        line-height: 1.9;
    }

    .love-story p {
        font-size: 16px;
        line-height: 1.9;
    }

    .countdown-timer {
        flex-wrap: wrap;
        gap: 20px;
    }

    .countdown-item {
        width: 40%;
    }

    .countdown-number {
        font-size: 48px;
    }

    .countdown-label {
        font-size: 13px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-content h3 {
        font-size: 26px;
        line-height: 1.3;
    }

    .timeline-content p {
        font-size: 15px;
        line-height: 1.8;
    }

    .gallery-grid {
        gap: 15px;
        padding: 10px;
        justify-content: space-evenly;
    }

    .polaroid-frame {
        width: calc(50vw - 30px);
        max-width: 180px;
    }

    .polaroid-frame img {
        height: calc(50vw - 50px);
        max-height: 160px;
    }

    .polaroid-caption {
        font-size: 11px;
        padding: 10px 5px 0;
    }

    .lightbox-nav {
        padding: 10px 15px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-caption {
        font-size: 16px;
        padding: 8px 20px;
        bottom: 30px;
    }

    .venue-info-content h3 {
        font-size: 32px;
        line-height: 1.3;
    }

    .venue-address,
    .venue-date {
        font-size: 16px;
        line-height: 1.9;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
        line-height: 1.8;
    }

    .hero-content {
        margin-top: -180px;
    }

    .hero-title {
        font-size: 46px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .section-title {
        font-size: 34px;
        line-height: 1.3;
    }

    .btn {
        padding: 14px 35px;
        font-size: 13px;
    }

    .couple-image {
        width: 200px;
        height: 200px;
    }

    .couple-card h3 {
        font-size: 28px;
    }

    .couple-bio {
        font-size: 16px;
        line-height: 1.9;
    }

    .timeline-content h3 {
        font-size: 24px;
    }

    .timeline-content p {
        font-size: 15px;
        line-height: 1.8;
    }

    .gallery-grid {
        gap: 12px;
        padding: 8px;
        justify-content: space-evenly;
    }

    .polaroid-frame {
        width: calc(50vw - 25px);
        max-width: 160px;
    }

    .polaroid-frame img {
        height: calc(50vw - 45px);
        max-height: 140px;
    }

    .polaroid-caption {
        font-size: 10px;
        padding: 8px 5px 0;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 30px;
    }

    .lightbox-nav {
        padding: 8px 12px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: 14px;
        padding: 6px 15px;
        bottom: 20px;
    }
}
