/*
Theme Name: Blocksy Child
Template: blocksy
Version: 1.0
Author: Jonny McCrink - jonnymccrink.com
*/

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Header Layout */
.custom-header {
    width: 100%;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0; /* sticks to the top */
    background: #1c1c1c; /* ensures content behind doesn’t show through */
    z-index: 1000; /* keeps it above other content */
    margin-bottom: 10px;
}

.custom-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

/* Logo */
.header-logo {
    flex: 0 0 auto;
}
.header-logo img {
    display: block;
    max-height: 80px;   /* sensible desktop size */
    width: auto;
    height: auto;
}

/* Navigation */
.onepager-nav {
    margin-left: auto; /* pushes nav fully right */
}
.onepager-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.onepager-nav a {
    text-decoration: none;
    font-weight: 500;
    color: #ffffff; /* white text */
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s, border-bottom 0.3s;
}

.onepager-nav a:hover {
    color: #bababa !important; /* white text */
}


/* Global body styles */
body {
    background-color: #1c1c1c !important; /* charcoal/dark grey */
}

/* Reset basics */
body, h1, h2, h3, h4, p, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    color: #ffffff;
}

/* Links */
a {
    color: #ffffff !important; 
}

a:hover, a:focus {
    color: #f0f0f0 !important; 
    text-decoration: underline;
}


/* Sections */
section {
    padding: 80px 20px;
    max-width: 1440px;
    margin: 0 auto;
    background-color: transparent;
}
.custom-h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}
.acf-wysiwyg {
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.larger-text {
    font-size: 18px;
}


/* Logos gallery block */
.wp-block-gallery {
    text-align: center;
    padding: 20px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Grid layout */
.wp-block-gallery.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 32px;
}

.wp-block-gallery .blocks-gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Make images inside links slightly transparent on hover */
.wp-block-gallery .blocks-gallery-item a img {
    max-width: 140px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
    transition: opacity 0.3s ease; /* smooth effect */
}

.wp-block-gallery .blocks-gallery-item a:hover img {
    opacity: 0.8; /* slight opacity on hover */
}

.wp-block-gallery .blocks-gallery-item img {
    max-width: 140px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

/* Caption */
.wp-block-gallery figcaption {
    font-size: 15px !important;
    margin: 0;
    padding: 10px;
}


/* Tablet */
@media (max-width: 900px) {
    .wp-block-gallery.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 500px) {
    .wp-block-gallery.columns-3 {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Contact */
.forminator-ui {
    display: block !important;
    visibility: visible !important;
}

/* Form container */
.forminator-ui {
    color: #ffffff;
}

/* Labels */
.forminator-ui .forminator-label {
    color: #f1f1f1;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Input fields */
.forminator-ui input,
.forminator-ui textarea,
.forminator-ui select {
    width: 100%;
    background: #1f1f1f;
    border: 1px solid #555;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 15px;
}

/* Placeholder text */
.forminator-ui input::placeholder,
.forminator-ui textarea::placeholder {
    color: #b5b5b5;
}

/* Focus state for accessibility */
.forminator-ui input:focus,
.forminator-ui textarea:focus,
.forminator-ui select:focus {
    outline: none;
    border-color: #4da3ff;
    box-shadow: 0 0 0 2px rgba(77,163,255,0.3);
    color: #fff;
}

/* Textarea height */
.forminator-ui textarea {
    min-height: 140px;
}

/* Submit button */
.forminator-ui .forminator-button-submit {
    background: #4da3ff;
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

/* Button hover */
.forminator-ui .forminator-button-submit:hover {
    background: #2f84d6;
}

/* Button focus (keyboard users) */
.forminator-ui .forminator-button-submit:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Error messages */
.forminator-ui .forminator-error-message {
    color: #ff6b6b;
}

/* Success message */
.forminator-ui .forminator-response-message {
    color: #8be28b;
}

/* Force Gutenberg Columns to display side by side on desktop */
.wp-block-columns {
    display: flex !important;
    flex-wrap: wrap;
    gap: 50px; /* spacing between columns */
}

.wp-block-column {
    flex: 1 1 48% !important; /* make columns 50% width each */
    box-sizing: border-box;
}

.wp-block-column p {
    text-align: left;
}

/* Stack columns on mobile */
@media (max-width: 768px) {
    .wp-block-column {
        flex: 1 1 100% !important;
        margin-bottom: 20px;
    }
}

/* Footer */
footer {
    background: #1c1c1c !important; /* match page background */
    color: #ffffff !important;
    text-align: center;
    padding: 0 20px;
    border-top: 1px solid #2a2a2a;
}

.footer-inner {
    max-width: 1440px; 
    margin:0 auto; 
    display:grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); 
    gap:40px;
}

footer h4 {
    font-weight: 600;
    font-size: 20px;
    padding-bottom: 10px;
}

.footer-credit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    font-size: 14px;
}

.footer-credit a {
    color: #ccc;
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* Responsive Header and Navigation */

/* Tablet adjustments */
@media (max-width: 900px) {
    .custom-header .header-inner {
        flex-direction: column;
        align-items: center;
        padding: 16px 20px;
    }

    .onepager-nav ul {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

    .onepager-nav {
        margin-left: 0;
        width: 100%;
        padding-top: 10px;
    }

    .header-logo img {
        max-height: 60px;
        margin-bottom: 12px;
    }
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .custom-header .header-inner {
        padding: 12px 16px;
    }

    .onepager-nav ul {
        gap: 12px;
    }

    .custom-h2 {
        font-size: 2rem;
    }

    section {
        padding: 60px 15px;
    }

    .acf-wysiwyg {
        max-width: 100%;
        padding: 0 10px;
    }

    .header-logo img {
        max-height: 50px;
    }

    /* Optional: Make sticky header smaller on mobile */
    .custom-header {
        padding: 8px 0;
    }
}

@media (max-width: 768px) {
    .footer-credit {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}


@media (max-width: 900px) {
    body {
        padding-top: calc(60px + 16px);
         padding-top: unset !important;
    }
    .larger-text {
        padding: 0 10px;
    }

    .wp-block-column p {
        text-align: center !important;
    }
}