
/* ==========================================
   STELLA PSYKIATRI – KONTAKTSIDA
========================================== */

:root {
    --background: #f8f6f2;
    --white: #ffffff;
    --sage-light: #e5e8de;
    --sage: #87927d;
    --sage-dark: #596451;
    --green: #3f4c3c;
    --green-dark: #303a2e;
    --text: #292b26;
    --text-light: #62675f;
    --border: #dcded5;
    --orange: #d9672f;
}

/* GRUNDINSTÄLLNINGAR */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background-color: var(--background);
    font-family: "Poppins", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

ul {
    list-style: none;
}

/* ==========================================
   HEADER
========================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: rgba(248, 246, 242, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(48, 58, 46, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-container {
    width: min(92%, 1450px);
    min-height: 90px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    width: 220px;
    height: auto;
}

/* NAVIGATION */

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.nav-links a {
    display: block;
    padding: 10px 9px;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--green);
    background-color: var(--sage-light);
}

.nav-links .contact-button {
    margin-left: 8px;
    padding: 12px 20px;
    color: var(--white);
    background-color: var(--green);
    border-radius: 999px;
}

.nav-links .contact-button:hover,
.nav-links .active-contact {
    color: var(--white);
    background-color: var(--green-dark);
}

/* MOBILMENY */

.menu-toggle {
    width: 46px;
    height: 46px;
    padding: 10px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--green);
    border-radius: 50%;
    cursor: pointer;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    display: block;
    background-color: var(--green);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ==========================================
   HERO – PORTRÄTT OCH TEXT
========================================== */

.contact-hero {
    position: relative;
    isolation: isolate;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: #303a2e;
}

/*
   Porträttet ligger bakom textytan.
   Bildytan är bredare och övergången
   tonas mjukt in från vänster.
*/

.contact-hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58%;

    background-image: url("../img/raktfram5.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 35%;

    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 0.12) 12%,
        rgba(0, 0, 0, 0.5) 28%,
        rgba(0, 0, 0, 0.85) 45%,
        #000 65%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 0.12) 12%,
        rgba(0, 0, 0, 0.5) 28%,
        rgba(0, 0, 0, 0.85) 45%,
        #000 65%
    );
}

/* Diskret toning för att behålla färgharmoni */

.contact-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(
        to right,
        rgba(48, 58, 46, 0.2) 0%,
        rgba(48, 58, 46, 0.08) 45%,
        rgba(48, 58, 46, 0) 75%
    );
}

/* Texten placeras närmare Stella */

.contact-hero-content {
    position: relative;
    z-index: 2;
    width: min(54%, 800px);
    margin-left: clamp(35px, 7vw, 130px);
    padding: 60px 15px;
    text-align: center;
    transform: none;
}

.contact-hero h1 {
    margin-bottom: 14px;
    color: var(--white);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(3.5rem, 5vw, 5.6rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.contact-hero-content > p:last-child {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.8;
}

/* DEKORATIV LINJE */

.hero-line {
    width: 160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-line span {
    width: 65px;
    height: 1px;
    background-color: #e8a474;
}

.hero-line i {
    width: 9px;
    height: 9px;
    margin: 0 7px;
    display: block;
    background-color: #e98950;
    border-radius: 50%;
}

/* ==========================================
   KONTAKTALTERNATIV
========================================== */

.contact-options {
    padding: 20px 0 35px;
    background-color: var(--background);
}

.contact-options-container {
    width: min(84%, 1180px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.contact-card {
    min-height: 280px;
    padding: 38px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.48);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.contact-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background-color: var(--sage-dark);
    border-radius: 50%;
}

.contact-icon span {
    font-size: 1.4rem;
    line-height: 1;
}

.contact-card h2 {
    margin-bottom: 12px;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 500;
}

.contact-card p {
    margin-bottom: 7px;
    color: var(--text);
    font-size: 0.91rem;
    line-height: 1.65;
}

.contact-card a:hover {
    color: var(--green);
}

.contact-card .card-small {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.82rem;
}

.small-line {
    width: 80px;
    height: 2px;
    margin-top: 18px;
    background-color: #df8650;
}

.map-link {
    margin-top: 8px;
    display: inline-block;
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.map-link:hover {
    color: var(--orange);
    text-decoration: underline;
}

/* ==========================================
   MEDDELANDESEKTION
========================================== */

.message-section {
    padding: 25px 0 85px;
    background-color: var(--background);
}

.message-container {
    width: min(90%, 1180px);
    margin: 0 auto;
    padding: 45px;
    display: grid;
    grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
    align-items: start;
    gap: 35px;
    background-color: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.message-intro {
    max-width: 340px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--sage-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.message-intro h2 {
    margin-bottom: 19px;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.2rem, 3vw, 3rem);
    font-weight: 500;
    line-height: 1.1;
}

.message-intro p {
    margin-bottom: 14px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* FORMULÄR */

.contact-form {
    width: 100%;
}

.form-group {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}

.form-group label {
    position: absolute;
    top: 8px;
    left: 16px;
    z-index: 2;
    color: var(--text-light);
    font-size: 0.66rem;
    font-weight: 500;
    pointer-events: none;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-form input {
    height: 57px;
    padding: 24px 16px 7px;
}

.contact-form textarea {
    min-height: 160px;
    padding: 30px 16px 12px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--sage-dark);
    background-color: var(--white);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-button-wrapper {
    margin-top: 16px;
}

.submit-button {
    min-width: 190px;
    min-height: 51px;
    padding: 13px 27px;
    color: var(--white);
    background-color: var(--green);
    border: none;
    border-radius: 999px;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.submit-button:hover {
    background-color: var(--green-dark);
    transform: translateY(-2px);
}

/* ==========================================
   KARTA
========================================== */

.map-section {
    padding: 80px 0 90px;
    background-color: #eeeee7;
}

.map-container {
    width: min(84%, 1180px);
    margin: 0 auto;
}

.map-heading {
    max-width: 650px;
    margin-bottom: 30px;
}

.map-heading h2 {
    margin-bottom: 14px;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 500;
    line-height: 1.1;
}

.map-heading p:not(.eyebrow) {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

.map-frame {
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: #dddddd;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.map-button {
    margin-top: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    color: var(--white);
    background-color: var(--green);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.map-button:hover {
    color: var(--white);
    background-color: var(--green-dark);
    transform: translateY(-2px);
}

/* ==========================================
   FOOTER
========================================== */

.footer {
    padding: 30px 0;
    background-color: #eeeee7;
    border-top: 1px solid #dcded5;
}

.footer-container {
    width: min(90%, 1300px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    text-align: left;
}

.footer strong {
    color: #303a2e;
    font-size: 0.83rem;
}

.footer p {
    margin: 0;
    color: #62675f;
    font-size: 0.75rem;
}

.footer-contact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.footer-contact a {
    display: inline-block;
    color: #62675f;
    font-size: 0.78rem;
    white-space: nowrap;
}

.footer-contact a:hover {
    color: var(--green);
}

.footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.back-top {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background-color: var(--sage-dark);
    border-radius: 50%;
}

.footer-links a {
    font-size: 0.70rem;
}

/* ==========================================
   MINDRE DATORER
========================================== */

@media screen and (max-width: 1200px) {

    .logo img {
        width: 185px;
    }

    .nav-links a {
        padding: 9px 6px;
        font-size: 0.69rem;
    }

    .contact-options-container,
    .message-container,
    .map-container {
        width: 90%;
    }

    .contact-hero-content {
        width: 55%;
        margin-left: 4%;
    }
}

/* ==========================================
   SURFPLATTA
========================================== */

@media screen and (max-width: 950px) {

    .header-container {
        min-height: 76px;
    }

    .logo img {
        width: 175px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: absolute;
        top: 76px;
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background-color: var(--background);
        border-bottom: 1px solid var(--border);
        transition: max-height 0.3s ease;
    }

    .main-navigation.open {
        max-height: 700px;
    }

    .nav-links {
        width: 92%;
        margin: 0 auto;
        padding: 15px 0 25px;
        display: block;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        padding: 13px 5px;
        font-size: 0.93rem;
        border-radius: 0;
    }

    .nav-links .contact-button {
        margin: 14px 0 0;
        display: inline-flex;
        padding: 12px 20px;
        border-radius: 999px;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* HERO */

    .contact-hero {
        min-height: 500px;
    }

    .contact-hero::before {
        width: 65%;
        background-position: center 35%;
    }

    .contact-hero-content {
        width: 59%;
        margin-left: 2%;
        padding: 50px 15px;
    }

    .contact-hero h1 {
        font-size: clamp(3rem, 6vw, 4.5rem);
    }

    .contact-hero-content > p:last-child {
        font-size: 0.9rem;
    }

    /* KONTAKTKORT */

    .contact-options-container {
        grid-template-columns: 1fr;
        width: min(90%, 720px);
    }

    .contact-card {
        min-height: auto;
        padding: 30px;
    }

    /* FORMULÄR */

    .message-container {
        width: min(90%, 720px);
        padding: 40px;
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .message-intro {
        max-width: 600px;
    }

    /* KARTA */

    .map-container {
        width: min(90%, 720px);
    }

    /* FOOTER */

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        text-align: left;
    }

    .footer-right {
        justify-content: flex-start;
    }
}

/* ==========================================
   MOBIL
========================================== */

@media screen and (max-width: 600px) {

    body {
        font-size: 15px;
    }

    .header-container {
        width: 91%;
    }

    .logo img {
        width: 155px;
    }

    /* PORTRÄTT ÖVERST, TEXT UNDER */

    .contact-hero {
        min-height: 620px;
        align-items: flex-end;
    }

    .contact-hero::before {
        width: 100%;
        height: 72%;
        top: 0;
        bottom: auto;
        background-size: cover;
        background-position: center 32%;

        -webkit-mask-image: linear-gradient(
            to bottom,
            #000 0%,
            #000 40%,
            rgba(0, 0, 0, 0.65) 65%,
            transparent 100%
        );

        mask-image: linear-gradient(
            to bottom,
            #000 0%,
            #000 40%,
            rgba(0, 0, 0, 0.65) 65%,
            transparent 100%
        );
    }

    .contact-hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(48, 58, 46, 0) 0%,
            rgba(48, 58, 46, 0.1) 35%,
            #303a2e 80%
        );
    }

    .contact-hero-content {
        width: 100%;
        margin: 0;
        padding: 30px 22px 40px;
    }

    .contact-hero h1 {
        font-size: 3.3rem;
    }

    .contact-hero-content > p:last-child {
        font-size: 0.88rem;
    }

    /* KONTAKTKORT */

    .contact-options {
        padding-top: 15px;
    }

    .contact-options-container {
        width: calc(100% - 30px);
        gap: 12px;
    }

    /* FORMULÄR */

    .message-section {
        padding-bottom: 55px;
    }

    .message-container {
        width: calc(100% - 30px);
        padding: 28px 20px;
        border-radius: 9px;
    }

    .message-intro h2 {
        font-size: 2.3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .submit-button {
        width: 100%;
    }

    /* KARTA */

    .map-section {
        padding: 55px 0 65px;
    }

    .map-container {
        width: calc(100% - 30px);
    }

    .map-heading h2 {
        font-size: 2.4rem;
    }

    .map-frame {
        height: 340px;
        border-radius: 9px;
    }

    .map-button {
        width: 100%;
    }

    /* FOOTER */

    .footer-contact {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px 22px;
    }
}
