/* ═══════════════════════════════════════════════════
   Vayanta Banner Builder — frontend styles
   ═══════════════════════════════════════════════════ */

/* ── Motion tokens ── */
:root {
    --vh-banner-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --vh-banner-duration: 0.45s;
}

@keyframes vh-banner-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vh-banner-popup-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vh-banner-popup-shell-in {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes vh-banner-shimmer {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

@keyframes vh-banner-accent-line {
    0%, 100% { opacity: 0.45; transform: scaleX(0.85); }
    50% { opacity: 1; transform: scaleX(1); }
}

.vh-banner-wrap--boxed { max-width: 1240px; margin: 0 auto; width: 100%; }
.vh-banner-wrap--full { width: 100%; }

.vh-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

/* Entrance — inline / hero / card / split / sidebar (not top bar strips) */
.vh-banner--hero,
.vh-banner--card,
.vh-banner--split,
.vh-banner--sidebar,
.vh-banner--inline,
.vh-banner--popup {
    animation: vh-banner-enter var(--vh-banner-duration) var(--vh-banner-ease) both;
}

.vh-banner--bar {
    min-height: auto !important;
    padding: 10px 48px 10px 16px !important;
    font-size: 13px;
    font-weight: 500;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.vh-banner--bar .vh-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100% !important;
}
.vh-banner--bar .vh-banner-title,
.vh-banner--bar .vh-banner-content { display: inline; margin: 0 !important; font-size: inherit !important; }
.vh-banner--bar .vh-banner-top-image { display: none; }

.vh-banner--top_bar {
    min-height: auto !important;
    padding: 10px 48px 10px 16px !important;
    font-size: 13px;
    font-weight: 500;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.vh-banner--top_bar .vh-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100% !important;
    text-align: center !important;
}
.vh-banner--top_bar .vh-banner-title,
.vh-banner--top_bar .vh-banner-content {
    display: inline;
    font-size: inherit !important;
    margin: 0 !important;
}
.vh-banner--top_bar .vh-banner-title { font-weight: 700 !important; white-space: nowrap; }
.vh-banner--top_bar .vh-banner-btn {
    padding: 3px 14px !important;
    font-size: 12px !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    background: transparent !important;
    color: inherit !important;
    transition: background .25s, border-color .25s, transform .25s var(--vh-banner-ease), box-shadow .25s;
}
.vh-banner--top_bar .vh-banner-btn:hover {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.85) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

/* Subtle accent line on announcement strips */
.vh-banner--bar::before,
.vh-banner--top_bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(110, 231, 183, .85), transparent);
    transform-origin: center;
    animation: vh-banner-accent-line 3.5s ease-in-out infinite;
}

.vh-banner-bg,
.vh-banner-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.vh-banner-bg {
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform 0.7s var(--vh-banner-ease);
    will-change: transform;
}
.vh-banner--hero:hover .vh-banner-bg,
.vh-banner--card:hover .vh-banner-bg {
    transform: scale(1.06);
}
.vh-banner--bar .vh-banner-bg { opacity: 0.35; }
.vh-banner-overlay { z-index: 1; }

.vh-banner-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: inherit;
}
.vh-banner-inner[style*="text-align: center"],
.vh-banner-inner[style*="text-align:center"] { align-items: center; }
.vh-banner-inner[style*="text-align: left"],
.vh-banner-inner[style*="text-align:left"] { align-items: flex-start; }
.vh-banner-inner[style*="text-align: right"],
.vh-banner-inner[style*="text-align:right"] { align-items: flex-end; }

.vh-banner-title {
    line-height: 1.25;
    margin: 0 0 8px;
}
.vh-banner-content {
    line-height: 1.65;
    margin: 0 0 16px;
    opacity: .92;
}
.vh-banner-content:last-child { margin-bottom: 0; }
.vh-banner-content p { margin: 0 0 .65em; }
.vh-banner-content p:last-child { margin-bottom: 0; }
.vh-banner-content ul,
.vh-banner-content ol { margin: 0; padding-left: 1.25em; text-align: inherit; }
.vh-banner-content li { margin: 0 0 .35em; }
.vh-banner-content a { color: inherit; text-decoration: underline; }
.vh-banner-content img { max-width: 100%; height: auto; border-radius: 8px; }
.vh-banner-content table { width: 100%; border-collapse: collapse; }
.vh-banner-content h1,
.vh-banner-content h2,
.vh-banner-content h3,
.vh-banner-content h4 { margin: 0 0 .5em; line-height: 1.2; }

.vh-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin-top: 4px;
    transition:
        transform 0.25s var(--vh-banner-ease),
        box-shadow 0.25s var(--vh-banner-ease),
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .14);
}
.vh-banner-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
    transform: translateX(-130%);
    pointer-events: none;
}
.vh-banner-btn:hover::after {
    animation: vh-banner-shimmer 0.65s ease;
}
.vh-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
    color: inherit;
}
.vh-banner-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
.vh-banner-btn .bi-arrow-right {
    transition: transform 0.25s var(--vh-banner-ease);
}
.vh-banner-btn:hover .bi-arrow-right {
    transform: translateX(4px);
}

.vh-banner-top-image {
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    max-height: 180px;
    transition: transform 0.4s var(--vh-banner-ease), box-shadow 0.4s ease;
}
.vh-banner:hover .vh-banner-top-image {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}
.vh-banner-top-image img {
    width: 100%;
    height: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

/* Split layout */
.vh-banner--split {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    align-items: stretch !important;
    padding: 0 !important;
    text-align: left !important;
}
.vh-banner--split .vh-banner-split-media {
    min-height: 200px;
    overflow: hidden;
}
.vh-banner--split .vh-banner-split-media img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: block;
    transition: transform 0.65s var(--vh-banner-ease);
    will-change: transform;
}
.vh-banner--split:hover .vh-banner-split-media img {
    transform: scale(1.05);
}
.vh-banner-split-media--placeholder {
    min-height: 200px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.vh-banner--split .vh-banner-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px !important;
    text-align: left !important;
}

/* Hero & Card — full-bleed background image */
.vh-banner--hero,
.vh-banner--card {
    min-height: 280px !important;
    padding: 48px 24px !important;
    transition: box-shadow 0.35s var(--vh-banner-ease);
}
.vh-banner--hero:hover,
.vh-banner--card:hover {
    box-shadow: 0 16px 48px rgba(15, 23, 42, .18);
}
.vh-banner--hero .vh-banner-inner,
.vh-banner--card .vh-banner-inner {
    color: inherit;
    position: relative;
    z-index: 2;
}

/* Minimal */
.vh-banner--minimal .vh-banner-top-image { display: none; }
.vh-banner--minimal .vh-banner-content { margin-bottom: 8px; }

/* Close button */
.vh-banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.92);
    color: #334155;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, transform 0.25s var(--vh-banner-ease), box-shadow 0.25s;
    pointer-events: auto;
    line-height: 1;
}
.vh-banner-close i { pointer-events: none; }
.vh-banner--custom-html { overflow: visible; }
.vh-banner--top_bar .vh-banner-close {
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    width: 22px;
    height: 22px;
    font-size: 11px;
}
.vh-banner-close:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .15);
}
.vh-banner--top_bar .vh-banner-close:hover {
    transform: translateY(-50%) scale(1.08);
}

/* Popup */
.vh-banner-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
}
.vh-banner-popup-overlay.vh-banner-popup--visible {
    display: flex;
    animation: vh-banner-popup-overlay-in 0.35s ease forwards;
}
.vh-banner-popup-overlay.vh-banner-popup--visible .vh-banner-popup-shell {
    animation: vh-banner-popup-shell-in 0.5s var(--vh-banner-ease) forwards;
}
.vh-banner-popup-overlay.vh-banner-popup--closing {
    animation: vh-banner-popup-overlay-in 0.28s ease reverse forwards;
}
.vh-banner-popup-overlay.vh-banner-popup--closing .vh-banner-popup-shell {
    animation: vh-banner-popup-shell-in 0.28s ease reverse forwards;
}
.vh-banner-popup-shell {
    max-width: 520px;
    width: 100%;
    position: relative;
}
.vh-banner--popup {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15,23,42,.25) !important;
}
.vh-banner--popup .vh-banner-top-image {
    margin: -32px -32px 16px;
    max-height: 220px;
    border-radius: 0;
}
.vh-banner--popup.vh-banner--hero { padding-top: 0 !important; }
.vh-banner--popup.vh-banner--hero .vh-banner-inner { padding: 24px; }

/* Sidebar */
.vh-banner--sidebar {
    border-radius: 12px !important;
    font-size: 14px;
    transition: transform 0.35s var(--vh-banner-ease), box-shadow 0.35s ease;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .08);
}
.vh-banner--sidebar:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(15, 23, 42, .14);
}
.vh-banner--sidebar .vh-banner-title { font-size: 16px !important; }

/* Inline section spacing */
.vh-banner-section { padding: 24px 16px; }
.vh-banner-section .vh-banner-wrap--boxed { padding: 0 8px; }

@media (max-width: 768px) {
    .vh-banner--split {
        grid-template-columns: 1fr !important;
    }
    .vh-banner--split .vh-banner-split-media { min-height: 160px; }
    .vh-banner--split .vh-banner-split-media img { min-height: 160px; }
    .vh-banner--hero { min-height: 220px !important; padding: 32px 16px !important; }
    .vh-banner--top_bar { padding-right: 40px !important; font-size: 12px; }
    .vh-banner--top_bar .vh-banner-title { white-space: normal; }
    .vh-banner--hero:hover .vh-banner-bg,
    .vh-banner--card:hover .vh-banner-bg {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vh-banner--hero,
    .vh-banner--card,
    .vh-banner--split,
    .vh-banner--sidebar,
    .vh-banner--inline,
    .vh-banner--popup,
    .vh-banner-popup-overlay,
    .vh-banner-popup-shell,
    .vh-banner--bar::before,
    .vh-banner--top_bar::before {
        animation: none !important;
    }
    .vh-banner-bg,
    .vh-banner-btn,
    .vh-banner-btn .bi-arrow-right,
    .vh-banner--split .vh-banner-split-media img,
    .vh-banner--sidebar,
    .vh-banner-top-image,
    .vh-banner-close {
        transition: none !important;
    }
    .vh-banner--hero:hover .vh-banner-bg,
    .vh-banner--card:hover .vh-banner-bg,
    .vh-banner--split:hover .vh-banner-split-media img {
        transform: none !important;
    }
}
