@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --bg: #F4F5F7;
    --white: #FFFFFF;
    --header: #424949;
    --red: #A62C2C;
    --red-dark: #8c2525;
    --text: #464545;
    --text-muted: #777;
    --border: #E8E8E8;
    --hover: #F2F3F4;
    --transition: all 0.25s ease;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-size: 16px; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 0.9375rem; /* 15px */
}

h1 { font-size: 1.75rem;  font-weight: 500; line-height: 1.3; }
h2 { font-size: 1.375rem; font-weight: 500; line-height: 1.4; }
h3 { font-size: 1.0625rem; font-weight: 500; line-height: 1.4; }
h4 { font-size: 0.9375rem; font-weight: 500; }
p  { font-size: 0.9rem; color: var(--text); }

ul { padding-left: 1.25rem; }
li { font-size: 0.875rem; margin-bottom: 4px; color: var(--text); }

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

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

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    width: 78%;
    max-width: 1200px;
    margin: 0 auto;
}

main { padding-bottom: 60px; }

/* ============================================================
   HEADER (top utility bar)
   ============================================================ */
header {
    background-color: var(--white);
    padding: 8px 0;
}

header nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

header a {
    color: var(--header);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 7px 14px;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

header a:hover { background: var(--hover); }

header a[href="login.html"] {
    background-color: var(--red);
    color: var(--white);
    border-radius: 2px;
}

header a[href="login.html"]:hover { background-color: var(--red-dark); }

/* ============================================================
   LOGO / NAV SECTION (below top header)
   ============================================================ */
.logo-section,
section.logo.description {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.logo-section .container,
section.logo.description .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.parentLogo { height: 65px; }

.logo-section nav,
section.logo.description nav {
    display: flex;
    flex-shrink: 0;
}

.logo-section nav a,
section.logo.description nav a {
    display: block;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 8px 18px;
    border-right: 1px solid var(--border);
    transition: var(--transition);
    white-space: nowrap;
}

.logo-section nav a:last-child,
section.logo.description nav a:last-child { border-right: none; }

.logo-section nav a span,
section.logo.description nav a span {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.logo-section nav a:hover,
section.logo.description nav a:hover { background-color: var(--hover); }

/* ============================================================
   PAGE HERO BANNER (inner pages)
   ============================================================ */
.page-banner {
    background: linear-gradient(135deg, var(--header) 0%, #2c3333 100%);
    padding: 48px 0;
    color: var(--white);
    margin-bottom: 0;
}

.page-banner h1 {
    font-size: 1.875rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--white);
}

.page-banner p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin-top: 8px;
}

.page-banner .breadcrumb {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.page-section {
    padding: 50px 0;
}

.page-section + .page-section {
    border-top: 1px solid var(--border);
}

.page-section--grey {
    background: var(--bg);
}

.page-section--white {
    background: var(--white);
}

/* Section titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--header);
    margin-bottom: 8px;
    border-left: 4px solid var(--red);
    padding-left: 14px;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-left: 18px;
}

/* ============================================================
   ACCOUNT / RELATION SECTION (legacy class)
   ============================================================ */
.account.relation, section.account.relation {
    padding: 48px 0;
    background: var(--white);
}

.account.relation + .account.relation {
    border-top: 1px solid var(--border);
}

.account.relation .container > h3:first-child {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--header);
    margin-bottom: 10px;
    border-left: 4px solid var(--red);
    padding-left: 14px;
}

.account.relation .container > p:first-of-type {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    padding-left: 18px;
    max-width: 720px;
}

/* ============================================================
   CARD GRIDS  (.display-f  &  .additional-f)
   ============================================================ */
.display-f {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0 40px;
}

.additional-f {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0 40px;
}

.display-f > div,
.additional-f > div {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 24px 20px;
    transition: var(--transition);
}

.display-f > div:hover,
.additional-f > div:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.display-f img,
.additional-f img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 14px;
}

.display-f h3,
.additional-f h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--header);
}

.display-f p,
.additional-f p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   SERVICE CARDS  (.accounts / .service-card)
   ============================================================ */
.accounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0 40px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: #d9d9d9;
}

.service-card img,
.service-card svg {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}

.service-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--header);
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   EXPAT CARDS  (.expat-grid / .expat-card)
   ============================================================ */
.expat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0 40px;
}

.expat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    transition: var(--transition);
}

.expat-card:hover { box-shadow: var(--shadow-md); }

.expat-card img { width: 100%; height: 180px; object-fit: cover; }

.expat-card .content { padding: 20px; }

.expat-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--header);
}

.expat-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================================
   CONTACT  (list items, links)
   ============================================================ */
.contact-block { margin-bottom: 28px; }

.contact-block h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--header);
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.contact-block p, .contact-block a {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.8;
}

.contact-block a {
    color: var(--red);
    text-decoration: underline;
}

.contact-block a:hover { color: var(--red-dark); }

.contact-block ul li { font-size: 0.85rem; margin-bottom: 6px; }

/* ============================================================
   FORMS
   ============================================================ */
form h3 {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--header);
    margin: 20px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

form h3:first-child { margin-top: 0; }

form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--header);
    margin-bottom: 5px;
}

form input[type=text],
form input[type=password],
form input[type=date],
form input[type=tel],
form input[type=email],
form select {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 2px;
    outline: none;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s;
    margin-bottom: 0;
}

form input:focus, form select:focus { border-color: var(--red); }

form input[type=checkbox] { width: auto; display: inline; margin-right: 6px; }

form a {
    font-size: 0.8125rem;
    color: var(--red);
    text-decoration: underline;
}

.l-failed {
    background-color: #c0392b;
    color: var(--white);
    padding: 6px 10px;
    font-size: 0.8125rem;
    border-radius: 2px;
    margin-bottom: 12px;
    display: none;
}

button, .btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--red);
    color: var(--white);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: var(--transition);
    margin-top: 14px;
}

button:hover, .btn:hover { background-color: var(--red-dark); }

/* Enrollment / login form grid */
.signInField {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.signInField > div { display: flex; flex-direction: column; gap: 5px; }

/* ============================================================
   LOGIN / ENROLLMENT SECTION LAYOUT
   ============================================================ */
.login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 30px;
}

.login-panel {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 36px 32px;
}

.login-side-info {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 36px 32px;
}

.login-side-info h3 {
    font-size: 1.0625rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--header);
}

.login-side-info p, .login-side-info ul {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

/* ============================================================
   INLINE TAGS / BADGES
   ============================================================ */
.badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge--red { background: #fde8e8; color: var(--red); }
.badge--grey { background: #eee; color: var(--header); }

/* ============================================================
   BRANCH INFO / EXTERNAL LINKS
   ============================================================ */
.branch-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.branch-info:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.branch-info span.branch-name {
    display: block;
    font-weight: 500;
    color: var(--header);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.branch-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.external-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    opacity: 0.8;
}

.external-link:hover {
    color: var(--red-dark);
}

.external-link:hover svg {
    opacity: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background-color: var(--white);
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 8px;
}

/* ============================================================
   HOMEPAGE — TRADING STRIP
   ============================================================ */
.trading-strip {
    border-bottom: 1px solid var(--border);
    background: var(--white);
    overflow: hidden;
}

/* ============================================================
   HOMEPAGE — HERO SECTION
   ============================================================ */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.38), rgba(0,0,0,0.38)), url('./assets/miroshnichenko.jpg');
    background-size: cover;
    background-position: center;
    padding: 70px 0;
    min-height: 420px;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    justify-content: flex-end;
}

#homepageLogin {
    background-color: rgba(255,255,255,0.97);
    padding: 32px 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    border-top: 3px solid var(--red);
}

#homepageLogin > p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--header);
    margin-bottom: 10px;
}

#homepageLogin ul {
    margin-bottom: 18px;
    padding-left: 18px;
}

#homepageLogin li {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

#homepageLogin input {
    display: block;
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s;
}

#homepageLogin input:focus { border-color: var(--red); }

#homepageLogin button {
    width: 100%;
    padding: 11px;
    background-color: var(--red);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    margin-top: 4px;
}

#homepageLogin button:hover { background-color: var(--red-dark); }

/* ============================================================
   HOMEPAGE — SERVICES SECTION
   ============================================================ */
.services {
    padding: 56px 0;
}

.service-intro {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-left: 18px;
    max-width: 680px;
}

/* Expat-card: icon-based (no photo) variant */
.expat-card-icon {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    transition: var(--transition);
}

.expat-card-icon:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.expat-card-icon .card-header {
    background: linear-gradient(135deg, var(--header) 0%, #2c3333 100%);
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expat-card-icon .card-header svg {
    width: 48px;
    height: 48px;
    opacity: 0.9;
}

.expat-card-icon .content {
    padding: 20px;
}

.expat-card-icon h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--header);
    margin-bottom: 8px;
}

.expat-card-icon p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media only screen and (max-width: 900px) {
    .container { width: 92%; }

    .logo-section .container,
    section.logo.description .container { flex-direction: column; gap: 12px; }

    .logo-section nav,
    section.logo.description nav { overflow-x: auto; width: 100%; }

    .accounts,
    .display-f,
    .additional-f,
    .expat-grid,
    .login-layout { grid-template-columns: 1fr; }

    .signInField { grid-template-columns: 1fr; }

    .page-banner h1 { font-size: 1.375rem; }
}

@media only screen and (max-width: 600px) {
    h1 { font-size: 1.375rem; }
    h2 { font-size: 1.125rem; }
    h3 { font-size: 0.9375rem; }

    .accounts { grid-template-columns: 1fr; }

    .login-panel, .login-side-info { padding: 24px 18px; }
}
#main-nav a.active { color: var(--red); border-bottom: 2px solid var(--red); } #main-nav a.active span { color: var(--red); }