/* =========================
   BASIC RESPONSIVE FIXES
========================= */

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent Horizontal Scroll */
body {
    overflow-x: hidden;
}

/* Responsive Tables */
table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
}

/* Flexible Layout Fix */
.container,
.site-content,
.content-area,
.entry-content {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Prevent Overlapping */
* {
    box-sizing: border-box;
}

/* Responsive Videos */
iframe,
video {
    max-width: 100%;
    height: auto;
}

/* =========================
   MOBILE RESPONSIVE FIXES
========================= */

@media screen and (max-width: 768px) {

    body {
        font-size: 16px;
    }

    .site-header,
    .site-footer,
    .content-area,
    .widget {
        padding-left: 10px;
        padding-right: 10px;
    }

    img {
        height: auto;
    }

    table {
        font-size: 14px;
    }
}

/* =========================
   MOBILE MENU FIX
========================= */

@media screen and (max-width: 768px) {

    .main-header-menu,
    .ast-header-break-point .main-header-menu {
        display: block !important;
        width: 100% !important;
        background: #ffffff;
    }

    .main-header-menu li {
        display: block !important;
        width: 100% !important;
        border-bottom: 1px solid #ddd;
    }

    .main-header-menu li a {
        display: block !important;
        padding: 12px !important;
        color: #000 !important;
        background: #fff !important;
        font-size: 16px !important;
    }

    .main-header-menu li a:hover {
        background: #f2f2f2;
    }

    .ast-mobile-menu-buttons {
        display: block !important;
    }

    .menu-toggle {
        display: block !important;
    }

    .ast-mobile-popup-drawer.active {
        overflow-y: auto !important;
        height: 100vh !important;
    }

    .main-header-menu {
        padding-top: 20px !important;
    }

    .main-header-menu li {
        clear: both;
    }

    .ast-builder-menu-mobile .main-navigation {
        max-height: 100vh;
        overflow-y: auto;
    }

    .ast-builder-menu-mobile .main-header-menu {
        background: #fff;
    }
}

/* =========================
   ACCESSIBILITY TOP BAR FIX
========================= */

@media screen and (max-width: 768px) {

    .top-bar,
    .ast-above-header,
    .site-top-bar,
    .accessibility-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 5px !important;
        text-align: center !important;
    }

    .top-bar a,
    .ast-above-header a,
    .accessibility-bar a {
        font-size: 12px !important;
        padding: 4px 6px !important;
        display: inline-block !important;
    }

    .top-bar select,
    .ast-above-header select {
        width: auto !important;
        max-width: 100px !important;
        font-size: 12px !important;
    }
}

/* =========================
   MOBILE HEADER TEXT FIX
========================= */

@media screen and (max-width: 768px) {

    .site-title,
    .site-title a {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    .site-description {
        font-size: 16px !important;
    }
}

/* Mobile Header Alignment Fix */
@media screen and (max-width: 768px) {

    .site-title,
    .site-branding,
    .ast-site-title-wrap {
        text-align: center !important;
        width: 100% !important;
    }

    .site-title a {
        font-size: 22px !important;
        line-height: 1.3 !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
        display: block;
    }

    .site-description {
        font-size: 15px !important;
        text-align: center !important;
    }
}



/* ================= A4 PRINT OPTIMIZATION ================= */

@media print {

    @page {
        size: A4;
        margin: 15mm;
    }

    html,
    body {
        width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }

    /* Hide unnecessary sections while printing */

    header,
    footer,
    nav,
    aside,
    .sidebar,
    .widget,
    .widget-area,
    .site-footer,
    .footer-area,
    .main-navigation,
    .breadcrumbs,
    .search-form,
    .comments-area,
    .social-share,
    .elementor-location-header,
    .elementor-location-footer {
        display: none !important;
    }

    /* Make content full width */

    .site,
    .site-content,
    .content-area,
    .site-main,
    .container,
    .wrapper,
    .post,
    article,
    .entry-content,
    .post-content,
    .elementor-container,
    .elementor-column,
    .elementor-widget-wrap {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        display: block !important;
    }

    /* Fix images */

    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid !important;
    }

    /* Prevent broken layout */

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    table,
    img,
    section,
    article,
    div {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Table formatting */

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th,
    td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }

    /* Remove overflow and fixed heights */

    * {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        box-shadow: none !important;
        animation: none !important;
        transition: none !important;
    }

    /* Better spacing */

    section,
    div {
        margin-bottom: 10px !important;
    }

    /* Prevent Elementor shrinking */

    .elementor {
        transform: none !important;
        zoom: 1 !important;
    }
}




/* ============================= */
/* GIGW LOW CONTRAST FIX */
/* ============================= */

/* News ticker / News in Focus */
.news,
.news-ticker,
.marquee,
.breaking-news {
    background: #0b5d1e !important;
    color: #ffffff !important;
}

/* News links and buttons */
.news a,
.news button,
.breaking-news a {
    background: #8b0000 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 8px;
    border-radius: 3px;
}

/* Main menu text */
.main-navigation a,
.nav-menu a,
.menu a {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Menu hover effect */
.main-navigation a:hover,
.nav-menu a:hover,
.menu a:hover {
    color: #ffeb3b !important;
}

/* Improve overall body text readability */
body {
    color: #222222 !important;
}

/* Footer readability */
footer,
.site-footer {
    color: #ffffff !important;
}

/* Footer links */
footer a,
.site-footer a {
    color: #ffffff !important;
}

/* Buttons contrast */
button,
input[type="submit"],
.wp-block-button__link {
    background: #005a9c !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Improve link visibility */
a {
    color: #004a99;
}

/* Better text visibility on green backgrounds */
.green-section,
.header-green,
.top-bar {
    color: #ffffff !important;
}

/* =====================================================
   GIGW ACCESSIBILITY FIX – CLEAN KEYBOARD FOCUS
   ===================================================== */

/* Visible focus for all interactive elements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
summary:focus,
[tabindex]:focus,
.menu-item a:focus,
.nav-menu a:focus,
.main-navigation a:focus,
table a:focus,
td a:focus,
th a:focus {

    outline: 3px solid #ffcc00 !important;
    outline-offset: 3px !important;

    border-radius: 4px !important;

    box-shadow: 0 0 6px rgba(255, 204, 0, 0.8) !important;

    text-decoration: none !important;
}

/* Prevent themes from removing focus */
*:focus {
    outline-style: solid !important;
}

/* Optional light highlight for table row */
table tr:focus-within {
    background-color: rgba(255, 204, 0, 0.08) !important;
}

/* Smooth transition */
a,
button,
input,
select,
textarea,
table tr {
    transition: all 0.2s ease;
}


/* Improve text contrast across website */
body,
p,
span,
li,
td,
div {
    color: #222222 !important;
}

/* Improve links */
a {
    color: #0056b3 !important;
}

a:hover,
a:focus {
    color: #003d80 !important;
    text-decoration: underline;
}

/* Navigation menu */
.main-navigation a,
.menu a {
    color: #111111 !important;
}

/* Buttons */
button,
input[type="submit"],
.wp-block-button__link {
    background-color: #0056b3 !important;
    color: #ffffff !important;
}

/* Footer */
.site-footer,
.site-footer p,
.site-footer a {
    color: #ffffff !important;
}

/* Improve small text visibility */
small {
    color: #333333 !important;
}


/* Force menu text to white */
.main-navigation a,
.main-header-menu a,
.menu a,
.ast-builder-menu-1 .menu-link {
    color: #ffffff !important;
}

/* Keep hover also white */
.main-navigation a:hover,
.main-header-menu a:hover,
.menu a:hover,
.ast-builder-menu-1 .menu-link:hover {
    color: #ffffff !important;
}

/* Improve mobile touch size */
button,
.menu a,
input[type="submit"] {
    min-height: 44px;
    padding: 10px 15px;
}

/*Footer Social Media Icons */
.footer-widget-area h4 {
    margin-top: 0 !important;
}

.footer-widget-area .widget {
    margin-top: 0 !important;
}