/*
 Theme Name:   Twenty Sixteen Child
 Theme URI:    https://wordpress.org/themes/twentysixteen/
 Description:  Twenty Sixteen Child Theme for fu-dosannet
 Author:       fumito
 Author URI:   http://example.com
 Template:     twentysixteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twentysixteen-child
*/

/* Override Twenty Sixteen Defaults */
body, .site, .site-inner, #page {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
}

body {
    background-color: #F9F9F7 !important;
}

/* Remove Twenty Sixteen's default 21px margins/bars at top and bottom */
body:before,
body:after {
    display: none !important;
}

.site-content {
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important; /* Allow Tailwind to handle max-width inside pages */
}

/* Hide default Twenty Sixteen header and footer elements that we replaced */
.site-header, .site-footer {
    display: none !important;
}

/* Fudou specific override for better spacing */
#content {
    padding-top: 5rem !important; /* Space for fixed header */
}

/* Fix properties layout from fudou plugin that defaults to float */
.fudo-main {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* LP Inspired Widget & Post Styling */
.widget {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}
.widget-title {
    color: #1B4D3E !important;
    font-weight: 700;
    font-size: 1.125rem;
    border-bottom: 2px solid #C5A470;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 0;
}
.widget ul li {
    border-bottom: 1px solid #E5E7EB;
    padding: 0.5rem 0;
}
.widget ul li a {
    color: #333333;
    text-decoration: none;
}
.widget ul li a:hover {
    color: #C5A470;
}

/* Fudou Search Widget specific */
.widget_fudo_search select, .widget_fudo_search input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    background-color: #F9FAFB;
    margin-bottom: 0.5rem;
    color: #374151;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}
.widget_fudo_search input[type="submit"], .widget_fudo_b_k input[type="submit"] {
    background-color: #C5A470 !important;
    color: white !important;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.widget_fudo_search input[type="submit"]:hover, .widget_fudo_b_k input[type="submit"]:hover {
    background-color: #b09060 !important;
}

/* Posts / Pages as Cards */
.type-post, .type-page, .type-fudo {
    background: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}
.entry-title {
    color: #1B4D3E !important;
    font-weight: 700;
}
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: #C5A470 !important; }

/* Grid Layout Fixes for Main + Sidebar */
@media screen and (min-width: 56.875em) {
    .site-content {
        display: flex !important;
        flex-wrap: wrap;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
        justify-content: space-between;
    }
    #primary {
        width: 65% !important;
        float: none !important;
        margin: 0 !important;
    }
    #secondary {
        width: 30% !important;
        float: none !important;
        margin: 0 !important;
    }
    .site-main {
        width: 100% !important; /* Ensure main takes full width of primary */
        margin: 0 !important;
    }
}
@media screen and (max-width: 56.875em) {
    .site-content {
        padding: 0 1rem !important;
    }
    #primary, #secondary {
        width: 100% !important;
    }
}

/* Fix narrow entry elements from Twenty Sixteen (Overrides 15% margins) */
.entry-content, .entry-summary, .entry-header, .entry-footer {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

/* Fudou Single property page layout fix */
body.single-fudo .site-main, body.single-fudo .content-area {
    width: 100% !important;
}
body.single-fudo .site-content {
    max-width: 1000px !important;
}

/* Fix WP Admin Bar overlap with custom fixed header */
body.admin-bar .fixed.w-full.z-50 {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar .fixed.w-full.z-50 {
        top: 46px !important;
    }
}
