/*
Theme Name: MyTheme
Theme URI: http://example.com/mytheme
Author: Your Name
Author URI: http://example.com
Description: Custom WordPress theme with full-width layout, left sidebar, featured image options, fly-out menus, and social icons
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mytheme
*/

/* =========================
   Base Styles
========================= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: #b90069;
}

a:hover {
    color: #960053;
}

h1, h2, h3, h4, h5, h6 {
    color: #b90069;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

/* =========================
   Header Layout
========================= */
.site-header {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.header-top {
    display: flex;
    flex-wrap: wrap;           /* allow wrapping on small screens */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.logo {
    order: 0;
    flex: 0 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #b90069;
}
/* Limit the logo image size */
.logo img {
    max-width: 800px;  /* adjust this value */
    height: auto;
    display: block;
}

.header-search {
    flex: 1 1 200px;           /* flexible width */
    max-width: 300px;
    margin-left: 10px;
	order: 1;   /* search comes after logo */
}

.header-search input[type="search"] {
    width: 100%;
    padding: 5px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
}

.menu-toggle {
    display: none;
    order: 2;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
}

/* Menu centered below logo */
.primary-menu {
    text-align: center;
    width: 100%;
}

.primary-menu .menu {
    list-style: none;
    display: inline-flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.primary-menu .menu li {
    position: relative;
}

.primary-menu .menu li a {
    display: block;
    padding: 5px 10px;
    color: #b90069;
    font-weight: 500;
    background-color: #fff;
}

.primary-menu .menu li a:hover {
    color: #960053;
}

/* =========================
   Dropdown Menus & Fly-out
========================= */
.primary-menu .menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    background-color: #fff;
    padding: 10px 0;
    margin: 0;
    min-width: 150px;
    border: none;
    z-index: 999;
    text-align: left; /* <-- left-align dropdown items */
}

.primary-menu .menu li ul li ul {
    top: 0;
    left: 100%;
    padding: 10px 0;
    min-width: 150px;
    border: none;
    display: none;
    text-align: left; /* <-- left-align fly-out submenus */
}

.primary-menu .menu li:hover > ul {
    display: block;
}

.primary-menu .menu li ul li:hover > ul {
    display: block;
}

.primary-menu .menu li ul li a,
.primary-menu .menu li ul li ul li a {
    display: block;   /* ensures full width clickable area */
    padding: 5px 15px;
    white-space: nowrap;
    color: #b90069;
    background-color: #fff;
    text-align: left; /* <-- enforce left alignment on links */
}

.primary-menu .menu li ul li a:hover,
.primary-menu .menu li ul li ul li a:hover {
    color: #960053;
}

/* =========================
   Content Wrapper & Sidebar
========================= */
.content-wrapper {
    display: flex;
    width: 100%;
    margin: 10px 0 0 0;
    gap: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.sidebar-left {
    width: 15%;
    background-color: #fff;
    padding: 0 10px 0 0;
    border-right: 1px solid #ddd;
    text-align: left;
    box-sizing: border-box;
}

.sidebar-left .widget {
    margin-bottom: 15px;
    padding: 5px 0;
}

.sidebar-left .widget-title {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.2;
    color: #b90069;
}

.sidebar-left .widget p,
.sidebar-left .widget a {
    font-size: 0.9rem;
    line-height: 1.3;
}

.main-content {
    width: 90%;
}

main {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}
/* When sidebar is hidden, main content fills and is centered */
.content-wrapper.no-sidebar {
    display: block; /* removes flex layout */
    padding: 0 20px;
    max-width: 900px; /* or whatever width you want */
    margin: 0 auto;   /* centers container */
}

.content-wrapper.no-sidebar .main-content {
    width: 100%;
    padding: 20px 0;
}
/* =========================
   Blog Listing & Featured Image
========================= */
.post-thumbnail.left {
    float: left;
    width: 200px;
    margin: 0 20px 10px 0;
}

.post-thumbnail.right {
    float: right;
    width: 200px;
    margin: 0 0 10px 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-text {
    overflow: hidden;
    padding-top: 5px;
}

article {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #b90069;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
}

.read-more:hover {
    color: #960053;
}

article::after {
    content: "";
    display: table;
    clear: both;
}

/* =========================
   Footer
========================= */
footer {
    background-color: #fff;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

/* =========================
   Social Media Icons
========================= */
.header-social {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-right: 20px;
}

.header-social .social-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background-color: #b90069;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s;
}

.header-social .social-icon:hover {
    background-color: #960053;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .header-search input[type="search"] {
        width: 100%;
        margin-top: 5px;
    }

    .menu-toggle {
        display: inline-block;
        margin-top: 5px;
    }

    .primary-menu .menu {
        display: none;
        flex-direction: column;
        gap: 0;
        background-color: #fff;
        width: 100%;
        text-align: left;
    }

    .primary-menu.active .menu {
        display: flex;
    }

    .primary-menu .menu li ul,
    .primary-menu .menu li ul li ul {
        position: static;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar-left,
    .main-content {
        width: 100%;
        border-right: none;
        padding: 10px;
    }

    .sidebar-left .widget-title {
        font-size: 1.1rem;
    }

    .header-social {
        justify-content: flex-start;
        margin-top: 5px;
    }

    .header-social .social-icon {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 0.9rem;
    }

    .post-thumbnail.left,
    .post-thumbnail.right {
        float: none;
        width: 100%;
        margin: 0 0 15px 0;
    }

    .post-text {
        overflow: visible;
        padding-top: 0;
    }
}
