/* Landing page specific styles */
body {
    font-family: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0; /* Landing page: no extra padding, content fits viewport */
}

/* Header styles - Molecular hexagon gradient */
.header {
    /* Override to center content vertically */
    display: flex;
    align-items: center;
    /* V3 Gradient background */
    background: linear-gradient(120deg,
        var(--gradient-start) 0%,
        var(--gradient-mid) 40%,
        var(--gradient-end) 70%,
        var(--gradient-dark) 100%
    ) !important;
    border-bottom: none !important;
    position: relative;
    overflow: hidden; /* Contain hexagon pattern */
    z-index: 10;
}

/* Hexagon pattern overlay */
.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    right: -10%;
    bottom: -50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='150' viewBox='0 0 84 150'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.25' stroke-width='1.5' d='M42 99L0 75L0 24L42 0L84 24L84 75L42 99ZM42 150L0 126L0 75L42 51L84 75L84 126L42 150Z'/%3E%3C/svg%3E");
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}

/* Molecular nodes on right side */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='4' fill='%23ffffff' fill-opacity='0.35'/%3E%3Ccircle cx='20' cy='30' r='3' fill='%23ffffff' fill-opacity='0.25'/%3E%3Ccircle cx='80' cy='25' r='3' fill='%23ffffff' fill-opacity='0.28'/%3E%3Ccircle cx='75' cy='75' r='3' fill='%23ffffff' fill-opacity='0.25'/%3E%3Ccircle cx='25' cy='80' r='2' fill='%23ffffff' fill-opacity='0.2'/%3E%3Cline x1='50' y1='50' x2='20' y2='30' stroke='%23ffffff' stroke-opacity='0.15' stroke-width='1'/%3E%3Cline x1='50' y1='50' x2='80' y2='25' stroke='%23ffffff' stroke-opacity='0.15' stroke-width='1'/%3E%3Cline x1='50' y1='50' x2='75' y2='75' stroke='%23ffffff' stroke-opacity='0.15' stroke-width='1'/%3E%3Cline x1='50' y1='50' x2='25' y2='80' stroke='%23ffffff' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.header-content {
    /* Landing page specific: right-align auth buttons */
    justify-content: flex-end;
    display: flex;
    align-items: center;
    flex: 1; /* Expand to fill available width */
    position: relative;
    z-index: 1;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Login button positioned below header - right side */
.login-container {
    position: absolute;
    top: 125px; /* header min-height (120px) + 5px gap */
    right: 24px;
    z-index: 100;
}

/* Theme toggle positioned below header - left side */
.theme-toggle-container {
    position: absolute;
    top: 125px; /* header min-height (120px) + 5px gap */
    left: 24px;
    z-index: 100;
}

/* White icons for gradient header */
.header .control-btn svg {
    stroke: white;
}

.header .control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Theme cycle button - positioned below header left */
.theme-toggle-container .theme-cycle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.theme-toggle-container .theme-cycle-btn:hover {
    color: var(--text-primary);
}

.theme-toggle-container .theme-cycle-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Theme toggle tooltip */
.theme-toggle-container .theme-cycle-btn .tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.theme-toggle-container .theme-cycle-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Login button styling */
.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.2s ease;
}

.login-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.login-btn:hover svg {
    stroke: var(--color-primary);
}

/* Header shadow - elevated floating effect */
.header-blur-edge {
    position: relative;
    height: 0;
    margin: 0;
    pointer-events: none;
    z-index: 9;
}

.header-blur-edge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.15) 20%,
        rgba(0, 0, 0, 0.08) 40%,
        rgba(0, 0, 0, 0.03) 60%,
        transparent 100%
    );
    filter: blur(12px);
}

/* Dark mode shadow adjustment */
[data-theme="dark"] .header-blur-edge::before {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.25) 30%,
        rgba(0, 0, 0, 0.1) 60%,
        transparent 100%
    );
}

/* Main content - centered but compact to fit with features */
.page-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem 1rem;
}

.hero {
    max-width: 800px;
    text-align: center;
}

.logo-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
    position: relative;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    perspective: 1000px;
}

/* ===== CTA BUTTON MICRO-INTERACTIONS ===== */
.btn-container {
    position: relative;
    display: inline-block;
}

.cta-buttons .btn {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition:
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.3s ease,
        border-color 0.3s ease;
    will-change: transform;
}

/* Shine sweep effect overlay */
.cta-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.cta-buttons .btn:hover::before {
    left: 100%;
}

/* Glow effect */
.cta-buttons .btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 27px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-light), var(--gradient-start));
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: glowPulse 2s ease-in-out infinite;
}

.cta-buttons .btn:hover::after {
    opacity: 1;
}

@keyframes glowPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Enhanced hover state */
.cta-buttons .btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(0, 94, 184, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Active/click state */
.cta-buttons .btn:active {
    transform: translateY(-2px) scale(0.98);
    transition-duration: 0.1s;
}

/* Text transitions */
.cta-buttons .btn .btn-text-default,
.cta-buttons .btn .btn-text-hover {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.cta-buttons .btn .btn-text-hover {
    display: none;
    opacity: 0;
    transform: translateY(5px);
}

.cta-buttons .btn:hover .btn-text-default {
    display: none;
    opacity: 0;
    transform: translateY(-5px);
}

.cta-buttons .btn:hover .btn-text-hover {
    display: inline;
    opacity: 1;
    transform: translateY(0);
}

/* Primary button (Free Trial) specific */
#trialBtn {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    border: 2px solid transparent;
    font-weight: 700;
}

#trialBtn:hover {
    background: linear-gradient(135deg, var(--color-nhs-light-blue) 0%, var(--gradient-start) 100%);
    border-color: transparent;
    color: #ffffff;
}

/* Secondary button (Demo) - same style as Free Trial */
#demoBtn {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    border: 2px solid transparent;
    font-weight: 700;
}

#demoBtn:hover {
    background: linear-gradient(135deg, var(--color-nhs-light-blue) 0%, var(--gradient-start) 100%);
    border-color: transparent;
    color: #ffffff;
}

/* Dark mode button styles */
[data-theme="dark"] #trialBtn,
[data-theme="dark"] #demoBtn {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
}

[data-theme="dark"] #trialBtn:hover,
[data-theme="dark"] #demoBtn:hover {
    background: linear-gradient(135deg, var(--color-nhs-light-blue) 0%, var(--gradient-start) 100%);
    box-shadow:
        0 10px 30px rgba(0, 94, 184, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Ripple container */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: btnRipple 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes btnRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Floating AI stars around buttons on hover */
.btn-container::before,
.btn-container::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

/* AI Star shape using clip-path - 4-pointed sparkle */
.btn-container::before {
    top: -12px;
    left: 20%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-light) 50%, var(--gradient-start) 100%);
    clip-path: polygon(
        50% 0%,
        61% 35%,
        100% 50%,
        61% 65%,
        50% 100%,
        39% 65%,
        0% 50%,
        39% 35%
    );
    filter: drop-shadow(0 0 2px rgba(0, 94, 184, 0.6));
}

.btn-container::after {
    bottom: -12px;
    right: 20%;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-light) 50%, var(--gradient-start) 100%);
    clip-path: polygon(
        50% 0%,
        61% 35%,
        100% 50%,
        61% 65%,
        50% 100%,
        39% 65%,
        0% 50%,
        39% 35%
    );
    filter: drop-shadow(0 0 2px rgba(0, 94, 184, 0.6));
}

.btn-container:hover::before {
    opacity: 0.9;
    transform: translateY(-8px) rotate(15deg);
    animation: floatStar 1.5s ease-in-out infinite;
}

.btn-container:hover::after {
    opacity: 0.9;
    transform: translateY(8px) rotate(-15deg);
    animation: floatStar 1.5s ease-in-out infinite 0.5s;
}

@keyframes floatStar {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.7;
        filter: drop-shadow(0 0 2px rgba(0, 94, 184, 0.6));
    }
    50% {
        transform: translateY(-5px) scale(1.3) rotate(45deg);
        opacity: 1;
        filter: drop-shadow(0 0 4px rgba(0, 94, 184, 0.8));
    }
}

/* Dark mode AI stars - brighter with blue glow */
[data-theme="dark"] .btn-container::before,
[data-theme="dark"] .btn-container::after {
    background: linear-gradient(135deg, var(--gradient-accent) 0%, var(--gradient-start) 50%, var(--gradient-accent) 100%);
    filter: drop-shadow(0 0 3px rgba(77, 163, 255, 0.7));
}

[data-theme="dark"] .btn-container:hover::before,
[data-theme="dark"] .btn-container:hover::after {
    animation: floatStarDark 1.5s ease-in-out infinite;
}

[data-theme="dark"] .btn-container:hover::after {
    animation-delay: 0.5s;
}

@keyframes floatStarDark {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.8;
        filter: drop-shadow(0 0 3px rgba(77, 163, 255, 0.7));
    }
    50% {
        transform: translateY(-5px) scale(1.3) rotate(45deg);
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(77, 163, 255, 0.9));
    }
}

/* Features */
.features {
    background: var(--bg-primary);
    padding: 1rem 0;
    position: relative;
    overflow: hidden;
}

.features-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.features h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.feature h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
}

/* ===== HORIZONTAL SCROLLING FEATURES WITH MICRO-INTERACTIONS ===== */
.features-scroll-container {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    margin: 1.5rem 0 2rem 0;
    /* Gradient fade effects on left and right edges */
    mask: linear-gradient(90deg, transparent 0%, white 6%, white 94%, transparent 100%);
    -webkit-mask: linear-gradient(90deg, transparent 0%, white 6%, white 94%, transparent 100%);
    perspective: 1000px;
}

/* Animated maroon accent lines with glow */
.features::before {
    content: '';
    position: absolute;
    top: calc(50% - 80px - 10px);
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-primary-light) 10%,
        var(--color-primary) 30%,
        var(--color-primary) 70%,
        var(--color-primary-light) 90%,
        transparent 100%);
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 0 20px var(--color-primary-light);
    animation: lineGlow 3s ease-in-out infinite;
}

.features::after {
    content: '';
    position: absolute;
    top: calc(50% + 80px + 10px);
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-primary-light) 10%,
        var(--color-primary) 30%,
        var(--color-primary) 70%,
        var(--color-primary-light) 90%,
        transparent 100%);
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 0 20px var(--color-primary-light);
    animation: lineGlow 3s ease-in-out infinite 1.5s;
}

@keyframes lineGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 94, 184, 0.2);
        opacity: 0.8;
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 94, 184, 0.5);
        opacity: 1;
    }
}

.features-scroll-track {
    display: flex;
    align-items: center;
    animation: scrollFeatures 30s linear infinite;
    gap: 2rem;
    height: 100%;
    padding: 10px 0;
}

/* Pause animation on hover with smooth deceleration */
.features-scroll-container:hover .features-scroll-track {
    animation-play-state: paused;
}

/* ===== CARD STYLING ===== */
.scrolling-feature {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem 1.25rem;
    min-width: 300px;
    max-width: 300px;
    min-height: 180px;
    height: auto;
    flex-shrink: 0;
    text-align: center;
    position: relative;
    cursor: pointer;

    /* Transparent background */
    background: transparent;
    border-radius: 20px;
    border: none;

    /* Smooth transitions */
    transition:
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.3s ease,
        background 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}


/* Icon container - matches Clark style */
.scrolling-feature .feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scrolling-feature .feature-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-primary);
    stroke-width: 1.5;
    fill: none;
}

[data-theme="dark"] .scrolling-feature .feature-icon svg {
    stroke: var(--gradient-accent);
}

.scrolling-feature h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1a1a2e;
    letter-spacing: -0.336px;
    line-height: 1.6;
    transition:
        color 0.3s ease,
        transform 0.3s ease;
    transform: translateY(0);
}

.scrolling-feature p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    overflow: visible;
    transition:
        color 0.3s ease,
        transform 0.3s ease;
    transform: translateY(0);
}

/* ===== HOVER MICRO-INTERACTIONS ===== */
.scrolling-feature:hover {
    transform: translateY(-12px) scale(1.02);
    background: transparent;
}

.scrolling-feature:hover .feature-icon {
    transform: scale(1.2) translateY(-4px);
}

/* Evidence-Based: Searching/scanning motion */
.scrolling-feature:nth-child(1):hover .feature-icon,
.scrolling-feature:nth-child(9):hover .feature-icon {
    animation: iconSearch 0.8s ease-in-out;
}
@keyframes iconSearch {
    0%, 100% { transform: scale(1.2) translateY(-4px) rotate(0deg); }
    25% { transform: scale(1.25) translateY(-6px) rotate(-15deg); }
    50% { transform: scale(1.2) translateY(-4px) rotate(0deg); }
    75% { transform: scale(1.25) translateY(-6px) rotate(15deg); }
}

/* Instant Responses: Lightning flash */
.scrolling-feature:nth-child(2):hover .feature-icon,
.scrolling-feature:nth-child(10):hover .feature-icon {
    animation: iconFlash 0.5s ease-in-out;
}
@keyframes iconFlash {
    0%, 100% { transform: scale(1.2) translateY(-4px); opacity: 1; }
    20% { transform: scale(1.4) translateY(-8px); opacity: 0.6; }
    40% { transform: scale(1.15) translateY(-2px); opacity: 1; }
    60% { transform: scale(1.35) translateY(-6px); opacity: 0.7; }
    80% { transform: scale(1.2) translateY(-4px); opacity: 1; }
}

/* Desktop Optimised: Screen glow pulse */
.scrolling-feature:nth-child(3):hover .feature-icon,
.scrolling-feature:nth-child(11):hover .feature-icon {
    animation: iconGlow 0.8s ease-in-out;
}
@keyframes iconGlow {
    0%, 100% { transform: scale(1.2) translateY(-4px); filter: drop-shadow(0 0 0px var(--color-primary-light)); }
    50% { transform: scale(1.25) translateY(-6px); filter: drop-shadow(0 0 8px var(--color-primary)); }
}

/* Secure & Private: Lock wiggle */
.scrolling-feature:nth-child(4):hover .feature-icon,
.scrolling-feature:nth-child(12):hover .feature-icon {
    animation: iconLock 0.6s ease-in-out;
}
@keyframes iconLock {
    0%, 100% { transform: scale(1.2) translateY(-4px) rotate(0deg); }
    20% { transform: scale(1.25) translateY(-5px) rotate(-8deg); }
    40% { transform: scale(1.2) translateY(-4px) rotate(8deg); }
    60% { transform: scale(1.25) translateY(-5px) rotate(-5deg); }
    80% { transform: scale(1.2) translateY(-4px) rotate(5deg); }
}

/* Trusted Sources: Page flip effect */
.scrolling-feature:nth-child(5):hover .feature-icon,
.scrolling-feature:nth-child(13):hover .feature-icon {
    animation: iconFlip 0.7s ease-in-out;
}
@keyframes iconFlip {
    0%, 100% { transform: scale(1.2) translateY(-4px) rotateY(0deg); }
    50% { transform: scale(1.25) translateY(-6px) rotateY(20deg); }
}

/* Real-time AI: Sparkle twinkle */
.scrolling-feature:nth-child(6):hover .feature-icon,
.scrolling-feature:nth-child(14):hover .feature-icon {
    animation: iconSparkle 0.8s ease-in-out;
}
@keyframes iconSparkle {
    0%, 100% { transform: scale(1.2) translateY(-4px) rotate(0deg); }
    25% { transform: scale(1.3) translateY(-6px) rotate(15deg); }
    50% { transform: scale(1.15) translateY(-3px) rotate(0deg); }
    75% { transform: scale(1.3) translateY(-6px) rotate(-15deg); }
}

/* Clinical Calculators: Calculate/tabulate motion */
.scrolling-feature:nth-child(7):hover .feature-icon,
.scrolling-feature:nth-child(15):hover .feature-icon {
    animation: iconCalculate 0.7s ease-in-out;
}
@keyframes iconCalculate {
    0%, 100% { transform: scale(1.2) translateY(-4px); }
    20% { transform: scale(1.25) translateY(-6px) translateX(-2px); }
    40% { transform: scale(1.2) translateY(-4px) translateX(2px); }
    60% { transform: scale(1.25) translateY(-6px) translateX(-1px); }
    80% { transform: scale(1.3) translateY(-5px); }
}

/* CPD Learning Hub: Cap toss / bounce */
.scrolling-feature:nth-child(8):hover .feature-icon,
.scrolling-feature:nth-child(16):hover .feature-icon {
    animation: iconGraduate 0.7s ease-in-out;
}
@keyframes iconGraduate {
    0%, 100% { transform: scale(1.2) translateY(-4px); }
    30% { transform: scale(1.25) translateY(-6px) rotate(-6deg); }
    50% { transform: scale(1.2) translateY(-4px) rotate(0deg); }
    70% { transform: scale(1.25) translateY(-6px) rotate(6deg); }
}

.scrolling-feature:hover h4 {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.scrolling-feature:hover p {
    color: #3a3a4e;
    transform: translateY(-1px);
}

/* ===== ACTIVE/CLICK STATE ===== */
.scrolling-feature:active {
    transform: translateY(-8px) scale(0.98);
    transition-duration: 0.1s;
}

/* ===== DARK MODE STYLING ===== */
[data-theme="dark"] .scrolling-feature {
    background: transparent;
    border: none;
}

[data-theme="dark"] .scrolling-feature h4 {
    color: #f0f0f5;
}

[data-theme="dark"] .scrolling-feature p {
    color: #a0a0b0;
}

[data-theme="dark"] .scrolling-feature:hover {
    background: transparent;
}

[data-theme="dark"] .scrolling-feature:hover h4 {
    color: #4DA3FF;
}

[data-theme="dark"] .scrolling-feature:hover p {
    color: #d0d0e0;
}

/* ===== STAGGERED ENTRANCE ANIMATION ===== */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scrolling-feature.animate-in {
    animation: cardEntrance 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Staggered delays for initial load */
.scrolling-feature:nth-child(1) { animation-delay: 0.1s; }
.scrolling-feature:nth-child(2) { animation-delay: 0.2s; }
.scrolling-feature:nth-child(3) { animation-delay: 0.3s; }
.scrolling-feature:nth-child(4) { animation-delay: 0.4s; }
.scrolling-feature:nth-child(5) { animation-delay: 0.5s; }
.scrolling-feature:nth-child(6) { animation-delay: 0.6s; }
.scrolling-feature:nth-child(7) { animation-delay: 0.7s; }
.scrolling-feature:nth-child(8) { animation-delay: 0.8s; }

/* ===== SCROLL ANIMATION ===== */
@keyframes scrollFeatures {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-8 * (300px + 2rem)));
    }
}

/* ===== FLOATING PARTICLES EFFECT (removed maroon tint) ===== */
.features-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}


/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 0 0.25rem;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.3;
    animation: scrollDotPulse 3s ease-in-out infinite;
}

.scroll-dot:nth-child(1) { animation-delay: 0s; }
.scroll-dot:nth-child(2) { animation-delay: 1s; }
.scroll-dot:nth-child(3) { animation-delay: 2s; }

@keyframes scrollDotPulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    33% { opacity: 0.8; transform: scale(1.3); }
}

/* Footer styles moved to theme.css - no page-specific overrides needed */

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.44);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex !important;
}

.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 339px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.modal-header {
    padding: 21px 21px 0;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.25px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.modal-body {
    padding: 0 21px 21px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    border: 2px solid var(--color-primary);
    border-radius: 14px;
    font-size: 0.875rem;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.1);
    background: #ffffff;
}

/* Placeholder styling */
.form-group input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-group input::-webkit-input-placeholder {
    color: #9ca3af;
}

.form-group input::-moz-placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-group input:-ms-input-placeholder {
    color: #9ca3af;
}

/* Select placeholder styling */
.form-group select option[value=""] {
    color: #9ca3af;
}

.form-group select:invalid {
    color: #9ca3af;
}

.form-group select:valid {
    color: #1f2937;
}

.required-asterisk {
    color: var(--color-primary);
    font-weight: 600;
    margin-left: 2px;
}

.required-note {
    margin-top: 1rem;
    text-align: center;
}

.required-note small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.required-note .required-asterisk {
    color: var(--color-primary);
    font-weight: 600;
}

.password-feedback {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.password-feedback.match {
    color: #28a745;
}

.password-feedback.mismatch {
    color: #dc3545;
}

.form-group input.password-match {
    border-color: #28a745;
}

.form-group input.password-mismatch {
    border-color: #dc3545;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.error-message {
    color: var(--color-danger);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

.success-message {
    color: var(--color-success);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}


/* Popup bubble styles */
.popup-bubble {
    position: absolute;
    background: #ffffff;
    color: #212529;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    top: -50px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
}

.popup-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.popup-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ffffff;
}

.popup-bubble::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #dee2e6;
    z-index: -1;
}

/* Position bubble relative to Demo button */
.btn-container {
    position: relative;
    display: inline-block;
}

/* Dark mode support */
[data-theme="dark"] {
    color-scheme: dark;
}

/* Logo display based on theme */
.clare-logo-light {
    display: block;
}

.clare-logo-dark {
    display: none;
}

[data-theme="dark"] .clare-logo-light {
    display: none;
}

[data-theme="dark"] .clare-logo-dark {
    display: block;
}

/* Clare brand - convert NHS Blue wave to Clare Maroon using CSS filters */
[data-brand="clare"] .clare-logo-light,
[data-brand="clare"] .clare-logo-dark {
    filter: hue-rotate(130deg) saturate(2) brightness(0.85);
}

/* ===== LOGO ELEGANT SCALE + FADE MICRO-INTERACTION ===== */
.clare-logo-light,
.clare-logo-dark {
    transition:
        transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        filter 0.4s ease;
    transform-origin: center center;
}

.logo-center:hover .clare-logo-light,
.logo-center:hover .clare-logo-dark {
    transform: scale(1.05) translateY(-2px);
    filter:
        brightness(1.1)
        drop-shadow(0 4px 12px rgba(0, 94, 184, 0.4))
        drop-shadow(0 8px 25px rgba(0, 94, 184, 0.3))
        drop-shadow(0 16px 40px rgba(0, 94, 184, 0.2));
}

.logo-center:active .clare-logo-light,
.logo-center:active .clare-logo-dark {
    transform: scale(1.02) translateY(-1px);
    transition-duration: 0.1s;
}

/* Dark mode logo hover adjustments */
[data-theme="dark"] .logo-center:hover .clare-logo-dark {
    filter:
        brightness(1.15)
        drop-shadow(0 4px 12px rgba(77, 163, 255, 0.5))
        drop-shadow(0 8px 25px rgba(77, 163, 255, 0.35))
        drop-shadow(0 16px 40px rgba(77, 163, 255, 0.2));
}

/* Clare brand logo hover - maroon drop shadows */
[data-brand="clare"] .logo-center:hover .clare-logo-light,
[data-brand="clare"] .logo-center:hover .clare-logo-dark {
    filter:
        hue-rotate(130deg) saturate(2) brightness(0.9)
        drop-shadow(0 4px 12px rgba(153, 0, 51, 0.4))
        drop-shadow(0 8px 25px rgba(153, 0, 51, 0.3))
        drop-shadow(0 16px 40px rgba(153, 0, 51, 0.2));
}

[data-theme="dark"] .modal-content {
    background: #1f2937;
    border: 1px solid #374151;
    color: #f9fafb;
}

[data-theme="dark"] .modal-title {
    color: #f9fafb;
}

[data-theme="dark"] .modal-subtitle {
    color: #d1d5db;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
    background: #374151;
    border-color: var(--color-primary);
    color: #f9fafb;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus {
    background: #374151;
    border-color: var(--color-primary);
}

[data-theme="dark"] .form-group label {
    color: #f9fafb;
}

/* Dark mode placeholder styling */
[data-theme="dark"] .form-group input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

[data-theme="dark"] .form-group input::-webkit-input-placeholder {
    color: #9ca3af;
}

[data-theme="dark"] .form-group input::-moz-placeholder {
    color: #9ca3af;
    opacity: 1;
}

[data-theme="dark"] .form-group input:-ms-input-placeholder {
    color: #9ca3af;
}

/* Dark mode select placeholder styling */
[data-theme="dark"] .form-group select option[value=""] {
    color: #9ca3af;
}

[data-theme="dark"] .form-group select:invalid {
    color: #9ca3af;
}

[data-theme="dark"] .form-group select:valid {
    color: #f9fafb;
}

/* Textarea styling */
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.1);
}

.form-group textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

[data-theme="dark"] .form-group textarea {
    background: #374151;
    border-color: var(--color-primary);
    color: #f9fafb;
}

[data-theme="dark"] .form-group textarea:focus {
    background: #374151;
    border-color: var(--color-primary);
}

[data-theme="dark"] .form-group textarea::placeholder {
    color: #9ca3af;
}

/* Terms Overlay Styles */
.terms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.terms-overlay.show {
    display: flex;
}

.terms-overlay-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.terms-overlay-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
    text-align: center;
}

.terms-overlay-content p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.terms-overlay-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.terms-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.terms-link:hover {
    color: #660022;
    text-decoration: underline;
}

/* Dark mode support for terms overlay */
[data-theme="dark"] .terms-overlay-content {
    background: #1f2937;
    border: 1px solid #374151;
}

[data-theme="dark"] .terms-overlay-content h3 {
    color: #f9fafb;
}

[data-theme="dark"] .terms-overlay-content p {
    color: #d1d5db;
}

/* Privacy Consent Banner */
.privacy-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 2px solid var(--color-primary);
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.privacy-consent-banner.hidden {
    transform: translateY(100%);
}

.privacy-consent-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

.privacy-consent-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.privacy-consent-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.privacy-consent-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Mobile CSS removed - desktop only */

/* Login Button (SVG icon style) */
.control-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.control-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--fg);
    stroke-width: 2;
    fill: none;
}

.control-btn:hover {
    background: var(--bg-secondary);
}

.control-btn .tooltip {
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    margin-right: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.control-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Theme Cycle Button Base Styles */
.theme-cycle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-cycle-btn:hover {
    color: var(--text-primary);
}

.theme-cycle-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
