/*
Theme Name: GeneratePress Child
Theme URI: http://olge.se/generatepress-child/
Description: GeneratePress Child Theme
Author: OLGE
Author URI: http://olge.se
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-child
*/

/* ============== CSS Variabler ============== */
:root {
    --global-text-color: black;
    --global-link-color: #ffd300;
    --global-hover-color: red;
    --menu-bg-color: rgba(0, 0, 255, 0.5);
}

/* ============== Grundläggande inställningar ============== */
.clients-list {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}

.site-logo {
    display: none;
}

/* ============== Text- och länkövergångar ============== */
.home-intro,
.home-intro a {
    transition: color 0.5s ease;
}

.home-intro {
    color: var(--global-text-color);
}

.home-intro a {
    color: var(--global-link-color);
}

.home-intro a:hover {
    color: var(--global-hover-color) !important;
}

.info-button,
.info-button a,
.info-button strong {
    color: var(--global-link-color) !important;
}

.info-button {
    display: block;
    width: fit-content;
    margin-bottom: 10px;
    cursor: pointer;
    color: var(--global-link-color);
}

.info-button strong {
    color: var(--global-link-color);
}

.info-button a {
    display: inherit;
    width: fit-content;
    text-decoration: none;
    color: var(--global-link-color);
    transition: color 0.5s ease;
}

.info-button:hover,
.info-button:hover * {
    color: var(--global-hover-color) !important;
}

/* ============== Header och Global Meny ============== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background-color: transparent;
    z-index: 999;
    padding: 0;
}

.global-menu {
    background: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 15%;
    z-index: 1000;
    /* Dessa regler gäller förutsatt att .open inte är applicerad */
    text-align: left;
    color: white;
}

.menu-content {
    margin-left: 20px;
    margin-top: 10vh;
    text-align: left;
}

.menu-content p {
    margin: 0;
    line-height: 1;
    white-space: nowrap;
    font-size: clamp(14px, 2vw, 18px);
    color: var(--global-text-color);
}

.menu-content p a {
    color: var(--global-link-color);
    transition: color 0.3s ease;
}

.menu-content p a:hover {
    color: var(--global-hover-color);
}

html,
body {
    margin: 0;
    padding: 0;
}

/* ============== Slideshow (endast på startsidan) ============== */
#slideshow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.slideshow-image {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 2s ease-in-out;
}

.slideshow-caption {
    position: absolute;
    right: 20px;
    bottom: 40px;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 500;
    color: var(--global-link-color);
    text-align: right;
    transition: color 0.5s ease, opacity 2s ease-in-out;
}

#caption {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 60px;
}

#caption-title {
    font-size: 1em;
    font-weight: bold;
}

#caption-photographer {
    font-size: 0.8em;
    margin-top: 2px;
}

/* ============== Modal-styling ============== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 1s ease;
}

.modal-content {
    background-color: #ffffff;
    color: #000000;
    font-family: 'inconsolata';
    font-weight: 400;
    margin: 10% auto;
    padding: 10px;
    border: 0;
    width: 60%;
    max-width: 600px;
    position: relative;
}

.modal-content a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-content a:hover {
    color: var(--global-hover-color);
    text-decoration: underline;
}

.close {
    color: #333333;
    float: right;
    font-size: 28px;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000000;
    text-decoration: underline;
}

/* ============== Footer ============== */
.site-footer {
    position: fixed;
    bottom: 5px;
    right: 20px;
    color: white;
    text-align: center;
    z-index: 100;
    width: auto;
}

.site-footer p {
    font-size: 0.8rem !important;
}
/* ============== Responsiva Inställningar ============== */

/* Desktopspecifika regler */
@media (min-width: 769px) {
    /* Återställ eventuella mobilstilar som kan påverka desktop */
    .global-menu {
        display: block !important; /* Säkerställ att menyn alltid visas i desktop */
        width: 15% !important;
        text-align: left !important;
        background: transparent !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .global-menu .menu-content {
        margin-left: 20px !important;
        text-align: left !important;
        display: block !important;
        flex-direction: initial !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    
    .menu-content p, 
    .menu-content p.info-button,
    .menu-content p.info-button strong {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        font-size: clamp(14px, 2vw, 18px) !important;
        display: block !important;
    }
    
    /* Dölj mobilmenyknappen i desktop */
    .mobile-menu-button {
        display: none !important;
    }
}

/* Mobilspecifika regler */
@media (max-width: 768px) {
    /* Global mobilmeny: täcker hela skärmen när den är öppen */
    .global-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 100vh;
        background: transparent;
        padding: 20px 0;
        z-index: 1000;
        text-align: center;
    }
    
    .global-menu.open {
        display: block !important;
        background: var(--menu-bg-color) !important;
    }
    
    /* Inre menyinnehåll – centreras i mobil */
    .global-menu .menu-content {
        margin: 0 auto;
        min-height: 20vh;
        text-align: center;
        font-size: 20px !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1100;
    }
    
    /* Se till att mobillinjen tar bort vänstermarginaler */
    .global-menu.open .menu-content {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .menu-content p {
        white-space: nowrap;
        margin: 10px 0;
        font-size: 20px !important;
        text-align: center;
    }
    
    .global-menu .menu-content a {
        font-size: 20px !important;
    }
    
    .menu-content p.info-button {
        margin: 10px auto !important;
        text-align: center !important;
        font-size: 20px !important;
        display: block !important;
        width: fit-content !important;
    }
    
    .menu-content p.info-button strong {
        text-align: center !important;
        display: block !important;
    }
    
    .mobile-menu-button {
        display: block;
        background: transparent !important;
        color: var(--global-link-color);
        font-size: 25px;
        font-weight: 500;
        border: none !important;
        padding: 10px 15px;
        cursor: pointer;
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 1200;
        outline: none;
        -webkit-appearance: none;
    }
    
    .mobile-menu-button:active,
    .mobile-menu-button:focus,
    .mobile-menu-button:hover {
        background: transparent !important;
        color: red !important;
    }
}

/* Responsiva fontstorlekar */
@media (max-width: 768px) {
    p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    p {
        font-size: 14px;
    }
}
