/* --- Hamburger Menu --- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    position: absolute;
    top: 18px;
    left: 18px;
}
.hamburger-icon rect {
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}
.hamburger.open .hamburger-icon rect:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open .hamburger-icon rect:nth-child(2) {
    opacity: 0;
}
.hamburger.open .hamburger-icon rect:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

nav#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: rgba(26,26,26,0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: translateY(-100%);
    transition: transform 0.3s;
    z-index: 1050;
}
nav#main-nav.open {
    transform: translateY(0);
}
nav#main-nav ul {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem 0 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
nav#main-nav ul li {
    margin: 0;
}
/* Full-width background for intro section */
#intro {
    width: 100%;
    box-sizing: border-box;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-direction: column;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    text-align: center;
}



.intro-bg {
    width: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a1a; /* fallback solid color */
    padding: 48px 0;
    box-sizing: border-box;
    /* Dessa kan överskrivas av inline-style om de finns */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    aspect-ratio: 1/1;
    background-image: url('images/lifeline_logo.jpeg');
}

@media (max-width: 900px) {
  .intro-bg {
    min-height: 0;
    aspect-ratio: unset;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    width: 100vw;
    max-width: 100vw;
    padding: 24px 0;
  }
}

header, nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}


body {
    margin-top: 90px; /* Adjust if your nav/header is taller/shorter */
    background-color: #121212;
    color: #f5f5f5;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}


nav {
    background: rgba(26,26,26,0.97); /* Match header bg, slightly transparent */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

nav ul li {
    margin: 10px;
}

nav a {
    color: #ff9900;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.2s;
}

nav a:hover {
    color: #ff6600;
}


@media (max-width: 600px) {
    #intro {
        width: 100%;
        min-height: 300px;
        /* background properties removed for intro section */
    }
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    nav ul li {
        display: block;
        margin: 5px 0;
    }
    body {
        margin-top: 120px; /* More space for stacked nav on mobile */
    }
    section {
        width: 90%;
    }
}

header {
    background-color: #1a1a1a;
    padding: 30px 20px; /* Adds space around the content */
    text-align: center; /* Centers the text */
}


/* Gemensamma regler för sektioner med bakgrundsbild */
#kontakt, #lyssna, #info, #services {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.95);
    padding: 48px 32px;
    z-index: 1;
    text-align: left;
}
#kontakt::before, #lyssna::before, #info::before, #services::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.65);
    z-index: 0;
    border-radius: inherit;
}
#kontakt > *, #lyssna > *, #info > *, #services > * {
    position: relative;
    z-index: 1;
}

/* Unika bakgrundsbilder för varje sektion */
#kontakt { background-image: url('images/gallery/marcus02.jpg'); }
#lyssna { background-image: url('images/gallery/marcus01.jpg'); }
#info { background-image: url('images/gallery/mark01.jpg'); }
#services { background-image: url('images/gallery/dala_henrik01.jpg'); }

#info img {
    border: 4px solid rgba(255,255,255,0.7);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    margin: 24px 0;
}

h1 {
    color: #f0d402;
    font-size: 48px; /* Adjust size as needed */
    font-weight: bold; /* Make it stand out */
}

img {
    max-width: 100%; /* Bilden anpassas till skärmens bredd */
    height: auto; /* Behåller proportionerna */
    display: block; /* Förhindrar onödiga mellanrum */
    margin: 0 auto; /* Centrerar bilden */
}

form {
    display: flex; /* Använder Flexbox för centrering */
    flex-direction: column; /* Ställer in fälten vertikalt */
    align-items: center; /* Centrerar fälten horisontellt */
    justify-content: center; /* Centrerar innehållet vertikalt */
    width: 100%; /* Anpassar sig till skärmens bredd */
}

form input,
form textarea {
    width: 300px; /* Sätter en fast bredd på fälten */
    max-width: 100%; /* Gör dem responsiva */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 15px; /* Lägger till extra utrymme mellan fälten */
}

#services ul {
    list-style-type: none; /* Tar bort punkterna */
    padding-left: 0; /* Tar bort extra indrag */
}

section {
    margin: 50px auto;
    width: 80%;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}

section.fade-in {
    opacity: 1;
    transform: translateX(0);
}

section.fade-out {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
}

button {
    background-color: #ff6600; /* Snygg orange färg */
    color: white; /* Vit text */
    font-size: 16px; /* Större och tydligare text */
    padding: 10px 20px; /* Mer utrymme runt texten */
    border: none; /* Tar bort standardramen */
    border-radius: 5px; /* Rundade hörn */
    cursor: pointer; /* Visar att knappen är klickbar */
    transition: 0.3s; /* Mjukare hover-effekt */
}

button:hover {
    background-color: #e65c00; /* Lite mörkare orange vid hover */
}

#info {
    text-align: left;
}

a {
    color: #ff9900; /* Välj din färg */
    text-decoration: none; /* Tar bort understrykning */
    font-weight: bold;
}

a:hover {
    color: #ff6600; /* Ändrar färg vid hover */
    text-decoration: underline; /* Visar understrykning vid hover */
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 proportion */
    height: 0;
}

.video-container iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* --- Gallery Grid --- */
.gallery-section {
    margin: 50px auto;
    width: 80%;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 auto;
    padding: 0;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* Modal for full-size image */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 80vw;
    height: 80vh;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
.gallery-modal.active {
    display: flex;
}
.gallery-modal img {
    max-width: 70vw;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}
.gallery-modal .close-btn {
    position: absolute;
    top: 32px;
    left: 48px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 8px #000;
    transition: color 0.2s;
}
.gallery-modal .close-btn:hover {
    color: #ff6600;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid img {
        height: 120px;
    }
}