/* Robust Prefixed Utilities (rw-*) */
.rw-flex {
    display: flex !important;
}

.rw-flex-col {
    flex-direction: column !important;
}

.rw-justify-between {
    justify-content: space-between !important;
}

.rw-items-center {
    align-items: center !important;
}

.rw-h-16 {
    height: 4rem !important;
}

.rw-h-4 {
    height: 1rem !important;
}

.rw-w-auto {
    width: auto !important;
}

.rw-w-full {
    width: 100% !important;
}

.rw-mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.rw-max-w-7xl {
    max-width: 80rem !important;
}

/* Strict Padding (Matches Next.js px-8) */
.rw-px-8 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.rw-px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.rw-p-2 {
    padding: 0.5rem !important;
}

.rw-p-4 {
    padding: 1rem !important;
}

.rw-gap-1 {
    gap: 0.25rem !important;
}

.rw-gap-6 {
    gap: 1.5rem !important;
}

.rw-space-y-4>*+* {
    margin-top: 1rem !important;
}

.rw-relative {
    position: relative !important;
}

.rw-z-50 {
    z-index: 50 !important;
}

.rw-hidden {
    display: none !important;
}

.rw-block {
    display: block !important;
}

.rw-text-slate-300 {
    color: #cbd5e1 !important;
}

.rw-bg-dark {
    background-color: #0a0a0a !important;
}

.rw-border-b {
    border-bottom: 1px solid rgba(44, 153, 48, 0.2) !important;
}

.rw-text-left {
    text-align: left !important;
}

.rw-border-t {
    border-top: 1px solid rgba(44, 153, 48, 0.2) !important;
}

.rw-border-t-dark {
    border-top: 1px solid #1d1e1e !important;
}

/* Grid Utilities */
.rw-grid {
    display: grid !important;
}

.rw-grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

.rw-gap-8 {
    gap: 2rem !important;
}

.rw-gap-4 {
    gap: 1rem !important;
}

/* Footer Specific Utilities */
.racework-footer {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    line-height: 1.5 !important;
    color: #cbd5e1 !important;
    /* Default text color */
}

/* Footer Reset - Prevent Theme Bleed */
.racework-footer *,
.racework-footer *::before,
.racework-footer *::after {
    box-sizing: border-box !important;
}

.racework-footer ul,
.racework-footer li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
}

.racework-footer a {
    text-decoration: none !important;
    box-shadow: none !important;
    border: none !important;
}

.racework-footer img {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.racework-footer p,
.racework-footer h5 {
    margin: 0 !important;
    padding: 0 !important;
}

.rw-text-white {
    color: #ffffff !important;
}

.rw-font-bold {
    font-weight: 700 !important;
}

/* Precise Font Sizes & Line Heights (Matching Tailwind) */
.rw-text-lg-px {
    font-size: 18px !important;
    line-height: 28px !important;
}

.rw-text-base-px {
    font-size: 16px !important;
    line-height: 24px !important;
}

.rw-text-xs-px {
    font-size: 12px !important;
    line-height: 16px !important;
}

.rw-mb-4 {
    margin-bottom: 1rem !important;
}

.rw-mr-2 {
    margin-right: 0.5rem !important;
}

.rw-w-192 {
    width: 192px !important;
}

.rw-space-y-2>*+* {
    margin-top: 0.5rem !important;
}

/* Boost specificity to override resets */
.racework-footer .rw-space-y-10px>*+* {
    margin-top: 10px !important;
}

.racework-footer .rw-mb-4 {
    margin-bottom: 1rem !important;
}

.rw-text-muted {
    color: #9b9e9e !important;
}

.rw-h-auto {
    height: auto !important;
}

.rw-py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.rw-py-6 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.rw-flex-wrap {
    flex-wrap: wrap !important;
}

.rw-justify-center {
    justify-content: center !important;
}

.rw-items-start {
    align-items: flex-start !important;
}

/* Header Specific Refinements */
.racework-header {
    background-color: #0a0a0a;
    width: 100% !important;
    z-index: 9999 !important;
    font-family: 'DM Sans', sans-serif !important;
    position: relative !important;
}

/* Logo styles */
.racework-logo-link {
    display: flex !important;
    align-items: center !important;
}

.racework-logo {
    height: 1rem !important;
    /* constrained height */
    width: auto !important;
    display: block !important;
}

/* Mobile Toggle Button Reset */
.racework-mobile-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.5rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile Menu Overlay Positioning */
.racework-mobile-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #0a0a0a !important;
    z-index: 100 !important;
}

.racework-mobile-menu.open {
    display: flex !important;
}

/* Component Classes - Self Contained */
.racework-nav-link {
    font-size: 1.125rem !important;
    /* text-lg (mobile default) */
    color: #cbd5e1 !important;
    /* text-slate-300 */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    /* tracking-wider */
    text-decoration: none !important;
    transition: color 0.2s !important;
    display: flex !important;
    /* block in mobile but handled by flex container */
    align-items: center !important;
    gap: 0.25rem !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.5rem 0 !important;
    /* py-2 */
}

.racework-nav-link:hover {
    color: #2c9930 !important;
}

.racework-nav-btn {
    background-color: #2c9930 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    /* font-bold */
    padding: 0.75rem 1.5rem !important;
    /* py-3 px-6 */
    border-radius: 0.5rem !important;
    /* rounded-lg */
    text-decoration: none !important;
    font-size: 1rem !important;
    /* text-base */
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    /* tracking-wide */
    display: block !important;
    width: 100% !important;
    /* w-full */
    text-align: center !important;
    transition: background-color 0.3s !important;
}

.racework-nav-btn:hover {
    background-color: rgba(44, 153, 48, 0.8) !important;
}

/* Existing theme overrides */
.site-header,
#site-header,
.header,
#header {
    display: none !important;
}

/* Hide Theme Footer */
.site-footer,
#colophon,
#footer,
.footer,
footer[role="contentinfo"] {
    display: none !important;
}

body {
    padding-top: 0 !important;
}

.site-container {
    padding-top: 0 !important;
}

/* Dropdown specific styles */
.racework-dropdown {
    position: relative !important;
}

.racework-dropdown-menu {
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 0.5rem !important;
    width: 12rem !important;
    background-color: #0a0a0a !important;
    border: 1px solid rgba(44, 153, 48, 0.3) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4) !important;
    z-index: 150 !important;
    display: none !important;
    /* Hidden by default */
}

.racework-dropdown.open .racework-dropdown-menu {
    display: block !important;
}

.racework-dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    color: #cbd5e1 !important;
    text-decoration: none !important;
    text-align: left !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s, color 0.15s !important;
}

.racework-dropdown-item:hover {
    background-color: rgba(44, 153, 48, 0.1) !important;
    color: #2c9930 !important;
}

/* Responsive Utilities & Overrides (At the end to ensure priority) */
@media (min-width: 640px) {
    .sm\:rw-px-6 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 768px) {
    .rw-md-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .lg\:rw-px-8 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .rw-lg-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .rw-lg-flex-row {
        flex-direction: row !important;
    }
}

@media (min-width: 768px) {
    .rw-md-flex {
        display: flex !important;
    }

    .rw-md-hidden {
        display: none !important;
    }

    .racework-nav-link {
        padding: 0 !important;
        /* md:py-0 */
        font-size: 0.875rem !important;
        /* text-sm (desktop) */
    }

    .racework-nav-btn {
        padding: 0.5rem 1rem !important;
        /* md:py-2 md:px-4 */
        font-size: 0.875rem !important;
        /* md:text-sm */
        width: auto !important;
        /* md:w-auto */
        display: inline-block !important;
        /* behaves closer to block inside flex */
    }
}