/*
  Theme Name: Lonestar Logos Management
  Theme URI: https://lonestarlogosmanagement.com/
  Version: 1.0.1
  Template: Extra
  Author: RTW
  Author URI: https://www.restontechwiz.com/
  Description: Custom theme for Lonestar Logos
  Text Domain: lonestar-logos-management
  License: GNU General Public License v2 or later
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Search Icon and Dropdown */
.desktop-search-wrapper {
    display: none;
}

/* Desktop Layout - 981px and up */
@media (min-width: 981px) {
    /* Hide the search wrapper on desktop - we'll add it as a menu item instead */
    .desktop-search-wrapper {
        display: none !important;
    }
    
    /* Desktop Menu Search Icon Styles */
    /* Add this class to your last menu item in WordPress admin */
    .menu-item-search {
        position: relative;
    }
    
    .menu-item-search > a {
        padding: 0 15px !important;
        position: relative;
        display: inline-flex;
        align-items: center;
    }
    
    .menu-item-search > a::after {
        content: '';
        display: inline-block;
        width: 20px;
        height: 20px;
        background-image: url('../lonestar-logos-management/img/search-icon.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        opacity: 0.99;
        filter: brightness(0) saturate(100%) invert(61%) sepia(6%) saturate(424%) hue-rotate(180deg) brightness(96%) contrast(89%);
    }
    
    /* Hide menu text if using "Search" as menu label */
    .menu-item-search > a {
        font-size: 0;
        min-width: 20px;
    }
    
    /* Desktop Search Dropdown for Menu */
    .menu-item-search .search-dropdown {
        position: absolute;
        top: 30px;
        right: -30px;
        min-width: 400px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 9999;
    }
    
    .menu-item-search.active .search-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Ensure ET Ad stays full width if present */
    #main-header .etad {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Mobile Layout - up to 980px */
@media (max-width: 980px) {
    #main-header .container {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    
    #main-header .logo {
        flex: 0 0 auto;
        order: 1;
    }
    
    .desktop-search-wrapper {
        display: block !important;
        position: relative;
        order: 2;
        margin-left: auto;
        margin-right: 15px;
    }
    
    #main-header #et-navigation {
        flex: 0 0 auto;
        order: 3;
    }
    
    /* Mobile Search Icon Styling */
    .desktop-search-icon {
        cursor: pointer;
        padding: 8px;
        display: block;
    }
    
    .desktop-search-icon img {
        width: 24px;
        height: 24px;
    }
    
    /* Mobile Search Dropdown */
    .desktop-search-dropdown {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        border: none;
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        border-radius: 0;
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 999;
        margin-top: 15px;
    }
    
    /* Show dropdown when icon is clicked */
    .desktop-search-wrapper.active .desktop-search-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Style the search form inside dropdown */
    .desktop-search-dropdown .searchwp-form {
        margin: 0;
        width: 100%;
    }
    
    .desktop-search-dropdown .swp-flex--row {
        flex-wrap: nowrap !important;
    }
    
    .desktop-search-dropdown .searchwp-form-input-container {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .desktop-search-dropdown .swp-input--search {
        width: 100%;
        box-sizing: border-box;
    }
    
    .desktop-search-dropdown input[type="submit"] {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* SVG icon styling */
.desktop-search-icon img {
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.desktop-search-icon:hover img {
    opacity: 0.7;
    transform: scale(1.1);
}

/* ===== CUSTOMIZER CSS ===== */

/* Remove posts meta data */
/* .post-meta.vcard,.author-box.vcard,.rating-stars{
    display:none!important;
} */

/* Hide unwanted text on default category layout */ 
.paginated_page_2::before,
.paginated_page::before {
    display: none !important;
}

/* Modal adjustment for Categories */
/* Hide more than 3 links */
.et_pb_tabbed_posts_0 .posts-list li:nth-child(n+4),
.et_pb_tabbed_posts_1 .posts-list li:nth-child(n+4) {
    display: none !important;
}

/* Ensure the 3rd post shows */
.et_pb_tabbed_posts_0 .posts-list li:nth-child(3),
.et_pb_tabbed_posts_1 .posts-list li:nth-child(3) {
    display: list-item !important;
}

/* Excerpt fix */ 
.et_pb_tabbed_posts .posts-list .custom-post-excerpt {
    margin-top: 12px !important;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.et_pb_tabbed_posts .posts-list .excerpt-text {
    margin-bottom: 6px;
    line-height: 1.4em;
}

.et_pb_tabbed_posts .posts-list .read-more-btn:hover {
    text-decoration: underline !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .et_pb_tabbed_posts .posts-list .custom-post-excerpt {
        margin-top: 8px !important;
        font-size: 11px !important;
    }
}

/* Extra Theme Fix: Replace "All" with "Latest", hide duplicate "Latest" */

.module-head h1 {
    visibility: hidden;
    position: relative;
}

.module-head h1:before {
    content: "Latest";
    visibility: visible;
    position: absolute;
    top: 0;
    left: 0;
    color: inherit;
}

.module-head .module-filter {
    display: none !important;
}


/* Footer fix */
footer {
    background-color: #ffffff !important;
}

/* Mobile override */
@media (max-width: 767px) {
    #footer {
        background-color: #ffffff !important;
    }
}

/* Mobile Footer Widget - Show only on small screens */
#block-21 {
    display: block;
}

/* Desktop Footer Widget - Hide on small screens */
#block-20 {
    display: none;
}

/* Fix mobile footer margins and padding */
@media screen and (max-width: 979px) {
    #footer .container {
        padding: 0 !important;
    }
    
    .et_pb_extra_row {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .et_pb_extra_column.odd.column-1 {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #block-21 {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Media query for desktop/larger screens (980px to match your theme) */
@media screen and (min-width: 980px) {
    #block-21 {
        display: none;
    }
    
    #block-20 {
        display: block;
    }
}
/* End of footer fix */

/* Remove margin and padding from footer widget */
#footer #block-20 {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove spacing from the main block group */
#footer .wp-block-group {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any default footer container padding */
#footer .container {
    padding-top: 10px !important;
    padding-bottom: 20px !important;
}


/* Desktop Subscribe Button Styling */
#et-menu .menu-item-subscribe {
    display: inline-block !important;
    vertical-align: middle !important;
}

#et-menu .menu-item-subscribe a {
    display: inline-block !important;
    padding: 8px 16px !important;
    background-color: #0B6CB7 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    margin-right: 15px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -6px !important; /* Adjust this value to move up/down */
}

#et-menu .menu-item-subscribe a:hover {
    background-color: #095a94 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(11, 108, 183, 0.3) !important;
    text-decoration: none !important;
    color: #ffffff !important;
}

/* Remove any theme default hover effects */
#et-menu .menu-item-subscribe a:hover:before,
#et-menu .menu-item-subscribe a:hover:after {
    display: none !important;
}

/* Mobile Subscribe Button Styling */
#et-extra-mobile-menu .menu-item-subscribe a {
    display: block !important;
    padding: 12px 20px !important;
    background-color: #0B6CB7 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 10px 15px !important;
    transition: all 0.3s ease !important;
}

#et-extra-mobile-menu .menu-item-subscribe a:hover {
    background-color: #095a94 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(11, 108, 183, 0.3) !important;
    text-decoration: none !important;
    color: #ffffff !important;
}

/* Hide only the top "Category: ..." line inside this section */
.et_pb_extra_column_main > h1 {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide on mobile devices */
@media (max-width: 480px) {
  .landing-our-mission-text {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Hide on tablets in portrait mode */
@media (max-width: 768px) {
  .landing-our-mission-text {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
