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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #faf7f2;
    color: #2c3531;
    line-height: 1.8;
    text-align: center;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}

/* --- FORSIDE / HERO --- */
.hero {
    position: relative;
    height: 95vh;
    min-height: 650px;
    background-image: url('bilde.png');
    background-size: cover;
    background-position: center 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(44,53,49,0.65) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    padding: 20px;
    width: 100%;
    max-width: 900px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Sentrerer alt samlet vertikalt på dataskjerm */
}

.hero-top {
    padding-top: 0;
}

.hero-bottom {
    padding-bottom: 0;
}

.sub-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.6rem;
    letter-spacing: 2px;
    opacity: 0.9;
}

.hero h1 {
    font-size: 4.5rem;
    letter-spacing: 4px;
    margin: 10px 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.divider {
    width: 80px;
    height: 2px;
    background-color: #d88a68;
    margin: 15px auto;
}

.date-location {
    font-size: 0.95rem;
    letter-spacing: 3px;
    font-weight: 500;
    margin-top: 15px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* --- KUN FOR MOBILSKJERM (OVERSTYRING) --- */
@media (max-width: 768px) {
    .hero {
        /* Justerer bildet litt på mobil slik at ansiktene treffer lavere */
        background-position: center 35%;
    }

    .hero-content {
        justify-content: space-between;
    }

    .hero-top {
        /* Økt fra 60px til 110px for å senke overskriften tydelig ned */
        padding-top: 110px; 
    }

    .hero-bottom {
        padding-bottom: 20px;
    }

    .sub-title {
        font-size: 1.25rem;
    }

    .hero h1 {
        font-size: 2.3rem;
        line-height: 1.15;
    }

    .date-location {
        font-size: 0.78rem;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .nav-buttons {
        gap: 8px;
        margin-top: 10px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 9px 18px;
        font-size: 0.78rem;
    }

    .gift-card, .gallery-item {
        width: 100%;
    }
}

/* Navigasjonsknapper i Hero (Forside) */
.nav-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn:hover {
    background-color: #ffffff;
    color: #2c3531;
    border-color: #ffffff;
}

/* --- UNDERSIDER (SUBPAGES) --- */
.sub-header {
    position: relative;
    background-color: #718370;
    padding: 30px 20px;
    color: #ffffff;
}

.brand-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.nav-buttons-sub {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-sub {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-sub:hover, .btn-sub.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Innholdskasser */
.page-content {
    min-height: 60vh;
    padding: 40px 0;
}

.page-content h2 {
    font-size: 2.8rem;
    color: #718370;
}

.content-box {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 8px;
    padding: 40px;
    max-width: 700px;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.content-box h3 {
    color: #d88a68;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

/* --- BILDE OG LENKER PÅ UNDERSIDER --- */
.content-box.image-box {
    padding: 0;
    overflow: hidden;
    margin: 20px auto;
}

.info-image {
    width: 100%;
    max-width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.box-text {
    padding: 30px 20px;
}

.external-link {
    display: inline-block;
    margin-top: 15px;
    color: #718370;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.external-link:hover {
    text-decoration: underline;
}

.map-link-wrapper {
    margin-top: 20px;
}

.btn-map {
    display: inline-block;
    padding: 10px 20px;
    background-color: #718370;
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

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

/* --- FELLES CONTAINER / GRID --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.welcome-section h2 {
    font-size: 2.5rem;
    color: #718370;
    margin-bottom: 20px;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #555;
    max-width: 650px;
    margin: 0 auto;
}

.details-section {
    padding: 10px 0 40px 0;
}

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

.card {
    flex: 1;
    min-width: 280px;
    background: #ffffff;
    padding: 35px 20px;
    border-radius: 8px;
    border: 1px solid #e8e2d8;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 1.8rem;
    color: #718370;
    margin-bottom: 10px;
}

.card .location {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

/* Footer */
footer {
    padding: 30px;
    background-color: #2c3531;
    color: #faf7f2;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

/* Mobilanpasning */
@media (max-width: 768px) {
    .hero-top {
        padding-top: 25px;
    }

    .sub-title {
        font-size: 1.3rem;
    }

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

    .date-location {
        font-size: 0.8rem;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .nav-buttons {
        gap: 8px;
        margin-top: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 9px 18px;
        font-size: 0.78rem;
    }

    .gift-card {
        width: 100%;
    }

    .gallery-item {
        width: 100%;
    }
}

/* --- RSVP SKJEMA STILING --- */
.rsvp-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #2c3531;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d8d0c5;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    background-color: #faf7f2;
    color: #2c3531;
    box-sizing: border-box;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #718370;
    background-color: #ffffff;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #718370;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: #586857;
}

/* --- GAVELISTE STILING --- */
.gift-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.gift-card {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 8px;
    width: calc(33.333% - 20px);
    min-width: 260px;
    max-width: 350px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gift-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f4efe6;
}

.gift-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.gift-details h3 {
    font-size: 1.5rem;
    color: #718370;
    margin-bottom: 10px;
}

.gift-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: #d88a68; /* Terracotta-farge */
    margin-top: -5px;
    margin-bottom: 10px;
}

.reserve-form {
    margin-top: 15px;
    border-top: 1px solid #f0ebe1;
    padding-top: 15px;
}

.reserve-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d8d0c5;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.alert-success {
    background-color: #718370;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* --- PROGRAM TIMELINE --- */
.timeline {
    text-align: center;
    margin-top: 10px;
}

.timeline-item {
    padding: 30px 0;
    border-bottom: 1px solid #f0ebe1;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.timeline-header .time {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3531;
    letter-spacing: 1px;
}

.timeline-header .dash {
    font-size: 1.5rem;
    color: #2c3531;
    font-weight: 300;
}

.timeline-header h3 {
    font-size: 1.6rem;
    color: #718370;
    margin: 0;
}

.timeline-item p {
    font-size: 0.95rem;
    color: #4a4a4a;
    margin: 0 auto;
    max-width: 500px;
}

@media (max-width: 600px) {
    .timeline-item {
        padding: 22px 0;
    }
    .timeline-header .time {
        font-size: 1.5rem;
    }
    .timeline-header h3 {
        font-size: 1.3rem;
    }
}

/* --- BILDEGALLERI STILING --- */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.gallery-item {
    background: #ffffff;
    border: 1px solid #e8e2d8;
    border-radius: 8px;
    overflow: hidden;
    width: calc(33.333% - 15px);
    min-width: 250px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.gallery-item .caption {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: #555;
    background-color: #ffffff;
    margin: 0;
}

/* --- DRESSKODE PÅ FORSIDEN --- */
.welcome-section p.dresscode {
    margin-top: 45px !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 1.1rem;
    color: #718370;
    letter-spacing: 0.5px;
}

.welcome-section p.dresscode strong {
    color: #2c3531;
    font-weight: 600;
}

/* --- SKILLELINJE MELLOM TILGJENGELIGE OG RESERVERTE GAVER --- */
.section-divider-large {
    margin: 80px 0 40px 0;
    text-align: center;
}

.full-divider {
    border: none;
    height: 1px;
    background-color: #d8d0c5;
    margin-bottom: 50px;
    opacity: 0.7;
}

.section-divider-large h2 {
    font-size: 2.8rem;
    color: #718370;
    margin-bottom: 5px;
}

/* --- KRAFTIG UTGRÅING & SVART-HVIT PÅ RESERVERTE GAVER --- */
.gift-card.is-reserved {
    background-color: #f4efe9;
    border-color: #d8d0c5;
    box-shadow: none;
    opacity: 0.75;
    transition: all 0.3s ease;
}

.gift-card.is-reserved:hover {
    opacity: 0.95;
}

/* SVART-HVIT SIKRING PÅ BILDET MED GJENNOMSIKTIGHET */
.gift-image.bw-image {
    filter: grayscale(100%) contrast(90%) brightness(85%);
    opacity: 0.5;
}

/* SKRÅSTILT RESERVERT-BÅND OVER BILDET */
.reserved-wrapper {
    position: relative;
    overflow: hidden;
}

.diagonal-ribbon {
    position: absolute;
    top: 25px;
    right: -40px;
    transform: rotate(45deg);
    width: 160px;
    background-color: rgba(44, 53, 49, 0.7);
    color: #ffffff;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 6px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.reserved-text {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 10px;
    font-weight: 500;
}

.btn-unreserve {
    display: inline-block;
    width: 100%;
    padding: 10px 15px;
    background-color: #8c857b;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-unreserve:hover {
    background-color: #718370;
}

/* LOKAL FEILBOBLE INNE PÅ KORTET */
.error-bubble {
    background-color: #d9534f;
    color: #ffffff;
    font-size: 0.78rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: center;
    position: relative;
    animation: shake 0.3s ease;
}

.error-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #d9534f transparent;
    display: block;
    width: 0;
}

.input-error {
    border-color: #d9534f !important;
    background-color: #fdf2f2 !important;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}