/* =========================================================
   CUSTOM HEADER & CATEGORY FILTER STYLING FOR SPE.VN
   Exact match to client specification and screenshot.
   ========================================================= */

/* Reset background & general layout */
body, #main, #content, .page-wrapper, #website-template-layout {
    background-color: #ffffff !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

.page-wrapper .row-main,
.page-wrapper .row {
    max-width: 1280px !important;
    width: 100% !important;
}

.col-inner {
    width: 100% !important;
}

/* SPE Custom Navigation Bar */
#spe-custom-header {
    background-color: #1D87EA;
    background-image: linear-gradient(90deg, #1877f2 0%, #1D87EA 50%, #2196f3 100%);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.spe-header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Badge */
.spe-header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.spe-logo-badge {
    background: #ffffff;
    padding: 5px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.spe-logo-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.spe-logo-img {
    max-height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Center Nav Menu */
.spe-header-nav {
    display: flex;
    align-items: center;
}

.spe-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.spe-menu-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.spe-menu-link {
    color: #ffffff !important;
    font-size: 15.5px;
    font-weight: 500;
    text-decoration: none !important;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.spe-menu-link:hover,
.spe-menu-item:hover > .spe-menu-link {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.spe-dropdown-icon {
    font-size: 13px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.spe-menu-item:hover .spe-dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.spe-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 230px;
    z-index: 10000;
    border: 1px solid #edf2f7;
}

.spe-menu-item:hover .spe-dropdown-menu {
    display: block;
    animation: speFadeIn 0.2s ease;
}

@keyframes speFadeIn {
    from { opacity: 0; transform: translate(-50%, 6px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.spe-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #334155 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.spe-dropdown-menu a:hover {
    background-color: #f1f5f9;
    color: #1D87EA !important;
}

/* Right Actions */
.spe-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.spe-btn-login {
    color: #ffffff !important;
    font-size: 15.5px;
    font-weight: 500;
    text-decoration: none !important;
    padding: 8px 12px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.spe-btn-login:hover {
    opacity: 0.85;
}

.spe-btn-register {
    background-color: #28a745 !important;
    background-image: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%) !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    padding: 8px 22px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    display: inline-block;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.spe-btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
    opacity: 0.95;
    color: #ffffff !important;
}

.spe-mobile-toggle,
.spe-nav-mobile-close {
    display: none;
}

/* =========================================================
   CATEGORY CARDS 6-COLUMN GRID (FLEXBOX)
   ========================================================= */
#website-template-layout {
    max-width: 1260px !important;
    margin: 30px auto 10px !important;
    padding: 0 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.spe-categories-container {
    width: 100% !important;
    max-width: 1240px !important;
    margin: 0 auto 25px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.spe-categories-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -6px !important;
    width: calc(100% + 12px) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    list-style: none !important;
}

.spe-cate-col {
    flex: 0 0 16.6666% !important;
    max-width: 16.6666% !important;
    width: 16.6666% !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.spe-cate-card {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    outline: none !important;
    cursor: pointer !important;
}

.spe-cate-card-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    height: 94px !important;
    padding: 10px 4px !important;
    box-sizing: border-box !important;
    position: relative !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

.spe-cate-card:hover .spe-cate-card-inner {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09) !important;
    border-color: #cbd5e1 !important;
}

.spe-cate-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important;
    margin-bottom: 6px !important;
    transition: transform 0.2s ease !important;
}

.spe-cate-card:hover .spe-cate-icon {
    transform: scale(1.1) !important;
}

.spe-cate-icon i {
    font-size: 32px !important;
    line-height: 1 !important;
}

.spe-cate-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 95% !important;
    line-height: 1.2 !important;
}

.spe-cate-all-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Active Card Indicator */
.spe-cate-card.spe-cate-active .spe-cate-card-inner {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07) !important;
}

.spe-cate-active-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 8% !important;
    right: 8% !important;
    height: 3px !important;
    border-radius: 3px 3px 0 0 !important;
}

/* =========================================================
   SEARCH BAR
   ========================================================= */
.spe-search-wrap {
    max-width: 680px !important;
    margin: 10px auto 35px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}

.spe-search-input {
    width: 100% !important;
    height: 48px !important;
    border-radius: 9999px !important;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    padding: 0 24px !important;
    font-size: 15px !important;
    color: #374151 !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.spe-search-input:focus {
    border-color: #1D87EA !important;
    box-shadow: 0 0 0 3px rgba(29, 135, 234, 0.18) !important;
}

.spe-search-input::placeholder {
    color: #9ca3af !important;
    font-size: 14.5px !important;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 1100px) {
    .spe-menu-link {
        font-size: 14px;
        padding: 6px 8px;
    }
}

@media (max-width: 992px) {
    .spe-cate-col {
        flex: 0 0 33.3333% !important;
        max-width: 33.3333% !important;
        width: 33.3333% !important;
    }
    .spe-header-container {
        height: 60px;
    }
    .spe-logo-badge {
        height: 42px;
        padding: 4px 10px;
    }
    .spe-logo-img {
        max-height: 30px;
    }
    .spe-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 22px;
        cursor: pointer;
        padding: 6px;
        margin-left: 10px;
    }
    .spe-header-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        z-index: 99999;
        transition: right 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        overflow-y: auto;
    }
    .spe-header-nav.spe-nav-open {
        right: 0;
    }
    .spe-nav-mobile-close {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 18px;
        font-weight: 700;
        color: #1e293b;
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #e2e8f0;
        cursor: pointer;
    }
    .spe-menu-list {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .spe-menu-link {
        color: #1e293b !important;
        padding: 10px 12px;
        font-size: 15px;
    }
    .spe-menu-link:hover {
        background-color: #f1f5f9;
        color: #1D87EA !important;
    }
    .spe-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        border-radius: 6px;
        margin-left: 15px;
        padding: 4px 0;
    }
    .spe-menu-item:hover .spe-dropdown-menu {
        display: block;
        animation: none;
    }
}

@media (max-width: 580px) {
    .spe-cate-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding: 4px !important;
    }
    .spe-cate-card-inner {
        height: 86px !important;
    }
    .spe-cate-icon i {
        font-size: 26px !important;
    }
    .spe-cate-name {
        font-size: 12.5px !important;
    }
    .spe-btn-login {
        display: none;
    }
    .spe-btn-register {
        padding: 6px 14px;
        font-size: 13.5px;
    }
}

/* =========================================================
   CUSTOM FOOTER STYLING FOR WEB.SPE.VN
   Exact match to client specification and reference image.
   ========================================================= */

#spe-custom-footer {
    background-color: #030303 !important;
    border-top: 2px solid #31af56 !important;
    color: #9ca3af !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    padding: 42px 0 32px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10 !important;
}

#spe-custom-footer * {
    box-sizing: border-box !important;
}

.spe-footer-container {
    max-width: 1260px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
}

.spe-footer-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
}

/* Headings */
.spe-footer-heading {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    position: relative !important;
    line-height: 1.4 !important;
}

.spe-heading-line {
    padding-bottom: 12px !important;
}

.spe-heading-line::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 120px !important;
    height: 2px !important;
    background-color: #2f2e2e !important;
}

/* Row 1: Columns */
.spe-col-services {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 15px !important;
}

.spe-services-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

.spe-services-grid .spe-footer-list {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
}

.spe-col-support {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding: 0 15px !important;
}

.spe-col-about {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding: 0 15px !important;
}

/* Lists and Links */
.spe-footer-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.spe-footer-list li {
    margin: 0 0 7px 0 !important;
    padding: 0 !important;
    line-height: 1.65 !important;
}

.spe-footer-list a {
    color: #9ca3af !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: color 0.15s ease !important;
    display: inline-block !important;
}

.spe-footer-list a:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Divider Lines */
.spe-footer-divider {
    width: 100% !important;
    height: 1px !important;
    background-color: #24282e !important;
    margin: 20px 0 !important;
}

/* Row 2: Info */
.spe-footer-info-row {
    margin-top: 5px !important;
}

.spe-col-company {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 15px !important;
}

.spe-col-contact {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding: 0 15px !important;
}

.spe-footer-text {
    color: #9ca3af !important;
    font-size: 14px !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.6 !important;
}

/* Row 3: Bottom Copyright, Social & Badges */
.spe-footer-bottom-row {
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 5px !important;
}

.spe-col-copyright {
    flex: 0 0 58% !important;
    max-width: 58% !important;
    padding: 0 15px !important;
}

.spe-copyright-text {
    color: #9ca3af !important;
    font-size: 13.5px !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.6 !important;
}

.spe-designer-text {
    color: #9ca3af !important;
    font-size: 13.5px !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

.spe-highlight-link {
    color: #ef4444 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.15s ease, text-decoration 0.15s ease !important;
}

.spe-highlight-link:hover {
    color: #f87171 !important;
    text-decoration: underline !important;
}

.spe-col-badges {
    flex: 0 0 42% !important;
    max-width: 42% !important;
    padding: 0 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 10px !important;
}

.spe-social-connect {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.spe-social-label {
    color: #9ca3af !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.spe-social-links {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.spe-social-btn {
    position: relative !important;
    display: inline-block !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    border-radius: 50% !important;
    text-align: center !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.spe-social-btn:hover {
    transform: scale(1.1) !important;
    opacity: 0.9 !important;
    color: #ffffff !important;
}

.spe-social-btn i {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 14px !important;
    color: #ffffff !important;
}

.spe-facebook {
    background-color: #3b5998 !important;
}

.spe-youtube {
    background-color: #bb0000 !important;
}

.spe-badge-group {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.spe-badge-img {
    height: 36px !important;
    width: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
    transition: transform 0.15s ease !important;
}

.spe-badge-img:hover {
    transform: scale(1.03) !important;
}

.spe-badge-ssl {
    border-radius: 4px !important;
    background: #ffffff !important;
    padding: 2px !important;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .spe-col-services {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 25px !important;
    }
    .spe-col-support, .spe-col-about {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    .spe-col-company {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
    .spe-col-contact {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    .spe-col-copyright {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
    .spe-col-badges {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        align-items: flex-start !important;
    }
}

@media (max-width: 580px) {
    .spe-services-grid {
        flex-direction: column !important;
    }
    .spe-services-grid .spe-footer-list {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .spe-col-support, .spe-col-about {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
    .spe-col-contact {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
    }
    .spe-badge-group {
        flex-wrap: wrap !important;
    }
}

