/* Westpac Theme - Full Visual Design */
/* Primary Color: #D5002B (Westpac Red) */

:root {
    --westpac-red: var(--site-primary-color) !important;
    --westpac-dark-red: var(--site-primary-color) !important;
    --westpac-white: #FFFFFF;
    --westpac-black: #1F1F1F;
    --westpac-gray: #767676;
    --westpac-light-gray: #F5F5F5;
    --westpac-border: #E5E5E5;
}

/* ===== TOP BAR ===== */
.westpac-top-bar {
    background-color: var(--site-primary-color) !important;
    padding: 8px 0;
}

.westpac-top-bar .top-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.westpac-top-bar .top-links li a {
    color: var(--westpac-white);
    font-size: 13px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.westpac-top-bar .top-links li a:hover {
    opacity: 0.8;
}

.westpac-top-bar .register-link {
    font-weight: 600;
}

/* ===== MAIN HEADER ===== */
.westpac-main-header {
    background-color: var(--westpac-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--westpac-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.westpac-main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.westpac-logo img {
    max-height: 45px;
}

/* ===== NAVIGATION ===== */
.westpac-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.westpac-nav ul li a {
    color: var(--westpac-black);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 0;
    display: block;
    position: relative;
    transition: color 0.2s;
}

.westpac-nav ul li a:hover,
.westpac-nav ul li.active a {
    color: var(--site-primary-color) !important;
}

.westpac-nav ul li.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--site-primary-color) !important;
}

/* ===== HEADER RIGHT ===== */
.westpac-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ===== LANGUAGE DROPDOWN ===== */
.language-select select,
.language-switcher select,
.langu-swit,
select.langu-swit {
    background-color: var(--westpac-white) !important;
    border: 1px solid var(--site-primary-color) !important;
    color: var(--site-primary-color) !important;
    padding: 6px 24px 6px 10px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    height: 32px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23D5002B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    min-width: 80px !important;
}

.language-select select:hover,
.language-switcher select:hover,
.langu-swit:hover,
select.langu-swit:hover {
    background-color: var(--site-primary-color) !important;
    color: var(--westpac-white) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.language-select select:focus,
.language-switcher select:focus,
.langu-swit:focus,
select.langu-swit:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(213, 0, 43, 0.25) !important;
}

.language-select select option,
.language-switcher select option,
.langu-swit option,
select.langu-swit option {
    background-color: var(--westpac-white) !important;
    color: var(--westpac-black) !important;
    padding: 10px !important;
}

/* ===== SIGN IN BUTTON DROPDOWN ===== */
.signin-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.westpac-signin-btn {
    background-color: var(--site-primary-color) !important;
    color: var(--westpac-white) !important;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s;
    height: 32px;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.westpac-signin-btn:hover {
    background-color: var(--westpac-dark-red);
    color: var(--westpac-white) !important;
}

.westpac-signin-btn.active {
    background-color: var(--westpac-dark-red);
}

.westpac-signin-btn svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}

.westpac-signin-btn.active svg {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.signin-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--westpac-white);
    border: 1px solid var(--westpac-border);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.signin-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.signin-dropdown-menu .dropdown-item {
    display: block;
    padding: 14px 18px;
    color: var(--westpac-black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    border-bottom: 1px solid var(--westpac-border);
    transition: background-color 0.15s, color 0.15s;
}

.signin-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.signin-dropdown-menu .dropdown-item:hover {
    background-color: var(--westpac-light-gray);
    color: var(--site-primary-color) !important;
}

.signin-dropdown-menu .dropdown-item.active {
    background-color: var(--site-primary-color) !important;
    color: var(--westpac-white) !important;
}

.signin-dropdown-menu .dropdown-item.active:hover {
    background-color: var(--westpac-dark-red);
    color: var(--westpac-white);
}

.signin-dropdown-menu .item-text {
    display: block;
}

/* Mobile Sign in Section */
.mobile-signin-section {
    border-bottom: none !important;
    padding: 15px 0 !important;
    background-color: var(--westpac-light-gray);
    margin: 10px -20px;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.mobile-signin-section .mobile-section-title {
    display: block;
    font-weight: 600;
    color: var(--westpac-gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.mobile-signin-section .mobile-signin-link {
    display: block;
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--westpac-border) !important;
    font-size: 15px !important;
    color: var(--westpac-black) !important;
}

.mobile-signin-section .mobile-signin-link:last-of-type {
    border-bottom: none !important;
}

.mobile-signin-section .mobile-signin-link:hover {
    color: var(--site-primary-color) !important;
}

/* Responsive adjustments for dropdown */
@media (max-width: 576px) {
    .signin-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        min-width: 100%;
        transform: translateY(100%);
    }

    .signin-dropdown-menu.show {
        transform: translateY(0);
    }

    .signin-dropdown-menu .dropdown-item {
        padding: 18px 20px;
        font-size: 16px;
    }
}

/* ===== MOBILE MENU ===== */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--westpac-black);
    transition: 0.3s;
}

.westpac-mobile-menu {
    display: none;
    background-color: var(--westpac-white);
    border-top: 1px solid var(--westpac-border);
    padding: 20px;
}

.westpac-mobile-menu.active {
    display: block;
}

.westpac-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.westpac-mobile-menu ul li a {
    display: block;
    padding: 12px 0;
    color: var(--westpac-black);
    text-decoration: none;
    border-bottom: 1px solid var(--westpac-border);
    font-size: 15px;
}

.westpac-mobile-menu ul li a:hover {
    color: var(--site-primary-color) !important;
}

/* ===== FOOTER ===== */
.westpac-footer {
    background-color: var(--westpac-white);
    padding: 0;
    margin-top: 60px;
    border-top: 1px solid var(--westpac-border);
}

.westpac-footer .footer-top-border {
    height: 4px;
    background: linear-gradient(90deg, var(--westpac-red) 0%, var(--westpac-dark-red) 100%);
}

.westpac-footer .container {
    padding-top: 40px;
    padding-bottom: 30px;
}

.westpac-footer .footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--westpac-border);
}

@media (max-width: 768px) {
    .westpac-footer .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .westpac-footer .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.westpac-footer .footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.westpac-footer .footer-column ul li {
    margin-bottom: 12px;
}

.westpac-footer .footer-column ul li a {
    color: var(--westpac-black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.westpac-footer .footer-column ul li a .link-arrow {
    color: var(--site-primary-color) !important;
    font-size: 18px;
    font-weight: 700;
    margin-right: 8px;
    line-height: 1;
}

.westpac-footer .footer-column ul li a:hover {
    color: var(--site-primary-color) !important;
}

.westpac-footer .footer-column ul li a:hover .link-arrow {
    transform: translateX(3px);
}

/* Footer Brand Section */
.westpac-footer .footer-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid var(--westpac-border);
    margin-bottom: 25px;
}

@media (max-width: 576px) {
    .westpac-footer .footer-brand {
        flex-direction: column;
        gap: 20px;
    }
}

.westpac-footer .brand-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--site-primary-color) !important;
    letter-spacing: -0.5px;
}

.westpac-footer .footer-logo {
    max-height: 40px;
    width: auto;
}

.westpac-footer .brand-logo {
    display: flex;
    align-items: center;
}

/* Social Links */
.westpac-footer .social-links {
    display: flex;
    gap: 10px;
}

.westpac-footer .social-links .social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--westpac-white);
    font-size: 16px;
    transition: transform 0.2s, opacity 0.2s;
}

.westpac-footer .social-links .social-icon:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.westpac-footer .social-links .social-icon.facebook {
    background-color: #1877F2;
}

.westpac-footer .social-links .social-icon.twitter {
    background-color: #000000;
}

.westpac-footer .social-links .social-icon.youtube {
    background-color: var(--site-primary-color) !important;
}

.westpac-footer .social-links .social-icon.linkedin {
    background-color: #0A66C2;
}

.westpac-footer .social-links .social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Footer Disclaimer */
.westpac-footer .footer-disclaimer {
    font-size: 13px;
    color: var(--westpac-gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.westpac-footer .footer-disclaimer p {
    margin: 0;
}

.westpac-footer .footer-disclaimer a {
    color: var(--site-primary-color) !important;
    text-decoration: none;
}

.westpac-footer .footer-disclaimer a:hover {
    text-decoration: underline;
}

/* Footer Copyright */
.westpac-footer .footer-copyright {
    padding-top: 20px;
    border-top: 1px solid var(--westpac-border);
}

.westpac-footer .footer-copyright p {
    margin: 0;
    font-size: 13px;
    color: var(--westpac-gray);
    font-weight: 500;
}

/* ===== BUTTONS ===== */
.btn-primary,
.gradient-btn,
.td-primary-btn,
button[type="submit"],
input[type="submit"] {
    background-color: var(--site-primary-color) !important;
    border-color: var(--site-primary-color) !important;
    color: var(--westpac-white) !important;
}

.btn-primary:hover,
.gradient-btn:hover,
.td-primary-btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--westpac-dark-red) !important;
    border-color: var(--westpac-dark-red) !important;
}

.btn-outline-primary {
    color: var(--site-primary-color) !important;
    border-color: var(--site-primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--site-primary-color) !important;
    color: var(--westpac-white) !important;
}

/* ===== LINKS ===== */
a {
    color: var(--site-primary-color) !important;
}

a:hover {
    color: var(--westpac-dark-red);
}

/* ===== BADGES ===== */
.badge-primary,
.badge.bg-primary {
    background-color: var(--site-primary-color) !important;
}

/* ===== FORM ELEMENTS ===== */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--site-primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(213, 0, 43, 0.25) !important;
}

.form-check-input:checked {
    background-color: var(--site-primary-color) !important;
    border-color: var(--site-primary-color) !important;
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
    background-color: var(--site-primary-color) !important;
}

/* ===== PAGINATION ===== */
.page-item.active .page-link {
    background-color: var(--site-primary-color) !important;
    border-color: var(--site-primary-color) !important;
}

.page-link {
    color: var(--site-primary-color) !important;
}

.page-link:hover {
    color: var(--westpac-dark-red) !important;
}

/* ===== CARDS ===== */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: var(--westpac-light-gray);
    border-bottom: 1px solid var(--westpac-border);
}

/* ===== TABLES ===== */
.table thead th {
    background-color: var(--westpac-light-gray);
    border-bottom: 2px solid var(--site-primary-color) !important;
}

/* ===== ALERTS ===== */
.alert-primary {
    background-color: rgba(213, 0, 43, 0.1);
    border-color: var(--site-primary-color) !important;
    color: var(--westpac-dark-red);
}

/* ===== SIDEBAR ===== */
.sidebar-menu .active,
.sidebar-menu .active a {
    background-color: var(--site-primary-color) !important;
    color: var(--westpac-white) !important;
}

.sidebar-menu a:hover {
    color: var(--site-primary-color) !important;
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-card,
.account-card {
    border-left: 4px solid var(--site-primary-color) !important;
}

/* ===== HERO SECTION ===== */
.hero-section,
.banner-section {
    background: linear-gradient(135deg, var(--westpac-red) 0%, var(--westpac-dark-red) 100%);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card .product-icon {
    color: var(--site-primary-color) !important;
}

.product-card h3 a:hover {
    color: var(--site-primary-color) !important;
}

/* ===== SELECT2 ===== */
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--site-primary-color) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--site-primary-color) !important;
}

/* ===== TABS ===== */
.nav-tabs .nav-link.active {
    border-bottom-color: var(--site-primary-color) !important;
    color: var(--site-primary-color) !important;
}

.nav-pills .nav-link.active {
    background-color: var(--site-primary-color) !important;
}

/* ===== SPINNERS ===== */
.spinner-border {
    color: var(--site-primary-color) !important;
}

/* ===== TOASTS ===== */
.toast-success {
    background-color: var(--site-primary-color) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .westpac-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 576px) {
    .westpac-top-bar .top-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .westpac-main-header {
        padding: 10px 0;
    }

    .westpac-header-right {
        gap: 8px;
    }

    .westpac-signin-btn {
        padding: 5px 10px;
        font-size: 12px;
        height: 28px;
        gap: 4px;
        white-space: nowrap;
    }

    .westpac-signin-btn svg {
        width: 10px;
        height: 10px;
    }

    .language-select select,
    .language-switcher select,
    .langu-swit,
    select.langu-swit {
        padding: 4px 20px 4px 8px !important;
        font-size: 12px !important;
        height: 28px !important;
        min-width: 70px !important;
    }
}