/* Custom styles for RecruitCompare */
/* Supplement Tailwind with any custom CSS needed */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Table striping on hover */
table tbody tr:hover {
    background-color: #f9fafb;
}

/* Card hover lift effect */
.hover\:shadow-md:hover {
    transform: translateY(-1px);
}

/* Rating bar animation */
.bg-green-500, .bg-brand-500 {
    transition: width 0.6s ease-out;
}

/* Line clamping for result descriptions */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   Quiz Styles
   ============================================= */

/* Page background */
.quiz-page-bg {
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 50%, #f8fafc 100%);
}

/* Screen transitions */
.quiz-screen {
    display: none;
    opacity: 0;
    transform: translateY(16px);
}
.quiz-screen.active {
    display: block;
    animation: quizFadeIn 0.4s ease-out forwards;
}
.quiz-screen.quiz-exit {
    animation: quizFadeOut 0.25s ease-in forwards;
}

@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes quizFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Question card */
.quiz-question-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
@media (min-width: 768px) {
    .quiz-question-card {
        padding: 2.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    }
}

/* Option buttons */
.quiz-option {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.quiz-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.08);
}
.quiz-option.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}
.quiz-option.quiz-option-compact {
    padding: 0.75rem 1rem;
}

/* Centered option style (for Q2 cards) */
.quiz-option.quiz-option-centered {
    text-align: center;
    padding: 1.5rem 1rem;
}

/* Option icons */
.quiz-option-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

/* Checkboxes for multi-select */
.quiz-option-check,
.quiz-option-check-sm {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: 2px solid #d1d5db;
    transition: all 0.2s ease;
}
.quiz-option-check {
    width: 1.75rem;
    height: 1.75rem;
}
.quiz-option-check-sm {
    width: 1.5rem;
    height: 1.5rem;
}
.quiz-option.selected .quiz-option-check,
.quiz-option.selected .quiz-option-check-sm {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Shake animation (max selections) */
.quiz-shake {
    animation: quizShake 0.4s ease;
}
@keyframes quizShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Welcome screen icon pulse */
.quiz-pulse-icon {
    animation: quizPulse 2.5s ease-in-out infinite;
}
@keyframes quizPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

/* Result cards */
.quiz-result-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem;
    opacity: 0;
    animation: quizResultSlideIn 0.5s ease-out forwards;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
@media (min-width: 768px) {
    .quiz-result-card {
        padding: 1.5rem 2rem;
    }
    .quiz-result-card:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        transform: translateY(-2px);
    }
}
.quiz-result-top {
    border-color: #86efac;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(34,197,94,0.1);
}

@keyframes quizResultSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Homepage Quiz CTA Widget
   ============================================= */
.quiz-cta-widget {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.quiz-cta-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

/* =============================================
   Homepage Hero Carousel
   ============================================= */

.carousel {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: #0f172a;
}
@media (max-width: 767px) {
    .carousel {
        height: 400px;
    }
}

/* Individual slides */
.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    z-index: 1;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Background images */
.carousel-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: transform 6s ease-out;
}
.carousel-slide.active .carousel-slide-bg {
    transform: scale(1);
}

/* Dark overlay for text readability */
.carousel-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.55) 50%,
        rgba(15, 23, 42, 0.40) 100%
    );
}

/* Slide content */
.carousel-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 1.25rem 1rem 2.25rem;
}
@media (min-width: 768px) {
    .carousel-content {
        padding: 2rem;
    }
}

.carousel-text {
    max-width: 620px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}
.carousel-slide.active .carousel-text {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767px) {
    .carousel-text {
        text-align: center;
        max-width: 100%;
        margin: 0 auto;
    }
}

.carousel-badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
@media (min-width: 768px) {
    .carousel-badge {
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

.carousel-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) {
    .carousel-title {
        margin-bottom: 0.75rem;
    }
}
@media (min-width: 768px) {
    .carousel-title {
        font-size: 2.75rem;
    }
}

.carousel-subtitle {
    font-size: 0.875rem;
    color: #bfdbfe;
    line-height: 1.5;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .carousel-subtitle {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }
}

/* Carousel CTA buttons */
.carousel-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}
.carousel-cta-primary {
    background: #2563eb;
    color: white;
}
.carousel-cta-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.carousel-cta-secondary {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
    margin-left: 0.75rem;
}
.carousel-cta-secondary:hover {
    background: rgba(255,255,255,0.2);
}
@media (max-width: 767px) {
    .carousel-cta-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    .carousel-cta-secondary {
        margin-left: 0;
    }
}

/* Category pills (slide 1) */
.carousel-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}
@media (min-width: 768px) {
    .carousel-pills {
        gap: 0.5rem;
        margin-top: 1.25rem;
    }
}
@media (max-width: 767px) {
    .carousel-pills {
        justify-content: center;
    }
}
.carousel-pill {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s ease;
    text-decoration: none;
}
@media (min-width: 768px) {
    .carousel-pill {
        padding: 0.375rem 0.875rem;
        font-size: 0.8125rem;
    }
}
.carousel-pill:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Navigation dots */
.carousel-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.carousel-dot:hover {
    background: rgba(255,255,255,0.6);
}
.carousel-dot.active {
    background: white;
    width: 28px;
}

/* Arrow buttons */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}
.carousel:hover .carousel-arrow {
    opacity: 1;
}
.carousel-arrow:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.08);
}
.carousel-arrow-prev { left: 1rem; }
.carousel-arrow-next { right: 1rem; }

@media (max-width: 767px) {
    .carousel-arrow {
        display: none;
    }
}

/* Progress bar at bottom of slide */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #3b82f6;
    z-index: 10;
    transition: width linear;
    width: 0%;
}
.carousel-progress.running {
    width: 100%;
}

/* Stat pill on comparison slides */
.carousel-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    background: rgba(255,255,255,0.1);
    color: #93c5fd;
    margin-bottom: 1rem;
}
.carousel-stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

/* =============================================
   Landing Pages: Shared Interactive Styles
   ============================================= */

/* Animated counters */
.counter {
    transition: all 0.1s ease;
}

/* Accordion transitions */
.accordion-chevron.rotated {
    transform: rotate(180deg);
}

/* Budget pills (pricing guide) */
.budget-pill {
    background: white;
    color: #6b7280;
    border-color: #d1d5db;
}
.budget-pill:hover {
    border-color: #93c5fd;
    color: #2563eb;
}
.budget-pill.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Price sort buttons */
.price-sort.active-sort {
    color: #2563eb;
    font-weight: 600;
}

/* Category tab switching (comparisons) */
.cat-tab {
    white-space: nowrap;
}

/* Search dropdown items */
.search-dropdown-item {
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}
.search-dropdown-item:hover {
    background: #eff6ff;
}

/* Data depth bars animation */
.data-bar {
    transition: width 0.7s ease-out;
}

/* Pricing card hover */
.pricing-tool-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pricing-tool-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
}
