/* ============================================
   FORSIDE - Specifikke styles for forside.html
   ============================================ */

/* Hero section med hero-text */
.hero {
    margin-top: 50px;
    margin-bottom: 2rem;
    min-height: 45vh;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 50px;
    row-gap: 0;
    align-items: start;
    position: relative;
    min-width: 0;
}

.hero a {
    text-decoration: none;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .11em;
    font-size: .86rem;
    cursor: pointer;
    display: inline-block;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.hero a::after {
    content: '→';
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-4px);
    display: inline-block;
}

.hero-text {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 0.5rem;
    justify-content: center;
    justify-items: center;
    max-width: 200px;
    min-width: 0;
    align-self: start;
}

.hero-text1 {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 0.5rem;
    justify-content: center;
    max-width: 200px;
    min-width: 180px;
    align-self: start;
}

.hero-text1 h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.hero-text1 a {
    font-size: 0.75rem;
    padding: 0.4rem 0;
}

.hero-text1 h5 {
    font-size: 0.7rem;
    margin-top: 0.75rem;
    opacity: 0.8;
}

.hero-text .maa-logo {
    display: flex;
    margin-top: 1rem;
    width: 75%;
    height: auto;
    margin-bottom: 1rem;
}

.hero-text-image-widescreen {
    display: none; /* Hidden by default */
    width: 150px;
    margin: 0 auto;
}

.hero-text-image {
    display: flex; /* Shown by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 1rem;
}

/* Hero slideshow */
.hero-slideshow-wrapper {
    position: relative;
    min-width: 300px;
    max-width: 945px;
    width: 100%;
    height: 100%;
    aspect-ratio: 945 / 658;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.hero-slide {
    width: 100%;
    height: 100%;
    display: none
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.hero-slideshow-prev, .hero-slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255, 255, 255, .9);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #222;
    cursor: pointer;
    z-index: 3
}

.hero-slideshow-prev {
    left: 16px
}

.hero-slideshow-next {
    right: 16px
}

.hero-slideshow-wrapper:hover .hero-slideshow-prev, 
.hero-slideshow-wrapper:hover .hero-slideshow-next {
    display: flex
}

/* Touch-enheder: vis altid knapper og pile */
@media (pointer: coarse) {
    .hero-slideshow-prev, .hero-slideshow-next {
        display: flex;
    }
    
    .hero a {
        color: var(--accent);
        border-bottom-color: var(--accent);
        width: 180px;
    }
    
    .hero a::after {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enheder med mus: hover-effekt kun ved hover */
@media (pointer: fine) {
    .hero a:hover {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }
    
    .hero a:hover::after {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Desktop 800px+: Widescreen logo */
@media (min-width: 800px) {
    .hero-text-image-widescreen {
        display: block; /* Show widescreen on desktop */
        width: 150px;
    }
    
    .hero-text-image-widescreen .kh-logo-widescreen {
        max-width: 150px;
    }

    /* Skjul kun KH logo i hero-text-image, men vis MAA logo */
    .hero-text-image {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        row-gap: 1rem;
    }
    
    .hero-text-image .kh-logo {
        display: none; /* Skjul KH logo på desktop */
    }
    
    /* MAA logo skal vises på desktop */
    .hero-text .maa-logo {
        display: flex;
        width: 250px;
        margin: 1rem auto 0 auto;
        height: auto;
    }
}

/* Mobile responsive */
@media (max-width: 799px) {
    .hero {
        margin-top: 10px;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 0;
        row-gap: 0px;
        min-height: 56vh;
    }
    
    .hero-text {
        grid-row: 1;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr;
    }

    .hero-text1 a {
        min-width: 170px;
    }

    .hero-text h5 {
        margin: 0px 0px 5px;
    }

    .hero-text-image-widescreen {
        display: none;
    }

    .hero-text-image {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: 10px;
    }
    
    .hero-text .maa-logo {
        margin: 0 0;
        width: 100%;
        height: 100%;
        min-width: 134px;
        max-height: 118px;
        object-fit: cover
    }

    .hero-text .kh-logo {
        margin: 0 0;
        width: 100%;
        height: 100%;
        min-width: 134px;
        max-height: 118px;
        object-fit: cover
    }
    
    .hero-slideshow-wrapper {
        grid-row: 2;
        min-width: 0;
    }

    .hero h1 {
        font-size: 1.5rem
    }
}

/* ============================================
   CONTENT SECTIONS - Main content area
   ============================================ */

.content-sections {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Wider width for screens larger than 1400px */
@media (min-width: 1401px) {
    .content-sections {
        max-width: 1350px;
    }
}

.content-section-left,
.content-section-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
    align-items: start;
}

.content-section-left:last-child,
.content-section-right:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.content-section-left .content-section-image {
    grid-column: 1;
}

.content-section-left .content-section-text {
    grid-column: 2;
}

.content-section-right .content-section-image {
    grid-column: 2;
}

.content-section-right .content-section-text {
    grid-column: 1;
}

.content-section-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
}

.content-section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-section-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--text);
}

.content-section-text p {
    line-height: 1.75;
    margin-bottom: 1rem;
    color: var(--text);
}

.content-section-text p:last-of-type {
    margin-bottom: 1.5rem;
}

.content-section-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    color: var(--text);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.2s ease;
    margin-top: 0.5rem;
}

.content-section-link::after {
    content: "→";
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.content-section-link:hover {
    color: var(--accent);
}

.content-section-link:hover::after {
    transform: translateX(4px);
}

.content-section-text strong {
    font-weight: 700;
    color: var(--text);
}

/* Mobile responsive for content sections */
@media (max-width: 799px) {
    .content-sections {
        padding: 0 0.75rem;
        max-width: 100%;
    }
    
    .content-section-left,
    .content-section-right {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .content-section-left .content-section-image,
    .content-section-right .content-section-image {
        grid-column: 1;
        order: 1;
    }
    
    .content-section-left .content-section-text,
    .content-section-right .content-section-text {
        grid-column: 1;
        order: 2;
    }
    
    .content-section-image {
        min-height: 250px;
    }
    
    .content-section-text h2 {
        font-size: 1.25rem;
    }
}

/* ============================================
   FEATURED PROJECTS SECTION
   ============================================ */

.featured-projects-section {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 48px;
    padding: 3rem 1rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* Wider width for screens larger than 1400px */
@media (min-width: 1401px) {
    .featured-projects-section {
        max-width: 1350px;
    }
}

.featured-projects-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
    text-align: left;
}

.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.featured-projects-grid .project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/2;
}

.featured-projects-grid .project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.featured-projects-grid .project-card:hover img {
    transform: scale(1.05);
}

.featured-projects-grid .project-card .hover-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.featured-projects-grid .project-card:hover .hover-overlay {
    opacity: 1;
}

.featured-projects-grid .project-card .hover-title {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    font-size: 1.1rem;
    padding: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.featured-projects-link-wrapper {
    text-align: left;
    margin-top: 2rem;
}

.featured-projects-link {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.featured-projects-link::after {
    content: "→";
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.featured-projects-link:hover {
    color: var(--accent);
}

.featured-projects-link:hover::after {
    transform: translateX(4px);
}

/* Mobile responsive for featured projects */
@media (max-width: 799px) {
    .featured-projects-section {
        padding: 2rem 0.75rem;
    }
    
    .featured-projects-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .featured-projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .featured-projects-grid .project-card .hover-overlay {
        display: none;
    }
    
    .featured-projects-grid .project-title-mobile {
        display: block;
        font-size: 0.8rem;
        padding: 0.5rem 0 0 0;
        font-weight: normal;
        color: var(--text);
        text-align: center;
    }
}

/* Very small screens: 1 column */
@media (max-width: 400px) {
    .featured-projects-grid {
        grid-template-columns: 1fr;
    }
}

