/* Prevent navigation menu from wrapping to multiple lines */
#navigation {
    white-space: nowrap !important;
    display: block !important;
}
#navigation li {
    white-space: nowrap !important;
    display: inline-block !important;
}
.main-menu {
    width: 100%;
}
.main-menu nav {
    width: 100%;
}

/* Menu item hover effect with red background */
#navigation li a {
    transition: all 0.3s ease !important;
    border-radius: 4px;
    margin: 0 2px;
}

#navigation li a:hover,
#navigation li:hover > a,
.main-menu ul li a:hover,
.main-menu ul li:hover > a {
    background-color: #DC143C !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Force white text on hover - override any other styles */
#navigation li a:hover *,
#navigation li:hover > a *,
.main-menu ul li a:hover *,
.main-menu ul li:hover > a * {
    color: #ffffff !important;
}

/* Exclude search menu item from background hover effect */
#navigation li.search-menu-item a:hover,
#navigation li.search-menu-item:hover > a {
    background-color: transparent !important;
    color: inherit !important;
    font-weight: inherit !important;
}

/* Reduce padding for smaller screens to fit all items on one line */
@media (min-width: 992px) and (max-width: 1199px) {
    #navigation li a {
        padding: 39px 10px !important;
        font-size: 13px !important;
    }
}
@media (min-width: 1200px) and (max-width: 1399px) {
    #navigation li a {
        padding: 39px 12px !important;
        font-size: 14px !important;
    }
}

/* Top Story Ticker Links */
.trending-animated .news-item a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.trending-animated .news-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Sidebar Content Fixes */
.sidebar-content-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.trand-right-single {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
}

.trand-right-single:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trand-right-img {
    flex-shrink: 0;
    width: 130px;
    min-width: 130px;
}

.trand-right-img img {
    width: 100%;
    height: auto;
    max-width: 130px;
    object-fit: cover;
    border-radius: 4px;
}

.trand-right-cap {
    flex: 1;
    padding-left: 15px;
    overflow: hidden;
}

.trand-right-cap h4 {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 14px;
}

.trand-right-cap h4 a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.col-lg-4 .trand-right-single {
    max-width: 100%;
}

@media (max-width: 991px) {
    .trand-right-img {
        width: 100px;
        min-width: 100px;
    }
    
    .trand-right-img img {
        max-width: 100px;
    }
    
    .trand-right-cap {
        padding-left: 10px;
    }
    
    .trand-right-cap h4 {
        font-size: 13px;
    }
}

/* Footer Logo at Top */
.footer-logo-top {
    margin-bottom: 50px;
    padding-top: 30px;
}

.footer-logo-top img {
    max-width: 200px;
    height: auto;
    transition: opacity 0.3s ease;
}

.footer-logo-top a:hover img {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-logo-top {
        margin-bottom: 40px;
        padding-top: 20px;
    }
    
    .footer-logo-top img {
        max-width: 150px;
    }
}

/* Social Share Buttons */
.social-share ul {
    display: flex !important;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
    flex-wrap: wrap;
}

.social-share ul li {
    margin: 0;
}

.social-share ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-share ul li a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.social-share ul li a img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-share ul li a i {
    transition: all 0.3s ease;
    font-size: 20px;
}

.social-share ul li a:hover i {
    transform: scale(1.1);
}

/* Default icon colors */
.social-share ul li a .fa-facebook-f {
    color: #1877f2 !important;
}

.social-share ul li a .fa-twitter {
    color: #1da1f2 !important;
}

.social-share ul li a .fa-whatsapp {
    color: #25d366 !important;
}

.social-share ul li a .fa-linkedin-in {
    color: #0077b5 !important;
}

.social-share ul li a .fa-envelope {
    color: #666 !important;
}

/* Hover background colors */
.social-share ul li:nth-child(1) a:hover {
    background: #e7f3ff;
}

.social-share ul li:nth-child(2) a:hover {
    background: #e1f5fe;
}

.social-share ul li:nth-child(3) a:hover {
    background: #e8fcf1;
}

.social-share ul li:nth-child(4) a:hover {
    background: #e3f2fd;
}

.social-share ul li:nth-child(5) a:hover {
    background: #f0f0f0;
}

/* Header Search Form Styles */
.search-menu-item {
    margin-left: 20px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.header-search-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    flex-direction: row-reverse; /* Reverse order so input appears on left */
    justify-content: flex-end; /* Align to the right */
    /* Initially collapsed - only icon visible */
    width: 45px;
    min-width: 45px;
    margin-left: auto; /* Push to the right */
}

.search-input-wrapper.expanded {
    /* Expanded state - full width */
    width: 220px;
    min-width: 220px;
}

.search-input-wrapper:hover {
    border-color: #DC143C;
    box-shadow: 0 3px 8px rgba(220, 20, 60, 0.15);
}

.search-input-wrapper:focus-within {
    border-color: #DC143C;
    box-shadow: 0 3px 12px rgba(220, 20, 60, 0.25);
    outline: none;
}

.search-input {
    border: none;
    outline: none;
    padding: 10px 18px 10px 15px;
    font-size: 14px;
    width: 0;
    background: transparent;
    color: #333;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0;
    transition: all 0.3s ease;
    flex: 0;
    order: 1; /* Input appears after button in flex order */
}

.search-input-wrapper.expanded .search-input {
    width: 180px;
    opacity: 1;
    flex: 1;
    padding-right: 50px; /* Add padding to prevent text overlap with button */
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-input:focus {
    color: #333;
}

/* Toggle button (icon only - always visible) */
.search-toggle-btn {
    background: #DC143C;
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 40px;
    border-radius: 30px;
    position: absolute;
    right: 0;
    top: 0;
    order: 2; /* Button appears after input in flex order (but visually on right due to row-reverse) */
    z-index: 2;
}

.search-toggle-btn:hover {
    background: #a01030;
}

.search-toggle-btn:active {
    background: #8a0d28;
    transform: scale(0.95);
}

.search-toggle-btn i {
    font-size: 16px;
    font-weight: 600;
}

/* Submit button (hidden when collapsed, shown when expanded) */
/* Submit button (hidden when collapsed, shown when expanded) */
.search-button {
    background: #DC143C;
    border: none;
    cursor: pointer;
    padding: 10px 16px;
    color: #fff;
    transition: all 0.3s ease;
    display: none; /* Initially hidden */
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 40px;
    border-radius: 30px 0 0 30px; /* Rounded on left side since it's on the right edge */
    position: absolute;
    right: 0;
    order: 2;
    z-index: 2;
}

.search-button:hover {
    background: #a01030;
    transform: none;
}

.search-button:active {
    background: #8a0d28;
    transform: scale(0.98);
}

.search-button i {
    font-size: 16px;
    font-weight: 600;
}

/* When expanded, hide toggle and show submit */
.search-input-wrapper.expanded .search-toggle-btn {
    display: none !important;
}

.search-input-wrapper.expanded .search-button {
    display: flex !important;
}

/* Responsive search form - Large screens */
@media (min-width: 1400px) {
    .search-input-wrapper.expanded {
        width: 250px;
        min-width: 250px;
    }
    
    .search-input-wrapper.expanded .search-input {
        width: 210px;
    }
}

/* Responsive search form - Medium screens */
@media (max-width: 1399px) and (min-width: 1200px) {
    .search-input-wrapper.expanded {
        width: 200px;
        min-width: 200px;
    }
    
    .search-input-wrapper.expanded .search-input {
        width: 160px;
        font-size: 13px;
        padding: 9px 12px 9px 15px;
    }
    
    .search-button {
        padding: 9px 14px;
        height: 38px;
    }
    
    .search-toggle-btn {
        height: 38px;
        padding: 9px 12px;
    }
    
    .search-button i,
    .search-toggle-btn i {
        font-size: 15px;
    }
}

@media (max-width: 1199px) {
    .search-menu-item {
        margin-left: 15px;
    }
    
    .search-input-wrapper {
        width: 40px;
        min-width: 40px;
    }
    
    .search-toggle-btn {
        width: 40px;
        padding: 8px 10px;
        height: 36px;
    }
    
    .search-input-wrapper.expanded {
        width: 180px;
        min-width: 180px;
    }
    
    .search-input-wrapper.expanded .search-input {
        width: 140px;
        font-size: 13px;
        padding: 8px 10px 8px 14px;
    }
    
    .search-button {
        padding: 8px 12px;
        height: 36px;
    }
    
    .search-button i,
    .search-toggle-btn i {
        font-size: 14px;
    }
}

/* Responsive search form - Tablet and Mobile */
@media (max-width: 991px) {
    .search-menu-item {
        margin-left: 0;
        margin-top: 15px;
        margin-bottom: 10px;
        width: 100%;
        display: block;
        padding: 0 15px;
    }
    
    .header-search-form {
        width: 100%;
        display: block;
    }
    
    .search-input-wrapper {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        border-radius: 25px;
        height: 45px;
        /* Always expanded on mobile */
        flex-direction: row !important;
    }
    
    .search-input-wrapper.expanded {
        width: 100% !important;
    }
    
    .search-input {
        width: 100% !important;
        flex: 1 !important;
        padding: 12px 15px 12px 18px;
        font-size: 14px;
        opacity: 1 !important;
        /* Always visible on mobile */
        display: block !important;
    }
    
    .search-input-wrapper.expanded .search-input {
        width: 100% !important;
        flex: 1 !important;
        padding: 12px 15px 12px 18px;
        font-size: 14px;
        opacity: 1 !important;
    }
    
    .search-toggle-btn {
        display: none !important; /* Hide toggle button on mobile */
    }
    
    .search-button {
        padding: 12px 18px;
        border-radius: 0 25px 25px 0;
        height: 45px;
        display: flex !important; /* Always show submit button on mobile */
    }
    
    .search-button i {
        font-size: 16px;
    }
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .search-menu-item {
        margin-top: 12px;
        margin-bottom: 8px;
        padding: 0 10px;
    }
    
    .search-input {
        padding: 11px 12px 11px 16px;
        font-size: 14px;
    }
    
    .search-button {
        padding: 11px 16px;
    }
}

/* Ensure search form aligns with menu items on desktop */
@media (min-width: 992px) {
    .search-menu-item {
        height: auto;
    }
    
    .header-search-form {
        height: auto;
    }
    
    .search-input-wrapper {
        height: 40px;
    }
    
    /* Align search with menu items vertically */
    #navigation > .search-menu-item {
        vertical-align: middle;
        line-height: normal;
    }
}

/* Mobile Menu Search Form (handled by slicknav) */
.slicknav_nav .search-menu-item {
    margin: 10px 15px;
    padding: 0;
    width: calc(100% - 30px);
    list-style: none !important;
}

.slicknav_nav .header-search-form {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

.slicknav_nav .search-input-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-radius: 25px;
    height: 45px;
    border: 2px solid #e0e0e0;
    display: flex !important;
    flex-direction: row !important;
    position: relative;
    /* Always expanded on mobile */
    width: 100% !important;
}

.slicknav_nav .search-input {
    width: 100% !important;
    flex: 1 !important;
    padding: 12px 15px 12px 18px;
    font-size: 15px;
    opacity: 1 !important;
    /* Always visible on mobile */
    display: block !important;
}

.slicknav_nav .search-toggle-btn {
    display: none !important; /* Hide toggle button on mobile */
}

.slicknav_nav .search-button {
    padding: 12px 18px;
    border-radius: 0 25px 25px 0;
    background: #DC143C;
    display: flex !important; /* Always show submit button on mobile */
    position: absolute;
    right: 0;
    height: 45px;
}

.slicknav_nav .search-button:hover {
    background: #a01030;
}

.slicknav_nav .search-button:active {
    background: #8a0d28;
}

.slicknav_nav .search-button i {
    font-size: 16px;
    color: #fff;
}

/* Prevent slicknav from interfering with form */
.slicknav_nav .search-menu-item * {
    pointer-events: auto !important;
}

.slicknav_nav .search-menu-item form {
    pointer-events: auto !important;
}

.slicknav_nav .search-menu-item input,
.slicknav_nav .search-menu-item button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Reduce container padding/margins on larger screens */
@media (min-width: 992px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (min-width: 1200px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 1170px;
    }
}

@media (min-width: 1400px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 1340px;
    }
}

@media (min-width: 1600px) {
    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 1560px;
    }
}

/* Reduce margins on row elements for larger screens */
@media (min-width: 1200px) {
    .row {
        margin-left: -8px !important;
        margin-right: -8px !important;
    }
    
    .row > [class*="col-"] {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

@media (min-width: 1400px) {
    .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }
    
    .row > [class*="col-"] {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* Reduce padding on main content areas */
@media (min-width: 1200px) {
    main .container,
    .category-header .container,
    .search-header .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (min-width: 1400px) {
    main .container,
    .category-header .container,
    .search-header .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}