/* =========================================================
   Vejbystrand Konsult AB – Main Stylesheet
   ========================================================= */

/* ---------- Reset & Variables ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:    #1a2744;
    --navy-dk: #111c33;
    --gold:    #c9a96e;
    --gold-lt: #dfc48c;
    --cream:   #f8f6f0;
    --white:   #ffffff;
    --text:    #2d2d2d;
    --text-lt: #666;
    --shadow:  rgba(0,0,0,.18);
    --radius:  6px;
    --trans:   .35s ease;
    --hdr-h:   72px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--navy-dk);
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-lt); }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--hdr-h);
    background: transparent;
    transition: background var(--trans), box-shadow var(--trans);
}
.site-header.scrolled {
    background: var(--navy-dk);
    box-shadow: 0 2px 20px var(--shadow);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}
.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .03em;
    line-height: 1.2;
}

/* ---------- Nav ---------- */
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-list  { display: flex; align-items: center; gap: .25rem; list-style: none; }

/* Language switcher */
.lang-switcher {
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: var(--radius);
    color: rgba(255,255,255,.75);
    cursor: pointer;
    font-family: inherit;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    padding: .3rem .65rem;
    transition: border-color var(--trans), color var(--trans);
    white-space: nowrap;
}
.lang-switcher:hover { border-color: var(--gold); color: var(--gold); }
.lang-switcher .lang-sep { margin: 0 .15rem; opacity: .45; }
.lang-switcher .lang-sv,
.lang-switcher .lang-en { transition: color var(--trans); }
.lang-switcher .active  { color: var(--gold); }

.nav-item { position: relative; }
.nav-link {
    display: block;
    padding: .5rem .85rem;
    color: rgba(255,255,255,.88);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: color var(--trans), background var(--trans);
}
.nav-link:hover,
.nav-link.active { color: var(--gold); background: rgba(255,255,255,.07); }

/* Dropdown */
.has-children:hover .dropdown { opacity:1; pointer-events:all; transform:translateY(0); }
.dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    min-width: 210px;
    background: var(--navy-dk);
    border: 1px solid rgba(201,169,110,.25);
    border-radius: var(--radius);
    list-style: none;
    padding: .4rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--trans), transform var(--trans);
    box-shadow: 0 8px 32px var(--shadow);
    z-index: 100;
}
.dropdown li a {
    display: block;
    padding: .55rem 1.1rem;
    color: rgba(255,255,255,.8);
    font-size: .84rem;
}
.dropdown li a:hover { color: var(--gold); background: rgba(255,255,255,.05); }

.admin-nav-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,.15);
}
.admin-link {
    font-size: .8rem;
    color: var(--gold);
    padding: .3rem .7rem;
    border: 1px solid var(--gold);
    border-radius: 50px;
    transition: background var(--trans);
}
.admin-link:hover { background: var(--gold); color: var(--navy-dk); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform var(--trans), opacity var(--trans);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ---------- Page Background ---------- */
.page-bg, .page-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
}
.page-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image .6s ease;
    filter: brightness(.75);
}
.page-bg-overlay {
    background: linear-gradient(
        to bottom,
        rgba(17,28,51,.35) 0%,
        rgba(17,28,51,.65) 60%,
        rgba(17,28,51,.9)  100%
    );
}

/* ---------- Main Content ---------- */
#main-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--hdr-h) + 2rem) 1.5rem 4rem;
}

.page-content {
    width: 100%;
    max-width: 1100px;
    opacity: 1;
    transition: opacity .3s ease;
}
.page-content.fading { opacity: 0; }

/* ---------- Loader ---------- */
.page-loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    align-items: center;
    justify-content: center;
    background: rgba(17,28,51,.5);
}
.page-loader.active { display: flex; }

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(201,169,110,.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero (Home) ---------- */
.hero-content {
    text-align: center;
    padding: 3rem 1rem 2rem;
    color: var(--white);
}
.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,.85);
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 2.5rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .75rem 1.8rem;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--trans);
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--gold);
    color: var(--navy-dk);
    border-color: var(--gold);
}
.btn-primary:hover {
    background: var(--gold-lt);
    border-color: var(--gold-lt);
    color: var(--navy-dk);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,169,110,.4);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.6);
}
.btn-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--white);
    color: var(--white);
}

/* ---------- Content Section ---------- */
.content-section {
    background: rgba(255,255,255,.95);
    border-radius: 12px;
    padding: 3rem 3.5rem;
    color: var(--text);
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.content-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    color: var(--navy);
    margin-bottom: 1.2rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--gold);
}
.content-section h3 {
    font-size: 1.15rem;
    color: var(--navy);
    margin: 1.5rem 0 .6rem;
}
.content-section p { margin-bottom: 1rem; color: #444; }

.info-box {
    background: var(--cream);
    border-left: 4px solid var(--gold);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-top: 1.5rem;
}
.info-box p { margin: .3rem 0; color: var(--text); }

/* ---------- Services Grid ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.service-card {
    background: var(--cream);
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    border-top: 3px solid var(--gold);
    transition: transform var(--trans), box-shadow var(--trans);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.service-icon { font-size: 1.4rem; color: var(--gold); margin-bottom: .75rem; }
.service-card h3 { color: var(--navy); font-size: 1rem; margin-bottom: .5rem; }
.service-card p  { font-size: .9rem; color: #555; margin: 0; }

/* ---------- Promo / Partner Cards ---------- */
.promo-divider {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gold);
}
.promo-divider h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--navy);
    margin-bottom: .5rem;
    padding-bottom: 0;
    border-bottom: none;
}
.promo-divider p { color: #555; margin-bottom: 0; }

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.promo-card {
    background: var(--navy);
    border-radius: 10px;
    padding: 1.75rem 2rem;
    color: var(--white);
    border-top: 3px solid var(--gold);
    transition: transform var(--trans), box-shadow var(--trans);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,.3);
}
.promo-badge {
    display: inline-block;
    background: rgba(201,169,110,.2);
    color: var(--gold);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .25rem .75rem;
    border-radius: 50px;
    border: 1px solid rgba(201,169,110,.4);
    align-self: flex-start;
}
.promo-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--white);
    margin: 0;
}
.promo-card p {
    color: rgba(255,255,255,.78);
    font-size: .9rem;
    margin: 0;
    flex-grow: 1;
    line-height: 1.6;
}
.promo-card .btn {
    align-self: flex-start;
    margin-top: .5rem;
}

/* ---------- Values Grid ---------- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.value-card {
    background: var(--navy);
    color: var(--white);
    border-radius: 10px;
    padding: 2rem 1.75rem;
}
.value-card h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: .75rem; }
.value-card p  { font-size: .9rem; color: rgba(255,255,255,.8); margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}
.contact-info h3 { color: var(--navy); margin-bottom: .75rem; }
.contact-info p, .contact-info address { font-style: normal; color: #555; margin-bottom: .5rem; }
.contact-info a { color: var(--gold); }

.contact-form-wrap h3 { color: var(--navy); margin-bottom: 1rem; }
.contact-form .form-group {
    margin-bottom: 1rem;
}
.contact-form label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: .35rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid #ddd;
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--trans);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}
.form-result {
    margin-top: .75rem;
    padding: .6rem 1rem;
    border-radius: var(--radius);
    font-size: .9rem;
    display: none;
}
.form-result.ok  { display:block; background:#d4edda; color:#155724; }
.form-result.err { display:block; background:#f8d7da; color:#721c24; }

/* ---------- Styled List ---------- */
.styled-list { list-style: none; margin: 1rem 0; padding: 0; }
.styled-list li {
    padding: .5rem 0 .5rem 1.6rem;
    position: relative;
    border-bottom: 1px solid #eee;
    color: #444;
}
.styled-list li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: .65rem;
    top: .75rem;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 10;
    background: var(--navy-dk);
    color: rgba(255,255,255,.75);
    padding: 3.5rem 1.5rem 0;
    border-top: 1px solid rgba(201,169,110,.2);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}
.footer-col h4 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 1rem;
    letter-spacing: .05em;
}
.footer-col p, .footer-col address { font-size: .875rem; font-style: normal; margin-bottom: .4rem; }
.footer-col a { color: rgba(255,255,255,.65); font-size: .875rem; }
.footer-col a:hover { color: var(--gold); }

.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: .35rem; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    font-size: .8rem;
    color: rgba(255,255,255,.4);
}
.footer-admin-link {
    font-size: .75rem;
    color: rgba(255,255,255,.25);
}
.footer-admin-link:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .main-nav {
        position: fixed;
        top: var(--hdr-h);
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        background: var(--navy-dk);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1rem;
        transform: translateX(100%);
        transition: transform var(--trans);
        border-left: 1px solid rgba(201,169,110,.2);
        overflow-y: auto;
    }
    .main-nav.open { transform: translateX(0); }

    .nav-list { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
    .nav-link  { font-size: 1rem; padding: .8rem 0; }

    .dropdown {
        position: static;
        opacity: 1;
        pointer-events: all;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,.05);
        padding: 0 0 0 1rem;
        border-radius: 0;
        display: none;
    }
    .has-children.open .dropdown { display: block; }

    .admin-nav-bar { margin-left: 0; padding-left: 0; border-left: none; }

    .content-section { padding: 2rem 1.5rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .services-grid, .values-grid { grid-template-columns: 1fr; }
}
