/* ============================================
   COMPANY QUESTIONS - COMPLETE UI/UX OVERHAUL
   Addresses ALL 29 Issues from Review
   ============================================ */

/* ===========================================
   ISSUE #8: SMOOTH SCROLLING
   =========================================== */
html {
    scroll-behavior: smooth;
}

/* ===========================================
   ISSUE #25: REDUCED MOTION SUPPORT
   (Accessibility - Applied at the top)
   =========================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .scroll-progress {
        display: none;
    }
}

/* ===========================================
   CSS VARIABLES - Unified Design System
   =========================================== */
:root {
    /* Background Colors */
    --bg-deep: #0A0E27;
    /* ISSUE #30: Updated to match main page (rgb 10, 14, 39) */
    --bg-card: rgba(31, 41, 55, 0.6);
    --bg-card-hover: rgba(31, 41, 55, 0.9);

    /* Accent Colors */
    --accent-blue: #4B7BFF;
    --accent-blue-light: #5B8FFF;
    --accent-cyan: #3DD9E3;
    --accent-purple: #8B5CF6;
    --accent-green: #10B981;
    --accent-yellow: #FBBF24;
    --accent-red: #F87171;

    /* Text Colors */
    --text-main: #F8FAFC;
    --text-secondary: #E2E8F0;
    --text-muted: #A8B3CF;
    /* ISSUE #15: Brighter description text */
    --text-dim: #94A3B8;

    /* Borders & Glass Effects */
    --border-glass: rgba(255, 255, 255, 0.15);
    /* ISSUE #10: Stronger border */
    --border-hover: rgba(75, 123, 255, 0.5);
    --glass-blur: blur(12px);

    /* Shadows */
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 0 1px rgba(75, 123, 255, 0.4);
    --shadow-button: 0 8px 24px rgba(75, 123, 255, 0.4);
    --shadow-cyan: 0 8px 24px rgba(61, 217, 227, 0.5);

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===========================================
   BASE STYLES
   =========================================== */
body {
    background: var(--bg-deep) !important;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ===========================================
   ISSUE #2: FOCUS STATES (ACCESSIBILITY)
   =========================================== */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

.glass-panel:focus-visible,
.company-card:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(75, 123, 255, 0.15);
}

/* ===========================================
   ISSUE #7: CURSOR POINTERS
   =========================================== */
.company-card,
.glass-panel,
.filter-button,
.btn-primary,
.btn-secondary,
.btn-cyber,
.btn-outline-cyber,
.nav-link,
a,
button {
    cursor: pointer;
}

[disabled],
.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

/* ===========================================
   ISSUE #20: ENTRANCE ANIMATIONS
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp 0.5s var(--ease-out-back) forwards;
    will-change: transform, opacity;
}

/* Staggered entrance delays for cards */
.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

.stagger-6 {
    animation-delay: 0.3s;
}

.stagger-7 {
    animation-delay: 0.35s;
}

.stagger-8 {
    animation-delay: 0.4s;
}

.stagger-9 {
    animation-delay: 0.45s;
}

.stagger-10 {
    animation-delay: 0.5s;
}

.stagger-11 {
    animation-delay: 0.55s;
}

.stagger-12 {
    animation-delay: 0.6s;
}

/* ===========================================
   ISSUE #9: LOADING SKELETON SCREENS
   =========================================== */
.skeleton-card {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    height: 240px;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
}

.skeleton-text {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 1em;
}

/* ===========================================
   ISSUE #27: GPU ACCELERATION (Performance)
   =========================================== */
.glass-panel,
.company-card,
.btn-primary,
.btn-secondary,
.filter-button {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===========================================
   ISSUE #1 & #10: COMPANY CARDS (GLASS PANEL)
   - Hover effects with lift, shadow, border glow
   - Stronger visible border
   =========================================== */
.glass-panel,
.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    /* ISSUE #10: Visible border */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 2rem;
    transition:
        transform 0.3s var(--ease-smooth),
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
}

/* ISSUE #1: Card hover effects */
.glass-panel:hover,
.company-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-6px) translateZ(0);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* ISSUE #1: Card active/press state */
.glass-panel:active,
.company-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 0.1s ease;
}

/* ===========================================
   ISSUE #4: FILTER BUTTONS
   =========================================== */
.filter-button,
.btn-secondary {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 0.6rem 1.5rem;
    border-radius: 99px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s var(--ease-smooth);
    cursor: pointer;
}

/* ISSUE #11: Filter button icon alignment */
.filter-button svg,
.filter-button i,
.btn-secondary svg,
.btn-secondary i {
    vertical-align: middle;
    display: inline-block;
    font-size: 0.875rem;
}

/* ISSUE #4: Filter button hover */
.filter-button:not(.active):hover,
.btn-secondary:not(.active-filter):hover {
    background: rgba(75, 123, 255, 0.15);
    border-color: rgba(75, 123, 255, 0.4);
    transform: translateY(-2px);
    color: white;
}

/* ISSUE #4: Filter button active/press */
.filter-button:active,
.btn-secondary:active {
    transform: scale(0.98) !important;
}

/* ISSUE #4 & #16: Active filter state - more prominent */
.filter-button.active,
.active-filter {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 4px 16px rgba(75, 123, 255, 0.5);
    font-weight: 600;
}

/* ===========================================
   ISSUE #5: PRIMARY CTA BUTTONS
   =========================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    border: none;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(75, 123, 255, 0.3);
    cursor: pointer;
}

/* ISSUE #5: Button hover */
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-cyan);
    filter: brightness(1.1);
    color: white;
}

/* ISSUE #5: Button press/active */
.btn-primary:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s;
}

/* ===========================================
   ISSUE #24: LOGIN BUTTON BORDER
   =========================================== */
.btn-outline-cyber {
    border: 1.5px solid rgba(75, 123, 255, 0.6);
}

.btn-outline-cyber:hover {
    border-color: var(--accent-blue);
    background: rgba(75, 123, 255, 0.15);
    transform: translateY(-2px);
}

/* ===========================================
   ISSUE #6: NAVIGATION LINKS HOVER
   =========================================== */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-cyan);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===========================================
   ISSUE #3: SEARCH BAR FOCUS STATE
   =========================================== */
.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 99px;
    color: white;
    font-size: 1rem;
    transition:
        all 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
    transition: opacity 0.3s ease;
}

/* ISSUE #3: Search hover */
.search-input:hover {
    border-color: rgba(75, 123, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

/* ISSUE #3: Search focus */
.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(75, 123, 255, 0.15);
    background: #1E2943;
}

.search-input:focus::placeholder {
    opacity: 0.5;
}

/* ISSUE #21: Search icon color */
.search-icon {
    color: var(--accent-blue);
}

/* ===========================================
   SCROLL PROGRESS INDICATOR
   =========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ===========================================
   TEXT UTILITIES
   =========================================== */
.text-gradient {
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================================
   PAGE HEADER
   =========================================== */
.company-header {
    text-align: center;
    padding: 4rem 1rem;
    position: relative;
    overflow: hidden;
}

.company-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.company-logo-large {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: #333;
}

/* ===========================================
   ISSUE #14: COMPANY LOGO SHADOW
   =========================================== */
.company-logo {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===========================================
   ISSUE #12 & #13: DIFFICULTY BADGES
   - Consistent positioning
   - Improved color scheme
   =========================================== */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    transition: transform 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* ISSUE #13: Badge color consistency */
.badge-easy {
    background: #065F46;
    color: #6EE7B7;
}

.badge-medium {
    background: #92400E;
    color: #FCD34D;
}

.badge-hard {
    background: #991B1B;
    color: #FCA5A5;
}

.badge-very_hard,
.badge-very-hard {
    background: #7F1D1D;
    color: #FCA5A5;
}

/* ===========================================
   ISSUE #15 & #17: CARD DESCRIPTION
   - Brighter text color
   - Better line height
   =========================================== */
.card-description,
.glass-panel p {
    color: var(--text-muted);
    /* #A8B3CF - Brighter */
    line-height: 1.6;
}

/* ===========================================
   ISSUE #16: CARD METADATA ICONS
   =========================================== */
.card-metadata svg,
.card-metadata i {
    vertical-align: text-bottom;
    margin-right: 4px;
}

/* ===========================================
   QUESTION CARDS
   =========================================== */
.question-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition:
        all 0.3s ease,
        transform 0.3s ease,
        border-color 0.3s ease;
    cursor: pointer;
}

.question-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
    transform: translateY(-4px);
}

.question-card:active {
    transform: scale(0.99);
}

.question-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ===========================================
   SECTION TITLES
   =========================================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.section-icon {
    width: 32px;
    height: 32px;
    background: rgba(75, 123, 255, 0.15);
    color: var(--accent-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ===========================================
   TIMELINE PROCESS
   =========================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(4px);
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    margin-left: -5px;
    width: 12px;
    height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    margin-top: 0.4rem;
    box-shadow: 0 0 0 4px rgba(75, 123, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(75, 123, 255, 0.3);
}

/* ===========================================
   PERSONA CARDS
   =========================================== */
.persona-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
}

.persona-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.persona-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.persona-card:hover .persona-avatar {
    transform: scale(1.1);
}

/* ===========================================
   RADAR CHART CONTAINER
   =========================================== */
.radar-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* ===========================================
   UNWRITTEN RULES
   =========================================== */
.rule-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 12px;
    transition:
        background 0.3s ease,
        transform 0.3s ease;
    cursor: default;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.rule-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-top: 2px;
    transition: transform 0.3s ease;
}

.rule-item:hover .rule-icon {
    transform: scale(1.15);
}

.rule-do {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.rule-dont {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
}

/* ===========================================
   ISSUE #18: FOOTER SOCIAL ICONS HOVER
   =========================================== */
.social-icon,
.social-link {
    transition: all 0.2s ease;
}

.social-icon:hover,
.social-link:hover {
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

/* ===========================================
   ISSUE #19: SCROLL-TO-TOP BUTTON HOVER
   =========================================== */
.scroll-top-btn,
.back-to-top {
    transition: all 0.2s ease;
}

.scroll-top-btn:hover,
.back-to-top:hover {
    background: rgba(75, 123, 255, 0.3) !important;
    transform: translateY(-2px);
}

/* ===========================================
   ISSUE #22: FOOTER COLUMN SPACING
   =========================================== */
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 80px;
}

/* ===========================================
   ISSUE #23: OPENAI BADGE BRIGHTNESS
   =========================================== */
.openai-badge {
    opacity: 0.8;
}

/* ===========================================
   PAGE TRANSITION OVERLAY
   =========================================== */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-deep);
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.page-loaded .page-transition-overlay {
    opacity: 0;
}

/* ===========================================
   ISSUE #26: MOBILE RESPONSIVENESS
   =========================================== */
/* Company Grid Layout */
.company-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1440px) {
    .company-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .company-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .company-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .company-header {
        padding: 3rem 1rem;
    }

    .company-header h1 {
        font-size: 2rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    /* ISSUE #26: Filter buttons overflow */
    .filter-container {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-container::-webkit-scrollbar {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .company-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 1rem;
    }

    .company-header h1 {
        font-size: 1.75rem;
    }

    .btn-secondary,
    .filter-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ===========================================
   HIGH CONTRAST MODE SUPPORT
   =========================================== */
@media (prefers-contrast: high) {
    :root {
        --border-glass: rgba(255, 255, 255, 0.4);
        --text-muted: #E2E8F0;
    }

    .glass-panel,
    .question-card,
    .company-card {
        border-width: 2px;
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {

    .scroll-progress,
    .page-transition-overlay,
    .back-to-top,
    .sticky-cta-bar {
        display: none !important;
    }
}

/* ===========================================
   ISSUE #28: IMAGE LAZY LOADING
   (Applied via HTML loading="lazy" attribute)
   =========================================== */
img[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}