/* --- Globala Inställningar --- */
:root {
    --primary-color: #000000;
    --background-color: #ffffff;
    --text-color: #000000;
    --text-color-2: #ffffff;
    --button-color: #000000;
    --max-content-width: 1400px; /* Denna styr när sidan slutar växa i bredd */
}

.darkmode {
    --primary-color: #fff;
    --background-color: #000;
    --text-color: #FFF;
    --text-color-2: #000;
    --button-color: #FFF;
}

* {
    box-sizing: border-box;
}

body, html {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    width: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Förhindrar side-scroll på stora skärmar */
}

/* --- Animationer --- */
@keyframes fromLeft { from { transform: translateX(-50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fromTop { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fromBottom { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popOut { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Navigering --- */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Centrerar naven */
    width: 100%;
    padding: 20px 5%;
    animation: fromTop 1s ease;
    z-index: 100;
}

.Logo {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-color-2);
    text-decoration: none;
    font-weight: 700;
}

nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
    margin: 0;
}

nav ul li a {
    font-size: 1rem;
    color: var(--text-color-2);
    font-weight: 500;
    text-decoration: none;
    background-color: var(--button-color);
    padding: 0.8rem 1.5rem;
    border-radius: 0.4rem;
}

.menu-icon { display: none; cursor: pointer; }

/* --- Hero Section --- */
.hero {
    width: 100%;
    background-color: var(--background-color);
    overflow: hidden;
}

.button{
    font-size: 1rem;
    color: var(--text-color-2);
    font-weight: 500;
    text-decoration: none;
    background-color: var(--button-color);
    padding: 0.8rem 1.5rem;
    border-radius: 0.4rem;
}

.body-hero {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Håller 50/50 split */
    min-height: 100vh;
    width: 100%;
}

.hero-body-left {
    width: 100%;
}

.hero-body-left img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    /* Behåller din design med runda hörn på höger sida */
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    animation: fromLeft 1.25s ease;
}

.hero-body-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 5rem; /* Avstånd från bilden */
    padding-right: 5%;   /* Säkerhetsmarginal till högerkanten */
}

/* En inre behållare för texten så den inte blir för bred på ultrawide */
.hero-text-container {
    max-width: 600px; 
    width: 100%;
}

.hero-title1 { 
    font-size: clamp(2rem, 3vw, 3.5rem); 
    color: var(--text-color); 
    font-weight: 700; 
    margin: 0; 
}

.hero-title2 { 
    font-size: clamp(1rem, 1.5vw, 1.8rem); 
    color: var(--text-color); 
    font-weight: 500; 
    margin-bottom: 1rem; 
}

.hero-subtitle1 { 
    font-size: 0.8rem; 
    color: var(--text-color); 
    margin-bottom: 2rem; 
    line-height: 1.6; 
}

/* --- Media Query för att fixa mobilvyn när vi tog bort max-width --- */
@media (max-width: 992px) {
    .body-hero {
        grid-template-columns: 1fr;
    }
    .hero-body-left img {
        height: 50vh;
        border-radius: 0 0 30px 30px;
    }
    .hero-body-right {
        padding: 3rem 5%;
        align-items: center;
        text-align: center;
    }
    .hero-text-container {
        max-width: 100%;
    }
}
/* --- About Section --- */
.About-section {
    padding: 5rem ;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-container {
    display: grid;
    /* Skapar 3 kolumner på desktop, 1 på mobil automatiskt */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Vi animerar hela kortet som en enhet */
.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: popOut both;
    animation-timeline: view();
    animation-range: entry 10% cover 40%; /* Triggar animationen när kortet scrollas in */
}

/* Bild-inställningar */
.about-image-wrapper {
    width: 100%;
}

.about-image-wrapper img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 1.5rem;
}

/* Titlar - matchar klassen i din HTML */
.about-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Beskrivning - matchar klassen i din HTML */
.about-card-subtitle {
    text-align: center;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 0;
    opacity: 0.8;
}

/* Fallback för webbläsare som inte stödjer scroll-animationer (som äldre Safari) */
@supports not (animation-timeline: view()) {
    .about-card {
        animation: fromBottom 0.8s ease forwards;
    }
}


/* --- Contact Section --- */
.contact-section {
    padding: 6rem 5%;
    background-color: var(--background-color);
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
    animation: fromBottom 0.8s ease;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 1rem;
}

/* Form layout */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Input grupper */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Inputs */
.form-input,
.form-textarea {
    font-family: 'Poppins', sans-serif;
    padding: 14px;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.15);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.25s ease;
}

/* Focus effekt */
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--text-color);
    transform: scale(1.01);
}

/* Textarea resize */
.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Button */
.form-button {
    margin-top: 1rem;
    padding: 14px 20px;
    border-radius: 0.5rem;
    border: none;
    background-color: var(--button-color);
    color: var(--text-color-2);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.form-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Mobil */
@media (max-width: 600px) {

    .contact-section {
        padding: 4rem 5%;
    }

    .contact-title {
        font-size: 1.8rem;
    }

}


/* --- Why Us Section --- */
.why-us {
    padding: 6rem 5%;
    background: linear-gradient(
        180deg,
        var(--background-color) 0%,
        rgba(0,0,0,0.03) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Liten subtil bakgrundseffekt */
.why-us::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    z-index: 0;
}

.why-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.why-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fromTop 0.8s ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
}

.why-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.why-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.6;
}

/* Grid */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

/* Cards */
.why-card {
    background-color: var(--background-color);
    padding: 2.5rem 2rem;
    border-radius: 1.2rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.35s ease;
    
    animation: fromBottom both;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
}

/* Hover effekt */
.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* Ikon */
.why-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.why-card:hover .why-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Rubrik */
.why-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Text */
.why-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
    color: var(--text-color);
}

/* CTA */
.why-cta {
    text-align: center;
    margin-top: 4rem;
    animation: popOut both;
    animation-timeline: view();
    animation-range: entry 20% cover 40%;
}

.why-button {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--button-color);
    color: var(--text-color-2);
    border-radius: 0.6rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.why-button:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

/* Fallback för äldre webbläsare */
@supports not (animation-timeline: view()) {
    .why-card {
        animation: fromBottom 0.8s ease forwards;
    }

    .why-header,
    .why-cta {
        animation: fromBottom 0.8s ease forwards;
    }
}

/* Mobiljustering */
@media (max-width: 600px) {
    .why-us {
        padding: 4rem 5%;
    }

    .why-grid {
        gap: 2rem;
    }
}




/* --- Footer --- */
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 4rem 5%;
    gap: 3rem;
}

.footer-title {
    border-bottom: 2px solid var(--text-color);
    width: fit-content;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-subtitle, .footer-ul {
    color: var(--text-color);
    font-size: 1rem;
    text-decoration: none;
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: block;
}

/* --- Media Queries (Mobil) --- */
@media (max-width: 992px) {
    .body-hero { grid-template-columns: 1fr; text-align: center; }
    .hero-body-left img { height: 50vh; border-radius: 0 0 30px 30px; }
    .hero-body-right { padding: 3rem 5%; align-items: center; }
    .about-container { grid-template-columns: 1fr; gap: 4rem; }
}

@media (max-width: 600px) {
    nav { padding: 15px 5%; }
    nav ul { display: none; } /* Kräver JS för hamburgermeny */
    .menu-icon { display: block; color: var(--text-color); }
    .footer-container { text-align: center; }
    .footer-title { margin: 0 auto 1.5rem auto; }
}


/* --- Mobilmeny-inställningar --- */
@media (max-width: 768px) {
    nav {
        background-color: var(--background-color);
        padding: 15px 5%; /* Mindre padding på mobil */
    }

    .Logo
    {
        color: var(--text-color);
    }

    #menuList {
        position: absolute;
        top: 100%; /* Placerar menyn direkt under nav-baren */
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        overflow: hidden;
        
        /* Animation för att glida ner */
        max-height: 0; 
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        
        /* Skugga så man ser skillnad på meny och bakgrund */
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 0;
        margin: 0;
    }

    /* Klassen som JavaScript lägger till */
    #menuList.show-menu {
        max-height: 300px; /* Justera beroende på hur många länkar du har */
        opacity: 1;
        padding: 20px 0;
    }

    #menuList li {
        width: 100%;
        text-align: center;
        list-style: none;
    }

    #menuList li a {
        display: block;
        padding: 15px;
        width: 100%;
        background: none; /* Tar bort knappen på mobil för renare look */
        color: var(--text-color);
        font-size: 1.2rem;
        text-decoration: none;
    }

    .menu-icon {
        display: block; 
        cursor: pointer;
        font-size: 1.8rem;
        color: var(--text-color);
    }
}



/* ============================= */
/*   Subtila Hover-förbättringar */
/* ============================= */

/* --- NAV BUTTON HOVER --- */
nav ul li a {
    transition: all 0.25s ease;
}

nav ul li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}


/* --- HERO IMAGE HOVER --- */
.hero-body-left img {
    transition: transform 0.6s ease;
}

.hero-body-left img:hover {
    transform: scale(1.03);
}


/* --- ABOUT CARD HOVER --- */
.about-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.about-card:hover {
    transform: translateY(-8px);
}

/* Bild zoom inuti about */
.about-image-wrapper img {
    transition: transform 0.6s ease;
}

.about-card:hover .about-image-wrapper img {
    transform: scale(1.05);
}


/* --- CONTACT INPUT HOVER --- */
.form-input:hover,
.form-textarea:hover {
    border-color: var(--text-color);
}


/* --- FOOTER LINKS HOVER --- */
.footer-ul {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-ul:hover {
    opacity: 0.7;
    transform: translateX(4px);
}


/* --- LOGO HOVER --- */
.Logo {
    transition: opacity 0.3s ease;
}

.Logo:hover {
    opacity: 0.8;
}


/* --- SMOOTH SECTION FADE IN --- */
/* Gör så att hela sektioner känns mjukare när man scrollar */

.hero,
.About-section,
.contact-section,
.footer-container {
    animation: fromBottom 0.8s ease both;
}

/* --- Centrera About Section på mobil --- */
@media (max-width: 992px) {

    .About-section {
        padding: 4rem 5%;
        min-height: auto; /* Tar bort full-height på mobil */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .about-container {
        text-align: center;
        width: 100%;
    }

    .about-card {
        align-items: center;
    }

    .about-image-wrapper {
        display: flex;
        justify-content: center;
    }

    .about-image-wrapper img {
        max-width: 100%;
    }
}