/* ============================================
   Global Header & Footer — ReviewSolicitors Style
   Matches reference site navigation and footer
   ============================================ */

/* ── HEADER ── */

.rs-global-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
    display: block !important; /* Override top-template.css legacy */
}

/* Remove any WordPress admin bar spacing conflicts */
.admin-bar .rs-global-header {
    top: 32px;
}

/* ── Top Navigation Bar ── */

.rs-topnav {
    background: var(--rs-green, #0064E0);
    height: 60px;
    display: flex;
    align-items: center;
}

.rs-topnav-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.rs-topnav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.rs-topnav-logo svg {
    width: 22px;
    height: 22px;
}

.rs-topnav-logo span {
    font-family: var(--rs-font, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

/* Nav Links */
.rs-topnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.rs-topnav-links a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-family: var(--rs-font, 'Inter', sans-serif);
    opacity: 0.92;
}

.rs-topnav-links a:hover,
.rs-topnav-links a:focus {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    opacity: 1;
    text-decoration: none !important;
}

/* Auth Buttons */
.rs-topnav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rs-auth-link {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 6px;
    transition: background 0.15s;
    font-family: var(--rs-font, 'Inter', sans-serif);
    white-space: nowrap;
    opacity: 0.92;
}

.rs-auth-link:hover,
.rs-auth-link:focus {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    text-decoration: none !important;
    opacity: 1;
}

.rs-auth-link i {
    margin-right: 4px;
}

.rs-btn-register,
.rs-btn-dashboard {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
}

.rs-btn-register:hover,
.rs-btn-dashboard:hover {
    background: rgba(255,255,255,0.28);
}

/* ── Search Bar (inner pages) ── */

.rs-header-search {
    background: var(--rs-green-dark, #0143B5);
    padding: 10px 0;
}

.rs-header-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rs-search-field {
    flex: 1;
    position: relative;
}

.rs-search-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 13px;
}

.rs-search-field input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--rs-font, 'Inter', sans-serif);
    outline: none;
    background: #fff;
}

.rs-search-field input:focus {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}

.rs-search-btn {
    background: #0A1317;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    font-family: var(--rs-font, 'Inter', sans-serif);
}

.rs-search-btn:hover {
    background: #2d2d44;
}

.rs-search-btn i {
    margin-right: 6px;
}

/* ── Mobile Hamburger ── */

.rs-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1060;
}

.rs-hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.rs-hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.rs-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.rs-hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile-only auth links (hidden on desktop, shown in hamburger menu) */
.rs-mobile-auth-link {
    display: none !important;
}

/* ── Responsive ── */

@media (max-width: 991px) {
    .rs-topnav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--rs-green, #0064E0);
        flex-direction: column;
        padding: 12px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1055;
    }

    .rs-topnav-links.open {
        display: flex;
    }

    .rs-topnav-links a {
        padding: 12px 24px;
        width: 100%;
        text-align: left;
        border-radius: 0;
    }

    .rs-topnav-links a:hover {
        background: rgba(0,0,0,0.1);
    }

    .rs-hamburger {
        display: flex;
    }

    .rs-topnav-auth {
        display: none;
    }

    /* Show Sign in/Register in mobile menu */
    .rs-topnav-links .rs-mobile-auth-link {
        display: flex !important;
        border-top: 1px solid rgba(255,255,255,0.15);
        margin-top: 4px;
        padding-top: 12px;
        font-weight: 600;
    }

    .admin-bar .rs-topnav-links {
        top: 60px;
    }

    /* Search bar stacks */
    .rs-header-search-form {
        flex-direction: column;
    }

    .rs-search-field {
        width: 100%;
    }

    .rs-search-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .rs-topnav-logo span {
        font-size: 16px;
    }

    .admin-bar .rs-global-header {
        top: 46px;
    }
}


/* ============================================
   FOOTER
   ============================================ */

.rs-global-footer {
    background: #2C3E50;
    color: #ccc;
    font-family: var(--rs-font, 'Inter', sans-serif);
    margin-top: 0;
}

.rs-footer-main {
    padding: 48px 0 36px;
}

.rs-footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.rs-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
}

/* Logo */
.rs-footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.rs-footer-logo svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.rs-footer-logo span {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

/* Address */
.rs-footer-address {
    font-style: normal;
    font-size: 13px;
    line-height: 1.8;
    color: #aab;
    margin-bottom: 10px;
}

.rs-footer-phone {
    font-size: 13px;
    color: #aab;
}

.rs-footer-phone i {
    color: var(--rs-green, #0064E0);
    margin-right: 6px;
}

.rs-footer-email {
    font-size: 13px;
    color: #aab;
    margin-top: 4px;
}

.rs-footer-email i {
    color: var(--rs-green, #0064E0);
    margin-right: 6px;
}

.rs-footer-email a {
    color: #aab !important;
    text-decoration: none !important;
}

.rs-footer-email a:hover {
    color: var(--rs-green, #0064E0) !important;
}

/* Column Headings */
.rs-footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Links */
.rs-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rs-footer-col ul li {
    margin-bottom: 8px;
}

.rs-footer-col ul li a {
    color: #aab !important;
    text-decoration: none !important;
    font-size: 13.5px;
    transition: color 0.15s;
}

.rs-footer-col ul li a:hover,
.rs-footer-col ul li a:focus {
    color: var(--rs-green, #0064E0) !important;
    text-decoration: none !important;
}

/* Social Icons */
.rs-footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.rs-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #aab !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.rs-footer-social a:hover {
    background: var(--rs-green, #0064E0);
    color: #fff !important;
}

/* Footer Bottom */
.rs-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
}

.rs-footer-bottom p {
    font-size: 12px;
    color: #889;
    line-height: 1.7;
    margin: 0;
    text-align: center;
}

.rs-footer-bottom a {
    color: var(--rs-green, #0064E0) !important;
    text-decoration: none !important;
}

.rs-footer-bottom a:hover {
    text-decoration: underline !important;
}

/* ── Footer Responsive ── */

@media (max-width: 991px) {
    .rs-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .rs-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .rs-footer-main {
        padding: 32px 0 24px;
    }
}


/* ============================================
   GLOBAL BODY ADJUSTMENTS
   ============================================ */

/* Reset any theme default header styling that conflicts */
body .site-header,
body #site-header.site-header {
    /* Override theme header if it somehow renders */
}

/* Ensure content clears the sticky header */
body:not(.solicitor-dashboard) .rs-global-header + * {
    /* Content starts after header */
}

/* Override theme defaults that may conflict */
body .navbar {
    z-index: auto;
}
