:root {
    --primary: #003b8e;
    --primary-soft: #e2ecf8;
    --primary-soft-border: #c3d6f0;
    --primary-dark: #002c68;

    --bg: #f4f5f8;
    --bg-alt: #e7ebf2;
    --panel: #ffffff;
    --panel-soft: #f9fafc;

    --text-main: #1d2433;
    --text-muted: #6a7183;
    --border-subtle: #dde1eb;

    --error: #d64545;
    --success: #1d9a5a;

    --radius-lg: 1.25rem;
    --radius-md: 0.8rem;
    --radius-sm: 0.5rem;

    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.18);
    --shadow-subtle: 0 10px 25px rgba(15, 23, 42, 0.12);

    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text-main);
    background: radial-gradient(circle at top, #ffffff 0, #f4f5f8 45%, #edf0f6 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.page-content {
    min-height: 60vh;
}

/* Layout */

.container {
    width: min(1120px, 100% - 2.4rem);
    margin-inline: auto;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: linear-gradient(180deg, #f7f8fb 0, #eef1f8 100%);
}

.section-header {
    max-width: 640px;
    margin-bottom: 2.4rem;
}

.section-header h2 {
    font-size: clamp(1.9rem, 3vw, 2.3rem);
    margin: 0 0 0.35rem;
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
}

/* Skip link */

.skip-link {
    position: absolute;
    left: -999px;
    top: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: #111827;
    color: #ffffff;
    border-radius: 999px;
    z-index: 1000;
    font-size: 0.85rem;
}

.skip-link:focus {
    left: 0.75rem;
}

/* Header / nav / branding */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
    border-bottom-color: rgba(148, 163, 184, 0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0.65rem 0;
}

.header-brand-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.header-ukas {
    display: flex;
    align-items: center;
}

.brand-logo {
    width: auto;
    height: auto;
    max-height: 96px;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.brand-name {
    font-weight: 650;
    letter-spacing: 0.03em;
    font-size: 1rem;
    color: var(--primary-dark);
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.site-header .ukas-header-logo {
    width: auto;
    height: auto;
    max-height: 88px;
    object-fit: contain;
}

/* Navigation */

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    font-size: 0.92rem;
    padding: 0.35rem 0.3rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text-muted);
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.main-nav a:hover {
    color: var(--primary-dark);
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.main-nav a.active {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-color: var(--primary-soft-border);
}

.nav-cta {
    color: #ffffff !important;
    background: var(--primary) !important;
    border-color: transparent !important;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
}

.main-nav a.nav-cta {
    font-weight: 600;
    background: var(--primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.main-nav a.nav-cta:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

/* Nav toggle */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 999px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.93rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: var(--shadow-subtle);
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline {
    background: #ffffff;
    color: var(--primary-dark);
    border: 1px solid rgba(148, 163, 184, 0.9);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: none;
}

.btn-small {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
}

/* Hero */

.hero {
    padding: 3rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.1rem, 4vw, 2.7rem);
    margin: 0.15rem 0 0.75rem;
    color: #0f172a;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--primary-dark);
}

.lead {
    color: var(--text-muted);
    max-width: 40rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.3rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-meta .stat {
    display: block;
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--primary-dark);
}

.hero-image-card {
    position: relative;
    border-radius: 1.6rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    min-height: 260px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 260px;
    background-image: url('../img/hero-lab.png');
    background-size: cover;
    background-position: center;
}

/* Services */

.section-services {
    padding-top: 3rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.card {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.5rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.card h3 {
    margin: 0 0 0.1rem;
    font-size: 1.1rem;
    color: #0f172a;
}

.card p {
    margin: 0;
    color: var(--text-muted);
}

.card-list {
    margin: 0.6rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-list li {
    margin-bottom: 0.2rem;
}

.card-link {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

/* Subtle hover polish for cards & panels */
@media (hover: hover) {
    .card,
    .news-card,
    .form-card,
    .contact-aside,
    .admin-panel,
    .highlight-panel,
    .timeline-item {
        transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
    }

    .card:hover,
    .news-card:hover,
    .form-card:hover,
    .contact-aside:hover,
    .admin-panel:hover,
    .highlight-panel:hover,
    .timeline-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
        border-color: rgba(148, 163, 184, 0.65);
    }
}

/* Table row hover */
.admin-table tr:hover td {
    background: rgba(2, 132, 199, 0.06);
}

/* Inputs micro-polish */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(106, 113, 131, 0.75);
}

/* Highlight */

.section-highlight {
    background: linear-gradient(135deg, #f3f6fc, #e1ebfa);
}

.highlight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 2.2rem;
    align-items: start;
}

.highlight-panel {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.tick-list {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0;
    color: var(--text-muted);
}

.tick-list li {
    margin-bottom: 0.35rem;
    position: relative;
    padding-left: 1.3rem;
}

.tick-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0, #ffffff 30%, var(--primary) 100%);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0;
    margin: 0.7rem 0 0;
    list-style: none;
}

.pill-list li {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.8);
}

/* Page hero */

.page-hero {
    padding: 3rem 0 2.4rem;
}

.page-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.page-hero h1 {
    margin: 0.3rem 0 0.7rem;
    font-size: clamp(1.9rem, 3vw, 2.3rem);
    color: #0f172a;
}

.page-hero-tag {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: #ffffff;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Two-column and info panel */

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 2rem;
    align-items: start;
}

.info-panel {
    border-radius: var(--radius-lg);
    background: var(--panel);
    padding: 1.5rem 1.5rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

/* FAQ */

.faq-list {
    max-width: 720px;
}

.faq-list details {
    border-radius: var(--radius-md);
    background: var(--panel);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 0.95rem;
    margin-bottom: 0.7rem;
}

.faq-list summary {
    cursor: pointer;
    list-style: none;
    font-weight: 550;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "▾";
    float: right;
    transform: translateY(1px);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.faq-list details[open] summary::after {
    content: "▴";
}

.faq-list p {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* News */

.news-list {
    display: grid;
    gap: 1.2rem;
}

.news-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    padding: 1.2rem 1.1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.news-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.15rem;
}

.news-thumb {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(15, 30, 55, 0.12);
    box-shadow: 0 10px 30px rgba(15, 30, 55, 0.08);
}

.news-card .news-image {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(15, 30, 55, 0.10);
    overflow: hidden;
    margin: 0 0 14px 0;
}

.news-card .news-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Contact & forms */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 2rem;
}

.form-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 1.7rem 1.5rem;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.form-card.form-compact {
    padding: 1.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.form-row-inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
}

.form-row label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.field-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
    background: var(--panel-soft);
    border-radius: 0.6rem;
    border: 1px solid var(--border-subtle);
    padding: 0.55rem 0.75rem;
    color: var(--text-main);
    font: inherit;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

/* Modern select styling */
select {
    background: var(--panel-soft);
    border-radius: 0.6rem;
    border: 1px solid var(--border-subtle);
    padding: 0.55rem 2.6rem 0.55rem 0.75rem;
    color: var(--text-main);
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%236a7183' d='M5.6 7.8a1 1 0 0 1 1.4 0L10 10.8l3-3a1 1 0 1 1 1.4 1.4l-3.7 3.7a1 1 0 0 1-1.4 0L5.6 9.2a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2rem 1.2rem;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

select:hover {
    border-color: rgba(148, 163, 184, 0.95);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

select[multiple] {
    height: auto;
    background-image: none;
    padding-right: 0.75rem;
}

.has-error {
    border-color: var(--error) !important;
}

.alert {
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #ecfdf3;
    border: 1px solid #bbf0ce;
    color: var(--success);
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
}

.contact-aside {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    padding: 1.5rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.form-inline-secondary {
    margin-top: 0.4rem;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.form-inline-secondary input[type="password"] {
    max-width: 160px;
}

.form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Contact enquiry type selector */
.enquiry-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.enquiry-type-btn {
    flex: 1 1 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-dark);
    border: 1px solid rgba(148, 163, 184, 0.9);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    box-shadow: none;
}

.enquiry-type-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.enquiry-type-btn.is-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--shadow-subtle);
}

/* Checkbox grid for appliance selection */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--panel-soft);
}

.checkbox-item input {
    width: 1.05rem;
    height: 1.05rem;
}

/* Auto-growing enquiry text areas */
.form-card textarea {
    width: 100%;
    min-height: 52px;
    overflow: hidden;
    resize: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Auth & admin */

.auth-grid {
    max-width: 520px;
}

.auth-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-grid,
.admin-news-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 2rem;
}

.admin-panel {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    padding: 1.5rem 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.admin-panel h2 {
    margin-top: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 0.45rem 0.45rem;
    border-bottom: 1px solid #edf0f6;
}

.admin-table th {
    text-align: left;
    color: var(--text-muted);
}

/* Admin actions panel */
.admin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.admin-action-card {
    height: 100%;
    background: var(--panel);
    border-radius: 1.25rem;
    border: 1px solid var(--border-subtle);
    padding: 1.5rem 1.6rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.admin-action-card h2 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
}

.admin-action-card p {
    margin: 0 0 0.9rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.admin-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: flex-start;
}

/* Facility image grid */
.section-facility {
    padding-top: 3rem;
}

.facility-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.facility-card {
    background: var(--panel);
    border-radius: 1.2rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.facility-card img {
    display: block;
    width: 100%;
    height: auto;
}

.facility-card-body {
    padding: 0.9rem 1rem 1.1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.facility-card-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #0f172a;
}

/* CTA / enquiry account */

.enquiry-account-cta {
    display: flex;
    justify-content: center;
}

.enquiry-account-panel {
    max-width: 720px;
    width: 100%;
    background: var(--panel);
    border-radius: 1.5rem;
    padding: 1.7rem 1.8rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    text-align: left;
}

.enquiry-account-panel h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.enquiry-account-panel p {
    margin-top: 0;
    margin-bottom: 0.9rem;
    color: var(--text-muted);
}

.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 1.6rem;
    background: var(--panel);
    border: 1px solid var(--border-subtle);
    border-radius: 1.25rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.cta-panel h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.cta-panel p {
    margin: 0;
    color: var(--text-muted);
    max-width: 62ch;
}

.cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

/* Services inline */

.services-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.95rem;
}

.services-inline a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.services-inline a:hover {
    text-decoration: underline;
}

/* Utility / badges / notices */

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.03);
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.inline-form {
    display: block;
}

.notice {
    padding: .85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    margin: 0 0 1rem 0;
}

.notice-warn {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .35);
}

.notice-success {
    background: rgba(16, 185, 129, .12);
    border-color: rgba(16, 185, 129, .35);
}

.notice-error {
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .35);
}

/* Policy nav */

.nav-policies .nav-link {
    font-weight: 700;
}

.nav-policies .nav-link:hover {
    background: rgba(2, 132, 199, .16);
}

@media (min-width: 900px) {
    .nav-policies .nav-link.active,
    .nav-policies .nav-link:hover {
        padding: .55rem .9rem;
        border-radius: 999px;
        background: rgba(2, 132, 199, .10);
        border: 1px solid rgba(2, 132, 199, .18);
    }
}

/* Panel link */

.panel-link {
    position: relative;
}

.panel-link__cta {
    margin-top: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    color: var(--primary);
}

.panel-link:hover .panel-link__cta {
    text-decoration: underline;
}

.register-link {
    color: var(--primary) !important;
    text-decoration: underline !important;
    font-weight: 700;
}

.register-link:hover {
    opacity: .9;
}

/* Timeline */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: #fff;
}

.timeline-year {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.05rem;
}

.timeline-content {
    color: var(--text-main);
    line-height: 1.5;
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.3fr;
    gap: 2.2rem;
    padding: 2.4rem 0 1.6rem;
    font-size: 0.9rem;
}

.site-footer h3,
.site-footer h4 {
    margin-top: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.35rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: var(--primary-dark);
}

.footer-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
}

.ukas-logo {
    margin-top: 0.5rem;
    max-width: 130px;
}

/* Footer logos: Byzas + UKAS side by side, identical styling, controlled sizes */
.footer-logos {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 0.6rem;
}

.footer-logo {
    height: auto !important;
    width: auto !important;
}

/* Byzas visually larger than UKAS in footer */
.footer-logos .footer-logo:first-of-type {
    max-height: 108px;
}

.footer-logos .footer-logo:last-of-type {
    max-height: 78px;
}

/* Responsive */

@media (max-width: 960px) {
    .admin-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 880px) {
    .hero-grid,
    .highlight-grid,
    .two-column,
    .contact-grid,
    .footer-grid,
    .admin-grid,
    .admin-news-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card-grid,
    .facility-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 2.4rem;
    }

    .page-hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }

    .hero-image-card {
        order: -1;
    }

    .header-brand-group {
        gap: 0.9rem;
    }

    .brand-logo {
        max-height: 60px;
    }

    .site-header .ukas-header-logo {
        max-height: 50px;
    }
}

@media (max-width: 800px) {
    .admin-panel-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cta-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .header-inner {
        padding-block: 0.6rem;
    }

    .site-header .brand-text {
        display: none;
    }

    .site-header .brand {
        gap: 0.55rem;
    }

    .site-header .header-brand-group {
        gap: 0.7rem;
    }

    .site-header .ukas-header-logo {
        max-height: 55px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        inset-inline: 0;
        top: 100%;
        background: #ffffff;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.16s ease, opacity 0.16s ease, visibility 0.16s ease;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.7rem 1rem 1rem;
        gap: 0.4rem;
    }

    .main-nav a {
        display: block;
        width: 100%;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }
}

/* ==================================================
   Final header override: logos on top row, text below,
   smooth scroll-driven collapse without jitter
   ================================================== */
.site-header {
    --header-collapse: 0;
}

.container {
    width: min(1240px, 100% - 1.6rem);
}

.header-inner {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 1.8rem !important;
    padding: calc(0.75rem - (0.27rem * var(--header-collapse))) 0 !important;
}

.header-brand-group {
    display: grid !important;
    grid-template-columns: auto auto !important;
    grid-template-areas:
        "logo ukas"
        "text text" !important;
    column-gap: 0.95rem !important;
    row-gap: calc(0.35rem - (0.15rem * var(--header-collapse))) !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

.brand {
    display: contents !important;
}

.brand-logo {
    grid-area: logo !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(88px - (30px * var(--header-collapse))) !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    box-shadow: none !important;
    align-self: center !important;
    transform: translateY(calc(1px * var(--header-collapse))) !important;
}

.header-ukas {
    grid-area: ukas !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-self: center !important;
    opacity: 1 !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    margin: 0 !important;
}

.site-header .ukas-header-logo {
    width: auto !important;
    height: auto !important;
    max-height: calc(88px - (46px * var(--header-collapse))) !important;
    object-fit: contain !important;
    transform: none !important;
}

.brand-text {
    grid-area: text !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.1rem !important;
    margin-top: 0 !important;
    padding-left: 0.1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    max-width: 440px !important;
    max-height: calc(64px * (1 - var(--header-collapse))) !important;
    opacity: calc(1 - var(--header-collapse)) !important;
    transform: translateY(calc(-8px * var(--header-collapse))) !important;
}

.brand-name {
    font-weight: 650 !important;
    letter-spacing: 0.03em !important;
    font-size: 0.98rem !important;
    color: var(--primary-dark) !important;
    line-height: 1.2 !important;
}

.brand-tagline {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    line-height: 1.2 !important;
}

.main-nav {
    margin-left: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding-top: calc(0.42rem * (1 - var(--header-collapse))) !important;
}

.main-nav ul {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: calc(1.2rem - (0.15rem * var(--header-collapse))) !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
}

.main-nav li:first-child {
    margin-left: 0.3rem !important;
}

.main-nav li:last-child {
    margin-left: 0.55rem !important;
}

.main-nav a.active {
    padding-inline: 0.8rem !important;
}

.footer-logos .footer-logo:last-of-type {
    max-height: 90px;
}

@media (max-width: 1180px) {
    .container {
        width: min(1240px, 100% - 1.25rem);
    }

    .header-inner {
        gap: 1.1rem !important;
    }

    .brand-logo {
        max-height: calc(78px - (24px * var(--header-collapse))) !important;
    }

    .site-header .ukas-header-logo {
        max-height: calc(72px - (36px * var(--header-collapse))) !important;
    }

    .brand-text {
        max-width: 380px !important;
    }

    .main-nav ul {
        gap: calc(0.95rem - (0.08rem * var(--header-collapse))) !important;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(1240px, 100% - 1rem);
    }

    .site-header {
        --header-collapse: 0 !important;
    }

    .header-inner {
        align-items: center !important;
        gap: 0.75rem !important;
        padding: 0.6rem 0 !important;
    }

    .header-brand-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.6rem !important;
        flex: 0 1 auto !important;
    }

    .brand {
        display: contents !important;
    }

    .brand-logo {
        max-height: 56px !important;
        transform: none !important;
    }

    .site-header .ukas-header-logo {
        max-height: 44px !important;
    }

    .header-ukas {
        margin: 0 !important;
    }

    .brand-text {
        display: none !important;
        opacity: 1 !important;
        max-height: none !important;
        transform: none !important;
    }

    .main-nav {
        position: absolute !important;
        inset-inline: 0 !important;
        top: 100% !important;
        background: #ffffff !important;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08) !important;
        transform: translateY(-150%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: transform 0.16s ease, opacity 0.16s ease, visibility 0.16s ease !important;
        margin-left: 0 !important;
        padding-top: 0 !important;
    }

    .main-nav.open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .main-nav ul {
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 0.7rem 1rem 1rem !important;
        gap: 0.4rem !important;
    }

    .main-nav li:first-child,
    .main-nav li:last-child {
        margin-left: 0 !important;
    }

    .main-nav a {
        display: block !important;
        width: 100% !important;
    }

    .nav-toggle {
        display: flex !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }
}
