
/*
Theme Name: Astana Medical Alliance
Theme URI: https://astameda.org/
Author: Astana Medical Alliance
Description: Официальная тема сайта общественного объединения Astana Medical Alliance.
Version: 1.0.8
Requires PHP: 8.0
Text Domain: ama-theme
*/

/* ==========================================
   AMA — Brand Colors
   ========================================== */

:root {
    --ama-primary: #0B7D5B;
    --ama-secondary: #0B3A6E;
    --ama-white: #FFFFFF;
    --ama-background: #F7FAFC;
    --ama-text: #243447;
}

/* ==========================================
   Base Styles
   ========================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ama-white);
    color: var(--ama-text);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--ama-primary);
}

a:hover {
    color: var(--ama-secondary);
}


/* ==========================================
   AMA — Header
   ========================================== */

.ama-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E4EAF0;
}

.ama-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.ama-header__brand {
    display: flex;
    align-items: center;
    gap: 14px;

    text-decoration: none;
}

.ama-header__symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    background: #0B7D5B;
    color: #FFFFFF;

    border-radius: 50%;

    font-size: 21px;
    font-weight: 700;
    letter-spacing: -1px;
}

.ama-header__name {
    color: #0B3A6E;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.ama-header__nav {
    margin-left: auto;
}

.ama-menu {
    display: flex;
    align-items: center;
    gap: 24px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.ama-menu a {
    color: #0B3A6E;
    text-decoration: none;
    font-weight: 500;
}

.ama-menu a:hover {
    color: #0B7D5B;
}

.ama-header__languages {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.ama-lang {
    color: #637487;
    font-size: 13px;
    font-weight: 600;
}

.ama-lang--active {
    color: #0B7D5B;
}

.ama-skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 10000;
}

.ama-skip-link:focus {
    left: 8px;
    padding: 10px 14px;
    background: #FFFFFF;
}

/* ==========================================
   AMA — Responsive Header
   ========================================== */

@media (max-width: 768px) {

    .ama-header__inner {
        flex-wrap: wrap;
        padding: 14px 18px;
        gap: 16px;
    }

    .ama-header__symbol {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .ama-header__name {
        font-size: 16px;
    }

    .ama-header__nav {
        width: 100%;
        margin-left: 0;
    }

    .ama-menu {
        flex-wrap: wrap;
        gap: 12px;
    }

    .ama-header__languages {
        margin-left: auto;
    }
}


/* ==========================================
   AMA — Main Content
   ========================================== */

.ama-main {
    background: #F7FAFC;
    min-height: 420px;
    padding: 80px 24px;
}

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

.ama-main h1 {
    color: #0B3A6E;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 28px;
}

.ama-main p {
    max-width: 720px;
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 18px;
}

/* ==========================================
   AMA — Footer
   ========================================== */

.ama-footer {
    background: #0B3A6E;
    color: #FFFFFF;
    padding: 52px 24px 28px;
}

.ama-footer__inner {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.ama-footer__about strong {
    font-size: 21px;
    font-weight: 700;
}

.ama-footer__about p {
    color: #D5E4F0;
    font-size: 15px;
    line-height: 1.6;
    margin-top: 14px;
}

.ama-footer a {
    color: #FFFFFF;
    text-decoration: none;
}

.ama-footer a:hover {
    color: #8EE0C4;
}

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

.ama-footer-menu li {
    margin-bottom: 12px;
}

.ama-footer__contact {
    overflow-wrap: anywhere;
}

.ama-footer__copyright {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 24px;
    margin-top: 12px;
    color: #C3D5E5;
    font-size: 14px;
}

/* ==========================================
   AMA — Mobile Layout
   ========================================== */

@media (max-width: 768px) {

    .ama-main {
        padding: 48px 18px;
        min-height: 300px;
    }

    .ama-main p {
        font-size: 16px;
    }

    .ama-footer {
        padding: 40px 18px 24px;
    }

    .ama-footer__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ama-footer__copyright {
        margin-top: 0;
    }
}


/* ==========================================
   AMA — Internal Pages
   ========================================== */

.ama-page__content {
    max-width: 880px;
    font-size: 18px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.ama-page__content p {
    max-width: none;
    margin: 0 0 22px;
}

.ama-page__content p,
.ama-page__content li {
    font-size: inherit;
    line-height: inherit;
}

.ama-page__content h2 {
    color: var(--ama-secondary);
    font-size: clamp(25px, 2.6vw, 30px);
    line-height: 1.3;
    margin: 44px 0 18px;
}

.ama-page__content h3 {
    color: var(--ama-primary);
    font-size: 23px;
    line-height: 1.4;
    margin: 32px 0 16px;
}

.ama-page__content ul,
.ama-page__content ol {
    padding-left: 28px;
    margin: 0 0 28px;
}

.ama-page__content li { margin-bottom: 10px; }
.ama-page__content img { max-width: 100%; height: auto; }
.ama-page__content a { text-underline-offset: 3px; }
.ama-page__content table { display: block; max-width: 100%; overflow-x: auto; }

.ama-page h1 {
    margin-top: 0;
    margin-bottom: 28px;
}

/* Preserve existing desktop wrapping behavior. */
.ama-header__inner { flex-wrap: wrap; }
.ama-header__brand { min-width: 0; }
.ama-header__nav { min-width: 0; }
.ama-menu { flex-wrap: wrap; }
.ama-lang { cursor: default; }
.ama-header__languages { margin-left: auto; }

@media (max-width: 768px) {
    .ama-page__content { font-size: 16px; line-height: 1.7; }
    .ama-page__content h3 { font-size: 20px; }
    .ama-header__name { overflow-wrap: anywhere; }
}

/* ==========================================
   Header upgrade — 1.0.3
   ========================================== */
.ama-header__brand-wrap { min-width: 0; flex-shrink: 0; }
.ama-header__brand-wrap .custom-logo-link { display: inline-flex; align-items: center; }
.ama-header__brand-wrap .custom-logo { display: block; width: auto; height: auto; max-width: 230px; max-height: 70px; }
.ama-menu-toggle { display: none; }
.ama-menu a:focus-visible, .ama-header__brand:focus-visible, .custom-logo-link:focus-visible,
.ama-menu-toggle:focus-visible { outline: 3px solid var(--ama-primary); outline-offset: 4px; }
@media (min-width: 769px) {
    .ama-header__inner { flex-wrap: nowrap; }
    .ama-menu { flex-wrap: wrap; }
}
@media (max-width: 768px) {
    .ama-header__inner { display: flex; flex-wrap: wrap; gap: 12px; }
    .ama-header__brand-wrap { flex: 1 1 auto; }
    .ama-header__brand-wrap .custom-logo { max-width: 180px; max-height: 54px; }
    .ama-menu-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #D5E0E8; border-radius: 8px; background: #fff; color: var(--ama-secondary); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
    .ama-menu-toggle__bars { display: grid; gap: 4px; }
    .ama-menu-toggle__bars span { display: block; width: 19px; height: 2px; background: currentColor; border-radius: 2px; }
    .ama-header__nav { display: none; order: 4; width: 100%; margin: 0; }
    .ama-header__nav.is-open { display: block; }
    .ama-menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; border-top: 1px solid #E4EAF0; }
    .ama-menu a { display: block; padding: 11px 8px; }
    .ama-header__languages { order: 3; width: 100%; justify-content: flex-end; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .ama-menu-toggle { scroll-behavior: auto; } }


/* ==========================================
   Homepage — 1.0.4
   ========================================== */
.ama-home { background: #fff; }
.ama-home .ama-container { width: min(100% - 48px, 1200px); margin-inline: auto; }
.ama-hero { background: linear-gradient(115deg, #f1f7fa 0%, #f7fbfc 58%, #eaf5f1 100%); padding: clamp(54px, 5.5vw, 78px) 0; }
.ama-hero__inner { max-width: 1200px; }
.ama-hero__eyebrow, .ama-section-label { color: var(--ama-primary); text-transform: uppercase; letter-spacing: .09em; font-size: 13px; font-weight: 700; margin: 0 0 20px; }
.ama-hero h1 { color: var(--ama-secondary); font-size: clamp(36px, 4.1vw, 60px); line-height: 1.15; letter-spacing: -.025em; max-width: 850px; margin: 0 0 28px; }
.ama-hero__lead { color: #344b60; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.55; max-width: 760px; margin: 0 0 34px; }
.ama-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.ama-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 12px 22px; border: 2px solid var(--ama-primary); border-radius: 8px; font-weight: 700; text-decoration: none; transition: background .15s ease, color .15s ease; }
.ama-btn--primary { background: var(--ama-primary); color: #fff; }
.ama-btn--primary:hover { background: #08664b; color: #fff; }
.ama-btn--outline { background: transparent; color: var(--ama-secondary); border-color: var(--ama-secondary); }
.ama-btn--outline:hover { background: var(--ama-secondary); color: #fff; }
.ama-btn:focus-visible { outline: 3px solid var(--ama-primary); outline-offset: 4px; }
.ama-home-section { padding: clamp(55px, 7vw, 88px) 0; scroll-margin-top: 24px; }
.ama-home-section--muted { background: var(--ama-background); }
.ama-home-section h2 { color: var(--ama-secondary); font-size: clamp(28px, 3.2vw, 42px); line-height: 1.2; margin: 0 0 22px; }
.ama-home-section__intro { max-width: 850px; font-size: 19px; margin: 0 0 28px; }
.ama-focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ama-focus-card { padding: 28px; border: 1px solid #dfe8ed; border-radius: 12px; background: #fff; }
.ama-focus-card h3 { color: var(--ama-secondary); margin: 0 0 10px; font-size: 23px; }
.ama-focus-card p { margin: 0; }
.ama-home-section__note { color: #526679; font-size: 15px; }
@media (max-width: 768px) {
  .ama-home .ama-container { width: min(100% - 36px, 1200px); }
  .ama-hero { padding: 48px 0 58px; }
  .ama-hero h1 { letter-spacing: -.02em; }
  .ama-hero__actions { flex-direction: column; align-items: stretch; }
  .ama-focus-grid { grid-template-columns: 1fr; }
  .ama-focus-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .ama-btn { transition: none; } }

/* === Hero cityscape — version 1.0.6 === */
.ama-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 550px;
  display: flex;
  align-items: center;
  background: #edf6fa;
}
.ama-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
}
.ama-hero__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 49%;
}
.ama-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgba(244,250,252,.98) 0%,
    rgba(244,250,252,.96) 29%,
    rgba(244,250,252,.85) 43%,
    rgba(244,250,252,.33) 65%,
    rgba(244,250,252,0) 88%);
  pointer-events: none;
}
.ama-hero__inner { width: min(100% - 48px, 1440px); max-width: 1440px; position: relative; z-index: 1; }
.ama-hero h1 { max-width: 810px; font-size: clamp(38px, 3.8vw, 58px); text-wrap: balance; }
.ama-hero__lead { max-width: 670px; font-size: clamp(17px, 1.3vw, 20px); }
.ama-hero__eyebrow { max-width: 680px; }
@media (min-width: 1440px) {
  .ama-hero { min-height: 600px; }
}
@media (max-width: 1024px) and (min-width: 641px) {
  .ama-hero { min-height: 520px; }
  .ama-hero::before { background: linear-gradient(90deg, rgba(244,250,252,.99) 0%, rgba(244,250,252,.94) 43%, rgba(244,250,252,.47) 75%, rgba(244,250,252,.17) 100%); }
  .ama-hero h1 { max-width: 720px; font-size: clamp(36px, 5vw, 50px); }
  .ama-hero__lead { max-width: 610px; }
}
@media (max-width: 640px) {
  .ama-hero { display: flex; flex-direction: column; min-height: 0; padding: 0; background: linear-gradient(145deg, #f0f8fb, #e9f5f0); }
  .ama-hero::before { display: none; }
  .ama-hero__inner { order: 0; width: min(100% - 36px, 560px); padding: 42px 0 28px; }
  .ama-hero__media { position: relative; order: 1; inset: auto; width: 100%; height: clamp(210px, 58vw, 340px); z-index: 0; }
  .ama-hero__media img { object-position: 66% center; }
  .ama-hero h1 { font-size: clamp(32px, 8vw, 42px); line-height: 1.14; margin-bottom: 22px; }
  .ama-hero__lead { font-size: 17px; line-height: 1.5; margin-bottom: 26px; }
  .ama-hero__eyebrow { font-size: 11px; letter-spacing: .07em; margin-bottom: 18px; }
  .ama-hero__actions { gap: 12px; }
  .ama-btn { width: 100%; }
}
@media (max-width: 360px) {
  .ama-hero__inner { width: calc(100% - 28px); }
  .ama-hero h1 { font-size: 30px; }
}

/* === Hero responsive refinements — 1.0.7 ===
   Preserve the approved Astana cityscape and desktop composition. */
@media (min-width: 1025px) {
  .ama-hero { min-height: 0; padding-block: clamp(42px, 4vw, 64px); }
  .ama-hero h1 { max-width: 780px; font-size: clamp(42px, 3.5vw, 54px); margin-bottom: 22px; }
  .ama-hero__lead { max-width: 650px; margin-bottom: 26px; }
  .ama-hero__eyebrow { margin-bottom: 17px; }
}
@media (min-width: 1440px) {
  .ama-hero { min-height: 0; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .ama-hero { min-height: 0; padding-block: 52px; }
  .ama-hero h1 { max-width: 650px; font-size: clamp(36px, 4.5vw, 46px); margin-bottom: 20px; }
  .ama-hero__lead { max-width: 570px; font-size: 18px; margin-bottom: 25px; }
  .ama-hero__eyebrow { margin-bottom: 16px; }
}
@media (max-width: 640px) {
  .ama-hero__inner { padding-block: 28px 22px; }
  .ama-hero__eyebrow { font-size: 11px; line-height: 1.4; margin-bottom: 12px; }
  .ama-hero h1 { font-size: clamp(30px, 7.2vw, 36px); line-height: 1.12; margin-bottom: 16px; }
  .ama-hero__lead { font-size: 16px; line-height: 1.45; margin-bottom: 20px; }
  .ama-hero__actions { gap: 10px; }
  .ama-hero__actions .ama-btn { min-height: 48px; padding: 10px 16px; font-size: 16px; }
  .ama-hero__media { height: clamp(190px, 52vw, 300px); }
}
@media (max-width: 360px) {
  .ama-hero__inner { padding-block: 22px 18px; }
  .ama-hero h1 { font-size: 29px; }
  .ama-hero__lead { font-size: 15px; }
  .ama-hero__media { height: 190px; }
}

/* === AMA 1.0.8: dedicated mobile hero composition ===
   The mobile cityscape is a single decorative background, not a separate image below CTA.
   HTML heading, paragraph and links remain selectable and accessible. */
@media (max-width: 767px) {
  .ama-hero {
    display: block;
    min-height: 0;
    padding: 0;
    align-items: initial;
    background-color: #eff8fb;
    background-image: url('assets/images/hero/astana-hero-mobile-960.webp');
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center top;
  }
  .ama-hero::before { display: none; }
  .ama-hero__media { display: none; }
  .ama-hero__inner {
    display: block;
    width: min(calc(100% - 36px), 560px);
    max-width: 560px;
    margin-inline: auto;
    padding: clamp(220px, 60vw, 390px) 0 44px;
  }
  .ama-hero__eyebrow { font-size: 11px; line-height: 1.4; margin-bottom: 12px; }
  .ama-hero h1 { font-size: clamp(30px, 7.3vw, 42px); line-height: 1.12; margin: 0 0 18px; max-width: 100%; }
  .ama-hero__lead { font-size: clamp(15px, 3.7vw, 18px); line-height: 1.5; margin: 0 0 24px; max-width: 100%; }
  .ama-hero__actions { display: flex; flex-direction: column; align-items: stretch; gap: 11px; }
  .ama-hero__actions .ama-btn { width: 100%; min-height: 50px; padding: 12px 16px; font-size: 16px; }
}
@media (max-width: 480px) {
  .ama-hero { background-image: url('assets/images/hero/astana-hero-mobile-640.webp'); }
  .ama-hero__inner { padding-top: clamp(215px, 60vw, 285px); padding-bottom: 34px; }
}
@media (max-width: 360px) {
  .ama-hero__inner { width: calc(100% - 30px); }
  .ama-hero h1 { font-size: 29px; }
}
