/*
Theme Name:     Courier Recruit
Theme URI:      n/a
Template:       kadence
Author:         All Advertising Ltd
Author URI:     n/a
Description:    Child Theme Description
Version:        1.0
License:        GNU General Public License v3.0 (or later)
License URI:    https://www.gnu.org/licenses/gpl-3.0.html
*/

/* Footer Widget Area Adjustments
   Styles for spacing and alignment in footer widgets, including icon lists and general widgets.
*/
.footer-widget-area-inner .kt-svg-icon-list {
    margin-bottom: 0px !important;
}

.site-middle-footer-inner-wrap .widget {
    margin-bottom: 10px;
}


figcaption {
    display: none;
}
/* Cookie Banner and Document Styles
   Customizations for cookie consent banner background and document container widths/colors.
*/
.cmplz-cookiebanner.cmplz-show {
    background-image: linear-gradient(150deg, var(--global-palette1) 0%, var(--global-palette5) 100%) !important;
}

#cmplz-document, 
.editor-styles-wrapper .cmplz-unlinked-mode {
    max-width: max-content !important;
}

.cmplz-document {
    background: #ffffff;
    color: #062026;
}

/* Gravity Forms Styling
   Form field borders, required indicators, spacing, and confirmation message colors.
*/
.gform-theme--foundation .gfield textarea.large {
    min-block-size: 2rem;
}

div#gform_fields_1 {
    row-gap: 10px;
}

p.gform_required_legend {
    display: none;
}

span.gfield_required.gfield_required_asterisk {
    color: #1a748c;
}

#gform_fields_1 input,
#gform_fields_1 textarea {
    border-top: 0px !important;
    border-left: 0px !important;
    border-right: 0px !important;
    border-bottom: 2px solid #1a748c !important;
    border-radius: 0px !important;
}

#gform_fields_1 input:focus {
    outline-width: 0px;
}

div#gform_confirmation_message_1 {
    color: #1a748c;
}

/* Content Body Colors
   Text color overrides for blog and single post pages.
*/
body.blog,
body.single-post {
    color: #041418 !important;
}

/* Social Links and Block Adjustments
   Border radius for social links and padding for specific row blocks.
*/
.wp-block-social-link {
    border-radius: 0.75rem;
}

#block-19 .kt-row-column-wrap.kt-has-1-columns {
    padding-bottom: 0.5rem;
}

/* Responsive Styles
   Media queries for tablet/desktop and mobile adjustments, including gradients, alignments, and flex behaviors.
*/
@media (min-width: 768px) {
    .kb-row-layout-id701_7566cf-ca > .kt-row-layout-overlay {
        opacity: 1;
        background: linear-gradient(100deg, #062026 55%, rgba(255, 255, 255, 0) 36%);
    }
}

@media (max-width: 767px) {
    /* Styles for mobile devices */
    .wp-block-kadence-iconlist ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap {
        justify-content: flex-start;
    }
    
    .footer-widget-area-inner .wp-block-kadence-iconlist ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap {
        justify-content: center;
    }
    
    .ft-ro-dir-row .footer-section-inner-items-2 .footer-widget-area.content-tablet-align-center:first-child {
        margin: 0;
    }
    
    .ft-ro-dir-row .footer-section-inner-items-2 .footer-widget-area {
        flex: unset;
        margin-left: 0px;
    }
    
    ul.wp-block-social-links {
        justify-content: center;
    }
}

/* Custom 404 Page Styles
   Layout and typography for the error page only (scoped to body.error404).
*/
body.error404 .site-main { /* Targets Kadence's main content area for full-page centering, but only on 404 */
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
}

body.error404 .custom-404-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(150deg, var(--global-palette1) 0%, var(--global-palette5) 100%) !important;
    text-align: center;
    font-family: inherit; /* Inherit from Kadence theme */
}

body.error404 .custom-404-content {
    max-width: 800px; /* Slightly wider for posts grid */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensures stacked elements are horizontally centered */
}

body.error404 .custom-404-logo {
    margin-bottom: 1rem;
}

body.error404 .custom-404-logo img {
    max-width: 150px; /* Adjust based on your logo size */
    height: auto;
}

/* Recent Posts Section */
body.error404 .custom-404-recent-posts {
    margin-top: 2rem;
    width: 100%;
}

body.error404 .custom-404-recent-heading {
    font-size: 1.5rem;
    color: #ffffff;
    margin: 0 0 1.5rem;
    font-weight: bold;
}

body.error404 .custom-404-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

body.error404 .custom-404-post-item {
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: left;
    transition: transform 0.3s;
}

body.error404 .custom-404-post-item:hover {
    transform: translateY(-2px);
}

body.error404 .custom-404-post-image {
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: 0.25rem;
}

body.error404 .custom-404-post-image img {
    width: 100%;
    object-fit: cover;
}

body.error404 .custom-404-post-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

body.error404 .custom-404-post-title a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

body.error404 .custom-404-post-title a:hover {
    color: #1a748c;
}

body.error404 .custom-404-post-excerpt {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.4;
}

body.error404 .custom-404-post-readmore {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #1a748c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.3s;
}

body.error404 .custom-404-post-readmore:hover {
    background: #062026;
    color: #ffffff;
}

body.error404 .custom-404-title {
    font-size: 8rem;
    font-weight: bold;
    color: #ffffff; /* Matches your earlier Gravity Forms accent */
    margin: 0 0 1rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

body.error404 .custom-404-message {
    font-size: 1.25rem;
    color: #ffffff; /* Matches your body text color */
    margin: 0 0 2rem;
    line-height: 1.5;
}

body.error404 .custom-404-home {
    margin: 0 0 1rem 0; /* Space for posts below */
}

body.error404 .custom-404-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #1a748c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    transition: background 0.3s, color 0.3s;
}

body.error404 .custom-404-btn:hover {
    background: #062026;
    color: #ffffff;
}

/* Mobile Responsiveness (scoped to 404) */
@media (max-width: 767px) {
    body.error404 .site-main {
        min-height: max-content; /* More space on mobile */
    }
    
    body.error404 .custom-404-container {
        height: max-content;
        padding: 1rem;
    }
    
    body.error404 .custom-404-title {
        font-size: 5rem;
    }
    
    body.error404 .custom-404-message {
        font-size: 1rem;
    }
    
    body.error404 .custom-404-logo img {
        max-width: 120px;
    }
    
    body.error404 .custom-404-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    body.error404 .custom-404-recent-heading {
        font-size: 1.25rem;
    }
}