/*
=============================================================================
  PrevostOwners.com — Design System
  Primary: Navy #0B1C35  |  Gold #B8963E  |  Off-white #F7F4EF
  Vendor branding overrides via CSS custom properties
=============================================================================
*/

/* ---- CSS Custom Properties (overridden per vendor in <head>) ---- */
:root {
    --po-navy: #0B1C35;
    --po-gold: #B8963E;
    --po-offwhite: #F7F4EF;
    --po-primary: var(--po-navy);
    --po-secondary: var(--po-gold);
    --po-body-bg: #ffffff;
    --po-text: #333333;
    --po-text-muted: #6c757d;
    --po-border: #dee2e6;
    --po-card-shadow: 0 2px 12px rgba(11, 28, 53, 0.08);
}

/* ---- Base ---- */
body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--po-text);
    background: var(--po-body-bg);
}

a {
    color: var(--po-secondary);
    transition: color 0.2s;
}
a:hover {
    color: var(--po-primary);
}

/* ---- Navbar ---- */
.po-navbar {
    background: var(--po-primary);
    padding: 0.75rem 0;
}
.po-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
}
.po-navbar .navbar-brand:hover {
    color: var(--po-secondary);
}
.po-navbar .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
}
.po-navbar .nav-link:hover,
.po-navbar .nav-link.active {
    color: var(--po-secondary);
}
.po-navbar .btn-outline-gold {
    border-color: var(--po-secondary);
    color: var(--po-secondary);
    font-weight: 600;
}
.po-navbar .btn-outline-gold:hover {
    background: var(--po-secondary);
    color: var(--po-primary);
}

/* ---- Hero Section ---- */
.po-hero {
    background: linear-gradient(135deg, var(--po-primary) 0%, #142d50 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.po-hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(184,150,62,0.05)"/><circle cx="20" cy="80" r="30" fill="rgba(184,150,62,0.03)"/></svg>');
    background-size: cover;
    pointer-events: none;
}
.po-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}
.po-hero .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 540px;
}
.po-hero .btn-gold {
    background: var(--po-secondary);
    color: var(--po-primary);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    border: none;
    font-size: 1.05rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.po-hero .btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(184, 150, 62, 0.4);
    color: var(--po-primary);
}

/* ---- Section Styling ---- */
.po-section {
    padding: 4.5rem 0;
}
.po-section-alt {
    background: var(--po-offwhite);
}
.po-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--po-primary);
    margin-bottom: 0.5rem;
}
.po-section-subtitle {
    color: var(--po-text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ---- Feature Cards ---- */
.po-feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: var(--po-card-shadow);
    border: 1px solid var(--po-border);
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}
.po-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 28, 53, 0.12);
}
.po-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--po-offwhite);
    color: var(--po-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.po-feature-card h5 {
    font-weight: 700;
    color: var(--po-primary);
    margin-bottom: 0.5rem;
}
.po-feature-card p {
    color: var(--po-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ---- Category Pills ---- */
.po-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--po-border);
    border-radius: 50px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--po-primary);
    transition: all 0.2s;
}
.po-category-pill:hover {
    background: var(--po-primary);
    color: #fff;
    border-color: var(--po-primary);
}
.po-category-pill i {
    color: var(--po-secondary);
    font-size: 1rem;
}
.po-category-pill:hover i {
    color: var(--po-secondary);
}

/* ---- Service Center Cards ---- */
.po-vendor-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--po-card-shadow);
    border: 1px solid var(--po-border);
    text-align: center;
    height: 100%;
    transition: transform 0.2s;
}
.po-vendor-card:hover {
    transform: translateY(-3px);
}
.po-vendor-card h6 {
    font-weight: 700;
    color: var(--po-primary);
    margin-bottom: 0.25rem;
}
.po-vendor-card .vendor-location {
    color: var(--po-text-muted);
    font-size: 0.85rem;
}

/* ---- MFA Badge Section ---- */
.po-mfa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(184, 150, 62, 0.1);
    border: 1px solid rgba(184, 150, 62, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: var(--po-primary);
}
.po-mfa-badge i {
    color: var(--po-secondary);
    font-size: 1.2rem;
}

/* ---- Vendor Portal Banner ---- */
.po-vendor-banner {
    background: linear-gradient(135deg, var(--po-primary) 0%, #1a3a60 100%);
    color: #fff;
    border-radius: 12px;
    padding: 3rem 2rem;
}
.po-vendor-banner h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}
.po-vendor-banner p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.po-vendor-banner .btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
}

/* ---- Footer ---- */
.po-footer {
    background: var(--po-primary);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
    font-size: 0.9rem;
}
.po-footer a {
    color: var(--po-secondary);
    text-decoration: none;
}
.po-footer a:hover {
    color: #fff;
}
.po-footer h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}
.po-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

/* ---- Buttons ---- */
.btn-primary-po {
    background: var(--po-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
}
.btn-primary-po:hover {
    background: #142d50;
    color: #fff;
}
.btn-gold {
    background: var(--po-secondary);
    color: var(--po-primary);
    border: none;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
}
.btn-gold:hover {
    background: #a07d33;
    color: #fff;
}

/* ---- Utility ---- */
.text-gold { color: var(--po-secondary) !important; }
.text-navy { color: var(--po-primary) !important; }
.bg-offwhite { background: var(--po-offwhite) !important; }
.bg-navy { background: var(--po-primary) !important; color: #fff; }
.bg-gold { background: var(--po-secondary) !important; }

/* ---- Responsive ---- */

/* -- Mobile navbar collapsed menu -- */
@media (max-width: 991.98px) {
    .po-navbar .navbar-collapse {
        background: var(--po-primary);
        margin: 0.5rem -0.75rem -0.75rem;
        padding: 0.75rem 1rem 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .po-navbar .navbar-nav {
        gap: 0;
    }
    .po-navbar .nav-link {
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        font-size: 1rem;
    }
    .po-navbar .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    .po-navbar .nav-item .btn {
        display: block;
        text-align: center;
        margin: 0.5rem 0 0;
    }
    .po-navbar .dropdown-menu {
        background: rgba(255,255,255,0.08);
        border: none;
        border-radius: 8px;
        padding: 0.25rem 0;
    }
    .po-navbar .dropdown-menu .dropdown-item {
        color: rgba(255,255,255,0.8);
        padding: 0.6rem 1rem;
    }
    .po-navbar .dropdown-menu .dropdown-item:hover,
    .po-navbar .dropdown-menu .dropdown-item:focus {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }
    .po-navbar .dropdown-menu .dropdown-divider {
        border-color: rgba(255,255,255,0.1);
    }
    /* Ensure toggler is visible */
    .po-navbar .navbar-toggler {
        border-color: rgba(255,255,255,0.3);
        padding: 0.35rem 0.65rem;
    }
    .po-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(184,150,62,0.4);
    }
}

/* -- Small screens (phones) -- */
@media (max-width: 767.98px) {
    .po-hero {
        padding: 2.5rem 0 2rem;
        text-align: center;
    }
    .po-hero h1 {
        font-size: 1.75rem;
    }
    .po-hero .lead {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    .po-hero .btn-gold {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }
    .po-section {
        padding: 2.5rem 0;
    }
    .po-section-title {
        font-size: 1.4rem;
    }
    .po-section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Feature cards - stack nicely */
    .po-feature-card {
        padding: 1.25rem 1rem;
        margin-bottom: 0.75rem;
    }
    .po-feature-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    /* Vendor cards */
    .po-vendor-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Buttons - full width on phone */
    .btn-primary-po,
    .btn-gold {
        width: 100%;
        text-align: center;
    }

    /* Tables - horizontal scroll */
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Cards general spacing */
    .card {
        margin-bottom: 0.75rem;
    }
    .card-body {
        padding: 1rem;
    }

    /* Modal full-width on phone */
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-body {
        padding: 1rem;
    }

    /* Footer - stack columns */
    .po-footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    .po-footer h6 {
        margin-top: 1.5rem;
    }

    /* Punch list cards */
    .punch-item-card {
        margin-bottom: 0.5rem;
    }
    .punch-item-card .card-body {
        padding: 0.75rem;
    }

    /* MFA badge */
    .po-mfa-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Vendor banner */
    .po-vendor-banner {
        padding: 2rem 1.25rem;
        border-radius: 8px;
        text-align: center;
    }

    /* Category pills - wrap nicely */
    .po-category-pill {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    /* Status filter tabs - scrollable */
    .nav-pills,
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-pills::-webkit-scrollbar,
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    .nav-pills .nav-link,
    .nav-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }

    /* Dashboard stat cards */
    .stat-card {
        margin-bottom: 0.75rem;
    }
    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    /* Page headings */
    h1, .h1 { font-size: 1.6rem; }
    h2, .h2 { font-size: 1.35rem; }
    h3, .h3 { font-size: 1.15rem; }

    /* Floating action button (for adding items on mobile) */
    .fab-mobile {
        position: fixed;
        bottom: 1.25rem;
        right: 1.25rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--po-secondary);
        color: var(--po-primary);
        border: none;
        font-size: 1.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 1050;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .fab-mobile:hover,
    .fab-mobile:active {
        background: #a07d33;
        color: #fff;
    }
    /* Hide desktop-only elements */
    .d-mobile-none {
        display: none !important;
    }
}

/* -- Show mobile-only elements -- */
@media (min-width: 768px) {
    .d-desktop-none {
        display: none !important;
    }
    .fab-mobile {
        display: none !important;
    }
}

/* -- Extra small phones (under 375px like iPhone SE) -- */
@media (max-width: 374.98px) {
    .po-hero h1 {
        font-size: 1.5rem;
    }
    .po-navbar .navbar-brand {
        font-size: 1.1rem;
    }
    .po-navbar .navbar-brand img {
        height: 28px;
    }
    .card-body {
        padding: 0.75rem;
    }
}

/* ---- Punch List Items ---- */
.punch-item-card {
    transition: transform 0.15s, box-shadow 0.15s;
    border-left: 3px solid transparent;
}
.punch-item-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(11, 28, 53, 0.1);
}
.punch-item-card:has(.badge.bg-danger) {
    border-left-color: #dc3545;
}
.punch-item-card:has(.badge.bg-warning) {
    border-left-color: #ffc107;
}
.punch-item-card:has(.badge.bg-success) {
    border-left-color: #198754;
}
