/*
Theme Name: Brdr. Møller
Theme URI: https://www.brdrmoller.dk
Author: Dennis Lauritzen & Brdr. Møller
Author URI: https://www.dvlp-consult.dk
Description: Lavet til Brdr. Møller.
Requires at least: 6.6.2
Tested up to: 6.6.2
Requires PHP: 8.0
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brdrmoller
Tags:
*/

/* Override the navigation font to Cardo */
#footerSocialMenu .wp-block-navigation {
    font-family: 'Inter', serif !important; /* Ensures Cardo is used */
}

#footerSocialMenu .wp-block-navigation a {
    font-family: 'Inter', serif !important; /* Ensures links in navigation use Cardo */
}



/* Hero image adjustments */
.wp-block-cover {
    background-position: center;
    background-size: cover;
}

span.underline-color {
    text-decoration: underline;
    text-decoration-color: var(--wp--preset--color--brdrmoller-base); /* Your custom color */
}

a.wp-block-post-excerpt__more-link {
    color: var(--wp--preset--color--brdrmoller-base);
}


.contact-block-container .contact-block {
    flex: 1 1 360px;
}
/* CONTACT BLOCK */
@media (max-width: 1000px) {
    .contact-block-container {
        justify-content: left;
        flex-direction: column; /* Stack columns on top of each other */
    }
    .contact-block-container .contact-block {
        flex-basis: 100%;
        width: 100%;
    }
    .contact-block-container .contact-block:not(:last-child){
        padding-bottom: 60px;
    }
}


/* RESPONSIVE COLUMNS BLOCK */
.responsive-columns.block-image-left-text .right-column,
.responsive-columns.block-image-right-text .left-column {
    position: relative;
}

.responsive-columns.block-image-left-text .right-column .image-block,
.responsive-columns.block-image-right-text .left-column .image-block {
    z-index: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.responsive-columns.block-image-left-text .right-column .image-block {
    left: -100px;
    padding-left: 10px;
}
.responsive-columns.block-image-right-text .left-column .image-block {
    right: -100px;
    padding-right: 10px;
}

.responsive-columns.block-image-right-text .text-block,
.responsive-columns.block-image-left-text .text-block {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.responsive-columns.block-image-right-text .text-block {
    padding-right: 30px;
    padding-left: 100px;
}
.responsive-columns.block-image-left-text .text-block {
    padding-left: 30px;
    padding-right: 100px;
}

@media (max-width: 1100px) {
    .responsive-columns.block-image-left-text .right-column {
        position: initial;
    }
    .responsive-columns.block-image-left-text .right-column .image-block,
    .responsive-columns.block-image-right-text .left-column .image-block {
        z-index: 1;
        position: relative !important;
        transform: none;
        max-width: none;
    }

    .responsive-columns.block-image-left-text .right-column .image-block {
        left: 0;
        padding-left: 0px !important;
    }
    .responsive-columns.block-image-right-text .left-column .image-block {
        right: 0;
        padding-right: 0px !important;
    }

    .responsive-columns.block-image-left-text .image-block img {
        position: relative;
        max-width: 100%;
        left: 0;
    }

    .block-image-right-text .text-block,
    .block-image-left-text .text-block {
        padding-right: 30px;
        padding-left: 30px;
    }

    .responsive-columns.block-image-left-text .left-column {
        order: 2;
    }
    .responsive-columns.block-image-left-text .right-column {
        order: 1;
    }

    .responsive-columns {
        flex-direction: column; /* Stack columns on top of each other */
    }

    .responsive-columns .wp-block-column {
        flex-basis: 100%; /* Make each column take full width */
    }

    .responsive-columns .wp-block-column img {
        position: relative; /* Reset position for the image */
        left: 0; /* Reset left position */
        top: auto; /* Reset top position */
        transform: none; /* Remove transformation */
        margin: 0 auto; /* Center the image */
        max-width: 100%; /* Ensure the image does not overflow */
    }
}

/* MENU ----- */
/* Make the navbar fixed at the top */
.hero-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /*background: rgba(255, 255, 255, 0.9); /* Semi-transparent */
    z-index: 1000;
}
.hero-navbar .wp-block-site-logo {
    margin-left: 20px;
}
.hero-navbar .wp-block-site-title {
    margin-left: 10px;
    font-family: Inter,sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.hero-navbar .wp-block-navigation {
    margin-right: 20px;
}

/* Mobile Menu change */
@media (min-width: 1000px) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: none !important;
    }

    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: block !important;
        width: 100%;
        position: relative;
        z-index: auto;
        background-color: inherit;
    }
}

/* neutralize the wp default for 600px */
@media (min-width: 600px) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex;
    }
    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none;
    }
}

.white-background {
    background: #f9f9f9 !important;
}

/**
 Burger menu setup.
 */
nav.nav-transparent button.wp-block-navigation__responsive-container-open {
    color: #ffffff;
}



/* Style for top-level menu items (Parent links) */
@media (min-width: 1000px) {
    nav.nav-transparent ul li,
    nav.nav-transparent ul li a {
        color: #ffffff; /* Top-level items should be white */
    }

    /* Target only top-level navigation buttons */
    nav.nav-transparent > ul > li > a > button {
        color: #ffffff; /* Set color to white for top-level buttons */
    }

    /* Style for dropdowns (child links) */
    nav.nav-transparent ul li:hover > ul li a {
        color: #111111; /* Child (dropdown) items should always be black */
    }

    /* Ensure the dropdowns have the correct color on hover and when opened */
    nav.nav-transparent ul li ul li,
    nav.nav-transparent ul li ul li a {
        color: #111111; /* Dropdown items default to black */
    }

    /* Ensure the top-level items don't get affected when the dropdown is opened */
    nav.nav-transparent ul li:hover > a {
        color: #ffffff; /* Keep parent item white on hover */
    }

    /* Ensure the child items are black, even if their parent is hovered */
    nav.nav-transparent ul li > ul li a {
        color: #111111; /* Dropdown items should remain black */
    }
}



.navigation-top-line.transparent-background .wp-block-site-title {
    color: #ffffff;
}
.navigation-top-line.white-background .wp-block-site-title {
    color: #111111;
}




.navigation-top-line .wp-block-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Adjust as needed */
}



/**
 * LOGIN FORM styling
 *
 * for custom login form
 */
/* Centering the form */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 25px 30px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    text-align: center;
    font-family: 'Inter', sans-serif; /* Modern font */
}

/* Form heading */
.login-form h2 {
    font-family: 'Cardo',serif;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 800;
    color: #333;
}

/* Form group styling */
.login-form .form-group {
    margin-bottom: 15px;
    text-align: left;
}

/* Labels */
.login-form label {
    font-family: 'Inter',sans-serif;
    font-weight: 400px;
    font-size:15px;
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #555;
}

/* Input fields */
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}

/* Focus effect */
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
}

/* Submit button */
.login-form .login-button {
    font-family: 'Inter',sans-serif;
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form .login-button:hover {
    background-color: #005f8d;
}
