/*
Theme Name: Betheme Child
Theme URI: https://themes.muffingroup.com/betheme
Author: Muffin group
Author URI: https://muffingroup.com
Description: Child Theme for Betheme
Template: betheme
Version: 2.0.2
*/

/* 1. Fix Header Title Cutoff (Under Navigation) */
/* Reset padding since we are re-enabling the header */
.single-post #Content {
    padding-top: 0 !important;
}

#Header_wrapper {
    padding-top: 200px !important;
    background-image: url('/wp-content/uploads/yachts/15766/Motor Yacht BETH ANN.jpg');
    background-size: cover;
    background-position: bottom;
    position: relative;
    padding-bottom: 30px !important;
    margin-bottom: 60px !important;
}

#Subheader {
    background-color: transparent !important;
}

.custom-nav-prev .photo,
.custom-nav-next .photo {
    background-color: #003E78 !important;
    background-size: cover !important;
    background-position: center;
    background-repeat: no-repeat;
    width: 100% !important;
    /* adjust as needed */
    height: 100% !important;
    /* adjust as needed */
    min-height: 80px !important;
    /* fallback minimum height */
}

/* Remove default img styles if any remain */
.custom-nav-prev .photo img,
.custom-nav-next .photo img {
    display: none;
}



/* Overlay for Header Wrapper */
#Header_wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    /* White overlay with opacity */
    backdrop-filter: grayscale(100%);
    z-index: 0;
    pointer-events: none;
    /* Allow clicks through */
}

#Header_wrapper .header_placeholder {
    position: relative;
    z-index: 1;
}

/* 2. Fix Sidebar Layout (Force Sidebar to Right) */
@media only screen and (min-width: 960px) {
    .single-post .sections_group {
        width: 70% !important;
        float: left !important;
        box-sizing: border-box;
        padding-right: 20px;
    }

    .single-post .sidebar {
        width: 30% !important;
        float: right !important;
        box-sizing: border-box;
        display: block !important;
    }
}

/* 3. Related Posts Images */
.single-post .section-post-related .image_frame {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: 150px;
    /* Ensure it takes space */
    background-color: #f0f0f0;
    /* Placeholder color */
    border-radius: 0 !important;
    /* Square corners */
    margin-left: 0;
}

/* 4. Custom Navigation Arrows */
.custom-nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-nav-wrapper .entry-title {
    flex-grow: 1;
    padding: 0 60px;
    /* Space for arrows */
}

.custom-nav-prev,
.custom-nav-next {
    text-decoration: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: #333;
}

.custom-nav-prev {
    left: 0;
}

.custom-nav-next {
    right: 0;
    flex-direction: row-reverse;
    /* Arrow on right */
}

.nav-arrow {
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    align-items: center;
    opacity: 0;
    /* Hidden by default */
    visibility: hidden;
    transition: all 0.3s ease;
    background: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    border: 1px solid #f0f0f0;
}

.custom-nav-prev .nav-content {
    left: 100%;
    /* Show to the right of arrow */
    margin-left: 10px;
}

.custom-nav-next .nav-content {
    right: 100%;
    /* Show to the left of arrow */
    margin-right: 10px;
    flex-direction: row-reverse;
    /* Image on right for next */
}

/* Show content on hover */
.custom-nav-prev:hover .nav-content,
.custom-nav-next:hover .nav-content {
    opacity: 1;
    visibility: visible;
}

/* Navigation Photo Container */
.nav-content .photo {
    width: 80px !important;
    min-width: 80px !important;
    height: 60px;
    /* Increased height for better aspect ratio */
    background-color: #003E78 !important;
    /* Requested background */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    overflow: hidden;
}

.nav-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.nav-title {
    font-size: 13px;
    line-height: 1.2;
    /* Compact line height */
    color: #444;
    /* Body text color */
    max-width: 150px;
    /* Limit width */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5. Dropdown Styling (Categories & Tags) */
.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    gap: 15px;
}

.post-meta .author-date {
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-meta .category {
    position: relative;
    display: inline-block;
    margin: 0;
    /* Handled by gap */
}

.post-meta .category .cat-btn {
    cursor: pointer;
    padding: 6px 15px;
    background: #f9f9f9;
    border-radius: 3px;
    display: inline-block;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.post-meta .category .cat-btn:hover {
    background: #fff;
    color: #000;
    border-color: #ddd;
}

.post-meta .category .cat-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    /* Center dropdown */
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    white-space: normal;
    border-radius: 4px;
    margin-top: 0px;
}

.post-meta .category:hover .cat-wrapper {
    display: block;
}

.post-meta .category .cat-wrapper ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: transparent !important;
}

.post-meta .category .cat-wrapper li {
    margin-bottom: 8px;
    border-bottom: 1px solid #f5f5f5;
    background-color: transparent !important;
    padding-bottom: 8px;
    text-align: left;
    /* Align text left inside dropdown */
}

.post-meta .category .cat-wrapper li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-meta .category .cat-wrapper a {
    display: block;
    background-color: transparent !important;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 13px;
    line-height: 1.4;
}

.post-meta .category .cat-wrapper a:hover {
    color: #003E78 !important;
    /* Highlight text only */
}

/* 6. Related Posts Styling */

/* Flexbox for Equal Heights */
.section-post-related .section-related-ul {
    display: flex;
    flex-wrap: wrap;
}

.section-post-related .column {
    display: flex;
}

.section-post-related .column .mcb-column-inner {
    background: #fff;
    /* White background as per image */
    padding-bottom: 20px;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.section-post-related .image_wrapper {
    position: relative;
    overflow: hidden;
    margin-left: 0 !important;
}

.section-post-related .image_wrapper img {
    border-radius: 0 !important;
    width: 100%;
    height: 200px;
    /* Fixed height for images */
    object-fit: cover;
}

/* Date Badge Overlay */
.section-post-related .date_label {
    position: absolute;
    top: 20px;
    left: 0;
    background-color: #003E78 !important;
    /* Dark Blue */
    color: #fff;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    /* Triangle effect on right */
    clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%);
    padding-right: 20px;
    /* Extra padding for the cut */
}

/* Description Area */
.section-post-related .desc {
    padding: 20px;
    flex-grow: 1;
    font-size: 14px !important;
    line-height: 1.2 !important;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Center everything */
    text-align: center;
}

/* Author */
.post-author-related {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Title */
.section-post-related .desc h4 {
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 18px;
    line-height: 1.3;
}

.section-post-related .desc h4 a {
    color: #003E78;
    /* Dark Blue */
    text-decoration: none;
}

.section-post-related .desc h4 a:hover {
    color: #003E78;
}

.wp-caption-text {
    background-color: #003E78 !important;
    color: #fff !important;
    padding-top: 30px !important;
    padding-bottom: 15px !important;
    margin-top: -20px !important;
}

/* Button */
.section-post-related .button {
    margin-top: auto;
    /* Push to bottom */
    padding: 10px 25px !important;
    font-size: 14px !important;
    line-height: 14px !important;
    background-color: #fff !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: all 0.3s;
}

.section-post-related .button:hover {
    background-color: #f5f5f5 !important;
    border-color: #ccc !important;
    color: #333 !important;
}

.section-post-related .button .button_icon {
    display: none;
}

.section-related-adjustment {
    border-top: none !important;
}

/* Fixed navigation styling - image cover and text adjustments */
.fixed-nav .photo {
    position: relative;
    overflow: hidden;
    width: 80px;
    height: 100%;
    min-height: 80px;
    /* ensure some height */
    background-color: transparent !important;
    /* override theme's #eee */
}

.fixed-nav .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Override theme's default hidden description */
.fixed-nav .desc {
    width: auto !important;
    /* allow wider block */
    max-width: none !important;
    min-width: 200px;
    /* wider block */
    margin: 0 !important;
    /* remove negative margins that hide the desc */
    opacity: 0 !important;
    /* Hidden by default */
    visibility: hidden !important;
    /* Hidden by default */
    transition: all 0.3s ease-in-out;
    /* Smooth transition */
    position: static !important;
    /* override any absolute positioning */
    float: none !important;
    display: block !important;
    background: #fff !important;
    /* keep background */
    padding: 6px 15px !important;
    /* keep original padding */
    min-height: 68px !important;
    z-index: 91 !important;
}

.fixed-nav .desc h6 {
    font-size: 14px !important;
    /* slightly smaller font */
    line-height: 1.2 !important;
    margin-bottom: 5px;
    font-weight: normal;
}

.fixed-nav .desc .date {
    font-size: 11px;
    line-height: 1.1;
    display: inline-block;
    width: 100%;
    padding-top: 3px;
    border-top: 1px solid #eee;
}

/* Ensure fixed-nav container has proper layout */
.fixed-nav {
    display: flex !important;
    align-items: center !important;
    position: fixed !important;
    bottom: 70px !important;
    height: 80px !important;
    z-index: 90 !important;
}

.fixed-nav.fixed-nav-prev {
    flex-direction: row !important;
    left: 0 !important;
    right: auto !important;
}

.fixed-nav.fixed-nav-next {
    flex-direction: row-reverse !important;
    right: 0 !important;
    left: auto !important;
}

/* Override theme's hover effects that change margins */
.fixed-nav-prev:hover .desc,
.fixed-nav-next:hover .desc {
    margin: 0 !important;
    opacity: 1 !important;
    /* Show on hover */
    visibility: visible !important;
    /* Show on hover */
}

/* Override theme's float and margin for arrow, photo, desc */
.fixed-nav-prev .arrow,
.fixed-nav-prev .photo,
.fixed-nav-prev .desc,
.fixed-nav-next .arrow,
.fixed-nav-next .photo,
.fixed-nav-next .desc {
    float: none !important;
    margin: 0 !important;
}

.fixed-nav-prev .desc,
.fixed-nav-next .desc {
    border: 1px solid #eee;
}

/* Override theme's responsive adjustments for photo margins */
@media only screen and (max-width: 1430px) {

    .fixed-nav-prev .photo,
    .fixed-nav-next .photo {
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: relative !important;
    }

    .fixed-nav-prev:hover .photo,
    .fixed-nav-next:hover .photo {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Ensure arrow styling */
.fixed-nav .arrow {
    display: block !important;
    width: 45px !important;
    height: 80px !important;
    font-size: 15px !important;
    position: relative !important;
    z-index: 92 !important;
    color: #fff !important;
    line-height: 80px !important;
    text-align: center !important;
    background-color: #003E78 !important;
    /* match theme color */
}

/* Remove border from aside widgets */
aside::after,
.widget::after {
    border: none !important;
    display: none !important;
}

/* Style Contact Form 7 Submit Button */
input.wpcf7-form-control.wpcf7-submit {
    background-color: #003E78 !important;
    color: #fff !important;
    border: none !important;
    padding: 20px 40px !important;
    transition: background-color 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input.wpcf7-form-control.wpcf7-submit:hover {
    background-color: #002a52 !important;
}