/*
Theme Name: Twenty Twelve Child
Description: Custom child theme for Twenty Twelve
Template: twentytwelve
Version: 1.0.0
*/

/* Custom styling will go below this line */

/* Display header image above navigation */
.site-header {
    display: flex;
    flex-direction: column;
}

.site-header > a {
    order: 1;
}

.site-header .main-navigation {
    order: 2;
}

/* Main navigation bar */
.main-navigation {
    background: #303030;
    margin-top: 6px;
    padding: 0 14px;
}

/* Navigation links */
.main-navigation li a {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    padding: 0 12px;
}

/* Hover and current page */
.main-navigation li a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: #9acd32;
}

/* Remove Twenty Twelve's default menu borders */
.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
    border-top: none;
    border-bottom: none;
}

/* Keep menu links white */
.main-navigation li a:visited {
    color: #ffffff;
}

/* Current menu item and parent */
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
    color: #9acd32;
}

/* Dropdown container */
.main-navigation ul.nav-menu ul.sub-menu {
    background: #303030;
    border: none;
}

/* All dropdown links */
.main-navigation ul.nav-menu ul.sub-menu li a {
    background: #303030;
    color: #ffffff;
}

/* Dropdown link hover and keyboard focus */
.main-navigation ul.nav-menu ul.sub-menu li a:hover,
.main-navigation ul.nav-menu ul.sub-menu li a:focus {
    background: #404040;
    color: #9acd32;
}

/* Current dropdown item */
.main-navigation ul.nav-menu ul.sub-menu li.current-menu-item > a,
.main-navigation ul.nav-menu ul.sub-menu li.current_page_item > a {
    background: #303030;
    color: #9acd32;
}

/* Sidebar links */
.widget-area .widget a {
    text-decoration: none;
    color: #555555;
}

/* Sidebar link hover */
.widget-area .widget a:hover {
    color: #9acd32;
    text-decoration: underline;
}

/* Sidebar list spacing */
.widget-area .widget li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.widget-area .widget {
    margin-bottom: 1.71428571rem;
}

/* Dark footer matching navigation */
footer[role="contentinfo"] {
    background: #303030;
    color: #cccccc;
    padding: 20px 25px;
    border-top: none;
    max-width: none;
    margin-top: 30px;
}

/* Footer links */
footer[role="contentinfo"] a,
footer[role="contentinfo"] a:visited {
    color: #cccccc;
    text-decoration: none;
}

footer[role="contentinfo"] a:hover {
    color: #9acd32;
}

/* Full-width footer */
footer[role="contentinfo"] {
    margin-left: -40px;
    margin-right: -40px;
    padding: 20px 40px;
    max-width: none;
}

/* Site content */
.site-content article {
    border-bottom: none;
    margin-bottom: 1.28571429rem
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: #9acd32;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 18px;
    cursor: pointer;
    z-index: 999;
}

/* Keep button hidden until JavaScript reveals it */
#back-to-top[hidden] {
    display: none;
}

/* Hover and keyboard focus */
#back-to-top:hover,
#back-to-top:focus-visible {
    background: #303030;
    color: #ffffff;
}

/* Smaller screens */
@media screen and (max-width: 600px) {
    #back-to-top {
        bottom: 15px;
        right: 15px;
    }
}

/* Reduce spacing below navigation on mobile */
@media screen and (max-width: 600px) {
    .site-header {
        padding-bottom: 0;
    }

    .site-content {
        margin-top: 20px;
    }
}

/* Mobile navigation */
@media screen and (max-width: 600px) {

    /* Reset desktop menu styling */
    .main-navigation li,
    .main-navigation ul li {
        display: block;
        float: none;
        margin: 0;
        padding: 0;
    }

    /* Restore normal link layout and spacing */
    .main-navigation li a,
    .main-navigation ul ul a {
        display: block;
        position: static;
        width: auto;
        height: auto;
        padding: 10px 15px;
        line-height: 1.5;
        text-align: left;
        text-decoration: none;
        background: #303030;
        color: #ffffff;
    }

    /* Submenus remain in normal document flow */
    .main-navigation ul ul {
        position: static;
        display: block;
        width: auto;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        background: #303030;
    }

    /* Indent submenu links */
    .main-navigation ul ul a {
        padding-left: 30px;
    }

    /* Hover and keyboard focus */
    .main-navigation li a:hover,
    .main-navigation li a:focus,
    .main-navigation ul ul a:hover,
    .main-navigation ul ul a:focus {
        background: #404040;
        color: #9acd32;
    }

    /* Highlight current page */
    .main-navigation .current-menu-item > a,
    .main-navigation .current_page_item > a,
    .main-navigation .current-menu-ancestor > a {
        color: #9acd32;
    }
}

/* Sidebar search widget */
.widget-area .widget_search form {
    position: relative;
    display: flex;
    width: 100%;
}

/* Search input */
.widget-area .widget_search input[type="search"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 42px 10px 12px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    background: #ffffff;
    color: #333333;
    font-size: 13px;
}

/* Sidebar search widget */
.widget-area .widget_search form {
    display: flex;
    position: relative;
    width: 100%;
    align-items: stretch;
    gap: 0;
}

/* Search field */
.widget-area .widget_search input[type="search"],
.widget-area .widget_search input[type="text"] {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    padding: 9px 12px;
    margin: 0;
    border: 1px solid #cccccc;
    border-right: none;
    border-radius: 3px 0 0 3px;
    background: #ffffff;
    font-size: 13px;
}

/* Sidebar search widget */
.widget-area .widget_search #searchform > div {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative;
    gap: 0;
}

/* Search input field */
.widget-area .widget_search #s {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #cccccc;
    border-right: none;
    border-radius: 3px 0 0 3px;
    background: #ffffff;
    color: #333333;
    font-size: 13px;
}

/* Search submit button */
.widget-area .widget_search #searchsubmit {
    display: block;
    flex: 0 0 40px;
    width: 40px;
    height: auto;
    position: static;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0 3px 3px 0;
    background: #303030;
    color: transparent;
    font-size: 0;
    cursor: pointer;
}

/* Magnifying glass icon */
.widget-area .widget_search #searchform > div::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E");
}

/* Button hover */
.widget-area .widget_search #searchsubmit:hover {
    background: #9acd32;
}

/* Mobile navigation button */
@media screen and (max-width: 600px) {

    .main-navigation button.menu-toggle {
        display: inline-block;
        background: #303030;
        color: #9acd32;
        border: 1px solid #9acd32;
        border-radius: 3px;
        padding: 6px 22px;
        margin: 8px auto;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.5;
        cursor: pointer;
        box-shadow: none;
        text-shadow: none;
    }

    /* Hover and keyboard focus */
    .main-navigation button.menu-toggle:hover,
    .main-navigation button.menu-toggle:focus-visible {
        background: #404040;
        color: #ffffff;
        border-color: #9acd32;
    }

    /* Menu button when expanded */
    .main-navigation button.menu-toggle.toggled-on {
        background: #404040;
        color: #9acd32;
    }
}

/* Correct footer width on mobile */
@media screen and (max-width: 600px) {
    footer[role="contentinfo"] {
        margin-left: -16px;
        margin-right: -16px;
        padding: 20px 16px;
        box-sizing: border-box;
    }
}
