﻿:root {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #2f3a4c;
    background: #e9eff5;
    --bg: #e9eff5;
    --surface: #ffffff;
    --surface-muted: #f5f8fb;
    --text: #2f3a4c;
    --muted: #6f7b8a;
    --primary: #4a76a8;
    --primary-dark: #345b85;
    --border: #c9d6e3;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(960px, calc(100% - 48px));
    margin: 0 auto;
}

/* Slightly wider page content and small left offset to avoid perfectly centered layout */
main#app-content {
    padding: 24px 0 40px;
}

.page-hero,
.section {
    max-width: 980px;
    margin: 0 auto; /* center content horizontally */
    width: calc(100% - 48px);
}
a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

a:hover {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.site-header {
    background: #4a76a8;
    color: #fff;
    border-bottom: 1px solid #3a6287;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 62px;
}

.brand {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    border-bottom: none;
}

.brand:hover {
    transform: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.4rem;
    border-bottom: 1px dashed transparent;
}

.nav-links a.active,
.nav-links a:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.8);
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Auth / avatar styles */
.auth-links {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-username {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: inherit;
    text-decoration: none;
}

.auth-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}

.auth-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    min-width: 160px;
    background: #fff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.12);
    padding: 6px 0;
    display: none;
    z-index: 60;
}

.auth-username {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: inherit;
    text-decoration: none;
}

.auth-username:hover,
.auth-username:focus {
    transform: none;
    text-decoration: none;
    color: inherit;
}

.auth-menu a,
.auth-menu button {
    display: block;
    padding: 8px 14px;
    color: inherit;
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.auth-menu a:hover,
.auth-menu button:hover {
    background: #f7f9fb;
}

/* Prevent hero CTA from shifting on hover */
.button:hover {
    transform: none;
}

.lang-switcher {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.lang-switcher__item {
    padding: 0.45rem 0.8rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.lang-switcher__item.active,
.lang-switcher__item:hover {
    background: #ffffff;
    color: #4a76a8;
    border-color: #ffffff;
}

.link-like {
    background: none;
    border: none;
    color: #345b85;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.pw-row {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.pw-row input[type="password"], .pw-row input[type="text"] {
    flex: 1 1 auto;
    padding-right: 44px; /* space for the toggle */
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
}

.hero,
.section {
    padding: 64px 0;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 0.8fr;
    gap: 1.8rem;
    align-items: center;
    padding-top: 28px;
}

.page-hero__content {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.hero-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    background: #f5f8fb;
    color: var(--primary);
    font-size: 0.92rem;
    border: 1px solid #d3dde8;
}

.page-hero .eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.page-hero h1 {
    margin: 0;
    font-size: 2.7rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-hero p {
    margin: 1.2rem 0 0;
    color: var(--muted);
    max-width: 54rem;
    font-size: 1rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.button-primary {
    background: #4a76a8;
    color: #fff;
}

.button-primary:hover {
    background: #3a6287;
}

.button-secondary {
    background: #f5f8fb;
    color: var(--primary);
    border-color: #d3dde8;
}

.button-secondary:hover {
    background: #e9eff5;
}

.hero-card {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: #f5f8fb;
    border: 1px solid #d3dde8;
}

.page-hero__illustration {
    position: relative;
    display: grid;
    gap: 1rem;
}

/* visual tweaks for hero */
.page-hero__illustration .large-card h3,
.page-hero__illustration .large-card strong {
    font-size: 1.1rem;
}

.page-hero__illustration .large-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(145deg, #f5f8fb, #ffffff);
}

.page-hero__illustration .small-card {
    padding: 1.2rem 1.3rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #dfe7ef;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.page-hero__illustration .top-right {
    align-self: start;
}

.page-hero__illustration .bottom-left {
    align-self: end;
}

.page-hero__illustration::before {
    content: '';
    position: absolute;
    top: -14px;
    right: -14px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(74, 118, 168, 0.12);
    pointer-events: none;
}

.hero-card__item {
    padding: 1rem 1.2rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #dfe7ef;
}

.icon-card {
    position: relative;
}

.icon-card .icon {
    display: block;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.icon-card .icon[alt] { display:block; }

.story-section {
    padding-top: 56px;
}

.hero-card__item strong {
    display: block;
    margin-bottom: 0.4rem;
}

/* Header / auth dropdown */
.auth-links {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    position: relative;
}

.auth-links a,
.auth-links .button {
    white-space: nowrap;
}

.auth-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    color: var(--text);
    border: 1px solid #d6e1ea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    min-width: 200px;
    z-index: 80;
}

.auth-menu a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text);
}

.auth-links:hover .auth-menu,
.auth-links:focus-within .auth-menu {
    display: block;
}

/* Language modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal__bg {
    position: absolute;
    inset: 0;
    background: rgba(12,20,30,0.45);
}

.modal__panel {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    width: min(760px, 96%);
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.22);
    z-index: 10000;
}

.lang-list { display: grid; gap: 8px; }
.lang-item { padding: 10px 12px; border-radius: 8px; border: 1px solid #e6eef6; cursor: pointer; }
.lang-item:hover { background:#f5f8fb; }

/* avatar in header */
.auth-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
    border: 2px solid rgba(255,255,255,0.12);
}

/* ensure header links don't get underlined on hover */
.brand:hover, .nav-links a:hover { text-decoration: none; }

.section-header {
    max-width: 720px;
    margin-bottom: 24px;
}

.section-header h1,
.section-header h2 {
    margin: 0;
    font-size: 2rem;
}

.section-header p {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.cards-grid,
.features-grid,
.contact-grid,
.service-cards,
.about-grid,
.stats-grid,
.profile-card,
.languages-list,
.story-grid {
    display: grid;
    gap: 1rem;
}

.cards-grid,
.service-cards,
.story-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.auth-card,
.contact-card,
.contact-form,
.admin-card,
.profile-card,
.info-card {
    background: #fff;
    border: 1px solid #d3dde8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 1.6rem;
}

.feature-card {
    padding: 1.5rem;
    background: #f8fbff;
}

.feature-card.feature-strong {
    background: #eef4fb;
}

.feature-card.feature-accent {
    background: #fff2f0;
}

/* stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.stat-card {
    background: #fff;
    border: 1px solid #d6e1ea;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}

.info-card h3,
.card h3,
.feature-card h3,
.profile-card h2,
.admin-card h2 {
    margin-top: 0;
}

.info-card p,
.card p,
.feature-card p,
.profile-card p {
    color: var(--muted);
}

.contact-card {
    display: grid;
    gap: 1rem;
    grid-template-columns: 150px 1fr;
    align-items: center;
}

.contact-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(74, 118, 168, 0.15), rgba(234, 244, 255, 0.75));
}

.contact-card ul {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    color: var(--muted);
}

.contact-card li {
    margin-bottom: 0.7rem;
}

.auth-section,
.profile-page,
.admin-page,
.services-page,
.about-page {
    padding: 56px 0;
}

.auth-card,
.admin-card,
.profile-card,
.settings-card,
.contact-form {
    max-width: 560px;
    width: 100%;
}

.auth-card h1,
.admin-card h2,
.profile-card h2,
.settings-card h2 {
    margin: 0 0 1rem;
}

.auth-card p,
.profile-card ul,
.admin-card p {
    color: var(--muted);
}

.auth-card label,
.contact-form label,
.admin-form label {
    display: grid;
    gap: 0.55rem;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Ensure auth forms have proper spacing and buttons don't overlap inputs */
.auth-card form label { display:block; margin-bottom: 0.7rem; }
.auth-card input, .auth-card textarea { width:100%; box-sizing: border-box; }
.auth-card button { margin-top: 10px; }

.auth-card input,
.contact-form input,
.contact-form textarea,
.admin-form input {
    width: 100%;
    border: 1px solid #c9d6e3;
    border-radius: 6px;
    background: #f7f9fb;
    padding: 0.9rem 1rem;
    color: var(--text);
}

.settings-card {
    background: #fff;
    border: 1px solid #dfe7ee;
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.settings-form label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--text);
}

.settings-form button {
    align-self: start;
    padding: 0.95rem 1.2rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(74, 118, 168, 0.15);
}

@media (max-width: 720px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.form-messages {
    margin-bottom: 0.9rem;
}

.profile-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    color: var(--muted);
}

.profile-card li {
    margin-bottom: 0.75rem;
}

.admin-form {
    margin-top: 1rem;
}

.languages-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.language-item {
    padding: 0.9rem 1rem;
    border-radius: 6px;
    background: #f5f8fb;
    border: 1px solid #d6e1ea;
}

.language-item strong {
    display: block;
    margin-bottom: 0.35rem;
}

.alert {
    padding: 0.95rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.alert-success {
    background: #eff7f5;
    border: 1px solid #c9e3d9;
    color: #23664b;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #f0c2c3;
    color: #a32b2b;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 18px 0;
    color: var(--muted);
}

.footer-right {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.site-footer {
    background: #eef4fb;
    border-top: 1px solid #d3dde8;
}

.site-footer code {
    background: #f5fbff;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
}

@media (max-width: 900px) {
    .page-hero,
    .contact-grid,
    .about-grid,
    .cards-grid,
    .service-cards,
    .languages-list {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .page-meta {
        justify-content: space-between;
    }
}

@media (max-width: 720px) {
    .nav-links,
    .auth-links {
        flex-direction: column;
        align-items: stretch;
    }

    .lang-switcher {
        gap: 0.4rem;
    }

    .hero-buttons {
        flex-direction: column;
    }
}
