/**
 * Main Theme CSS - REREC WordPress Theme
 * COMPLETE FIXED VERSION - FONT AWESOME ICONS WORKING
 */

/* ============================================
   ROOT VARIABLES
   ============================================ */

:root {
    --primary: #FC6100;
    --primary-dark: #E35500;
    --primary-light: #FD8F40;
    --secondary: #17733C;
    --secondary-dark: #0F552C;
    --secondary-light: #229A50;
    --topbar-bg: #FC6100;
    --text-main: #1e2f3e;
    --text-light: #556b7a;
    --text-lighter: #8a9ba8;
    --gray-light: #f9fafb;
    --gray-border: #e5e7eb;
    --white: #ffffff;
    --black: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* ============================================
   GLOBAL FONT - MERRIWEATHER SANS (TEXT ONLY)
   ============================================ */

/* Apply to ALL text elements - but NOT icons */
body, 
h1, h2, h3, h4, h5, h6, 
p, blockquote, pre,
a, abbr, acronym, address,
del, dfn, em, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video,
button, input, select, textarea,
.nav-menu, .nav-menu > li > a, .sub-menu li a,
.top-bar, .top-bar .tb-left span, .top-bar .tb-center a,
.main-header, .footer, .hero-section, .card,
.section-title, .search-popup,
.search-popup-header h3, .search-popup-header p,
.search-popup-input, .suggestions-title, .suggestions-tags a,
.quick-links span, .quick-links a,
.live-suggestions-container, .suggestion-content strong,
.suggestion-content span, .view-all-results a,
.no-results p,
.rerec-frontend,
.rerec-frontend h2,
.rerec-frontend table,
.rerec-frontend th,
.rerec-frontend td,
.rerec-frontend a,
.rerec-frontend .rerec-tabs a {
    font-family: 'Merriweather Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

/* ============================================
   FONT AWESOME - FORCE PRESERVE ICONS
   ============================================ */

/* Primary Font Awesome icon classes - MUST come AFTER text font */
.fa,
.fas,
.far,
.fal,
.fab,
.fad,
.fa-solid,
.fa-regular,
.fa-light,
.fa-brands,
.fa-thin,
.fa-duotone,
[class*="fa-"],
i[class*="fa-"],
span[class*="fa-"],
a[class*="fa-"],
.rerec-tabs a i,
.tb-left i,
.tb-center a i,
.tb-right a i,
.search-icon i,
.mobile-menu-icon i,
#backToTop i,
.nav-menu > li > a i,
.nav-menu .sub-menu li a i,
.top-bar i,
.rerec-frontend .rerec-tabs a:before,
.rerec-frontend .rerec-tabs a i {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Free', 'FontAwesome' !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Brands */
.fab,
.fa-brands {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}

/* Regular */
.far,
.fa-regular {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 400 !important;
}

/* Solid */
.fas,
.fa-solid,
.fa {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}

/* Menu dropdown arrows */
.nav-menu > li.menu-item-has-children > a:after,
.nav-menu .sub-menu li.menu-item-has-children > a::after {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}

/* ============================================
   BASE RESET
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
}

body.menu-open {
    overflow: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.25rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    font-weight: 500;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

/* ============================================
   SCROLL PROGRESS & BACK TO TOP
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 10000;
    box-shadow: 0 0 10px rgba(252, 97, 0, 0.5);
    transition: width 0.1s ease;
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    font-size: 20px;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   TOP BAR
   ============================================ */

.top-bar {
    background: var(--topbar-bg);
    color: var(--white);
    font-size: 12px;
    position: relative;
    z-index: 1002;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 24px;
    min-height: 40px;
    gap: 15px;
}

.tb-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tb-left span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
}

.tb-left i {
    color: #ffd966;
    font-size: 11px;
}

.tb-center {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

.tb-center a {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
}

.tb-center a:hover {
    color: #ffd966;
}

.tb-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.tb-right a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: var(--transition);
}

.tb-right a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.top-bar i {
    margin-right: 5px;
    font-size: 12px;
}

/* ============================================
   MAIN HEADER & MENU
   ============================================ */

.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 80px;
    gap: 15px;
    position: relative;
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo img,
.custom-logo {
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (min-width: 1025px) and (max-width: 1200px) {
    .nav-container {
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: thin;
    }
    
    .nav-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-container::-webkit-scrollbar-track {
        background: var(--gray-border);
        border-radius: 10px;
    }
    
    .nav-container::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }
    
    .nav-menu {
        flex: none;
        min-width: max-content;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: visible;
}

.nav-menu > li {
    position: relative;
    flex-shrink: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    cursor: pointer;
}

body.menu-open {
    overflow: hidden;
}

.nav-menu > li > a {
    font-weight: 500;
    font-size: 11px;
    padding: 8px 10px;
    color: var(--text-main);
    text-transform: uppercase;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.nav-menu > li.menu-item-has-children > a:after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.nav-menu > li.menu-item-has-children:hover > a:after {
    transform: rotate(180deg);
}

.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 1000;
}

.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
    margin-top: -3px;
    border-top: 3px solid var(--primary);
    border-left: 1px solid var(--gray-border);
    transform: translateX(-10px);
}

.nav-menu .sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nav-menu .sub-menu li {
    position: relative;
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 1px solid var(--gray-border);
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
}

.nav-menu .sub-menu li:last-child a {
    border-bottom: none;
}

.nav-menu .sub-menu li a:hover {
    color: var(--primary);
    background: var(--gray-light);
    padding-left: 26px;
}

.rerec-entry-content img {

  margin: 0px !important;
}

.nav-menu .sub-menu li.menu-item-has-children > a::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 11px;
    float: right;
    margin-left: 20px;
    transition: transform 0.2s ease;
}

.nav-menu .sub-menu li.menu-item-has-children:hover > a::after {
    transform: translateX(3px);
}

.nav-menu > li:last-child .sub-menu,
.nav-menu > li:nth-last-child(2) .sub-menu {
    left: auto;
    right: 0;
}

.nav-menu > li:last-child .sub-menu .sub-menu,
.nav-menu > li:nth-last-child(2) .sub-menu .sub-menu {
    left: auto;
    right: 100%;
}

.search-column {
    flex-shrink: 0;
    margin-left: 5px;
}

.search-icon a {
    background: var(--secondary);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.search-icon a:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.mobile-menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary);
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
}

/* Desktop Responsive */
@media (min-width: 1025px) and (max-width: 1350px) {
    .nav-menu > li > a {
        font-size: 12px;
        padding: 8px 10px;
    }
}

@media (min-width: 1025px) and (max-width: 1250px) {
    .nav-menu > li > a {
        font-size: 11px;
        padding: 8px 8px;
        letter-spacing: 0.2px;
    }
    
    .logo img,
    .custom-logo {
        max-height: 40px;
    }
}

@media (min-width: 1025px) and (max-width: 1150px) {
    .nav-menu > li > a {
        font-size: 10.5px;
        padding: 8px 7px;
    }
    
    .nav-container {
        padding: 0 15px;
        gap: 10px;
    }
}

@media (min-width: 1025px) and (max-width: 1080px) {
    .nav-menu > li > a {
        font-size: 10px;
        padding: 8px 6px;
    }
    
    .search-icon a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ============================================
   MOBILE MENU (max-width: 1024px)
   ============================================ */

@media (max-width: 1024px) {
    .mobile-menu-icon {
        display: block;
        order: 2;
    }
    
    .search-column {
        order: 3;
        margin-left: 0;
    }
    
    .logo {
        order: 1;
        flex: 1;
    }
    
    .nav-container {
        min-height: 65px;
        padding: 10px 15px;
    }
    
    .logo img,
    .custom-logo {
        max-height: 40px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 0 30px;
        box-shadow: var(--shadow-xl);
        transition: left 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        gap: 0;
        display: block !important;
    }
    
    .nav-menu.show {
        left: 0;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--gray-border);
    }
    
    .nav-menu > li > a {
        width: 100%;
        justify-content: space-between;
        padding: 14px 20px;
        font-size: 14px;
        white-space: normal;
        font-weight: 700;
    }
    
    .nav-menu .sub-menu {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        background: var(--gray-light);
        display: none;
        width: 100%;
        border-radius: 0;
        margin-top: 0;
    }
    
    .nav-menu .sub-menu .sub-menu {
        border-left: none;
        padding-left: 20px;
    }
    
    .nav-menu li:hover > .sub-menu {
        display: none;
    }
    
    .nav-menu .sub-menu li a {
        padding: 12px 20px 12px 35px;
        white-space: normal;
        border-bottom: none;
        font-weight: 500;
    }
    
    .nav-menu .sub-menu .sub-menu li a {
        padding-left: 50px;
    }
    
    .nav-menu > li.menu-item-has-children > a:after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free' !important;
    }
}

/* ============================================
   TOP BAR RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .top-bar .container {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .tb-center {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        order: 2;
    }
    
    .tb-left {
        order: 1;
    }
    
    .tb-right {
        display: flex;
        order: 3;
    }
    
    .tb-left span {
        font-size: 11px;
    }
    
    .tb-center a {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .tb-left span {
        font-size: 10px;
        white-space: normal;
        text-align: center;
    }
    
    .tb-center {
        gap: 12px;
    }
    
    .tb-center a {
        font-size: 10px;
    }
    
    .tb-center a i {
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .tb-left span {
        font-size: 9px;
    }
    
    .tb-center a {
        font-size: 9px;
        white-space: normal;
        text-align: center;
    }
    
    .tb-right a {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ============================================
   SEARCH POPUP
   ============================================ */

.search-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.search-popup-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    max-width: 700px;
    width: 90%;
    margin: 100px auto;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-popup-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-popup-close:hover {
    color: #f06725;
    transform: rotate(90deg);
}

.search-popup-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-popup-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.search-popup-header p {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

.search-popup-form {
    margin-bottom: 30px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 5px 5px 5px 20px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #f06725;
    box-shadow: 0 0 0 3px rgba(240, 103, 37, 0.1);
}

.search-icon-inline {
    color: #999;
    font-size: 18px;
    margin-right: 12px;
}

.search-popup-input {
    flex: 1;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    outline: none;
    background: transparent;
    font-weight: 400;
}

.search-popup-submit {
    background: #f06725;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-popup-submit:hover {
    background: #d45a1c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 103, 37, 0.3);
}

.search-suggestions {
    text-align: center;
}

.suggestions-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.suggestions-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggestions-tags a {
    background: #f0f0f0;
    color: #666;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.suggestions-tags a:hover {
    background: #f06725;
    color: white;
    transform: translateY(-2px);
}

.search-popup-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.quick-links {
    font-size: 13px;
}

.quick-links span {
    color: #999;
    margin-right: 15px;
    font-weight: 600;
}

.quick-links a {
    color: #666;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
    font-weight: 500;
}

.quick-links a:hover {
    color: #f06725;
}

#liveSuggestions {
    margin-top: 20px;
}

.live-suggestions-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-search-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.live-search-list li {
    border-bottom: 1px solid #f0f0f0;
}

.live-search-list li:last-child {
    border-bottom: none;
}

.live-search-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    text-decoration: none;
    transition: background 0.3s ease;
    border-radius: 8px;
}

.live-search-list li a:hover {
    background: #f8f9fa;
}

.live-search-list li a i {
    color: #f06725;
    font-size: 18px;
    width: 30px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-content strong {
    display: block;
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 700;
}

.suggestion-content span {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: 500;
}

.view-all-results {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.view-all-results a {
    color: #f06725;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.view-all-results a:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.no-results i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.no-results p {
    color: #666;
    margin: 0;
    font-weight: 400;
}

.no-results strong {
    color: #f06725;
}

/* Search Popup Responsive */
@media (max-width: 992px) {
    .search-popup-content {
        margin: 50px auto;
        padding: 30px 20px;
        width: 95%;
    }
    
    .search-popup-header h3 {
        font-size: 24px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
        border-radius: 15px;
        padding: 15px;
    }
    
    .search-icon-inline {
        display: none;
    }
    
    .search-popup-input {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .search-popup-submit {
        width: 100%;
    }
    
    .suggestions-tags a {
        font-size: 11px;
        padding: 5px 12px;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    body {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .search-icon a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .mobile-menu-icon {
        font-size: 20px;
    }
    
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.bg-light { background: var(--gray-light); }
.bg-white { background: var(--white); }

/* ============================================
   LINK STYLING
   ============================================ */

a {
    color: inherit !important;
    text-decoration: none !important;
}

.nav-menu li a,
.nav-menu li a:visited {
    color: var(--text-main) !important;
    text-decoration: none !important;
}

.nav-menu li a:hover {
    color: var(--primary) !important;
}

.entry-content a,
.elementor-widget-container a {
    color: var(--primary) !important;
    text-decoration: none !important;
}

.elementor a {
    color: inherit !important;
    text-decoration: none !important;
}

/* ============================================
   REREC TENDERS FRONTEND FIXES
   ============================================ */

/* Fix for tender tabs - ensure icons show */
.rerec-frontend .rerec-tabs a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* If using Font Awesome icons before text */
.rerec-frontend .rerec-tabs a:before {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    margin-right: 6px !important;
}

/**
 * REREC Tenders System - Aggressive Brand Styling
 * Complete style overrides for frontend and backend
 */

/* ============================================
   ROOT VARIABLES - REREC BRAND COLORS
   ============================================ */

:root {
    --rerec-primary: #17733C;
    --rerec-primary-dark: #0F552C;
    --rerec-primary-light: #229A50;
    --rerec-primary-pale: #E8F5EE;
    --rerec-primary-bg: #F0FAF4;
    --rerec-orange: #FC6100;
    --rerec-orange-dark: #E35500;
    --rerec-orange-light: #FD8F40;
    --rerec-blue: #1e6091;
    --rerec-blue-dark: #174a73;
    --rerec-text: #1e2f3e;
    --rerec-text-light: #556b7a;
    --rerec-text-muted: #8a9ba8;
    --rerec-border: #e5e7eb;
    --rerec-border-light: #eef1f5;
    --rerec-white: #ffffff;
    --rerec-gray: #f9fafb;
    --rerec-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --rerec-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --rerec-radius: 8px;
    --rerec-radius-lg: 12px;
    --rerec-transition: all 0.3s ease;
}

/* ============================================
   FRONTEND TABS - AGGRESSIVE STYLING
   ============================================ */

.rerec-frontend .rerec-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    margin: 0 0 25px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-bottom: 3px solid var(--rerec-primary) !important;
    position: relative !important;
}

.rerec-frontend .rerec-tabs a {
    color: var(--rerec-text-light) !important;
    text-decoration: none !important;
    padding: 14px 28px !important;
    border-radius: 0 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    background: transparent !important;
    transition: var(--rerec-transition) !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    margin-bottom: -3px !important;
    cursor: pointer !important;
    position: relative !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'Merriweather Sans', sans-serif !important;
}

.rerec-frontend .rerec-tabs a:hover {
    color: var(--rerec-primary) !important;
    background: var(--rerec-primary-bg) !important;
    border-bottom-color: var(--rerec-primary) !important;
}

.rerec-frontend .rerec-tabs a.active {
    color: var(--rerec-primary) !important;
    background: var(--rerec-white) !important;
    border-bottom-color: var(--rerec-primary) !important;
    font-weight: 700 !important;
}

.rerec-frontend .rerec-tabs a.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -3px !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: var(--rerec-primary) !important;
}

/* Tab Counter Badges */
.rerec-frontend .rerec-tabs a .tab-count {
    display: inline-block !important;
    background: var(--rerec-primary-pale) !important;
    color: var(--rerec-primary) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 10px !important;
    border-radius: 20px !important;
    margin-left: 8px !important;
    transition: var(--rerec-transition) !important;
    line-height: 1.6 !important;
}

.rerec-frontend .rerec-tabs a.active .tab-count {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
}

.rerec-frontend .rerec-tabs a:hover .tab-count {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
}

/* ============================================
   FRONTEND SECTION TITLES
   ============================================ */

.rerec-frontend h2 {
    color: var(--rerec-primary) !important;
    border-bottom: 3px solid var(--rerec-orange) !important;
    padding-bottom: 12px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
    font-size: 1.6rem !important;
    font-family: 'Merriweather Sans', sans-serif !important;
}

.rerec-frontend .rerec-tab-content {
    display: none !important;
    padding-top: 20px !important;
    animation: rerecFadeIn 0.4s ease !important;
}

@keyframes rerecFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.rerec-frontend .rerec-tab-content.active {
    display: block !important;
}

/* ============================================
   FRONTEND TABLES
   ============================================ */

.rerec-frontend .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 10px 0 !important;
    border: 1px solid var(--rerec-border) !important;
    border-radius: var(--rerec-radius-lg) !important;
    background: var(--rerec-white) !important;
    box-shadow: var(--rerec-shadow) !important;
}

.rerec-frontend .table-responsive table {
    min-width: 600px !important;
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 14px !important;
    table-layout: fixed !important;
}

.rerec-frontend table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: 14px !important;
    table-layout: fixed !important;
}

.rerec-frontend th {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
    padding: 14px 12px !important;
    text-align: left !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    border: none !important;
}

.rerec-frontend td {
    padding: 12px 12px !important;
    border-bottom: 1px solid var(--rerec-border-light) !important;
    vertical-align: top !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    color: var(--rerec-text) !important;
    font-size: 13px !important;
}

.rerec-frontend tr:hover {
    background: #fff7ee !important;
}

.rerec-frontend tr:nth-child(even) {
    background: var(--rerec-gray) !important;
}

.rerec-frontend tr:nth-child(even):hover {
    background: #fff7ee !important;
}

/* Column widths */
.rerec-frontend th:nth-child(1),
.rerec-frontend td:nth-child(1) {
    width: 10% !important;
}

.rerec-frontend th:nth-child(2),
.rerec-frontend td:nth-child(2) {
    width: 25% !important;
}

.rerec-frontend th:nth-child(3),
.rerec-frontend td:nth-child(3) {
    width: 12% !important;
}

.rerec-frontend th:nth-child(4),
.rerec-frontend td:nth-child(4) {
    width: 12% !important;
}

.rerec-frontend th:nth-child(5),
.rerec-frontend td:nth-child(5) {
    width: 15% !important;
}

.rerec-frontend th:nth-child(6),
.rerec-frontend td:nth-child(6) {
    width: 15% !important;
}

.rerec-frontend th:nth-child(7),
.rerec-frontend td:nth-child(7) {
    width: 11% !important;
}

/* ============================================
   FRONTEND DOWNLOAD BUTTONS
   ============================================ */

.rerec-frontend a.rerec-dl {
    color: var(--rerec-primary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    background: var(--rerec-primary-pale) !important;
    transition: var(--rerec-transition) !important;
    font-size: 12px !important;
    border: 1px solid #c5e0d3 !important;
    line-height: 1.4 !important;
}

.rerec-frontend a.rerec-dl:hover {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
    border-color: var(--rerec-primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(23, 115, 60, 0.3) !important;
}

/* ============================================
   FRONTEND BADGES
   ============================================ */

.rerec-badge-new {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.rerec-badge-closed {
    background: #a83232 !important;
    color: var(--rerec-white) !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Additional status badges */
.rerec-badge-opening {
    background: #f59e0b !important;
    color: var(--rerec-white) !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.rerec-badge-addendum {
    background: #7c3aed !important;
    color: var(--rerec-white) !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.rerec-badge-cancelled {
    background: #dc2626 !important;
    color: var(--rerec-white) !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.rerec-badge-awarded {
    background: #1e6091 !important;
    color: var(--rerec-white) !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ============================================
   FRONTEND NO RECORDS
   ============================================ */

.rerec-frontend .no-records {
    text-align: center !important;
    color: var(--rerec-text-muted) !important;
    padding: 50px 20px !important;
    background: var(--rerec-gray) !important;
    border-radius: var(--rerec-radius-lg) !important;
    margin: 10px 0 !important;
    border: 2px dashed var(--rerec-border) !important;
    font-size: 16px !important;
}

/* ============================================
   FRONTEND SMALL TEXT
   ============================================ */

.rerec-frontend td small {
    color: var(--rerec-text-muted) !important;
    font-size: 12px !important;
    display: block !important;
    margin-top: 3px !important;
}

.rerec-frontend td strong {
    color: var(--rerec-primary) !important;
    font-weight: 700 !important;
}

/* ============================================
   FRONTEND RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .rerec-frontend table {
        font-size: 13px !important;
    }
    
    .rerec-frontend th,
    .rerec-frontend td {
        padding: 10px 8px !important;
    }
    
    .rerec-frontend .rerec-tabs a {
        padding: 12px 20px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 768px) {
    /* Tabs become full width */
    .rerec-frontend .rerec-tabs a {
        font-size: 11px !important;
        padding: 10px 16px !important;
        flex: 1 !important;
        text-align: center !important;
        min-width: 80px !important;
        border-bottom: 2px solid transparent !important;
        margin-bottom: -2px !important;
    }
    
    .rerec-frontend .rerec-tabs a.active::after {
        height: 2px !important;
        bottom: -2px !important;
    }
    
    /* Mobile card-style tables */
    .rerec-frontend table,
    .rerec-frontend thead,
    .rerec-frontend tbody,
    .rerec-frontend th,
    .rerec-frontend td,
    .rerec-frontend tr {
        display: block !important;
    }
    
    .rerec-frontend thead {
        display: none !important;
    }
    
    .rerec-frontend tr {
        margin-bottom: 16px !important;
        border: 1px solid var(--rerec-border) !important;
        border-radius: var(--rerec-radius-lg) !important;
        background: var(--rerec-white) !important;
        box-shadow: var(--rerec-shadow) !important;
    }
    
    .rerec-frontend td {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 10px 14px !important;
        border: none !important;
        border-bottom: 1px solid var(--rerec-border-light) !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    .rerec-frontend td:last-child {
        border-bottom: none !important;
    }
    
    .rerec-frontend td:before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        min-width: 100px !important;
        color: var(--rerec-primary) !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
    }
    
    .rerec-frontend td:not(:first-child) {
        white-space: normal !important;
    }
    
    .rerec-frontend .table-responsive table {
        min-width: 100% !important;
    }
    
    .rerec-frontend .table-responsive {
        overflow-x: visible !important;
    }
    
    .rerec-frontend .rerec-tabs a .tab-count {
        font-size: 9px !important;
        padding: 1px 8px !important;
        margin-left: 5px !important;
    }
}

@media (max-width: 480px) {
    .rerec-frontend td {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .rerec-frontend td:before {
        min-width: 80px !important;
        font-size: 10px !important;
    }
    
    .rerec-frontend .rerec-tabs a {
        font-size: 10px !important;
        padding: 8px 12px !important;
        min-width: 60px !important;
    }
    
    .rerec-frontend .rerec-tabs a .tab-count {
        font-size: 8px !important;
        padding: 0 6px !important;
        margin-left: 4px !important;
    }
    
    .rerec-frontend h2 {
        font-size: 1.2rem !important;
    }
}

/* ============================================
   BACKEND ADMIN STYLES - REREC BRAND
   ============================================ */

/* Admin Tab Navigation */
.rerec-tab-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 20px 0 25px !important;
    padding: 14px 20px !important;
    background: linear-gradient(135deg, var(--rerec-primary), var(--rerec-primary-dark)) !important;
    border-radius: var(--rerec-radius-lg) !important;
    box-shadow: 0 4px 14px rgba(23, 115, 60, 0.3) !important;
}

.rerec-tab-nav a {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none !important;
    padding: 10px 20px !important;
    border-radius: var(--rerec-radius) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    background: rgba(255,255,255,0.12) !important;
    transition: var(--rerec-transition) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
}

.rerec-tab-nav a:hover {
    background: rgba(255,255,255,0.25) !important;
    transform: translateY(-2px) !important;
    color: var(--rerec-white) !important;
}

.rerec-tab-nav a.active {
    background: var(--rerec-white) !important;
    color: var(--rerec-primary) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18) !important;
}

/* Admin Cards */
.rerec-card {
    background: var(--rerec-white) !important;
    padding: 24px !important;
    margin-top: 5px !important;
    border: 1px solid var(--rerec-border) !important;
    border-radius: var(--rerec-radius-lg) !important;
    box-shadow: var(--rerec-shadow) !important;
}

/* Admin Tables */
.rerec-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid var(--rerec-border) !important;
    border-radius: var(--rerec-radius) !important;
    overflow: hidden !important;
    font-size: 13px !important;
    table-layout: fixed !important;
}

.rerec-table thead th {
    background: var(--rerec-blue) !important;
    color: var(--rerec-white) !important;
    padding: 14px 14px !important;
    text-align: left !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
}

.rerec-table tbody td {
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--rerec-border-light) !important;
    vertical-align: top !important;
    color: var(--rerec-text) !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
}

.rerec-table tbody tr:nth-child(even) {
    background: var(--rerec-gray) !important;
}

.rerec-table tbody tr:hover {
    background: #fff7ee !important;
}

.rerec-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Column widths for admin */
.rerec-table th:nth-child(1),
.rerec-table td:nth-child(1) {
    width: 6% !important;
}

.rerec-table th:nth-child(2),
.rerec-table td:nth-child(2) {
    width: 25% !important;
}

.rerec-table th:nth-child(3),
.rerec-table td:nth-child(3) {
    width: 12% !important;
}

.rerec-table th:nth-child(4),
.rerec-table td:nth-child(4) {
    width: 12% !important;
}

.rerec-table th:nth-child(5),
.rerec-table td:nth-child(5) {
    width: 12% !important;
}

.rerec-table th:nth-child(6),
.rerec-table td:nth-child(6) {
    width: 10% !important;
}

.rerec-table th:nth-child(7),
.rerec-table td:nth-child(7) {
    width: 10% !important;
}

.rerec-table th:nth-child(8),
.rerec-table td:nth-child(8) {
    width: 13% !important;
}

/* Admin Badges */
.rerec-badge {
    display: inline-block !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.rerec-badge-active {
    background: var(--rerec-primary-pale) !important;
    color: var(--rerec-primary) !important;
}

.rerec-badge-archived {
    background: #fdeaea !important;
    color: #a83232 !important;
}

/* Admin Buttons */
.rerec-btn {
    display: inline-block !important;
    padding: 7px 16px !important;
    border-radius: var(--rerec-radius) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    transition: var(--rerec-transition) !important;
    line-height: 1.4 !important;
}

.rerec-btn-primary {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
}

.rerec-btn-primary:hover {
    background: var(--rerec-primary-dark) !important;
    color: var(--rerec-white) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(23, 115, 60, 0.3) !important;
}

.rerec-btn-edit {
    background: #eaf3fb !important;
    color: var(--rerec-blue) !important;
    border-color: #cfe2f1 !important;
}

.rerec-btn-edit:hover {
    background: var(--rerec-blue) !important;
    color: var(--rerec-white) !important;
    transform: translateY(-2px) !important;
}

.rerec-btn-archive {
    background: #fff4e6 !important;
    color: #c47b1a !important;
    border-color: #ffd9a8 !important;
}

.rerec-btn-archive:hover {
    background: #f59e0b !important;
    color: var(--rerec-white) !important;
    transform: translateY(-2px) !important;
}

.rerec-btn-restore {
    background: var(--rerec-primary-pale) !important;
    color: var(--rerec-primary) !important;
    border-color: #b9e6c8 !important;
}

.rerec-btn-restore:hover {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
    transform: translateY(-2px) !important;
}

.rerec-btn-view {
    background: var(--rerec-gray) !important;
    color: var(--rerec-text-light) !important;
    border-color: var(--rerec-border) !important;
}

.rerec-btn-view:hover {
    background: var(--rerec-text-light) !important;
    color: var(--rerec-white) !important;
    transform: translateY(-2px) !important;
}

/* Admin Filter Bar */
.rerec-filter-bar {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 18px !important;
    flex-wrap: wrap !important;
}

.rerec-count-pill {
    background: var(--rerec-primary-pale) !important;
    color: var(--rerec-primary) !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* Admin Stats Grid */
.rerec-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px !important;
}

.rerec-stat-card {
    color: var(--rerec-white) !important;
    padding: 24px !important;
    border-radius: var(--rerec-radius-lg) !important;
    text-align: center !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1) !important;
    transition: var(--rerec-transition) !important;
}

.rerec-stat-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}

.rerec-stat-card h2 {
    color: var(--rerec-white) !important;
    font-size: 32px !important;
    margin: 0 !important;
    font-weight: 800 !important;
}

.rerec-stat-card p {
    color: rgba(255,255,255,0.9) !important;
    margin: 5px 0 10px !important;
}

.rerec-stat-card a {
    color: var(--rerec-white) !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin-top: 10px !important;
    background: rgba(255,255,255,0.2) !important;
    padding: 6px 18px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: var(--rerec-transition) !important;
}

.rerec-stat-card a:hover {
    background: rgba(255,255,255,0.35) !important;
    transform: translateY(-2px) !important;
}

/* Admin Modal */
.rerec-modal {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 28, 45, 0.6) !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    backdrop-filter: blur(4px) !important;
}

.rerec-modal-inner {
    position: relative !important;
    max-width: 760px !important;
    margin: 40px auto !important;
    background: var(--rerec-white) !important;
    border-radius: var(--rerec-radius-lg) !important;
    padding: 32px 36px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25) !important;
    animation: rerecSlideIn 0.3s ease !important;
}

@keyframes rerecSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.rerec-modal-close {
    position: absolute !important;
    right: 20px !important;
    top: 14px !important;
    font-size: 30px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: var(--rerec-text-muted) !important;
    background: none !important;
    border: none !important;
    transition: var(--rerec-transition) !important;
}

.rerec-modal-close:hover {
    color: var(--rerec-primary) !important;
    transform: rotate(90deg) !important;
}

/* Admin Form */
.rerec-form-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.rerec-form-table th {
    width: 200px !important;
    text-align: left !important;
    padding: 12px 12px 12px 0 !important;
    font-weight: 700 !important;
    color: var(--rerec-text) !important;
    vertical-align: top !important;
}

.rerec-form-table td {
    padding: 10px 0 !important;
    vertical-align: top !important;
}

.rerec-form-table input[type=text],
.rerec-form-table input[type=number],
.rerec-form-table input[type=date],
.rerec-form-table select,
.rerec-form-table textarea {
    width: 100% !important;
    max-width: 480px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--rerec-border) !important;
    border-radius: var(--rerec-radius) !important;
    font-size: 13px !important;
    background: var(--rerec-white) !important;
    transition: var(--rerec-transition) !important;
    font-family: 'Merriweather Sans', sans-serif !important;
}

.rerec-form-table input:focus,
.rerec-form-table select:focus,
.rerec-form-table textarea:focus {
    border-color: var(--rerec-primary) !important;
    box-shadow: 0 0 0 3px rgba(23, 115, 60, 0.12) !important;
    outline: none !important;
}

.rerec-form-table .small-text {
    width: 90px !important;
    max-width: 90px !important;
}

/* Datepicker - REREC Styled */
#ui-datepicker-div {
    z-index: 999999 !important;
    border-radius: var(--rerec-radius-lg) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18) !important;
    border-color: var(--rerec-border) !important;
    background: var(--rerec-white) !important;
}

.ui-datepicker .ui-datepicker-title {
    font-weight: 700 !important;
    color: var(--rerec-primary) !important;
}

.ui-datepicker .ui-datepicker-calendar td a {
    text-align: center !important;
    padding: 6px 4px !important;
    border-radius: var(--rerec-radius) !important;
    transition: var(--rerec-transition) !important;
}

.ui-datepicker .ui-datepicker-calendar td a:hover {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-active {
    background: var(--rerec-primary) !important;
    color: var(--rerec-white) !important;
    border-color: var(--rerec-primary) !important;
}

/* ============================================
   ADMIN RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .rerec-table {
        font-size: 12px !important;
        table-layout: auto !important;
    }
    
    .rerec-table th,
    .rerec-table td {
        padding: 8px 10px !important;
    }
}

@media (max-width: 768px) {
    /* Admin mobile tables */
    .rerec-table,
    .rerec-table thead,
    .rerec-table tbody,
    .rerec-table th,
    .rerec-table td,
    .rerec-table tr {
        display: block !important;
    }
    
    .rerec-table thead {
        display: none !important;
    }
    
    .rerec-table tr {
        margin-bottom: 16px !important;
        border: 1px solid var(--rerec-border) !important;
        border-radius: var(--rerec-radius-lg) !important;
        background: var(--rerec-white) !important;
    }
    
    .rerec-table td {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 10px 14px !important;
        border: none !important;
        border-bottom: 1px solid var(--rerec-border-light) !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    .rerec-table td:last-child {
        border-bottom: none !important;
    }
    
    .rerec-table td:before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        min-width: 100px !important;
        color: var(--rerec-primary) !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
    }
    
    .rerec-table td:not(:first-child) {
        white-space: normal !important;
    }
    
    .rerec-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .rerec-filter-bar .rerec-btn {
        text-align: center !important;
    }
    
    .rerec-modal-inner {
        margin: 20px 15px !important;
        padding: 24px 20px !important;
    }
    
    .rerec-form-table th {
        width: 100% !important;
        display: block !important;
        padding: 8px 0 4px !important;
    }
    
    .rerec-form-table td {
        display: block !important;
        padding: 4px 0 12px !important;
    }
    
    .rerec-form-table input[type=text],
    .rerec-form-table input[type=number],
    .rerec-form-table input[type=date],
    .rerec-form-table select,
    .rerec-form-table textarea {
        max-width: 100% !important;
    }
    
    .rerec-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 12px !important;
    }
    
    .rerec-tab-nav a {
        font-size: 11px !important;
        padding: 8px 14px !important;
    }
}

@media (max-width: 480px) {
    .rerec-table td {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
   .rerec-featured-content {
    margin-left: 38px !important;
   }
    
    .rerec-table td:before {
        min-width: 80px !important;
        font-size: 10px !important;
    }
    
    .rerec-tab-nav a {
        font-size: 10px !important;
        padding: 6px 10px !important;
    }
    
    .rerec-modal-inner {
        padding: 16px !important;
    }
}

impact-section {
  padding-top: -0px !important;
}

.rerec-fluid-featured-image .rerec-container {
  margin-left: -17px !important;
}

.impact-section {
  padding-top: 0px !important;
}
/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-rerec-primary { color: var(--rerec-primary) !important; }
.text-rerec-orange { color: var(--rerec-orange) !important; }
.bg-rerec-primary { background: var(--rerec-primary) !important; }
.bg-rerec-pale { background: var(--rerec-primary-pale) !important; }
.border-rerec-primary { border-color: var(--rerec-primary) !important; }

@media (max-width: 768px) {
  .impact-section {
    padding-top: 14px !important;
    padding-bottom: 48px;
  }
}

/* ============================================
   ACCESSIBILITY MENU - REREC BRAND COMPONENT
   ============================================ */

/* ---- Floating Toggle Button ---- */
.a11y-toggle-btn {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #17733C 0%, #0F552C 100%);
    color: #ffffff;
    font-size: 22px;
    box-shadow: 0 6px 24px rgba(23, 115, 60, 0.45), 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    animation: a11yPulseRing 2.5s ease-in-out infinite;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}
.a11y-toggle-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(23, 115, 60, 0.3);
    animation: a11yPulseRing 2.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes a11yPulseRing {
    0%, 100% { box-shadow: 0 6px 24px rgba(23, 115, 60, 0.45), 0 0 0 0 rgba(23, 115, 60, 0.25); }
    50% { box-shadow: 0 6px 24px rgba(23, 115, 60, 0.45), 0 0 0 10px rgba(23, 115, 60, 0); }
}
.a11y-toggle-btn:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 8px 32px rgba(23, 115, 60, 0.55);
    background: linear-gradient(135deg, #229A50 0%, #17733C 100%);
}
.a11y-toggle-btn:focus-visible {
    outline: 3px solid #FC6100;
    outline-offset: 4px;
}
.a11y-toggle-btn.active {
    background: linear-gradient(135deg, #FC6100 0%, #E35500 100%);
    box-shadow: 0 6px 24px rgba(252, 97, 0, 0.45);
    animation: none;
    transform: rotate(45deg);
}
.a11y-toggle-btn.active::before {
    animation: none;
    border-color: rgba(252, 97, 0, 0.3);
}
.a11y-toggle-btn .a11y-icon-universal {
    font-size: 26px;
    transition: transform 0.35s ease;
}

/* ---- Overlay ---- */
.a11y-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}
.a11y-panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ---- Panel Shell ---- */
.a11y-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 100002;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    overflow: hidden;
}
.a11y-panel.open {
    transform: translateX(0);
}

/* ---- Panel Header ---- */
.a11y-panel-header {
    background: linear-gradient(135deg, #17733C 0%, #0F552C 100%);
    padding: 24px 24px 20px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.a11y-panel-header::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.a11y-panel-header::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(252, 97, 0, 0.12);
    pointer-events: none;
}
.a11y-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.a11y-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}
.a11y-panel-title > i {
    font-size: 24px;
    color: #FC6100;
}
.a11y-panel-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}
.a11y-panel-title small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.a11y-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    outline: none;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}
.a11y-panel-close:hover {
    background: #FC6100;
    border-color: #FC6100;
    transform: rotate(90deg);
}
.a11y-panel-close:focus-visible {
    outline: 2px solid #FC6100;
    outline-offset: 2px;
}

/* ---- Active Profiles Bar ---- */
.a11y-active-profiles {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.a11y-active-profiles .label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}
.a11y-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(252, 97, 0, 0.2);
    border: 1px solid rgba(252, 97, 0, 0.4);
    color: #FD8F40;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.a11y-active-tag > i {
    font-size: 8px;
}
.a11y-no-profiles {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-style: italic;
}

/* ---- Panel Body (scrollable) ---- */
.a11y-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 24px;
    scrollbar-width: thin;
    scrollbar-color: #17733C #e5e7eb;
}
.a11y-panel-body::-webkit-scrollbar { width: 5px; }
.a11y-panel-body::-webkit-scrollbar-track { background: #e5e7eb; border-radius: 10px; }
.a11y-panel-body::-webkit-scrollbar-thumb { background: #17733C; border-radius: 10px; }

/* ---- Section Groups ---- */
.a11y-section {
    margin-bottom: 22px;
}
.a11y-section:last-child { margin-bottom: 0; }
.a11y-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #8a9ba8;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #eef1f5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.a11y-section-title > i {
    color: #17733C;
    font-size: 12px;
}

/* ---- Toggle Rows ---- */
.a11y-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: background 0.2s ease;
    cursor: default;
    gap: 12px;
}
.a11y-toggle-row:hover { background: #f0faf4; }
.a11y-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.a11y-toggle-label > i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    background: #17733C;
    color: #ffffff;
    transition: all 0.25s ease;
}
.a11y-toggle-row.active .a11y-toggle-label > i {
    background: #FC6100;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(252, 97, 0, 0.35);
}
.a11y-toggle-text { min-width: 0; }
.a11y-toggle-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e2f3e;
    line-height: 1.3;
}
.a11y-toggle-text small {
    display: block;
    font-size: 10.5px;
    color: #8a9ba8;
    font-weight: 400;
    margin-top: 1px;
    line-height: 1.3;
}

/* ---- Switch Control ---- */
.a11y-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.a11y-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.a11y-switch .slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 26px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}
.a11y-switch .slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.a11y-switch input:checked + .slider {
    background: #17733C;
    box-shadow: 0 0 0 3px rgba(23, 115, 60, 0.15);
}
.a11y-switch input:checked + .slider::before {
    transform: translateX(20px);
}
.a11y-switch input:focus-visible + .slider {
    outline: 2px solid #FC6100;
    outline-offset: 2px;
}

/* ---- Size/Stepper Rows ---- */
.a11y-size-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 6px;
    gap: 12px;
    transition: background 0.2s ease;
}
.a11y-size-row:hover { background: #f0faf4; }
.a11y-size-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.a11y-size-label > i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    background: #FC6100;
    color: #ffffff;
    transition: all 0.25s ease;
}
.a11y-size-label strong {
    font-size: 13px;
    font-weight: 600;
    color: #1e2f3e;
    display: block;
}
.a11y-size-label small {
    display: block;
    font-size: 10.5px;
    color: #8a9ba8;
    font-weight: 400;
    margin-top: 1px;
}
.a11y-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.a11y-stepper-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    color: #556b7a;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}
.a11y-stepper-btn:hover {
    border-color: #17733C;
    color: #17733C;
    background: #f0faf4;
}
.a11y-stepper-btn:active { transform: scale(0.92); }
.a11y-stepper-btn:focus-visible {
    outline: 2px solid #FC6100;
    outline-offset: 1px;
}
.a11y-stepper-value {
    min-width: 42px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #17733C;
    background: #f0faf4;
    padding: 5px 6px;
    border-radius: 6px;
}

/* ---- Profile Quick-Select Grid ---- */
.a11y-profiles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}
.a11y-profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    outline: none;
}
.a11y-profile-btn:hover {
    border-color: #17733C;
    background: #f0faf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 115, 60, 0.1);
}
.a11y-profile-btn:focus-visible {
    outline: 2px solid #FC6100;
    outline-offset: 2px;
}

.a11y-profile-btn.active {
    border-color: #17733C;
    background: linear-gradient(135deg, #f0faf4 0%, #E8F5EE 100%);
    box-shadow: 0 0 0 3px rgba(23, 115, 60, 0.12);
}
.a11y-profile-btn > i {
    font-size: 20px;
    color: #ffffff;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #17733C;
    transition: all 0.25s ease;
}
.a11y-profile-btn.active > i {
    background: #FC6100;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(252, 97, 0, 0.35);
}
.a11y-profile-btn > span {
    font-size: 11px;
    font-weight: 600;
    color: #1e2f3e;
    line-height: 1.2;
}

/* ---- Reset Button ---- */
.a11y-reset-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    background: #f9fafb;
    color: #8a9ba8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
    font-family: 'Merriweather Sans', sans-serif;
}
.a11y-reset-btn:hover {
    border-color: #FC6100;
    color: #FC6100;
    background: #fff7ee;
}
.a11y-reset-btn:focus-visible {
    outline: 2px solid #FC6100;
    outline-offset: 2px;
}
.a11y-reset-btn > i {
    font-size: 14px;
    transition: transform 0.4s ease;
}
.a11y-reset-btn:hover > i { transform: rotate(-180deg); }

/* ---- Panel Footer ---- */
.a11y-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid #eef1f5;
    background: #f9fafb;
    flex-shrink: 0;
}
.a11y-footer-text {
    font-size: 10px;
    color: #8a9ba8;
    text-align: center;
    line-height: 1.5;
}
.a11y-footer-text a {
    color: #17733C;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.a11y-footer-text a:hover { color: #FC6100; }

/* ---- Toast Notifications ---- */
.a11y-toast-container {
    position: fixed;
    bottom: 160px;
    right: 30px;
    z-index: 100003;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}
.a11y-toast {
    background: #1e2f3e;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: a11yToastIn 0.35s ease forwards;
    pointer-events: auto;
    max-width: 280px;
    border-left: 3px solid #17733C;
}
.a11y-toast.leaving { animation: a11yToastOut 0.3s ease forwards; }
.a11y-toast > i { color: #229A50; font-size: 14px; }
@keyframes a11yToastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes a11yToastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(40px) scale(0.9); }
}

/* ============================================
   BODY CLASSES — Applied by JS
   ============================================ */

/* High Contrast */
body.a11y-high-contrast {
    background: #000000 !important;
    color: #ffffff !important;
}
body.a11y-high-contrast * {
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}
body.a11y-high-contrast img,
body.a11y-high-contrast video { filter: contrast(1.4); }
body.a11y-high-contrast a,
body.a11y-high-contrast button { text-decoration: underline !important; }

/* Dark Mode */
body.a11y-dark-mode { background: #ffffff !important; color: #e5e7eb !important; }
body.a11y-dark-mode .a11y-panel { background: #1f2937 !important; }
body.a11y-dark-mode .a11y-panel-header { background: linear-gradient(135deg, #0F552C 0%, #0a3d1f 100%) !important; }
body.a11y-dark-mode .a11y-panel-body { background: #1f2937 !important; }
body.a11y-dark-mode .a11y-panel-footer { background: #111827 !important; border-top-color: #374151 !important; }
body.a11y-dark-mode .a11y-toggle-row:hover,
body.a11y-dark-mode .a11y-size-row:hover { background: #374151 !important; }
body.a11y-dark-mode .a11y-section-title { color: #9ca3af !important; border-bottom-color: #374151 !important; }
body.a11y-dark-mode .a11y-toggle-text strong,
body.a11y-dark-mode .a11y-size-label strong { color: #f3f4f6 !important; }
body.a11y-dark-mode .a11y-toggle-text small,
body.a11y-dark-mode .a11y-size-label small { color: #6b7280 !important; }
body.a11y-dark-mode .a11y-profile-btn { background: #374151 !important; border-color: #4b5563 !important; }
body.a11y-dark-mode .a11y-profile-btn > span { color: #e5e7eb !important; }
body.a11y-dark-mode .a11y-profile-btn > i { background: #4b5563 !important; color: #ffffff !important; }
body.a11y-dark-mode .a11y-profile-btn.active > i { background: #FC6100 !important; color: #ffffff !important; }
body.a11y-dark-mode .a11y-stepper-value { background: #374151 !important; color: #229A50 !important; }
body.a11y-dark-mode .a11y-stepper-btn { background: #374151 !important; border-color: #4b5563 !important; color: #d1d5db !important; }
body.a11y-dark-mode .a11y-reset-btn { background: #1f2937 !important; border-color: #4b5563 !important; color: #9ca3af !important; }
body.a11y-dark-mode .a11y-switch .slider { background: #4b5563 !important; }
body.a11y-dark-mode .a11y-toggle-label > i { background: #374151 !important; color: #ffffff !important; }
body.a11y-dark-mode .a11y-size-label > i { background: #b34400 !important; color: #ffffff !important; }
body.a11y-dark-mode .a11y-no-profiles { color: rgba(255,255,255,0.35) !important; }
body.a11y-dark-mode .a11y-footer-text { color: #6b7280 !important; }

/* Grayscale */
body.a11y-grayscale img,
body.a11y-grayscale video,
body.a11y-grayscale svg,
body.a11y-grayscale canvas { filter: grayscale(100%) !important; }

/* Link Highlight */
body.a11y-link-highlight a {
    text-decoration: underline !important;
    text-decoration-thickness: 2.5px !important;
    text-underline-offset: 3px !important;
}
body.a11y-link-highlight a:hover { text-decoration-color: #FC6100 !important; }

/* Dyslexia Font */
body.a11y-dyslexia-font,
body.a11y-dyslexia-font * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Merriweather Sans', sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

/* Readable Line Height */
body.a11y-readable-line-height,
body.a11y-readable-line-height p,
body.a11y-readable-line-height li,
body.a11y-readable-line-height td { line-height: 2 !important; }

/* Large Cursor */
body.a11y-large-cursor,
body.a11y-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%23FC6100' stroke='%23ffffff' stroke-width='2' d='M4 2l20 14-8 2-4 8z'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Stop Animations */
body.a11y-stop-animations *,
body.a11y-stop-animations *::before,
body.a11y-stop-animations *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .a11y-toggle-btn {
        bottom: 75px;
        right: 16px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .a11y-panel { max-width: 100vw; width: 100vw; }
    .a11y-panel-header { padding: 18px 18px 16px; }
    .a11y-panel-title h3 { font-size: 16px; }
    .a11y-panel-body { padding: 16px 18px 20px; }
    .a11y-panel-footer { padding: 14px 18px; }
    .a11y-profiles-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .a11y-profile-btn { padding: 10px 6px; }
    .a11y-profile-btn > i { width: 38px; height: 38px; font-size: 17px; }
    .a11y-profile-btn > span { font-size: 10px; }
    .a11y-toggle-row, .a11y-size-row { padding: 8px 10px; }
    .a11y-toggle-label > i, .a11y-size-label > i { width: 28px; height: 28px; font-size: 11px; }
    .a11y-toggle-text strong, .a11y-size-label strong { font-size: 12px; }
    .a11y-toggle-text small, .a11y-size-label small { font-size: 9.5px; }
    .a11y-stepper-btn { width: 28px; height: 28px; font-size: 10px; }
    .a11y-stepper-value { min-width: 36px; font-size: 11px; padding: 4px 4px; }
    .a11y-toast-container { bottom: 135px; right: 16px; left: 16px; align-items: stretch; }
    .a11y-toast { max-width: 100%; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .a11y-toggle-btn { bottom: 80px; right: 20px; }
    .a11y-panel { max-width: 85vw; }
}


@media (max-width: 768px) {
  .rerec-entry-content h2 {
    font-size: 1.4rem !important;
    margin: 32px 0 14px;
  }
}

@media (max-width: 580px) {
  .rerec-fluid-featured-image .rerec-container {
    padding: 10px 16px;
    margin-left: 21px !important;
  }
}

/* ============================================
   HERO POPUP - PROFESSIONAL CLEAN DESIGN
   ============================================ */

/* Hero Popup Overlay */
.hero-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: heroPopupFadeIn 0.4s ease;
}

@keyframes heroPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero Popup Container */
.hero-popup {
    width: 520px;
    max-width: 92%;
    border-radius: var(--radius-lg, 16px);
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    animation: heroPopupSlideUp 0.5s ease;
    max-height: 90vh;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
}

@keyframes heroPopupSlideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* No image fallback */
.hero-popup.no-image {
    background: var(--white, #ffffff);
    border-top: 5px solid var(--primary, #FC6100);
}

/* Content wrapper - Clean, no overlay */
.hero-popup-image-bg {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 520px;
    padding: 30px 35px 20px;
}

/* Gradient bottom fade for text readability */
.hero-popup-image-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Close Button */
.hero-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-family: 'Merriweather Sans', sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-popup-close:hover {
    background: var(--primary, #FC6100);
    color: var(--white, #ffffff);
    transform: rotate(90deg);
}

/* Content - Positioned at bottom */
.hero-popup-content {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
    padding-bottom: 4px;
}

.hero-popup-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 2px;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.hero-popup-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 10px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.hero-popup-divider {
    width: 40px;
    height: 2px;
    background: var(--primary, #FC6100);
    margin: 0 auto 10px;
    border-radius: 2px;
}

.hero-popup-message {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.hero-popup-message .highlight {
    color: var(--primary, #FC6100);
    font-weight: 600;
}

.hero-popup-message .green {
    color: #4CAF50;
    font-weight: 600;
}

/* School Fees Box - Clean minimal */
.hero-popup-school-fees {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-left: 3px solid var(--primary, #FC6100);
    padding: 10px 16px;
    border-radius: var(--radius-sm, 8px);
    margin: 8px 0 10px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-popup-school-fees h4 {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 2px;
    letter-spacing: 0.3px;
}

.hero-popup-school-fees p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-weight: 400;
}

/* Buttons - At the very bottom edge */
.hero-popup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-top: 2px;
    padding-top: 4px;
    padding-bottom: 2px;
}

.hero-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 28px;
    border-radius: var(--radius-sm, 8px);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Merriweather Sans', sans-serif;
    min-width: 130px;
    flex: 1;
    letter-spacing: 0.3px;
    color: #ffffff !important;
}

.hero-popup-btn-primary {
    background: var(--primary, #FC6100);
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(252, 97, 0, 0.35);
}

.hero-popup-btn-primary:hover {
    background: var(--primary-dark, #E35500);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(252, 97, 0, 0.45);
    color: #ffffff !important;
}

.hero-popup-btn-secondary {
    background: #136233;
    color: #ffffff !important;
    border: none;
}

.hero-popup-btn-secondary:hover {
    background: #0e4d28;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(19, 98, 51, 0.4);
    color: #ffffff !important;
}

/* No image fallback styles */
.hero-popup.no-image .hero-popup-image-bg {
    background: var(--white, #ffffff);
    min-height: auto;
    padding: 35px 30px 30px;
    justify-content: center;
}

.hero-popup.no-image .hero-popup-image-bg::after {
    display: none;
}

.hero-popup.no-image .hero-popup-title {
    color: var(--secondary, #17733C);
}

.hero-popup.no-image .hero-popup-subtitle {
    color: var(--text-light, #556b7a);
}

.hero-popup.no-image .hero-popup-message {
    color: var(--text-main, #1e2f3e);
}

.hero-popup.no-image .hero-popup-school-fees {
    background: var(--gray-light, #f9fafb);
    border-left-color: var(--secondary, #17733C);
}

.hero-popup.no-image .hero-popup-school-fees h4 {
    color: var(--secondary, #17733C);
}

.hero-popup.no-image .hero-popup-school-fees p {
    color: var(--text-light, #556b7a);
}

.hero-popup.no-image .hero-popup-btn-secondary {
    background: #136233;
    color: #ffffff !important;
    border: none;
}

.hero-popup.no-image .hero-popup-btn-secondary:hover {
    background: #0e4d28;
    color: #ffffff !important;
}

.hero-popup.no-image .hero-popup-close {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-light, #556b7a);
}

.hero-popup.no-image .hero-popup-close:hover {
    background: var(--primary, #FC6100);
    color: var(--white, #ffffff);
}

/* Responsive */
@media (max-width: 600px) {
    .hero-popup {
        width: 95%;
        max-width: 95%;
        border-radius: var(--radius-md, 12px);
    }
    
    .hero-popup-image-bg {
        padding: 20px 20px 14px;
        min-height: 440px;
    }
    
    .hero-popup-title {
        font-size: 21px;
    }
    
    .hero-popup-subtitle {
        font-size: 11px;
    }
    
    .hero-popup-message {
        font-size: 12px;
    }
    
    .hero-popup-btn {
        padding: 9px 16px;
        font-size: 11px;
        min-width: 90px;
    }
    
    .hero-popup-school-fees {
        padding: 8px 12px;
        margin: 6px 0 8px;
    }
    
    .hero-popup-school-fees h4 {
        font-size: 11px;
    }
    
    .hero-popup-school-fees p {
        font-size: 10px;
    }
    
    .hero-popup-close {
        font-size: 17px;
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }
}

.rerec-entry-content img {
  margin: 0px 0 !important;
}
@media (max-width: 400px) {
    .hero-popup-image-bg {
        padding: 16px 14px 10px;
        min-height: 400px;
    }
    
    .hero-popup-title {
        font-size: 18px;
    }
    
    .hero-popup-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .hero-popup-btn {
        min-width: 100%;
        padding: 8px 12px;
        font-size: 10px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .top-bar,
    .main-header,
    #backToTop,
    .scroll-progress,
    .search-popup {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}