/*
    Theme Name: Paul Maitland Art Theme
    Theme URI: http://paulmaitland.com
    Description: Custom Bootstrap-based theme for Paul Maitland's art portfolio.
    Version: 1.4.0
    Author: Bay12 Design (@bay12design)
    Author URI: http://www.bay12design.com
*/

/*-------------------------------------------------------------------------------
    1. Generic Styles & Resets
-------------------------------------------------------------------------------*/

html {
    scroll-behavior: smooth;
    box-sizing: border-box;
    overflow-y: scroll;
}

*, *:before, *:after {
    box-sizing: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-color: #000;
    color: #f4e7bb;
    font-family: var(--wp--preset--font-family--body-font), -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/*-------------------------------------------------------------------------------
    2. WordPress Core Styles
-------------------------------------------------------------------------------*/

.alignnone { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 2rem auto; clear: both; }
.alignright { float: right; margin: 0.5rem 0 1.5rem 1.5rem; }
.alignleft { float: left; margin: 0.5rem 1.5rem 1.5rem 0; }

.wp-caption-text, .gallery-caption {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.5rem;
    color: #f4e7bb;
    opacity: 0.8;
    font-style: italic;
    text-align: center;
}

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute !important; width: 1px; word-wrap: normal !important;
}

/*-------------------------------------------------------------------------------
    3. Navigation (FlexNav Reborn)
-------------------------------------------------------------------------------*/

/* --- Shared Menu Base --- */
.desktop-menu, .mobile-menu, .mobile-menu ul, .desktop-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-menu a, .mobile-menu a {
    font-family: var(--wp--preset--font-family--heading-font) !important;
    color: var(--wp--preset--color--contrast) !important;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 700;
}

/* --- Desktop Specific (Horizontal) --- */
@media (min-width: 768px) {
    .desktop-menu {
        display: flex;
        gap: 20px;
    }
    .desktop-menu a:hover {
        color: var(--wp--preset--color--accent) !important;
    }
    /* Dropdown logic for desktop */
    .desktop-menu li { position: relative; }
    .desktop-menu ul {
        position: absolute;
        top: 100%;
        background: #111;
        display: none;
        z-index: 999;
    }
    .desktop-menu li:hover > ul { display: block; }
}

/* --- Mobile Specific (Vertical Stack) --- */
@media (max-width: 767px) {
    .mobile-navigation {
        border-top: 1px solid #222;
        /*padding: 10px 0 20px 0;*/
    }
    .mobile-menu li a {
        display: block;
        padding: 15px 25px;
        border-bottom: 1px solid #111;
    }
    .mobile-menu li a:hover {
        background-color: var(--wp--preset--color--accent);
        color: #fff !important;
    }
    /* Indent sub-menus for clarity on mobile */
    .mobile-menu ul a {
        padding-left: 45px;
        background: #0a0a0a;
    }
}

/*-------------------------------------------------------------------------------
    4. Typography & Branding
-------------------------------------------------------------------------------*/

h1, h2, h3, h4, h5, h6 {
    font-family: var(--wp--preset--font-family--heading-font);
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--wp--preset--color--accent); /* Maitland Red */;
}

.site-branding h1 {
    letter-spacing: -0.2em;
    font-size: 2.5rem;
}

.entry-content {
    margin-top: 2rem;
}


/*-------------------------------------------------------------------------------
    5. Header and Footer Styling
-------------------------------------------------------------------------------*/

header img {
    max-height: 80px;
}

#lower {
    border-top: 1px solid #222;
    font-family: var(--wp--preset--font-family--body-font);
}

#lower h6 {
    color: var(--wp--preset--color--accent); /* Maitland Red */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

footer {
    background-color: #000;
    border-top: 1px solid #111;
    color: #666; /* Subdued text for copyright */
}

footer strong {
    color: var(--wp--preset--color--contrast); /* Art Cream */
}

/*-------------------------------------------------------------------------------
    6. Widget Styling
-------------------------------------------------------------------------------*/

.widget-title {
    color: var(--wp--preset--color--accent) !important; /* Maitland Red */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 0.5rem;
}

.widget ul li a {
    color: var(--wp--preset--color--contrast); /* Art Cream */
    text-decoration: none;
    transition: opacity 0.2s;
}

.widget ul li a:hover {
    opacity: 0.7;
    color: #fff;
}

/*-------------------------------------------------------------------------------
    7. Mailchimp Embed Restyling
-------------------------------------------------------------------------------*/
/* --- Convert Jetpack Mailchimp to Bootstrap 5 Look --- */

/* 1. The Container */
.wp-block-jetpack-mailchimp {
    margin-bottom: 1.5rem;
}

/* 2. The Email Input (Styled as .form-control) */
.wp-block-jetpack-mailchimp input[type="email"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    background-color: #111; /* Maitland Dark */
    background-clip: padding-box;
    border: 1px solid #333;
    appearance: none;
    border-radius: 0; /* Bootstrap is rounded, but Maitland is sharp */
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    margin-bottom: 1rem;
}

.wp-block-jetpack-mailchimp input[type="email"]:focus {
    color: #fff;
    background-color: #000;
    border-color: var(--wp--preset--color--accent); /* Maitland Red */
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 0, 0.25);
}

/* 3. The Button (Styled as .btn .btn-primary) */
.wp-block-jetpack-mailchimp .wp-block-button__link {
    display: inline-block;
    width: 100%; /* Full width like a Bootstrap d-grid button */
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: var(--wp--preset--color--accent); /* Maitland Red */
    border: 1px solid var(--wp--preset--color--accent);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wp-block-jetpack-mailchimp .wp-block-button__link:hover {
    background-color: #fff;
    border-color: #fff;
    color: #000;
}

/* 4. Consent Text (Styled as .form-text) */
#wp-block-jetpack-mailchimp_consent-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d; /* Bootstrap muted gray */
    line-height: 1.4;
}

/* 5. Success/Error Messages (Styled as Bootstrap Alerts) */
.wp-block-jetpack-mailchimp_notification {
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid transparent;
}

.wp-block-jetpack-mailchimp_success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.wp-block-jetpack-mailchimp_error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}



.archive-header {
    border-color: #222 !important; /* Match your dark theme border */
}

.archive-description {
    font-family: var(--wp--preset--font-family--body-font);
    max-width: 800px;
    color: var(--wp--preset--color--contrast) !important;
    opacity: 0.8;
}

/* Ensure sidebar widgets look consistent */
aside .widget {
    margin-bottom: 3rem;
    background: #000;
    padding: 20px;
    border: 1px solid #222;
}

/*-------------------------------------------------------------------------------
    8. Social Media Styling
-------------------------------------------------------------------------------*/

/* --- Social Menu via ID --- */

#menu-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Changed from center to flex-start for left alignment */
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

/* Reset any default WordPress list padding that might push it away from the edge */
#menu-socials li {
    margin: 0 !important;
    padding: 0 !important;
}

#menu-socials a {
    font-size: 1.8rem;
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    display: inline-block;
}

#menu-socials a:hover {
    color: var(--wp--preset--color--accent);
    transform: translateY(-5px);
}

.tooltip-inner {
    background-color: var(--wp--preset--color--accent) !important; /* Maitland Red */
    color: #fff !important;
    font-family: var(--wp--preset--font-family--heading-font);
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 0; /* Keep the sharp art-gallery edges */
}

.bs-tooltip-top .tooltip-arrow::before, 
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
    border-top-color: var(--wp--preset--color--accent) !important;
}

/*-------------------------------------------------------------------------------
    Mailchimp Form Styling
-------------------------------------------------------------------------------*/

#mc_embed_signup {
    background: transparent !important;
    color: var(--wp--preset--color--contrast);
    width: 100% !important;
}

#mc_embed_signup form {
    padding: 0 !important;
}

/* Labels */
#mc_embed_signup label {
    display: block;
    font-family: var(--wp--preset--font-family--heading-font);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    color: var(--wp--preset--color--contrast);
}

/* Input Fields */
#mc_embed_signup input.email {
    width: 100%;
    background-color: transparent;
    border: 1px solid #333; /* Subtle dark border */
    color: #fff;
    padding: 10px;
    font-family: var(--wp--preset--font-family--body-font);
    border-radius: 0; /* Sharp gallery edges */
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

#mc_embed_signup input.email:focus {
    border-color: var(--wp--preset--color--accent);
    outline: none;
}

/* Submit Button */
#mc_embed_signup .button {
    background-color: var(--wp--preset--color--accent) !important;
    color: #fff !important;
    border: none;
    padding: 10px 25px !important;
    font-family: var(--wp--preset--font-family--heading-font);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    height: auto !important;
}

#mc_embed_signup .button:hover {
    background-color: #fff !important;
    color: #000 !important;
}

/* Error/Success Messages */
#mce-error-response, #mce-success-response {
    font-size: 0.85rem;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid;
}

#mce-error-response { color: #ff6b6b; border-color: #ff6b6b; }
#mce-success-response { color: #4ecdc4; border-color: #4ecdc4; }

/* Hide Mailchimp Badge */
.refferal_badge { display: none !important; }


/* --- Books Archive --- */
.book-card {
    transition: transform 0.3s ease;
    border: 1px solid #222;
    padding: 15px;
    background: #0a0a0a;
}

.book-card:hover {
    transform: translateY(-5px);
    border-color: var(--wp--preset--color--accent);
}

.book-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.book-card:hover .book-cover img {
    filter: grayscale(0%);
}

/* --- Custom Single Book Layout Utilities --- */
.tracking-widest { letter-spacing: 0.3em; }
.text-accent { color: var(--wp--preset--color--accent); }