/* 50/50 Section Styles */

.fifty-fifty-section {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.fifty-fifty-section-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: nowrap; /* Förhindra att elementen hamnar under varandra */
    min-height: 700px; /* Säkerställ en minsta höjd för containern */
}

/* Content column */
.fifty-fifty-section-content-column {
    width: 50%;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    background-color: #fff;
    padding: 40px;
    justify-content: center;
    --accent-color: #00FFFF; /* Default accent color, can be overridden inline */
    min-height: 700px; /* Säkerställ en minsta höjd */
}

.fifty-fifty-section-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    justify-content: center; /* Centrera innehållet vertikalt */
}

/* När beskrivning finns - ändra layout */
.fifty-fifty-section.has-description .fifty-fifty-section-content-wrapper {
    justify-content: space-between; /* Sprida ut innehållet */
    height: 100%; /* Ta upp hela höjden */
    padding-top: 0; /* Ta bort extra padding */
}

.fifty-fifty-section.has-description .fifty-fifty-section-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Börja från toppen */
    height: calc(100% - 80px); /* Minus padding för länken */
}

/* Headline */
.fifty-fifty-section-headline {
    font-size: 3.6vw; /* Minskad storlek enligt bilden */
    font-weight: 900;
    text-transform: uppercase;
    margin: 0; /* Ta bort marginalen för att centrera vertikalt */
    line-height: 1.1;
    color: #000;
    align-self: flex-start; /* Säkerställ att rubriken är vänsterställd */
    width: 100%; /* Säkerställ att rubriken tar upp hela bredden */
    max-width: 100%; /* Förhindra att rubriken blir för bred */
}

/* När beskrivning finns - lägg till margin under rubriken */
.fifty-fifty-section.has-description .fifty-fifty-section-headline {
    margin-bottom: 20px;
}

/* Description styling */
.fifty-fifty-section-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
    max-width: 90%;
    flex: 1; /* Ta upp tillgängligt utrymme */
    display: flex;
    align-items: center; /* Centrera vertikalt */
}

/* Link */
.fifty-fifty-section-link-wrapper {
    position: absolute;
    bottom: 40px;
    left: 40px;
}

.fifty-fifty-section-link,
.fifty-fifty-section-link-text {
    display: inline-block;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.fifty-fifty-section-link:hover {
    opacity: 0.7;
}

/* Image column */
.fifty-fifty-section-image-column {
    width: 50%;
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
    min-height: 700px; /* Säkerställ en minsta höjd */
}

.fifty-fifty-section-image {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.fifty-fifty-section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative; /* Relativ positionering istället för absolut */
}

/* Reversed layout */
.fifty-fifty-section.layout-reversed .fifty-fifty-section-container {
    flex-direction: row-reverse;
}

/* Placeholder for admin */
.fifty-fifty-section-placeholder {
    background-color: #f0f0f0;
    height: 100%;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed #ccc;
}

/* Accent line on the left side */


/* Responsive adjustments */
@media (max-width: 1200px) {
    .fifty-fifty-section-headline {
        font-size: 4.5vw;
    }

    .fifty-fifty-section-content-column {
        padding: 30px;
    }

    .fifty-fifty-section-link-wrapper {
        bottom: 30px;
        left: 30px;
    }
}

@media (max-width: 992px) {
    .fifty-fifty-section-headline {
        font-size: 4vw;
        margin-bottom: 20px;
    }

    .fifty-fifty-section-description {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .fifty-fifty-section-content-column {
        padding: 25px;
    }

    .fifty-fifty-section-link-wrapper {
        bottom: 25px;
        left: 25px;
    }
}

@media (max-width: 768px) {
    .fifty-fifty-section-container {
        flex-direction: column-reverse;
        flex-wrap: wrap;
		min-height: 400px;
    }

    .fifty-fifty-section.layout-reversed .fifty-fifty-section-container {
        flex-direction: column-reverse;
    }

    .fifty-fifty-section-content-column,
    .fifty-fifty-section-image-column {
        width: 100%;
        flex: 0 0 100%;
		min-height: 250px !important;
    }

    .fifty-fifty-section-image {
        height: 300px;
    }

    .fifty-fifty-section-headline {
        font-size: 6vw;
        margin-bottom: 10px;
    }

    .fifty-fifty-section-description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .fifty-fifty-section-content-column {
        padding: 25px 20px;
        min-height: 200px; /* Säkerställ tillräckligt utrymme för innehåll och länk */
    }

    .fifty-fifty-section-link-wrapper {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .fifty-fifty-section-image {
        height: 250px;
    }

    .fifty-fifty-section-headline {
        font-size: 7vw;
    }

    .fifty-fifty-section-description {
        font-size: 0.9rem;
    }

    .fifty-fifty-section-content-column {
        padding: 20px 15px;
    }

    .fifty-fifty-section-link-wrapper {
        margin-top: 20px;
    }
}
