/**
 * CTA Button Widget Styles
 *
 * Variants:
 * - primary: Large (316x73px), blue background, gold border
 * - secondary: Medium (165x51px), gold background, shadow
 * - tiny: Small for header/navigation
 */

/* Base button styles */
.cta-btn {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Megrim', cursive;
    font-weight: 400;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cta-btn-label {
    display: inline-block;
}

.cta-btn-icon {
    font-size: 0.9em;
}

/* Primary variant - Large blue background */
.cta-btn-primary {
    width: 316px;
    height: 73px;
    padding: 0 92px;
    background: rgba(0, 45, 115, 0.18);
    border: 1px solid #FFB117;
    border-radius: 36.5px;
    color: #FFFFFF;
    font-size: 1.25rem;
}

/* Secondary variant - Medium gold background */
.cta-btn-secondary {
    width: auto;
    min-width: 165px;
    height: 51px;
    padding: 0 30px;
    background: rgba(255, 177, 23, 0.18);
    border: 1px solid #FFB117;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    color: #FFFFFF;
    font-size: 1rem;
}

/* Tiny variant - For header/navigation */
.cta-btn-tiny {
    width: auto;
    min-width: 100px;
    height: 38px;
    padding: 0 20px;
    background: rgba(255, 177, 23, 0.18);
    border: 1px solid #FFB117;
    box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.2);
    border-radius: 19px;
    color: #FFFFFF;
    font-size: 0.875rem;
}

/* Hover states - WOW effect */
.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 177, 23, 0.5);
    text-decoration: none;
    color: #FFFFFF;
}

.cta-btn-primary:hover {
    background: rgba(0, 45, 115, 0.35);
    border-color: #FFD700;
    box-shadow: 0 0 25px rgba(255, 177, 23, 0.6);
}

.cta-btn-secondary:hover {
    background: rgba(255, 177, 23, 0.35);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 177, 23, 0.7);
}

.cta-btn-tiny:hover {
    background: rgba(255, 177, 23, 0.35);
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 177, 23, 0.6);
}

/* Active/Click state */
.cta-btn:active {
    transform: scale(0.98);
}

/* Focus state for accessibility */
.cta-btn:focus {
    outline: 2px solid #FFB117;
    outline-offset: 3px;
}

/* Heartbeat animation class */
.cta-btn-animate {
    animation: ctaHeartbeat 2s ease-in-out infinite;
}

@keyframes ctaHeartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.05);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(1);
    }
}

/* Pause animation on hover */
.cta-btn-animate:hover {
    animation-play-state: paused;
}

/* Dark background context (for light sections) */
.section-bg-white .cta-btn,
.section-bg-gradient-light .cta-btn {
    color: #00092F;
}

.section-bg-white .cta-btn-primary,
.section-bg-gradient-light .cta-btn-primary {
    background: rgba(0, 45, 115, 0.25);
}

.section-bg-white .cta-btn:hover,
.section-bg-gradient-light .cta-btn:hover {
    color: #00092F;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cta-btn-primary {
        width: 280px;
        height: 60px;
        padding: 0 50px;
        font-size: 1.1rem;
    }

    .cta-btn-secondary {
        min-width: 150px;
        height: 45px;
        padding: 0 25px;
        font-size: 0.9rem;
    }

    .cta-btn-tiny {
        min-width: 90px;
        height: 34px;
        padding: 0 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .cta-btn-primary {
        width: 100%;
        max-width: 280px;
        height: 55px;
        padding: 0 40px;
        font-size: 1rem;
    }

    .cta-btn-secondary {
        min-width: 140px;
        height: 42px;
    }
}

/* Container for centering buttons */
.cta-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

/* Multiple buttons wrapper */
.cta-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Header-specific styles */
.navbar .cta-btn-tiny {
    margin-left: 1rem;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink CTA button by 50% when header is scrolled */
.navbar.navbar-shrink .cta-btn-tiny {
    height: 19px;          /* 50% of 38px */
    min-width: 50px;       /* 50% of 100px */
    padding: 0 10px;       /* 50% of 20px */
    font-size: 0.4375rem;  /* 50% of 0.875rem */
    border-radius: 9.5px;  /* 50% of 19px */
    box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.2);
}

@media (max-width: 767px) {
    .navbar .cta-btn-tiny {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
}

/* Ripple effect */
.cta-btn {
    overflow: hidden;
}

.cta-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    pointer-events: none;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
}

.cta-ripple-animate {
    animation: ctaRipple 0.6s ease-out;
}

@keyframes ctaRipple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Viewed state - subtle glow when scrolled into view */
.cta-btn-viewed {
    animation: ctaGlow 0.5s ease-out;
}

@keyframes ctaGlow {
    0% {
        box-shadow: 0 0 0 rgba(255, 177, 23, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 177, 23, 0.5);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
    }
}
