/* Redesign Overrides */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
div,
span {
    font-family: 'Inter', sans-serif !important;
}

/* Modernize cards and borders */
.shadow,
.card,
.post-box,
.widget {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    border: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shadow:hover,
.card:hover,
.post-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(204, 0, 0, 0.1) !important;
}

/* Modern buttons */
button,
.btn,
.button,
input[type="submit"] {
    border-radius: 8px !important;
    text-transform: uppercase;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(204, 0, 0, 0.2) !important;
}

button:hover,
.btn:hover {
    box-shadow: 0 6px 12px rgba(204, 0, 0, 0.3) !important;
}

/* Cleanup inputs */
input,
textarea,
select {
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    background-color: #fcfcfc !important;
}

input:focus,
textarea:focus {
    border-color: #cc0000 !important;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1) !important;
}

/* Ad Block Replacement */
.ad-block {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 150px !important;
    width: 100% !important;
    background-color: #f8f9fa !important;
    border: 3px dashed #cccccc !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
}

.ad-block::before {
    content: "ADVERTISEMENT SPACE" !important;
    position: absolute !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #888888 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

.ad-block img,
.ad-block a {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}

/* Hard Bootstrap Clear */
.bg-primary {
    background-color: #cc0000 !important;
}

.text-primary {
    color: #cc0000 !important;
}

.btn-primary {
    background-color: #cc0000 !important;
    border-color: #cc0000 !important;
}

.btn-primary:hover {
    background-color: #a30000 !important;
    border-color: #a30000 !important;
}

/* Redesign Footer & Fix Embedded Blue */
.footer-newsletter-strip,
.newsletter-area {
    background: #cc0000 !important;
    background-image: none !important;
}

footer.faxnews-footer,
.footer-main {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-top: 1px solid #eaeaea !important;
}

.footer-col-heading {
    color: #cc0000 !important;
    font-weight: 800 !important;
}

footer.faxnews-footer a {
    color: #555555 !important;
    font-weight: 500 !important;
}

footer.faxnews-footer a:hover {
    color: #cc0000 !important;
}

.footer-bottom-bar {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-top: none !important;
    padding: 10px 0 !important;
}

.footer-tagline {
    color: #333333 !important;
    font-weight: 500 !important;
}

.footer-copyright,
.footer-bottom-bar a {
    color: #dddddd !important;
}

.footer-bottom-bar a:hover {
    color: #cc0000 !important;
}

/* Force horizontal alignment for legal links */
.footer-legal-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 0 !important;
    flex-wrap: nowrap !important;
}

.footer-legal-links li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide the newsletter First/Last name inputs */
.newsletter-inline-form input[type="text"],
.cat-sub-form input[type="text"] {
    display: none !important;
}

/* Aggressively theme all buttons to match the Red theme */
footer button,
button[type="submit"],
.btn-ftg-ptp-45,
.btn-ftg-ptp-40,
.cat-sub-form button,
.newsletter-inline-form button {
    background-color: #cc0000 !important;
    border-color: #cc0000 !important;
    color: #ffffff !important;
    background-image: none !important;
}

footer button:hover,
button[type="submit"]:hover,
.btn-ftg-ptp-45:hover,
.btn-ftg-ptp-40:hover {
    background-color: #a30000 !important;
    border-color: #a30000 !important;
}

/* Ensure Logo handles the white background nicely */
footer.faxnews-footer img,
.footer-brand img {
    margin-bottom: 20px !important;
    width: 220px !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
    filter: none !important;
}

/* Remove the "Your Source For Unbiased News" text */
.footer-brand span {
    display: none !important;
}

/* --- FOOTER OVERHAUL - COMPLETE RE-GRIDDING --- */
.faxnews-footer .footer-main > .container > .row {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1.5fr !important;
    gap: 40px !important;
    align-items: start !important;
}

.faxnews-footer .footer-main > .container > .row > div {
    max-width: 100% !important;
    flex: none !important;
    width: auto !important;
}

/* Radically minimize the footer by totally obliterating the redundant middle link columns */
.faxnews-footer .footer-main > .container > .row > div:nth-child(3),
.faxnews-footer .footer-main > .container > .row > div:nth-child(4) {
    display: none !important;
}

@media (max-width: 991px) {
    .faxnews-footer .footer-main {
        padding: 32px 0 0 !important;
    }

    .faxnews-footer .footer-main > .container > .row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .faxnews-footer .footer-main > .container > .row > div {
        margin-bottom: 10px !important;
    }

    .footer-bottom-bar {
        padding: 14px 12px !important;
        margin: 0 -15px !important;
    }

    .footer-bottom-bar .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px !important;
    }

    .footer-legal-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 14px !important;
    }
}

/* Sticky footer & eliminate any trailing space below footer on mobile/desktop */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    min-height: 100%;
}

#app,
#wrapper {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
}

footer.faxnews-footer {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* --- VANGUARD HOMEPAGE RESTRUCTURE --- */
.vanguard-category-block {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 60px !important;
    padding-bottom: 40px !important;
    border-bottom: 4px solid #f4f4f4 !important;
}

/* Vanguard Header Styles */
.vanguard-category-block .topic-border {
    border-bottom: 2px solid #eaeaea !important;
    margin-bottom: 25px !important;
    padding-bottom: 10px !important;
}

.vanguard-category-block .topic-box-lg {
    background: transparent !important;
    color: #cc0000 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 0 !important;
}

.vanguard-category-block .topic-box-lg::after {
    content: " ▶" !important;
    font-size: 20px !important;
    color: #cc0000 !important;
    vertical-align: middle !important;
}

/* Turn the content into a Grid */
.vanguard-category-block {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: 30px !important;
    row-gap: 20px !important;
}

/* Header spans full width */
.vanguard-category-block .topic-border {
    grid-column: 1 / -1 !important;
}

/* Main featured article stays on left, spans 3 rows */
.vanguard-category-block .img-overlay-70 {
    grid-column: 1 !important;
    grid-row: 2 / span 3 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* The three smaller `.media` articles stack on the right side */
.vanguard-category-block .media:nth-of-type(1) {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

.vanguard-category-block .media:nth-of-type(2) {
    grid-column: 2 !important;
    grid-row: 3 !important;
}

.vanguard-category-block .media:nth-of-type(3) {
    grid-column: 2 !important;
    grid-row: 4 !important;
}

/* Read More spans full width at bottom */
.vanguard-category-block .text-center.mt-3.mb-4 {
    grid-column: 1 / -1 !important;
    margin-top: 15px !important;
}

/* Clean up borders and shadows */
.vanguard-category-block img {
    border-radius: 0 !important;
}

.vanguard-category-block .media {
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid #eaeaea !important;
    padding-bottom: 15px !important;
    margin-bottom: 0 !important;
}

/* Remove border on the last media item */
.vanguard-category-block .media:nth-of-type(3) {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

@media (max-width: 991px) {
    .vanguard-category-block {
        grid-template-columns: 1fr !important;
    }

    .vanguard-category-block .img-overlay-70 {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: auto !important;
    }

    .vanguard-category-block .media:nth-of-type(1),
    .vanguard-category-block .media:nth-of-type(2),
    .vanguard-category-block .media:nth-of-type(3) {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

/* Ensure category tags on image widgets always use white text */
.topic-box-sm,
.topic-box,
.topic-box-lg.color-apple,
.topic-box-lg.color-scampi {
    color: #ffffff !important;
}

/* Ensure the text is white inside the main category blocks! */
.vanguard-category-block .topic-box-lg {
    color: #ffffff !important;
}

/* Completely remove the pre-footer subscription section */
.footer-newsletter-strip,
.newsletter-area {
    display: none !important;
}

/* --- HEADER LOGO CENTERING --- */
/* Desktop Centering */
.top-bar-bottom .row {
    justify-content: center !important;
}

.top-bar-bottom .col-lg-4,
.top-bar-bottom .col-md-12 {
    max-width: 100% !important;
    flex: 0 0 100% !important;
    text-align: center !important;
}

.top-bar-bottom .col-lg-8 {
    display: none !important;
    /* Hide header ad to clear space for perfect centering */
}

.logo-area.text-lg-left {
    text-align: center !important;
}

/* Mobile Centering */
@media (max-width: 991px) {
    .d-lg-none.bg-body .container>.d-flex.justify-content-between {
        justify-content: center !important;
        position: relative !important;
    }

    /* Absolutely map the hamburger menu to the right so logo is truly central! */
    .d-lg-none.bg-body .container>.d-flex>.d-flex.align-items-center {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/* Minimalist Professional Social Icons (Vanguard-style flat design) */
.footer-social-row {
    margin-top: 15px !important;
    display: flex !important;
    gap: 20px !important;
    justify-content: flex-start !important;
}

.footer-social-row a {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    color: #555555 !important;
    font-size: 22px !important;
    transition: color 0.2s ease !important;
    background-color: transparent !important;
}

.footer-social-row a:hover {
    transform: none !important;
    color: #cc0000 !important;
}

.soc-fb,
.soc-tw,
.soc-ig,
.soc-yt,
.soc-li {
    background-color: transparent !important;
}

/* --- MOBILE SEARCH ICON & SEARCH POPUP MODAL --- */
.mobile-icon-btn {
    font-size: 22px !important;
    padding: 8px 10px !important;
    color: #1a1a1a !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mobile-icon-btn:hover,
.mobile-icon-btn:focus {
    color: #cc0000 !important;
    box-shadow: none !important;
}

.fax-search-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.68) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 80px 16px 24px !important;
    animation: faxSearchFadeIn 0.2s ease-out !important;
}

@keyframes faxSearchFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fax-search-modal {
    width: 100% !important;
    max-width: 580px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 22px 24px 26px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35) !important;
    border-top: 4px solid #cc0000 !important;
    animation: faxSearchSlideDown 0.22s ease-out !important;
}

@keyframes faxSearchSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fax-search-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
}

.fax-search-modal-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.fax-search-modal-title i {
    color: #cc0000 !important;
}

.fax-search-modal-close {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: none !important;
    box-shadow: none !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.fax-search-modal-close:hover {
    background: #cc0000 !important;
    color: #ffffff !important;
}

.fax-search-modal-form {
    display: flex !important;
    gap: 10px !important;
    align-items: stretch !important;
}

.fax-search-modal-input {
    flex: 1 !important;
    height: 50px !important;
    padding: 0 16px !important;
    font-size: 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    outline: none !important;
}

.fax-search-modal-input:focus {
    border-color: #cc0000 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(204, 0, 0, 0.12) !important;
}

.fax-search-modal-submit {
    height: 50px !important;
    padding: 0 22px !important;
    background-color: #cc0000 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

@media (max-width: 575px) {
    .fax-search-backdrop {
        padding: 64px 12px 20px !important;
    }

    .fax-search-modal {
        padding: 18px 16px 20px !important;
    }

    .fax-search-modal-form {
        flex-direction: column !important;
    }

    .fax-search-modal-submit {
        width: 100% !important;
        height: 46px !important;
    }
}
