/* UnionConnect Developer Theme - Custom CSS */

/* Sticky header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Nav links */
.ast-primary-header .menu-item > .menu-link {
    background: none;
    border-radius: 0;
    padding: 0.4rem 0.9rem !important;
    margin: 0 0.1rem;
    transition: color 0.25s ease, background-color 0.25s ease, border-radius 0.25s ease;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a3a5c !important;
    box-shadow: none;
    border-bottom: 2px solid transparent;
    animation: uc-nav-fade 0.4s ease both;
}

.ast-primary-header .menu-item:nth-child(1) > .menu-link { animation-delay: 0.05s; }
.ast-primary-header .menu-item:nth-child(2) > .menu-link { animation-delay: 0.1s; }
.ast-primary-header .menu-item:nth-child(3) > .menu-link { animation-delay: 0.15s; }
.ast-primary-header .menu-item:nth-child(4) > .menu-link { animation-delay: 0.2s; }
.ast-primary-header .menu-item:nth-child(5) > .menu-link { animation-delay: 0.25s; }
.ast-primary-header .menu-item:nth-child(6) > .menu-link { animation-delay: 0.3s; }

/* Sign In button - subtle outlined style */
.ast-primary-header .menu-item-442 > .menu-link {
    border: 1.5px solid #1a3a5c;
    border-radius: 4px;
    padding: 0.3rem 1rem !important;
    border-bottom-width: 1.5px;
    color: #1a3a5c !important;
}

.ast-primary-header .menu-item-442 > .menu-link:hover {
    background: #1a3a5c;
    color: #fff !important;
    border-color: #1a3a5c;
}

.ast-primary-header .menu-item > .menu-link:hover {
    color: #1a3a5c !important;
    background-color: rgba(212, 146, 11, 0.15);
    border-radius: 6px;
    border-bottom-color: transparent;
}

.ast-primary-header .current-menu-item > .menu-link {
    color: #d4920b !important;
    background-color: rgba(212, 146, 11, 0.1);
    border-radius: 6px;
    border-bottom-color: transparent;
    box-shadow: none;
}

/* Hide default page title (pages use hero sections instead, single posts keep theirs) */
.page .entry-title {
    display: none !important;
}

@keyframes uc-nav-fade {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Site tagline */
.site-header .ast-site-title-wrap .site-description {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp--preset--color--muted);
    margin: 0;
    line-height: 1.2;
}

/* Hide Astra below-header area (creates unwanted gradient gap) */
.ast-below-header-wrap {
    display: none !important;
}

/* --- Hero / full-width layout fixes ---
 *
 * ROOT CAUSE: Astra uses two container modes:
 *   - ast-page-builder-template (pages): no container padding, no #primary margin
 *   - ast-plain-container (blog/single): .ast-container gets 20px side padding,
 *     #primary gets ~68px margin-top
 *
 * Pages work because their heroes are inside .entry-content where WordPress
 * applies alignfull breakout CSS. Blog/single heroes are PHP-injected into
 * #primary directly, so they need explicit breakout styles.
 */

/* 1. Remove Astra's top margin on #primary for blog and single posts */
.blog #primary,
.single #primary {
    margin-top: 0 !important;
}

/* 2. PHP-injected heroes: break out of .ast-container padding to full viewport */
#primary > .uc-animated-hero {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* 3. Block-editor heroes inside .entry-content (pages) - remove top gap */
.entry-content > .alignfull:first-child,
.entry-content > .wp-block-cover:first-child {
    margin-top: 0 !important;
}

/* Hero section - animated gradient */
.wp-block-cover > .wp-block-cover__background.has-primary-background-color {
    background: #1b2a4a !important;
    overflow: hidden;
}

.wp-block-cover > .wp-block-cover__background.has-primary-background-color::before,
.wp-block-cover > .wp-block-cover__background.has-primary-background-color::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}

.wp-block-cover > .wp-block-cover__background.has-primary-background-color::before {
    background: #e8a838;
    top: -20%;
    left: -20%;
    animation: uc-home-glow-1 14s ease-in-out infinite alternate;
}

.wp-block-cover > .wp-block-cover__background.has-primary-background-color::after {
    background: #111;
    bottom: -20%;
    right: -20%;
    animation: uc-home-glow-2 18s ease-in-out infinite alternate;
}

@keyframes uc-home-glow-1 {
    0% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(60%, 20%) scale(1.15); }
    40% { transform: translate(80%, 60%) scale(0.9); }
    60% { transform: translate(40%, 80%) scale(1.1); }
    80% { transform: translate(20%, 50%) scale(0.95); }
    100% { transform: translate(70%, 70%) scale(1.05); }
}

@keyframes uc-home-glow-2 {
    0% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(-50%, -40%) scale(1.1); }
    40% { transform: translate(-70%, -10%) scale(0.9); }
    60% { transform: translate(-30%, -60%) scale(1.15); }
    80% { transform: translate(-60%, -30%) scale(0.95); }
    100% { transform: translate(-40%, -70%) scale(1.05); }
}

/* Inner page blobs use the shorter animation */
@keyframes uc-glow-1 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40%, 10%) scale(1.1); }
    66% { transform: translate(20%, 30%) scale(0.9); }
    100% { transform: translate(50%, 25%) scale(1.05); }
}

@keyframes uc-glow-2 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20%, -30%) scale(1.15); }
    66% { transform: translate(-40%, -10%) scale(0.95); }
    100% { transform: translate(-35%, -25%) scale(1.1); }
}

.uc-hero {
    position: relative;
    overflow: hidden;
}

/* Animated hero for inner pages (wp-block-group based) */
.uc-animated-hero {
    position: relative;
    overflow: hidden;
}

.uc-animated-hero::before,
.uc-animated-hero::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    pointer-events: none;
}

.uc-animated-hero::before {
    background: #e8a838;
    top: -10%;
    left: -10%;
    animation: uc-glow-1 8s ease-in-out infinite alternate;
}

.uc-animated-hero::after {
    background: #111;
    bottom: -10%;
    right: -10%;
    animation: uc-glow-2 10s ease-in-out infinite alternate;
}

.uc-animated-hero > * {
    position: relative;
    z-index: 2;
}

.uc-hero-content {
    position: relative;
    z-index: 2;
}

/* iPhone Frame */
.uc-iphone {
    position: relative;
    width: 350px;
    height: 714px;
    margin: 0 auto;
    background: transparent;
}

.uc-iphone-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #1d1d1f;
    border-radius: 48px;
    padding: 10px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.1),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 1px 1px rgba(255,255,255,0.05);
}

.uc-iphone-screen {
    width: 100%;
    height: 100%;
    border-radius: 38px;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* Dynamic Island */
.uc-iphone-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 84px;
    height: 24px;
    background: #1d1d1f;
    border-radius: 20px;
    z-index: 10;
}

/* Screenshot Carousel */
.uc-phone-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Feature cards */
.uc-feature-card {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 2rem;
}

.uc-feature-card h3 {
    color: #1b2a4a;
    font-size: 1.3rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem !important;
    border-bottom: 1px solid #e2e5ea;
}

.uc-feature-card p {
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Logo marquee */
.uc-logo-marquee {
    --marquee-h: 80px;
    --sprite-w: 2304px;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: var(--marquee-h);
}

.uc-logo-marquee::before,
.uc-logo-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.uc-logo-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--wp--preset--color--light, #f5f5f5), transparent);
}

.uc-logo-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--wp--preset--color--light, #f5f5f5), transparent);
}

.uc-logo-track {
    display: flex;
    gap: 0;
    width: max-content;
    height: var(--marquee-h);
    animation: uc-marquee 30s linear infinite;
    will-change: transform;
}

.uc-logo-track:hover {
    animation-play-state: paused;
}

.uc-logo-track img {
    display: block;
    height: var(--marquee-h);
    width: var(--sprite-w);
    flex: 0 0 var(--sprite-w);
    opacity: 0.85;
}

@keyframes uc-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(var(--sprite-w) * -1)); }
}

/* Steps / How it works */
.uc-step {
    text-align: center;
    padding: 1.5rem;
}

.uc-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--wp--preset--color--accent);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

/* Testimonial */
.uc-testimonial {
    border-left: 4px solid var(--wp--preset--color--accent);
    padding-left: 1.5rem;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.6;
}

.uc-testimonial cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 700;
    font-size: 1rem;
    color: var(--wp--preset--color--primary);
}

/* CTA section */
.uc-cta-section {
    text-align: center;
}

.uc-cta-section .wp-block-button__link {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Pricing table */
.uc-pricing-card {
    background: #fff;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.uc-pricing-card.featured {
    border: 3px solid var(--wp--preset--color--accent);
    transform: scale(1.03);
}

.uc-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--wp--preset--color--primary);
    line-height: 1;
}

.uc-price-period {
    font-size: 1rem;
    color: var(--wp--preset--color--muted);
    font-weight: 400;
}

/* WPForms contact form */
.wpforms-container .wpforms-form .wpforms-field-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--wp--preset--color--primary, #1b2a4a);
    margin-bottom: 0.35rem;
}

.wpforms-container .wpforms-form input[type="text"],
.wpforms-container .wpforms-form input[type="email"],
.wpforms-container .wpforms-form input[type="tel"],
.wpforms-container .wpforms-form select,
.wpforms-container .wpforms-form textarea {
    border: 2px solid #e2e5ea;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafbfc;
}

.wpforms-container .wpforms-form input:focus,
.wpforms-container .wpforms-form select:focus,
.wpforms-container .wpforms-form textarea:focus {
    border-color: var(--wp--preset--color--accent, #e8a838);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.15);
    outline: none;
    background: #fff;
}

.wpforms-container .wpforms-form textarea {
    min-height: 120px;
}

.wpforms-container .wpforms-form .wpforms-field-sublabel {
    font-size: 0.8rem;
    color: #888;
}

.wpforms-container .wpforms-form button[type="submit"].wpforms-submit {
    background: linear-gradient(135deg, #e8a838, #d4872a) !important;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 0.85rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(232, 168, 56, 0.3);
}

.wpforms-container .wpforms-form button[type="submit"].wpforms-submit:hover {
    background: linear-gradient(135deg, #d4872a, #c07020) !important;
    box-shadow: 0 4px 14px rgba(232, 168, 56, 0.45);
    transform: translateY(-1px);
}

/* Inquiry form (AFT CT landing page) - mirrors WPForms styling */
.uc-inquiry-form label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--wp--preset--color--primary, #1b2a4a);
    margin-bottom: 0.35rem;
}

.uc-inquiry-form .uc-form-group {
    margin-bottom: 1.25rem;
}

.uc-inquiry-form input[type="text"],
.uc-inquiry-form input[type="email"],
.uc-inquiry-form input[type="tel"] {
    width: 100%;
    border: 2px solid #e2e5ea;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafbfc;
    box-sizing: border-box;
}

.uc-inquiry-form input:focus {
    border-color: var(--wp--preset--color--accent, #e8a838);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.15);
    outline: none;
    background: #fff;
}

.uc-inquiry-form .uc-submit-btn {
    background: linear-gradient(135deg, #e8a838, #d4872a);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.85rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(232, 168, 56, 0.3);
    width: 100%;
}

.uc-inquiry-form .uc-submit-btn:hover {
    background: linear-gradient(135deg, #d4872a, #c07020);
    box-shadow: 0 4px 14px rgba(232, 168, 56, 0.45);
    transform: translateY(-1px);
}

.uc-inquiry-form .uc-submit-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.uc-inquiry-form .status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.uc-inquiry-form .status-message.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.uc-inquiry-form .status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* Finger tap animation - triggered by JS before each slide */
.uc-finger-overlay.uc-tap {
    animation: finger-tap 0.4s ease-in-out;
}

@keyframes finger-tap {
    0% { transform: translateY(0); }
    40% { transform: translateY(-14px); }
    65% { transform: translateY(2px); }
    85% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

/* Links in dark sections (hero, CTA) - exclude buttons */
.uc-animated-hero a:not(.wp-element-button),
.wp-block-cover a:not(.wp-element-button),
.uc-cta-section a:not(.wp-element-button) {
    color: #e8a838 !important;
    text-decoration: underline;
}

.uc-animated-hero a:not(.wp-element-button):hover,
.wp-block-cover a:not(.wp-element-button):hover,
.uc-cta-section a:not(.wp-element-button):hover {
    color: #fff !important;
    text-decoration: underline;
}

/* Footer */
.uc-footer {
    font-size: 0.9rem;
}

.uc-footer a {
    color: var(--wp--preset--color--accent-light);
}

.uc-footer a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 782px) {
    .uc-iphone {
        width: 260px;
        height: 530px;
    }

    .uc-iphone-frame {
        border-radius: 40px;
        padding: 9px;
    }

    .uc-iphone-screen {
        border-radius: 31px;
    }

    .uc-iphone-island {
        width: 70px;
        height: 20px;
        top: 9px;
    }

    .uc-logo-marquee {
        --marquee-h: 60px;
        --sprite-w: 1728px;
    }

    .uc-pricing-card.featured {
        transform: none;
    }
}

@media (max-width: 480px) {
    .uc-animated-hero h1 {
        font-size: 2rem !important;
    }

    .uc-iphone {
        width: 220px;
        height: 448px;
    }

    .uc-iphone-frame {
        border-radius: 34px;
        padding: 7px;
    }

    .uc-iphone-screen {
        border-radius: 27px;
    }

    .uc-iphone-island {
        width: 58px;
        height: 17px;
        top: 7px;
    }
}
