:root {
    --light-blue: #f0f9ff;
    --grey-blue: #64748b;
    --dark-slate: #1e293b;
    --off-white: #f8fafc;
    --accent-blue: #0ea5e9;
    --white: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--off-white);
    color: var(--dark-slate);
    line-height: 1.6;
}

/* Navigation */
nav {
    background: var(--white);
    padding: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

nav a {
    text-decoration: none;
    color: var(--grey-blue);
    margin: 0 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-blue);
}

/* Hero Header */
header {
    padding: 40px 20px;
    text-align: center;
    background: rgba(240, 249, 255, 0.8);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 10px;
    color: var(--dark-slate);
}

header p {
    font-size: 1.2rem;
    color: var(--grey-blue);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Home Section */
#home {
    /* 1. Reset the width constraints from the general 'section' tag */
    max-width: 100%; 
    width: 100vw;
    margin: 0; /* Removes the 40px margin so it touches the Nav and edges */
    background: url('./content/images/Engagement\ Photos/92.jpg');
    
    padding: 120px 20px;
    text-align: center;
    color: var(--dark-slate);
    background-size: cover;
    background-position: center calc(40% + 65px);
    background-attachment: fixed; /* Parallax effect */

    /* 3. Height and Centering */
    min-height: 60vh; /* Takes up 80% of the screen height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

#home .card h2 {
    font-size: 2rem;
}

#home .card p {
    font-size: 1.5rem;
}

/* This class will be added/removed by JavaScript */
.hidden-card {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    transition: all 0.5s ease !important; /* Smooth fade out */
}

/* Standard state for the card */
#home .card {
    transition: all 0.5s ease;
    opacity: 1;
    visibility: visible;
}

/* Section Controls */
section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    display: none;
    scroll-margin-top: 100px;
}

section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

/* Photos */
#photos .section-title {
    padding: 20px;
}

.shared-album {
    display: grid;
    place-items: center;
}

#photos .shared-album img {
    padding-top: 10px;
    height: 30vh;
}

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

/* Cards */
.card {
    background: rgba(248, 250, 252, 0.65);
    padding: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.08);
    border-top: 6px solid var(--grey-blue);
}

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

/* Slideshow */
.slideshow-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slide.active {
    display: block;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover { background: var(--white); color: var(--accent-blue); }
.prev { left: 15px; }
.next { right: 15px; }

/* Buttons */
.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-slate { background: var(--grey-blue); color: white; }
.btn-blue { background: var(--accent-blue); color: white; }
.btn-purple { background: rgba(255, 68, 203); color: white; }
.btn:hover { opacity: 0.9; transform: translateY(-2px); }

/* Travel */
#travel {
    scroll-margin-top: 100px;
}

#travel .main-title {
    text-align: center;
    padding: 20px;
    font-size: 40px;
}

#travel .family-msg {
    text-align: center;
    padding-bottom: 20px;
    font-size: 15px;
}

/* Travel Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.travel-details-container {
    margin-top: 40px;
}

.travel-details-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--dark-slate);
}

.travel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.travel-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.08);
    border-top: 4px solid var(--accent-blue);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.travel-card img {
    max-width: 100%;
    height: 180px; /* Fixed height for images */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 8px;
    margin-bottom: 15px;
}

.travel-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark-slate);
}

.travel-card p {
    font-size: 0.95rem;
    color: var(--grey-blue);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow paragraph to grow and push button to bottom */
}

.travel-card .btn {
    margin-top: auto; /* Push button to the bottom */
}

/* Registry */
#registry .theknot-img {
    height: 100px;
    padding-top: 10px;
}

footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--grey-blue);
    font-size: 0.85rem;
}

section#photos h2 {
    text-align: center;
}

section#photos p {
    text-align: center;
}