/*
Theme Name: Fukasawa Child - F8/Mayorga.Net
Theme URI: https://mayorga.net
Description: Child theme of Fukasawa for F8/Mayorga.Net. Right-hand sidebar, white background, green accents, Montserrat title, hamburger menu below 1200px, and Featherlight lightbox styling with captions.
Author: Javy Mayorga
Template: fukasawa
Version: 1.0.0
Text Domain: fukasawa-child
*/

/* The Montserrat font is loaded from functions.php, so there is no @import here. */

/* Hide post titles, meta and the excerpt on the grid */
.post-title,
.post-meta,
.post-excerpt {
    display: none !important;
}

/* Wide screens: sidebar on the right */
@media (min-width: 1201px) {
    .sidebar {
        left: auto;
        right: 0;
    }
    .sidebar:before {
        left: auto;
        right: 0;
        border-left: 1px solid #eee;
    }
    .wrapper {
        margin-left: 0 !important;
        margin-right: 280px;
        padding-left: 50px;
        box-sizing: border-box;
    }
}

/* 1200px and below: hamburger layout (copied from the theme's mobile rules) */
@media (max-width: 1200px) {
    .wrapper {
        margin-left: 0;
    }
    .sidebar {
        align-items: center;
        background: #fff;
        border-bottom: 1px solid #ddd;
        display: flex;
        justify-content: space-between;
        font-size: 1em;
        margin: 0;
        padding: 30px 5%;
        position: relative;
        width: 100%;
    }
    .sidebar:before {
        content: none;
    }
    .content,
    .content.thin {
        max-width: 90%;
        margin: 5% auto;
    }
    .main-menu,
    .widgets,
    .credits {
        display: none;
    }
    .blog-title {
        width: 100%;
    }
    .nav-toggle {
        display: block;
    }
}

/* White background */
body,
.sidebar {
    background: #fff !important;
}

/* Hamburger menu panel: white background, dark text */
.mobile-navigation {
    background: #fff !important;
    border-bottom: 1px solid #ddd;
}
.mobile-menu a,
.mobile-menu a:visited,
.mobile-menu a:focus,
.mobile-menu a:active {
    color: #767676 !important;
}
.mobile-menu a:hover,
.mobile-menu > .current-menu-item > a,
.mobile-menu > .current_page_item > a {
    color: #2e9e5b !important;
}

/* Active menu item: green arrow instead of the blue x (sidebar and hamburger menu) */
.main-menu .current-menu-item:before,
.main-menu .current_page_item:before,
.mobile-menu .current-menu-item:before,
.mobile-menu .current_page_item:before {
    content: "\2192" !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px;
    font-weight: 700;
    color: #2e9e5b !important;
}

/* Hamburger button when open: soft green tint, green arrow instead of the x */
.nav-toggle.active {
    background: #eaf6ef !important;
}
.nav-toggle.active p {
    color: #2e9e5b !important;
}
.nav-toggle.active .bars .bar {
    opacity: 0 !important;
}
.nav-toggle.active .bars:after {
    content: "\2192";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    color: #2e9e5b;
    font-size: 18px;
    line-height: 1;
}

/* Title: Montserrat, aligned with the menu, same green as the arrows */
.blog-title,
.blog-title a {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
.blog-title a {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.25em;
}
.blog-title a,
.blog-title a:hover {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left !important;
    color: #2e9e5b !important;
}

/* Footer: hide "Powered by WordPress" and "Theme by..." */
.credits .theme-by,
.credits .powered-by,
.credits p:not(:first-child) {
    display: none !important;
}

/* Lightbox look */
.featherlight {
    background: rgba(0, 0, 0, 0.5) !important;
}
.featherlight .featherlight-content {
    background: #fff !important;
    padding: 12px !important;
}
.featherlight .featherlight-close-icon {
    background: #fff !important;
    color: #000 !important;
    font-size: 20px;
}
.featherlight-caption,
.featherlight .rl-gallery-caption {
    display: none !important;
}

/* Lightbox caption from the post excerpt: under the photo, same width, grows with the text */
.featherlight .fl-caption {
    width: 0;
    min-width: 100%;
    margin-top: 14px;
    padding-bottom: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
    text-align: left;
}

/* Keep photo + caption inside the window, no scrolling */
.featherlight .featherlight-content {
    overflow: visible !important;
    max-height: none !important;
}
.featherlight .featherlight-image {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    object-fit: contain;
    margin: 0 auto;
}

/* Lightbox previous/next arrows: kept, in the same green as the menu arrows */
.featherlight-previous span,
.featherlight-next span {
    color: #2e9e5b !important;
    text-shadow: none !important;
}

/* Contact form: plain field headings instead of the blue block */
.wpforms-container fieldset legend,
.wpforms-container .wpforms-field-label {
    background: transparent !important;
    color: #333 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* Keep the required asterisk visible, in the site green */
.wpforms-container .wpforms-required-label {
    color: #2e9e5b !important;
}

/* Contact form: green submit button with white text */
.wpforms-container .wpforms-submit-container .wpforms-submit,
.wpforms-container button.wpforms-submit,
.wpforms-container input.wpforms-submit {
    background: #2e9e5b !important;
    border: none !important;
    color: #fff !important;
    border-radius: 3px;
    transition: background-color 0.2s ease-in-out;
}
.wpforms-container .wpforms-submit-container .wpforms-submit:hover,
.wpforms-container button.wpforms-submit:hover,
.wpforms-container input.wpforms-submit:hover {
    background: #1f7a45 !important;
    color: #fff !important;
}

/* Green dividers: short lines in the sidebar, form name box */
.main-menu:before,
.widgets:before,
.widget + .widget:before,
.credits:before {
    background: #2e9e5b;
    height: 1px;
}
.wpforms-container fieldset {
    border: 1px solid #2e9e5b !important;
}

/* Sidebar menu links: gray normally, green on the page you are on (and on hover) */
.main-menu a,
.main-menu a:visited,
.main-menu a:focus,
.main-menu a:active {
    color: #767676 !important;
}
.main-menu a:hover,
.main-menu .current-menu-item > a,
.main-menu .current_page_item > a {
    color: #2e9e5b !important;
}

/* All other links (page text, widgets, footer): green always, light gray only on hover */
.post-content a:not(.wp-block-button__link):not(.wp-block-file__button),
.post-content a:not(.wp-block-button__link):not(.wp-block-file__button):visited,
.post-content a:not(.wp-block-button__link):not(.wp-block-file__button):focus,
.post-content a:not(.wp-block-button__link):not(.wp-block-file__button):active,
.widget-content a,
.widget-content a:visited,
.credits p a,
.credits p a:visited {
    color: #2e9e5b !important;
}
.post-content a:not(.wp-block-button__link):not(.wp-block-file__button):hover,
.widget-content a:hover,
.credits p a:hover {
    color: #b5b5b5 !important;
}
