/**
 * Authority Pages CSS
 *
 * Styles for government/facility buyer authority-first pages.
 * This file is loaded globally via base_home.html.
 */

/* ==========================================================================
   Color Palette
   ========================================================================== */

:root {
    /* Primary Brand Colors */
    --color-primary: #3272A8;
    --color-primary-dark: #245a80;
    --color-primary-light: #4a8bc4;

    /* Secondary/Accent */
    --color-secondary: #4A9B8C;
    --color-secondary-dark: #3d8275;

    /* Trust/Safety (for checkmarks, credentials) */
    --color-success: #3D8B6E;
    --color-success-light: #4a9f7d;

    /* Text Colors */
    --color-text-dark: #2d3748;
    --color-text-body: #4a5568;
    --color-text-muted: #718096;

    /* Backgrounds */
    --color-bg-light: #f0f5f9;
    --color-bg-white: #ffffff;

    /* Borders */
    --color-border: #d1dce6;
    --color-border-light: #e8eff5;
}

/* ==========================================================================
   Bootstrap Overrides
   ========================================================================== */

/* Override Bootstrap's primary color to match brand */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.text-primary {
    color: var(--color-primary) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

/* Secondary button style using teal */
.btn-secondary-teal {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
}

.btn-secondary-teal:hover,
.btn-secondary-teal:focus {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    color: #fff;
}

/* Success/trust color for checkmarks */
.text-success-trust {
    color: var(--color-success) !important;
}

/* Light background utility */
.bg-light-custom {
    background-color: var(--color-bg-light) !important;
}

/* ==========================================================================
   Header Word Logo
   ========================================================================== */

.header-wordlogo {
    line-height: 1.3;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
}

.header-wordlogo span {
    display: block;
    text-align: center;
}

.header-wordlogo span:first-child {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.25em;
}

.header-wordlogo span:last-child {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Header Styling
   ========================================================================== */

/* Solid blue header */
#header .header-body {
    background: var(--color-primary);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#header .header-container {
    background: transparent;
}

/* Sticky header styling */
html.sticky-header-active #header.header-effect-shrink .header-body {
    background: var(--color-primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.page-header.page-header-modern.authority-hero {
    padding: 40px 0 40px 0;
    position: relative;
}

/* Apply same padding to non-authority hero pages like apply.html */
.page-header.page-header-modern.page-header-lg {
    padding-top: 40px !important;
}

.authority-hero h1 {
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.authority-hero p {
    margin-bottom: 0;
}

.authority-hero .breadcrumb {
    margin-bottom: 1rem;
}

.authority-hero .breadcrumb li {
    font-size: 0.875rem;
}

.authority-hero .breadcrumb li + li::before {
    content: "/";
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Trust Bar
   ========================================================================== */

.authority-trust-bar {
    border-bottom: 1px solid #e9ecef;
}

.authority-trust-bar .trust-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.authority-trust-bar .trust-item i {
    font-size: 1.25rem;
}

/* ==========================================================================
   Generic Section
   ========================================================================== */

.authority-section {
    position: relative;
}

.authority-section h2 {
    color: #212529;
}

.authority-section .subheading {
    color: #6c757d;
}

/* ==========================================================================
   Process Steps
   ========================================================================== */

.authority-process-steps .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 700;
}

.authority-process-steps .process-step {
    padding: 1.5rem;
}

.authority-process-steps .process-step h3 {
    color: #212529;
}

/* ==========================================================================
   FAQ Block
   ========================================================================== */

.authority-faq .card {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
}

.authority-faq .card-header {
    background-color: #fff;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.authority-faq .card-title {
    font-size: 1rem;
}

.authority-faq .accordion-toggle {
    display: block;
    position: relative;
    padding-right: 1.5rem;
}

.authority-faq .accordion-toggle::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    color: #6c757d;
}

.authority-faq .accordion-toggle.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

.authority-faq .card-body {
    padding: 0 1.25rem 1.25rem;
    color: #6c757d;
}

/* ==========================================================================
   CTA Block
   ========================================================================== */

.authority-cta {
    position: relative;
}

.authority-cta h2 {
    margin-bottom: 0.25rem;
}

.authority-cta .btn {
    min-width: 150px;
}

.authority-cta .btn-outline-light:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   Feature Boxes / Cards
   ========================================================================== */

.feature-box,
.service-card,
.compliance-item,
.prep-card,
.option-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover,
.service-card:hover,
.compliance-item:hover,
.prep-card:hover,
.option-card:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   Wireframe Placeholders (Development Only)
   ========================================================================== */

.wireframe-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        #f8f9fa,
        #f8f9fa 10px,
        #fff 10px,
        #fff 20px
    );
}

/* ==========================================================================
   List Styles
   ========================================================================== */

.list-icons {
    list-style: none;
    padding-left: 0;
}

.list-icons li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
}

.list-icons li i {
    position: absolute;
    left: 0;
    top: 0.25rem;
}

.list-icons.list-primary li i {
    color: var(--color-primary);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 991.98px) {
    .page-header.page-header-modern.authority-hero {
        padding: 32px 0 32px 0;
    }

    .authority-hero h1 {
        font-size: 2rem;
    }

    .authority-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .authority-cta .btn + .btn {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .page-header.page-header-modern.authority-hero {
        padding: 24px 0 24px 0;
    }

    .authority-trust-bar .trust-item {
        font-size: 0.8125rem;
    }

    .authority-trust-bar .trust-item i {
        font-size: 1rem;
    }

    .authority-process-steps .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Audience Router (Homepage)
   ========================================================================== */

.authority-audience-router {
    background-color: var(--color-bg-light);
}

.authority-audience-router .audience-card .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0.5rem;
    overflow: hidden;
}

.authority-audience-router .audience-card:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
}

.authority-audience-router .audience-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(50, 114, 168, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.authority-audience-router .audience-icon i {
    line-height: 1;
}

.authority-audience-router .audience-card:hover .audience-icon {
    background: rgba(50, 114, 168, 0.15);
}

.authority-audience-router .btn {
    transition: all 0.2s ease;
}

.authority-audience-router .audience-card:hover .btn {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/*
 * Card equal height alignment
 * Base: Flexbox for universal browser support
 * Enhanced: CSS Subgrid for row-level content alignment (modern browsers)
 */

/* Base flexbox layout - works in all browsers */
.authority-audience-router .audience-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.authority-audience-router .audience-card .card-body > * {
    flex-shrink: 0;
}

.authority-audience-router .audience-card .card-body > ul {
    flex-grow: 1;
}

.authority-audience-router .card-body ul li {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.authority-audience-router .card-body ul li i {
    flex-shrink: 0;
    width: 1rem;
    margin-top: 0.125rem;
    margin-right: 0;
}

.authority-audience-router .audience-card .card-body > .btn {
    flex-shrink: 0;
    align-self: stretch;
}

/*
 * Cross-card content alignment for tablet and desktop
 * Each card uses internal grid with fixed row heights for alignment
 */
@media (min-width: 768px) {
    .authority-audience-router .row.audience-router-row {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }

    .authority-audience-router .row.audience-router-row > [class*="col-"] {
        flex: 1;
        max-width: 400px;
        padding: 0;
    }

    /* Card uses CSS Grid for internal layout with fixed row heights */
    .authority-audience-router .audience-card .card-body {
        display: grid;
        grid-template-rows:
            80px    /* row 1: icon */
            3.5rem  /* row 2: title */
            4.5rem  /* row 3: description */
            1fr     /* row 4: list */
            auto;   /* row 5: button */
        gap: 0.75rem;
        height: 100%;
    }

    /* Reset Bootstrap margins */
    .authority-audience-router .audience-card .card-body > * {
        margin: 0;
    }

    /* Content alignment within fixed-height rows */
    .authority-audience-router .audience-card .card-body > .audience-icon {
        justify-self: center;
        align-self: center;
    }

    .authority-audience-router .audience-card .card-body > h3 {
        justify-self: center;
        align-self: center;
    }

    .authority-audience-router .audience-card .card-body > p {
        justify-self: center;
        align-self: start;
    }

    .authority-audience-router .audience-card .card-body > ul {
        align-self: start;
    }

    .authority-audience-router .audience-card .card-body > .btn {
        align-self: end;
    }

    /* Tablet (768px - 991px) - adjust row heights for narrower cards */
    @media (max-width: 991.98px) {
        .authority-audience-router .row.audience-router-row {
            max-width: 720px;
        }

        .authority-audience-router .row.audience-router-row > [class*="col-"] {
            max-width: 340px;
        }

        .authority-audience-router .audience-card .card-body {
            grid-template-rows:
                70px    /* row 1: icon (smaller) */
                4rem    /* row 2: title (more space for wrapping) */
                6rem    /* row 3: description (more space for wrapping) */
                1fr     /* row 4: list */
                auto;   /* row 5: button */
        }
    }
}

/* ==========================================================================
   Homepage Hero
   ========================================================================== */

/* Fade-in animation keyframes */
@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main hero container */
.homepage-hero {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 80px 0 65px;
    background-color: var(--color-primary);
}

/* Subtle texture overlay */
.homepage-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/images/usyta-bg-cubes-4.png');
    background-repeat: repeat;
    mix-blend-mode: multiply;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

/* Ensure container is above pseudo-elements */
.homepage-hero > .container {
    position: relative;
    z-index: 2;
}

/* Hero content wrapper */
.homepage-hero .hero-content {
    position: relative;
}


/* Hero eyebrow - company name identifier */
.homepage-hero .hero-eyebrow {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    animation: heroFadeInUp 0.6s ease-out both;
    animation-delay: 0.1s;
}

/* Hero microline - service descriptor (above logo) */
.homepage-hero .hero-microline {
    font-size: 1.125rem;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

/* Hero headline */
.homepage-hero .hero-headline {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
    animation: heroFadeInUp 0.6s ease-out both;
    animation-delay: 0.2s;
}

/* Hero description */
.homepage-hero .hero-description {
    font-size: 1.125rem;
    letter-spacing: 0;
    line-height: 1.6;
    color: #FFFFFF;
    margin-bottom: 1.75rem;
    max-width: 540px;
    animation: heroFadeInUp 0.6s ease-out both;
    animation-delay: 0.3s;
}

/* Hero CTA buttons */
.homepage-hero .hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: heroFadeInUp 0.6s ease-out both;
    animation-delay: 0.4s;
}

.homepage-hero .hero-cta .btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Center CTA buttons on tablet */
@media (max-width: 991.98px) and (min-width: 768px) {
    .homepage-hero .hero-cta {
        justify-content: center;
    }
}

/* Hero phone microcopy */
.homepage-hero .hero-phone-microcopy {
    font-size: 0.875rem;
    letter-spacing: 0;
    color: #FFFFFF;
    margin-top: 1rem;
    margin-bottom: 0;
    animation: heroFadeInUp 0.6s ease-out both;
    animation-delay: 0.45s;
}

/* Hero credential block (right column) */
.homepage-hero .hero-credential-block {
    animation: heroFadeInUp 0.6s ease-out both;
    animation-delay: 0.5s;
}

/* Hero logo */
.homepage-hero .hero-logo {
    margin-bottom: 1rem;
}

.homepage-hero .hero-logo img {
    max-height: 175px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Hero credential line */
.homepage-hero .hero-credential-line {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 1px;
    margin-bottom: 0;
}


/* Tablet adjustments */
@media (max-width: 991.98px) {
    .homepage-hero {
        min-height: auto;
        padding: 60px 0 50px;
    }

    .homepage-hero .hero-headline {
        font-size: 2.5rem;
    }

    .homepage-hero .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

    .homepage-hero .hero-credential-block {
        margin-top: 2rem;
    }

    .homepage-hero .hero-logo img {
        max-height: 150px;
    }

    .authority-audience-router .audience-icon {
        width: 60px;
        height: 60px;
    }

    .authority-audience-router .audience-icon i {
        font-size: 1.5rem !important;
    }
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
    .homepage-hero {
        min-height: auto;
        padding: 48px 0 40px;
    }

    .homepage-hero .hero-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
        padding: 0.35rem 1rem;
    }

    .homepage-hero .hero-microline {
        font-size: 0.875rem;
    }

    .homepage-hero .hero-headline {
        font-size: 1.875rem;
        margin-bottom: 1rem;
    }

    .homepage-hero .hero-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .homepage-hero .hero-cta {
        flex-direction: column;
    }

    .homepage-hero .hero-cta .btn {
        width: 100%;
    }

    .homepage-hero .hero-phone-microcopy {
        font-size: 0.8125rem;
    }

    .homepage-hero .hero-credential-block {
        margin-top: 2rem;
    }

    .homepage-hero .hero-logo img {
        max-height: 120px;
    }
}

/* Reduced motion preference - disable animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    .homepage-hero .hero-eyebrow,
    .homepage-hero .hero-headline,
    .homepage-hero .hero-description,
    .homepage-hero .hero-cta,
    .homepage-hero .hero-phone-microcopy,
    .homepage-hero .hero-credential-block {
        animation: none;
    }
}

/* Focus states for hero buttons - WCAG 2.1 AA compliance */
.homepage-hero .hero-cta .btn:focus {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.homepage-hero .hero-cta .btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.homepage-hero .hero-cta .btn:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Homepage Testimonials
   ========================================================================== */

.homepage-testimonials {
    position: relative;
}

.homepage-testimonials .testimonial {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.homepage-testimonials .testimonial blockquote {
    border: none;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Font Size Overrides
   ========================================================================== */

/* Increase font size for information box lists */
.small {
    font-size: 0.9375rem !important;
}

/* ==========================================================================
   Typography & Text Colors
   ========================================================================== */

/* Text color for body text - warm gray */
.text-4 {
    color: var(--color-text-body) !important;
}

/* Headings - darker warm gray */
.authority-audience-router h2,
.authority-audience-router h3,
section h2,
section h3 {
    color: var(--color-text-dark);
}

/* Muted text */
.text-muted {
    color: var(--color-text-muted) !important;
}

/* Body paragraphs in content sections */
section p {
    color: var(--color-text-body);
}

/* ==========================================================================
   Section Backgrounds
   ========================================================================== */

/* Alternating section backgrounds */
.bg-light {
    background-color: var(--color-bg-light) !important;
}

/* Custom light background for specific sections */
.section-light {
    background-color: var(--color-bg-light);
}

.section-white {
    background-color: var(--color-bg-white);
}
