/* Digital ID Application Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2f484b;
    background-color: #f6f5f1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #0e5f5a;
    color: white;
    padding: 0;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 1rem;
}

.logo-image {
    height: 80px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.logo:hover {
    opacity: 0.9;
}

.logo:hover .logo-image {
    opacity: 0.9;
}

.mobile-menu-toggle {
    display: none !important;
    visibility: hidden !important;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.nav-links > a,
.nav-links > .nav-dropdown > .nav-dropdown-toggle {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    padding: 0.5rem 0.625rem;
    border-radius: 0;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links > a:hover,
.nav-links > .nav-dropdown > .nav-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-links > a.active,
.nav-links > .nav-dropdown > .nav-dropdown-toggle.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    user-select: none;
}

.nav-dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-dropdown.active .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background-color: white;
    min-width: 200px;
    box-shadow: none;
    z-index: 1000;
    margin-top: 0.25rem;
    border: 1px solid #dcd8cd;
    pointer-events: none;
}

.nav-dropdown.active .nav-dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
}

.nav-dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    color: #0d2b2e !important;
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f6f5f1;
    white-space: nowrap;
    background-color: transparent !important;
    transform: none !important;
    font-weight: 500 !important;
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background-color: #f6f5f1;
    transform: none;
}

.nav-dropdown-menu a.active {
    background-color: #f4f6f5;
    color: #0e5f5a;
    font-weight: 600;
}

.nav-dropdown-menu a i {
    width: 1rem;
    text-align: center;
    color: #4a5a5c;
    font-size: 0.875rem;
}

.nav-dropdown-menu a.active i {
    color: #0e5f5a;
}

.nav-badge {
    background: #a3322b;
    color: white;
    border-radius: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    margin-left: auto;
    font-weight: 600;
}

/* Mobile: Show dropdown menu as expanded list - MUST be before desktop media query */
@media (max-width: 968px) {
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-dropdown-menu {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        box-shadow: none;
        border: none !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        margin-top: 0 !important;
        padding-left: 1rem !important;
        top: auto !important;
        left: auto !important;
    }
    
    .nav-dropdown-menu a {
        color: white !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        background-color: transparent !important;
    }
    
    .nav-dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .nav-dropdown-menu a.active {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
    
    .nav-dropdown-menu a i {
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: none;
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dcd8cd;
    border-radius: 0;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0e5f5a;
    box-shadow: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #0e5f5a;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #0e5f5a;
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-secondary {
    background-color: #0e5f5a;
    color: white;
}

.btn-secondary:hover {
    background-color: #0a4440;
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-danger {
    background-color: #a3322b;
    color: white;
}

.btn-danger:hover {
    background-color: #7d2520;
}

/* ID Card */
.id-card {
    background-color: #ffffff;
    color: #0d2b2e;
    border: 2px solid #dcd8cd;
    border-radius: 0;
    padding: 2rem;
    max-width: 400px;
    margin: 3rem auto 2rem;
    box-shadow: none;
}

.id-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.id-card-photo {
    width: 180px;
    height: 180px;
    border-radius: 0;
    border: 3px solid #dcd8cd;
    margin: 0 auto 1rem;
    object-fit: cover;
    display: block;
}

.id-card-details {
    background: #f6f5f1;
    border: 1px solid #dcd8cd;
    padding: 1.5rem;
    border-radius: 0;
    margin-bottom: 1.5rem;
}

.id-card-details p {
    margin: 0.5rem 0;
}

.id-card-qr {
    text-align: center;
    margin-top: 1.5rem;
}

.id-card-qr img {
    max-width: 200px;
    background: white;
    padding: 1rem;
    border-radius: 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #e6f1ef;
    color: #174f33;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #f8eceb;
    color: #7d2520;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: #f4f6f5;
    color: #0e5f5a;
    border: 1px solid #67e8f9;
}

/* Callout box - richer informational highlight (heading + body + optional step list) */
.callout-box {
    background-color: #f4f6f5;
    border: 1px solid #f4f6f5;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
}

.callout-box h2,
.callout-box h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #0d2b2e;
    font-size: 1.125rem;
}

.callout-box > p {
    color: #2f484b;
    margin-bottom: 1rem;
}

.callout-box > p:last-child {
    margin-bottom: 0;
}

.callout-box--warning {
    background-color: #f7f1e1;
    border-color: #f7f1e1;
}

.callout-box--warning h3,
.callout-box--warning h4 {
    color: #6b4500;
}

.callout-box--warning a {
    color: #6b4500;
    font-weight: 500;
}

.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.step-list li {
    counter-increment: step-counter;
    padding-left: 3rem;
    position: relative;
    color: #2f484b;
    line-height: 1.6;
}

.step-list li:not(:last-child) {
    margin-bottom: 1.25rem;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #0e5f5a;
    color: white;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.step-list li strong {
    color: #0d2b2e;
}

/* Footer */
footer {
    background-color: #0d2b2e;
    color: #dcd8cd;
    padding: 4rem 0 2rem;
    margin-top: 0;
}

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

/* Bottom section with Install App and Staff Service side by side */
.footer-bottom-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #2f484b;
}

@media (min-width: 968px) {
    .footer-bottom-section {
        grid-template-columns: 1fr 2fr;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

.footer-section h3,
.footer-section h2.footer-heading {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.footer-logo-image {
    height: 80px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.footer-logo:hover {
    opacity: 0.9;
}

.footer-logo:hover .footer-logo-image {
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #dcd8cd;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #2f484b;
    padding-top: 2rem;
    text-align: center;
    color: #4a5a5c;
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: #2f484b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dcd8cd;
    transition: all 0.2s;
}

.footer-social a:hover {
    background-color: #0e5f5a;
    color: white;
}

/* Responsive */
@media (min-width: 969px) {
    .mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
    
    .nav-links {
        display: flex !important;
        visibility: visible !important;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    /* Ensure dropdown menu is hidden by default on desktop - must override mobile styles */
    .nav-dropdown-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        pointer-events: none !important;
        box-shadow: none;
        border: 1px solid #dcd8cd !important;
        background-color: white !important;
        margin-top: 0.25rem !important;
        padding-left: 0 !important;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Ensure dropdown menu items are styled correctly on desktop */
    .nav-dropdown-menu a {
        color: #0d2b2e !important;
        border-bottom: 1px solid #f6f5f1 !important;
        background-color: transparent !important;
    }
    
    .nav-dropdown-menu a:hover {
        background-color: #f6f5f1 !important;
    }
    
    .nav-dropdown-menu a.active {
        background-color: #f4f6f5 !important;
        color: #0e5f5a !important;
    }
}

@media (max-width: 1200px) and (min-width: 969px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.9375rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #0e5f5a;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0;
        box-shadow: none;
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        text-align: left;
        border-radius: 0;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: none;
    }
    
    nav .container {
        position: relative;
    }
}

@media (max-width: 768px) {
    footer .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .id-card {
        padding: 1.5rem;
    }
}

/* Verification Page */
.verification-result {
    text-align: center;
    padding: 2rem;
}

.verification-success {
    color: #1f6b45;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.verification-failed {
    color: #a3322b;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #0e5f5a;
    box-shadow: none;
    padding: 1.5rem 2rem;
    z-index: 10000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text p {
    margin: 0;
    color: #0d2b2e;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.cookie-banner-text a {
    color: #0e5f5a;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #0e5f5a;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-banner-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-banner-btn-accept {
    background: #0e5f5a;
    color: white;
}

.cookie-banner-btn-accept:hover {
    background: #0e5f5a;
}

.cookie-banner-btn-reject {
    background: #f6f5f1;
    color: #0d2b2e;
    border: 1px solid #dcd8cd;
}

.cookie-banner-btn-reject:hover {
    background: #dcd8cd;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-banner-btn {
        width: 100%;
    }
}


/* Demo instance */
.demo-banner { background: #3f2766; color: #fff; text-align: center; padding: 0.55rem 1rem; font-size: 0.9rem; line-height: 1.4; }
.demo-banner strong { text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.4rem; }
.demo-login-help { border: 1px solid #d7c9ec; background: #f1ecf8; color: #3f2766; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.demo-login-help h2 { margin: 0 0 0.4rem; font-size: 1.1rem; color: #3f2766; }
.demo-login-help p, .demo-login-help ul { margin: 0 0 0.4rem; }
.demo-login-help ul { padding-left: 1.2rem; }

/* Photo carousels are shown as a plain grid of capabilities (no stock imagery, no auto-moving content). */
.features-slider-wrapper, .features-slider { overflow: visible !important; height: auto !important; }
.features-slider-track { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; transform: none !important; width: auto !important; height: auto !important; }
.feature-slide { position: static !important; width: auto !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; background: var(--surface) !important; background-image: none !important; border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; }
.feature-slide::before { display: none !important; }
.feature-slide-content { position: static !important; padding: 0 !important; text-align: left !important; }
.feature-slide-content h3 { color: var(--ink) !important; margin: 0.75rem 0 0.4rem !important; font-size: 1.15rem !important; }
.feature-slide-content p { color: var(--ink-soft) !important; margin: 0 !important; }
.feature-icon-wrapper { background: var(--brand-tint) !important; width: 52px !important; height: 52px !important; border-radius: 6px !important; margin: 0 !important; }
.feature-icon-wrapper i { color: var(--brand) !important; font-size: 1.4rem !important; }
.slider-nav, .slider-dots { display: none !important; }
@media (max-width: 760px) { .features-slider-track { grid-template-columns: 1fr; } }

/* "How a check works" panel (features hero) */
.hero-steps { aspect-ratio: auto !important; display: block !important; text-align: left; background: var(--surface) !important; border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem 1.75rem !important; font-size: 1rem !important; }
.hero-steps__title { margin: 0 0 1rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.hero-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1rem; }
.hero-steps li { counter-increment: step; display: grid; grid-template-columns: 2.2rem 1fr; column-gap: 0.75rem; }
.hero-steps li::before { content: counter(step); grid-row: span 2; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 600; border-radius: 6px; }
.hero-steps li strong { color: var(--ink); }
.hero-steps li span { color: var(--ink-soft); line-height: 1.5; }
.feature-slide-content, .feature-slide-content * { background-color: transparent !important; }
.feature-slide-content { backdrop-filter: none !important; }
.feature-icon { color: var(--brand) !important; }

/* Housing and social care page: text-led layouts now that the stock photos are gone */
.use-case-grid, .use-case-grid.reverse { grid-template-columns: minmax(0, 1fr) !important; max-width: 70ch; }
.hero-section { grid-template-columns: minmax(0, 1fr) !important; }
.timeline-marker { background: var(--ink) !important; color: #fff !important; border-radius: 6px !important; }
