/* =================================================================================================
   HERO SHOWCASE — isolated stylesheet
   -------------------------------------------------------------------------------------------------
   Component : Views/Shared/Components/HeroShowcase/Default.cshtml
   Script    : wwwroot/js/hero-showcase.js
   Namespace : every selector is prefixed with ".rphs-" (RiPublicans Hero Showcase) and every rule is
               nested under ".rphs-section", so nothing here can leak into, or be confused with, the
               rest of the site (header.css, site.css, Bootstrap).
   Theming   : change the custom properties in the ".rphs-section" block below.
   ================================================================================================= */

/* -------------------------------------------------------------------------------------------------
   1. DESIGN TOKENS (scoped to the component, not :root, to avoid global collisions)
   ------------------------------------------------------------------------------------------------- */
.rphs-section {
    --rphs-bg: #eef4fb;
    --rphs-surface: #ffffff;
    --rphs-primary: #2563eb;
    --rphs-primary-hover: #1d4ed8;
    --rphs-primary-soft: #eaf1ff;
    --rphs-heading: #0b2545;
    --rphs-text: #4b5563;
    --rphs-border: #e5e7eb;
    --rphs-success: #15803d;
    --rphs-radius-lg: 14px;
    --rphs-radius-md: 8px;
    --rphs-shadow: 0 10px 30px -12px rgba(15, 40, 80, 0.18);
    --rphs-gap: 1rem;
    --rphs-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    box-sizing: border-box;
    background: var(--rphs-bg);
    padding: 1.25rem 0;
    font-family: var(--rphs-font);
}

.rphs-section *,
.rphs-section *::before,
.rphs-section *::after {
    box-sizing: inherit;
}

/* -------------------------------------------------------------------------------------------------
   2. LAYOUT — independent 12-unit grid (does not rely on Bootstrap's .row / .col-*)
   ------------------------------------------------------------------------------------------------- */
.rphs-section .rphs-container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.rphs-section .rphs-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.rphs-section .rphs-col-panel  { grid-column: span 3; }   /* 3 of 12 */
.rphs-section .rphs-col-slider { grid-column: span 9; }   /* 9 of 12 */

/* -------------------------------------------------------------------------------------------------
   3. INFORMATION PANEL (left card)
   ------------------------------------------------------------------------------------------------- */
.rphs-section .rphs-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--rphs-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--rphs-radius-lg);
    box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.08);
    padding: 1.75rem 1.6rem 1.6rem;
}

.rphs-section .rphs-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--rphs-primary-soft);
    border: 1px solid #d6e3fb;
    color: var(--rphs-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.rphs-section .rphs-panel-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rphs-primary);
}

.rphs-section .rphs-panel-title {
    margin: 0 0 1.1rem;
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0b2545; /* Deep BNMPC Institutional Navy */
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    padding-bottom: 0.75rem;
}

.rphs-section .rphs-panel-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 46px;
    height: 3px;
    background: linear-gradient(90deg, #0f52ba 0%, #cfa844 100%);
    border-radius: 2px;
}

.rphs-section .rphs-panel-text {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
    font-weight: 400;
}

.rphs-section .rphs-panel-highlight {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rphs-success);
}

/* Actions area */
.rphs-section .rphs-actions-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Rounded Pill Button matching the reference design */
.rphs-section .rphs-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 0.65rem 1.75rem;
    border-radius: 50px;
    background-color: #242a64;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    box-shadow: 0 3px 10px rgba(36, 42, 100, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rphs-section .rphs-pill-btn:hover,
.rphs-section .rphs-pill-btn:focus-visible {
    background-color: #171c48;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(36, 42, 100, 0.35);
}

.rphs-section .rphs-actions-secondary {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.rphs-section .rphs-action-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: var(--rphs-radius-md);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.rphs-section .rphs-action-sublink:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.rphs-section .rphs-action:focus-visible,
.rphs-section .rphs-nav:focus-visible,
.rphs-section .rphs-dot:focus-visible {
    outline: 2px solid var(--rphs-primary);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------------------------------
   4. IMAGE SLIDER (right column)
   ------------------------------------------------------------------------------------------------- */
.rphs-section .rphs-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 440px;
    overflow: hidden;
    border-radius: var(--rphs-radius-lg);
    background: #dbe4ef;
    box-shadow: var(--rphs-shadow);
    touch-action: pan-y;               /* allow vertical scroll, we handle horizontal swipes */
}

.rphs-section .rphs-track {
    position: absolute;
    inset: 0;
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.rphs-section .rphs-slide {
    flex: 0 0 100%;
    height: 100%;
    margin: 0;
}

.rphs-section .rphs-slide-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
}

/* Prev / next arrows */
.rphs-section .rphs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.35);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background-color 0.2s ease;
}

.rphs-section .rphs-nav:hover { background: rgba(15, 23, 42, 0.6); }
.rphs-section .rphs-nav--prev { left: 12px; }
.rphs-section .rphs-nav--next { right: 12px; }

/* Pagination dots */
.rphs-section .rphs-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
}

.rphs-section .rphs-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.rphs-section .rphs-dot.is-active {
    width: 18px;
    background: #fff;
}

/* Empty state */
.rphs-section .rphs-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #64748b;
    background: linear-gradient(135deg, #e8eef7 0%, #dbe6f5 100%);
    text-align: center;
}

.rphs-section .rphs-empty i { font-size: 2.5rem; color: #94a3b8; }
.rphs-section .rphs-empty p { margin: 0; font-size: 0.9rem; }

/* -------------------------------------------------------------------------------------------------
   5. RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------------------------------------------- */

/* Small laptops / large tablets: give the panel a little more room */
@media (max-width: 1199.98px) {
    .rphs-section .rphs-col-panel  { grid-column: span 4; }
    .rphs-section .rphs-col-slider { grid-column: span 8; }
}

/* Tablets & phones: stack — slider first for visual impact, panel below */
@media (max-width: 767.98px) {
    .rphs-section .rphs-col-panel,
    .rphs-section .rphs-col-slider { grid-column: 1 / -1; }

    .rphs-section .rphs-col-slider { order: -1; }

    .rphs-section .rphs-slider {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .rphs-section .rphs-panel-title { font-size: 1.35rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .rphs-section .rphs-track,
    .rphs-section .rphs-action,
    .rphs-section .rphs-dot { transition: none; }
}
