/* =========================================
   Landsberg's Psykoterapi - Stylesheet
   ========================================= */

/* --- CSS Variables & Tokens --- */
:root {
    /* Colors from brief */
    --color-bg: #EBE5DB; /* Varm beige/taupe */
    --color-section: #DFD5C7; /* Rolig sand/taupe nuance */
    --color-text: #424242; /* Blødere mørkegrå/brunlig grå */
    --color-accent: #7A8B6F; /* Olivengrøn */
    --color-accent-hover: #65755A;
    --color-white: #FFFFFF;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-serif: 'Lora', serif;

    /* Spacing & Layout */
    --spacing-sm: 1rem;
    --spacing-md: 2.5rem;
    --spacing-lg: 5rem;
    --spacing-xl: 8rem;

    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(58, 58, 58, 0.05);

    --container-max-width: 1100px;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-weight: 300;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.text-center {
    text-align: center;
}

.container {
    width: 90%;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.btn {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(143, 175, 154, 0.4);
}

/* --- Navigation --- */
.navbar {
    background-color: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    /* Adjust based on actual logo proportion */
    object-fit: contain;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-menu a:hover {
    color: var(--color-accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(235, 229, 219, 0.2), rgba(235, 229, 219, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
}

.hero-content h1 {
    color: var(--color-text);
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 255, 255, 0.7);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    letter-spacing: 1px;
    margin-top: 1rem;
    font-weight: 400;
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.9);
}

/* --- Welcome Section --- */
.welcome-section {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    max-width: 800px;
}

.welcome-text {
    font-size: 1.1rem;
}

.highlight-text {
    font-weight: 500;
    margin-top: 1.5rem;
    font-size: 1.2rem;
}

/* --- Three Boxes --- */
.three-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: var(--spacing-xl);
}

.box {
    background-color: var(--color-section);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    display: block;
    height: 100%;
}

.box:hover {
    transform: translateY(-5px);
    background-color: var(--color-white);
    color: var(--color-text);
}

.box h3 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

/* --- Section Backgrounds --- */
.bg-section {
    background-color: var(--color-section);
    padding: var(--spacing-lg) 0;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    height: auto;
}

.about-text .subtitle {
    font-size: 1.2rem;
    font-family: var(--font-primary);
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

/* --- Therapy Room --- */
.therapy-room {
    padding: var(--spacing-xl) 0;
}

.section-intro {
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
    font-size: 1.1rem;
}

.room-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.room-img {
    border-radius: var(--border-radius);
    width: 100%;
    height: 350px;
    object-fit: cover;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.cta-foto {
    object-fit: contain;
    background-color: var(--color-white);
}

.room-img:hover {
    transform: scale(1.02);
}

/* --- Education Section --- */
.diploma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.diploma-img {
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    background-color: var(--color-white);
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.diploma-img:hover {
    transform: scale(1.03);
}

/* --- Testimonials Slider --- */
.testimonials-section {
    padding: var(--spacing-xl) 0;
    overflow: hidden;
    /* Prevent horizontal scrollbar on body if items slightly overflow */
}

.slider-container {
    position: relative;
    max-width: 1000px;
    margin: 3rem auto 0;
    padding: 0 60px;
    /* Mere plads til pileknapperne */
}

.slider-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    padding: 1rem 0;
    cursor: grab;
    /* Shows that it is draggable */
}

.slider-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.slider-track.active {
    cursor: grabbing;
    scroll-behavior: auto;
    /* Required for JS drag to feel responsive */
}

.testimonial-slide {
    flex: 0 0 calc(50% - 1rem);
    /* 2 items visible by default */
    min-width: 300px;
    background-color: var(--color-white);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none;
    /* Prevent text selection while dragging */
}

.testimonial-slide p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    pointer-events: none;
    /* Let drag events pass through to track */
}

.testimonial-slide cite {
    font-weight: 500;
    color: var(--color-accent);
    font-style: normal;
    font-size: 0.95rem;
    pointer-events: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-white);
    color: var(--color-accent);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.prev-btn {
    left: 5px;
}

.next-btn {
    right: 5px;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-section);
    padding: var(--spacing-lg) 0 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-contact a {
    color: var(--color-accent);
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(58, 58, 58, 0.1);
    padding-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--color-bg);
        flex-direction: column;
        transition: 0.3s ease;
        padding: 2rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero {
        height: 60vh;
    }

    :root {
        --spacing-xl: 5rem;
        --spacing-lg: 3.5rem;
    }

    .testimonial-slide {
        flex: 0 0 100%;
        /* 1 item visible on mobile */
    }

    .slider-container {
        padding: 0 20px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .prev-btn {
        left: -10px;
    }

    .next-btn {
        right: -10px;
    }
}

/* --- Modal styling --- */
.diploma-img {
    cursor: pointer;
}

.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 2000;
    /* Sit on top, above navbar */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(243, 239, 234, 0.95);
    /* matching --color-bg, but translucent */
    backdrop-filter: blur(5px);
}

.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem;
}

/* Modal Content (Image) */
.modal-content {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation-name: zoom;
    animation-duration: 0.4s;
}

/* Caption text */
#modalCaption {
    margin-top: 2rem;
    text-align: center;
    max-width: 700px;
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation-name: zoom;
    animation-duration: 0.5s;
    border-left: 4px solid var(--color-accent);
}

#modalCaption h3 {
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

#modalCaption p {
    color: var(--color-text);
    margin-bottom: 0;
}

/* The Close Button */
.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--color-text);
    font-size: 50px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-accent);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 50vh;
    }

    #modalCaption {
        padding: 1.5rem;
    }
}

/* --- Data CTA Section --- */
.data-cta-section {
    padding: var(--spacing-xl) 0;
}

.data-cta-content {
    background-color: var(--color-white);
    padding: 4rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.06);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin: 3rem 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-card h4 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-family: var(--font-primary);
    font-weight: 500;
}

.stat-card p {
    font-size: 0.95rem;
    color: #555;
    margin-top: 1.5rem;
    line-height: 1.6;
}

/* Simple Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: auto;
}

.bar {
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-white);
}

.bar-normal {
    background-color: #A3B8B0;
    /* Rolig grøn nuance */
}

.bar-stress {
    background-color: #E29578;
    /* Kontrastfarve for stress */
}

/* Pie Chart using conic-gradient */
.circle-chart {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: auto;
}

.pie {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-image: conic-gradient(var(--color-accent) calc(var(--p) * 1%), #E9E4DD 0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-text);
    font-size: 1.2rem;
}

.data-source {
    font-size: 0.85rem;
    color: #888;
    text-align: center;
    margin-bottom: 3rem;
}

.data-source a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cta-action {
    background-color: var(--color-section);
    padding: 3rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.cta-action h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

@media (max-width: 768px) {
    .data-cta-content {
        padding: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}