/* ============================================================
   BERGLAND GUIDE SERVICE — Custom Design
   Bygget pa Divi 5 child theme
   Stil: Nordisk, organisk, minimalistisk, naturnaer
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   RESET & GLOBAL
   ───────────────────────────────────────────────────────────── */

body,
#page-container {
    font-family: var(--bg-font-body);
    color: var(--bg-dark);
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─────────────────────────────────────────────────────────────
   TYPOGRAFI
   ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6,
.et_pb_module_header,
.et_pb_slide_description .et_pb_slide_title {
    font-family: var(--bg-font-heading);
    color: var(--bg-primary);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
    margin-bottom: 1.25em;
    max-width: 65ch;
}

/* Mindre brodtekst i Divi-moduler */
.et_pb_text_inner p,
.et_pb_blurb_description p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--bg-dark);
    opacity: 0.85;
}

/* ─────────────────────────────────────────────────────────────
   LENKER
   ───────────────────────────────────────────────────────────── */

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

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

/* Understreket effekt pa lenker i brodtekst */
.et_pb_text_inner a,
.et_pb_blurb_description a {
    text-decoration: underline;
    text-decoration-color: rgba(var(--bg-accent-rgb), 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--bg-transition);
}

.et_pb_text_inner a:hover,
.et_pb_blurb_description a:hover {
    text-decoration-color: var(--bg-accent);
}

/* ─────────────────────────────────────────────────────────────
   KNAPPER
   ───────────────────────────────────────────────────────────── */

/* Primaerknapp */
.et_pb_button,
.et_pb_more_button,
.et_pb_promo_button,
.et_pb_newsletter_button {
    font-family: var(--bg-font-body) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    letter-spacing: 0.03em !important;
    text-transform: none !important;
    padding: 14px 32px !important;
    border-radius: var(--bg-radius-full) !important;
    background-color: var(--bg-primary) !important;
    color: #fff !important;
    border: 2px solid var(--bg-primary) !important;
    transition: all var(--bg-transition) !important;
}

.et_pb_button:hover,
.et_pb_more_button:hover {
    background-color: var(--bg-secondary) !important;
    border-color: var(--bg-secondary) !important;
    transform: translateY(-2px);
    box-shadow: var(--bg-shadow-md);
}

/* Sekundaerknapp (outline) */
.et_pb_button.bergland-outline,
.et_pb_button[data-style="outline"] {
    background-color: transparent !important;
    color: var(--bg-primary) !important;
    border: 2px solid var(--bg-primary) !important;
}

.et_pb_button.bergland-outline:hover,
.et_pb_button[data-style="outline"]:hover {
    background-color: var(--bg-primary) !important;
    color: #fff !important;
}

/* Fjern Divi sin standard pil pa knapper */
.et_pb_button::after,
.et_pb_more_button::after {
    display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   HEADER / NAVIGASJON
   ───────────────────────────────────────────────────────────── */

#main-header,
.et-l--header {
    background-color: rgba(var(--bg-primary-rgb), 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--bg-transition);
}

/* Fixed header med skygge */
.et-fixed-header#main-header,
.et-l--header.et-fixed-header {
    box-shadow: var(--bg-shadow-md);
}

/* Navigasjonslenker */
#top-menu li a,
.et-l--header .et_pb_menu__menu a {
    font-family: var(--bg-font-body) !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color var(--bg-transition);
}

#top-menu li a:hover,
.et-l--header .et_pb_menu__menu a:hover {
    color: var(--bg-accent) !important;
    opacity: 1 !important;
}

/* Aktiv menylenke */
#top-menu li.current-menu-item > a,
.et-l--header .et_pb_menu__menu .current-menu-item > a {
    color: var(--bg-accent) !important;
}

/* Logo i header */
#logo,
.et-l--header .et_pb_image img {
    max-height: 48px;
    width: auto;
}

/* ─────────────────────────────────────────────────────────────
   HERO-SEKSJON
   ───────────────────────────────────────────────────────────── */

.bergland-hero,
.et_pb_section.bergland-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.bergland-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(var(--bg-primary-rgb), 0.4) 0%,
        rgba(var(--bg-primary-rgb), 0.7) 100%
    );
    z-index: 1;
}

.bergland-hero .et_pb_row {
    position: relative;
    z-index: 2;
}

.bergland-hero h1 {
    color: #fff;
    font-size: clamp(2.8rem, 6vw, 5rem);
    margin-bottom: 0.4em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.bergland-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    max-width: 55ch;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   SEKSJONER
   ───────────────────────────────────────────────────────────── */

.et_pb_section {
    padding: var(--bg-space-xl) 0;
}

/* Lys bakgrunn-seksjon */
.bergland-light,
.et_pb_section.bergland-light {
    background-color: var(--bg-light);
}

/* Mork seksjon */
.bergland-dark,
.et_pb_section.bergland-dark {
    background-color: var(--bg-primary);
}

.bergland-dark h2,
.bergland-dark h3,
.bergland-dark p {
    color: rgba(255, 255, 255, 0.9);
}

/* Seksjon med subtil monsterbakgrunn */
.bergland-texture {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(var(--bg-accent-rgb), 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--bg-primary-rgb), 0.03) 0%, transparent 50%);
}

/* ─────────────────────────────────────────────────────────────
   KORT / CARDS
   ───────────────────────────────────────────────────────────── */

.et_pb_blurb,
.bergland-card {
    background: #fff;
    border-radius: var(--bg-radius-lg);
    padding: var(--bg-space-md);
    transition: all var(--bg-transition);
    border: 1px solid rgba(var(--bg-primary-rgb), 0.06);
}

.et_pb_blurb:hover,
.bergland-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bg-shadow-lg);
    border-color: rgba(var(--bg-accent-rgb), 0.15);
}

/* Blurb-ikon */
.et_pb_blurb .et_pb_main_blurb_image .et-waypoint {
    color: var(--bg-accent);
}

.et_pb_blurb .et_pb_module_header {
    margin-top: var(--bg-space-sm);
    font-size: 1.35rem;
}

/* ─────────────────────────────────────────────────────────────
   TJENESTE-NUMMERERING
   ───────────────────────────────────────────────────────────── */

.bergland-numbered {
    counter-reset: service-counter;
}

.bergland-numbered .et_pb_blurb {
    counter-increment: service-counter;
    position: relative;
    padding-left: calc(var(--bg-space-md) + 48px);
}

.bergland-numbered .et_pb_blurb::before {
    content: counter(service-counter, decimal-leading-zero);
    position: absolute;
    left: var(--bg-space-md);
    top: var(--bg-space-md);
    font-family: var(--bg-font-heading);
    font-size: 2.5rem;
    color: rgba(var(--bg-accent-rgb), 0.2);
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────────
   ARRANGEMENTER / EVENTS (shortcode: [bergland_arrangementer])
   Matcher prototypens mørke event-seksjon
   ───────────────────────────────────────────────────────────── */

.bergland-events {
    max-width: 1200px;
    margin: 0 auto;
}

.bergland-event {
    display: grid;
    grid-template-columns: 100px 160px 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--bg-transition);
}

.bergland-event:hover {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    padding-left: 16px;
}

.bergland-event:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dato-kolonne */
.bergland-event-date-col {
    text-align: left;
}

.bergland-event-days {
    font-family: var(--bg-font-body);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg-accent);
    margin-bottom: 8px;
}

.bergland-event-day {
    font-family: var(--bg-font-heading);
    font-size: 48px;
    font-weight: 400;
    line-height: 0.9;
    color: #fff;
    letter-spacing: -0.02em;
}

.bergland-event-month {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Bilde */
.bergland-event-image {
    width: 160px;
    height: 120px;
    border-radius: var(--bg-radius-md);
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Info */
.bergland-event-info h3 {
    font-family: var(--bg-font-heading);
    font-size: 24px;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.15;
}

.bergland-event-location {
    font-family: var(--bg-font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.bergland-event-desc,
.bergland-event-desc p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    max-width: 480px;
    margin-bottom: 12px;
}

.bergland-event-meta {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.bergland-event-meta strong {
    color: #fff;
    font-family: var(--bg-font-heading);
    font-size: 15px;
    font-weight: 400;
}

/* CTA-kolonne */
.bergland-event-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

/* Status-badges */
.bergland-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--bg-radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bergland-badge--open {
    background-color: rgba(45, 95, 74, 0.25);
    color: #7ec9a4;
}

.bergland-badge--few-left {
    background-color: rgba(212, 168, 75, 0.2);
    color: var(--bg-accent);
}

.bergland-badge--full {
    background-color: rgba(230, 57, 70, 0.15);
    color: #e66a73;
}

/* Event-knapper */
.bergland-event-btn {
    display: inline-block;
    padding: 10px 20px;
    font-family: var(--bg-font-body);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--bg-radius-full);
    background: var(--bg-accent);
    color: var(--bg-primary);
    text-decoration: none;
    transition: all var(--bg-transition);
}

.bergland-event-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3);
    color: var(--bg-primary);
}

.bergland-event-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.bergland-event-btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: none;
}

/* Responsivt for arrangementer */
@media (max-width: 980px) {
    .bergland-event {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 32px 0;
    }

    .bergland-event:hover {
        padding-left: 0;
    }

    .bergland-event-image {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .bergland-event-cta {
        align-items: flex-start;
        flex-direction: row;
    }
}

/* ─────────────────────────────────────────────────────────────
   OM OSS / GUIDE-PROFIL
   ───────────────────────────────────────────────────────────── */

.bergland-guide-image {
    border-radius: var(--bg-radius-lg);
    overflow: hidden;
}

.bergland-guide-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

/* Sitat-stil */
.bergland-quote,
.et_pb_testimonial {
    position: relative;
    padding-left: var(--bg-space-md);
    border-left: 3px solid var(--bg-accent);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--bg-primary);
    opacity: 0.9;
}

.bergland-quote::before {
    content: none; /* Fjern Divi-standard anforseltegn */
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */

#main-footer,
.et-l--footer {
    background-color: var(--bg-primary) !important;
    color: rgba(255, 255, 255, 0.7);
    padding-top: var(--bg-space-xl);
}

#main-footer h4,
.et-l--footer h4,
.et-l--footer .et_pb_module_header {
    color: #fff !important;
    font-family: var(--bg-font-body);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--bg-space-sm);
}

#main-footer a,
.et-l--footer a {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color var(--bg-transition);
}

#main-footer a:hover,
.et-l--footer a:hover {
    color: var(--bg-accent) !important;
}

#footer-bottom,
.et-l--footer .bergland-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--bg-space-sm) 0;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ─────────────────────────────────────────────────────────────
   BILDER I DIVI
   ───────────────────────────────────────────────────────────── */

.et_pb_image img,
.et_pb_gallery_image img {
    border-radius: var(--bg-radius-md);
}

/* Full-bredde bilde uten radius */
.bergland-fullwidth .et_pb_image img {
    border-radius: 0;
}

/* Hover-zoom pa galleribilder */
.et_pb_gallery_image {
    overflow: hidden;
    border-radius: var(--bg-radius-md);
}

.et_pb_gallery_image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.et_pb_gallery_image:hover img {
    transform: scale(1.05);
}

/* ─────────────────────────────────────────────────────────────
   KONTAKTSKJEMA
   ───────────────────────────────────────────────────────────── */

.et_pb_contact_form_container .input,
.et_pb_contact_form_container textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    font-family: var(--bg-font-body) !important;
    font-size: 16px !important;
    padding: 14px 18px !important;
    border: 1px solid rgba(var(--bg-primary-rgb), 0.15) !important;
    border-radius: var(--bg-radius-md) !important;
    background: #fff !important;
    transition: border-color var(--bg-transition) !important;
}

.et_pb_contact_form_container .input:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    border-color: var(--bg-accent) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(var(--bg-accent-rgb), 0.1) !important;
}

/* ─────────────────────────────────────────────────────────────
   DIVIDER / SKILLELINJE
   ───────────────────────────────────────────────────────────── */

.et_pb_divider .et_pb_divider_internal {
    border-color: rgba(var(--bg-primary-rgb), 0.08) !important;
}

/* Aksent-divider */
.bergland-divider-accent .et_pb_divider_internal {
    border-color: var(--bg-accent) !important;
    max-width: 80px;
}

/* ─────────────────────────────────────────────────────────────
   ANIMASJONER (subtile)
   ───────────────────────────────────────────────────────────── */

@keyframes bergland-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bergland-animate {
    animation: bergland-fade-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVT
   ───────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
    .et_pb_section {
        padding: var(--bg-space-lg) 0;
    }

    .bergland-hero {
        min-height: 70vh;
    }

    h1 { font-size: clamp(2rem, 7vw, 3rem); }
    h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
}

@media (max-width: 767px) {
    body, #page-container {
        font-size: 16px;
    }

    .et_pb_section {
        padding: var(--bg-space-md) 0;
    }

    .bergland-hero {
        min-height: 60vh;
    }

    .et_pb_button {
        width: 100% !important;
        text-align: center !important;
    }

    .bergland-numbered .et_pb_blurb {
        padding-left: var(--bg-space-md);
    }

    .bergland-numbered .et_pb_blurb::before {
        position: static;
        display: block;
        margin-bottom: 8px;
    }
}

/* ─────────────────────────────────────────────────────────────
   SCROLL-EFFEKTER
   ───────────────────────────────────────────────────────────── */

/* Smooth scroll for ankerlenker */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Subtil parallax-effekt */
.bergland-parallax {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

@media (max-width: 980px) {
    .bergland-parallax {
        background-attachment: scroll;
    }
}
