/**
 * Revidia Templates — Landing Page Components
 *
 * Provides:
 *   1. Modern CTA button modifier classes (.stc-btn--modern-*)
 *   2. Standalone CTA via shortcode (.rev-cta)
 *   3. Features list (.rev-features / .rev-feature)
 *   4. Pros list (.rev-pros / .rev-pro)
 *
 * Loaded only on single Landing Pages (revidia_lp post type).
 */

:root {
    --rev-purple-start: #6B4FE0;
    --rev-purple-end: #8B7AE8;
    --rev-purple-solid: #6B4FE0;
    --rev-blue-start: #0066FF;
    --rev-blue-end: #00D4FF;
    --rev-green-start: #10B981;
    --rev-green-end: #34D399;
    --rev-orange-start: #F97316;
    --rev-orange-end: #FB923C;
    --rev-red-start: #EF4444;
    --rev-red-end: #F87171;
    --rev-divider: #e5e7eb;
}

/* ===================================================================
   MODERN .stc-btn modifier classes (overrides the classic green look)
   =================================================================== */
.stc-btn[class*="stc-btn--modern-"] {
    background-color: transparent;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 64px;
    padding: 20px 24px;
    margin: 14px auto;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    gap: 16px;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* Remove the base .stc-btn arrow (we use a circular icon span instead) */
.stc-btn[class*="stc-btn--modern-"]::after {
    content: none;
}

.stc-btn[class*="stc-btn--modern-"]:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    opacity: 1;
}

.stc-btn[class*="stc-btn--modern-"] span {
    color: #fff !important;
}

/* Circular icon used inside modern buttons */
.stc-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: transparent;
    font-size: 16px;
    flex-shrink: 0;
}

/* Color variants */
.stc-btn--modern-purple {
    background: linear-gradient(135deg, var(--rev-purple-start) 0%, var(--rev-purple-end) 100%);
    box-shadow: 0 8px 24px rgba(107, 79, 224, 0.35);
}
.stc-btn--modern-purple:hover { box-shadow: 0 12px 32px rgba(107, 79, 224, 0.45); }

.stc-btn--modern-blue {
    background: linear-gradient(135deg, var(--rev-blue-start) 0%, var(--rev-blue-end) 100%);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.35);
}
.stc-btn--modern-blue:hover { box-shadow: 0 12px 32px rgba(0, 102, 255, 0.45); }

.stc-btn--modern-green {
    background: linear-gradient(135deg, var(--rev-green-start) 0%, var(--rev-green-end) 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}
.stc-btn--modern-green:hover { box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45); }

.stc-btn--modern-orange {
    background: linear-gradient(135deg, var(--rev-orange-start) 0%, var(--rev-orange-end) 100%);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}
.stc-btn--modern-orange:hover { box-shadow: 0 12px 32px rgba(249, 115, 22, 0.45); }

.stc-btn--modern-red {
    background: linear-gradient(135deg, var(--rev-red-start) 0%, var(--rev-red-end) 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}
.stc-btn--modern-red:hover { box-shadow: 0 12px 32px rgba(239, 68, 68, 0.45); }

@media (max-width: 600px) {
    .stc-btn[class*="stc-btn--modern-"] {
        font-size: 16px;
        padding: 16px 18px;
        min-height: 56px;
        gap: 12px;
    }
    .stc-btn__icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* ===================================================================
   [rev_cta] — Standalone CTA button (for use inside content)
   =================================================================== */
.rev-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    padding: 22px 28px;
    margin: 24px 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--rev-purple-start) 0%, var(--rev-purple-end) 100%);
    color: #fff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(107, 79, 224, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
}

.rev-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(107, 79, 224, 0.45);
    filter: brightness(1.05);
    color: #fff !important;
}

.rev-cta:active { transform: translateY(0); }

.rev-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: transparent;
    font-size: 16px;
    flex-shrink: 0;
}

.rev-cta--blue {
    background: linear-gradient(135deg, var(--rev-blue-start) 0%, var(--rev-blue-end) 100%);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.35);
}
.rev-cta--blue:hover { box-shadow: 0 12px 32px rgba(0, 102, 255, 0.45); }

.rev-cta--green {
    background: linear-gradient(135deg, var(--rev-green-start) 0%, var(--rev-green-end) 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}
.rev-cta--green:hover { box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45); }

.rev-cta--orange {
    background: linear-gradient(135deg, var(--rev-orange-start) 0%, var(--rev-orange-end) 100%);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}
.rev-cta--orange:hover { box-shadow: 0 12px 32px rgba(249, 115, 22, 0.45); }

.rev-cta--red {
    background: linear-gradient(135deg, var(--rev-red-start) 0%, var(--rev-red-end) 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}
.rev-cta--red:hover { box-shadow: 0 12px 32px rgba(239, 68, 68, 0.45); }

@media (max-width: 600px) {
    .rev-cta {
        font-size: 17px;
        padding: 18px 20px;
        gap: 12px;
    }
    .rev-cta__icon { width: 32px; height: 32px; font-size: 13px; }
}

/* ===================================================================
   [rev_features] — Features list (circular icon + title + description)
   =================================================================== */
.rev-features {
    margin: 32px 0;
    padding: 0;
}

.rev-feature {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 22px 0;
    border-bottom: 1px solid var(--rev-divider);
}

.rev-feature:last-child { border-bottom: none; }

.rev-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rev-purple-start) 0%, var(--rev-purple-end) 100%);
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}

.rev-feature__body { flex: 1; }

.rev-feature__title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px 0 !important;
    line-height: 1.3;
}

.rev-feature__text {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #4b5563;
    margin: 0 !important;
    line-height: 1.6;
}

.rev-feature__text strong {
    color: #1a1a2e;
    font-weight: 600;
}

@media (max-width: 600px) {
    .rev-feature { gap: 14px; padding: 18px 0; }
    .rev-feature__icon { width: 44px; height: 44px; font-size: 18px; }
    .rev-feature__title { font-size: 16px; }
    .rev-feature__text { font-size: 14px; }
}

/* ===================================================================
   [rev_pros] — Pros list (header + checkmark items)
   =================================================================== */
.rev-pros {
    margin: 32px 0;
    padding: 24px;
    border: 1px solid var(--rev-divider);
    border-radius: 14px;
    background: #fff;
}

.rev-pros__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rev-divider);
}

.rev-pros__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--rev-purple-solid);
    font-size: 22px;
}

.rev-pros__header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 !important;
}

.rev-pros__list {
    padding: 0;
    margin: 0;
}

.rev-pro {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 0;
    border-bottom: 1px solid var(--rev-divider);
}

.rev-pro:last-child { border-bottom: none; }

.rev-pro__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--rev-purple-solid);
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}

.rev-pro__body { flex: 1; }

.rev-pro__title {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px 0 !important;
    line-height: 1.3;
}

.rev-pro__text {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #4b5563;
    margin: 0 !important;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .rev-pros { padding: 18px; }
    .rev-pros__header-title { font-size: 18px; }
    .rev-pro { padding: 14px 0; }
    .rev-pro__title { font-size: 15px; }
    .rev-pro__text { font-size: 14px; }
}

/* ===================================================================
   MOBILE: maximize horizontal space inside Landing Pages
   Reduce side padding so CTA buttons feel bigger and more impactful.
   =================================================================== */
@media (max-width: 768px) {
    .single-revidia_lp #primary {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .single-revidia_lp .single--content,
    .single-revidia_lp .single-describe,
    .single-revidia_lp .entry-content,
    .single-revidia_lp .block-simple-mobile,
    .single-revidia_lp .block-align-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .single-revidia_lp .block-btns,
    .single-revidia_lp .block-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .stc-btn[class*="stc-btn--modern-"],
    .rev-cta {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ===================================================================
   TIGHT STACKING for modern button groups
   When the LP uses a "Moderno" button style, stack all 4 possible
   buttons close together (no gap between them).
   =================================================================== */
.block-btns[class*="block-btns--modern-"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.block-btns[class*="block-btns--modern-"] .block-btn {
    margin: 0 !important;
    padding: 0 !important;
}

.block-btns[class*="block-btns--modern-"] .stc-btn[class*="stc-btn--modern-"] {
    margin: 0 !important;
}

/* ===================================================================
   RUNNING LIGHT around button border for modern CTAs
   A small bright "comet" travels along the perimeter of the button
   border (NOT inside, NOT a glow — literally a moving light dot
   that follows the edge: top → right → bottom → left → repeat).

   Technique: mask-composite trick.
     - A pseudo-element overlays the button at +3px on each side.
     - It has 3px of padding, which becomes the visible "frame".
     - mask-composite punches out the inner content area, so only the
       3px frame around the button is visible.
     - A conic-gradient inside the pseudo has a bright spot.
     - @property animates the gradient's angle (not the element),
       so the bright spot rotates and appears to travel around the
       border — without rotating the rectangle itself.
   =================================================================== */
@property --rev-border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.stc-btn[class*="stc-btn--modern-"],
.rev-cta {
    position: relative;
}

.stc-btn[class*="stc-btn--modern-"]::before,
.rev-cta::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 17px;
    padding: 3px;
    background: conic-gradient(
        from var(--rev-border-angle, 0deg),
        transparent 0deg,
        transparent 200deg,
        rgba(255, 255, 255, 0.35) 250deg,
        rgba(255, 255, 255, 1) 295deg,
        rgba(255, 255, 255, 0.6) 320deg,
        rgba(255, 255, 255, 0.2) 340deg,
        transparent 360deg
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: rev-border-run 3s linear infinite;
    pointer-events: none;
}

@keyframes rev-border-run {
    to { --rev-border-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
    .stc-btn[class*="stc-btn--modern-"]::before,
    .rev-cta::before {
        animation: none;
    }
}

/* ===================================================================
   TITLE / SCROLL POSITION FIX
   Keep scroll anchoring sane. Extra top spacing is ONLY applied when
   the WordPress admin bar is visible (logged-in users) so the title
   isn't clipped beneath it.
   =================================================================== */
.single-revidia_lp h1.single--title,
.single-revidia_lp h1.entry-title {
    scroll-margin-top: 120px;
    position: relative;
    z-index: 1;
}

/* When the WP admin bar is visible (logged-in users), push the sticky
   site header down so it sits below the admin bar, and give the title
   breathing room so it never gets clipped. */
.admin-bar.single-revidia_lp .site-header,
.admin-bar.single-revidia_lp .site-header.header-visible {
    top: 32px !important;
}

@media (max-width: 782px) {
    .admin-bar.single-revidia_lp .site-header,
    .admin-bar.single-revidia_lp .site-header.header-visible {
        top: 46px !important;
    }

    .admin-bar.single-revidia_lp #primary {
        padding-top: 36px;
    }

    .admin-bar.single-revidia_lp h1.single--title,
    .admin-bar.single-revidia_lp h1.entry-title {
        margin-top: 56px !important;
    }
}
