/* EB Garamond for the Ukrainian site (WordPress font service, includes Cyrillic) */
@import url('https://fonts-api.wp.com/css?family=EB+Garamond:400,400italic,500,500italic,600,600italic,700,700italic,800,800italic&display=swap');

@media (min-width: 768px) {
section.hero {
    padding-top: 13px;
    overflow-x: hidden;
    min-height: unset;
    padding-bottom: 23px;
}

section.hero .container {
    display: flex;
    justify-content: flex-start;
    position: relative;
    max-width: 1420px;
    margin: 0 auto;
    container-type: inline-size;
}

.hero__content {
    max-width: 100%;
    position: relative;
    z-index: 10;
}

section.hero p.hero__lead {
    margin: 4px 0 -12px;
    font-size: clamp(30px, 4.45cqw, 62px);
    max-width: 80%;
    line-height: 81%;
    letter-spacing: -5%;
    font-family: 'Junicode Condensed' !important;
}
.hero__title {
    margin: 0px;
    font-size: clamp(60px, 14.555cqw, 201px);
    line-height: 71%;
    letter-spacing: -5%;
    font-family: 'Junicode Condensed' !important;
}
p.hero__note {
    margin-top: 40px;
}
section.hero .hero__gallery {
    position: absolute;
    top: 0;
    right: 0;
    width: 28%;
    height: 100%;
    z-index: 1;
    left: unset;
}
	section.hero .hero__photo--1 {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: clamp(160px, 18.6cqw, 264px);
    aspect-ratio: 528 / 352;
}
section.hero .hero__photo--2 {
    position: absolute;
    width: clamp(140px, 15.99cqw, 220px);
    top: clamp(80px, 9.4cqw, 132px);
    right: clamp(40px, 6.3cqw, 90px);
}

section.hero .hero__photo--3 {
    position: absolute;
    width: clamp(100px, 12.7cqw, 181px);
    top: clamp(150px, 17.6cqw, 250px);
    right: 0;
}
.hero-cta-main {
    margin-top: 24px !important;
}
.mac-desktop section.hero p.hero__lead {
    margin: 20px 0 26px !important;
}
h1.fellowship-hero__title {
    margin: -50px 0px 0px 0px;
    font-size: clamp(60px, 14.555cqw, 180px);
    line-height: 81%;
    letter-spacing: -5%;
    font-family: 'Junicode Condensed' !important;
}
	h1.publication-header__title {
    font-size: clamp(60px, 5.73cqw, 100px);
    line-height: 81%;
    letter-spacing: -5%;
    font-family: 'Junicode Condensed' !important;
    font-weight: 700;
}
	.head-section h1, .head-section .head-title-spacer {
    margin: -50px 0px 0px 0px;
    font-size: clamp(60px, 14.555cqw, 200px);
    line-height: 81%;
    letter-spacing: -5%;
    font-family: 'Junicode Condensed';
    font-weight: 700;
}
	.head-container__cta .head-section__cta .publication-head-p {
    margin-top: 60px;
}

	a.btn--secondary.fellowship-hero__apply {
    top: clamp(30px, 4cqw, 66px);
}
	section.fellowship-hero {
    margin-bottom: 10px;
}
	.mac-desktop .head-section h1, .mac-desktop .head-section .head-title-spacer {
    margin: 10px 0px 0px 0px;
}
 .mac-desktop h1.fellowship-hero__title {
    margin: 10px 0px 0px 0px;

}
.mac-desktop	h1.publication-header__title {
    margin: 10px 0px 0px 0px;
}
.mac-desktop	a.btn--secondary.fellowship-hero__apply {
    top: 20px;
	margin-top:0px
}
	:root:lang(uk) .hero__title {
}
	    :root:lang(uk) .hero__lead {
        max-width: 82%;
        font-size: 40px;
        letter-spacing: -5%;
        font-size: clamp(15px, 2.3cqw, 33px);
        margin: 24px 0 -12px;
    }
	:root:lang(uk) .head-container__cta .head-section__cta .publication-head-p {
    margin-top: 40px;
}
	:root:lang(uk).mac-desktop .head-container__cta  .head-section__cta .publication-head-p {
    margin-top: 0px !important;
}
:root:lang(uk).mac-desktop section.hero p.hero__lead {
    margin: 20px 0 52px !important;
}
}

@media (max-width: 767px) {

section.hero p.hero__lead {

    font-family: 'Junicode Condensed';
}
.hero__title {

    font-family: Junicode Condensed;
	font-size: 60px;
}


h1.fellowship-hero__title {
    font-family: 'Junicode Condensed' !important;
	font-size: 70px;
}
	h1.publication-header__title {
    font-family: 'Junicode Condensed' !important;
    font-weight: 700;
		font-size: 70px;
}
	.head-section h1, .head-section .head-title-spacer {
    font-family: 'Junicode Condensed';
    font-weight: 700;
		font-size: 70px;
}

}

/* Language switcher: keep the underline to the ENG / UKR text only (not the hover padding) */
.lang__switcher span:nth-child(2n+1)::after {
    left: 8px;
    width: calc(100% - 16px);
}

/* Main menu: even spacing after the Join Us dropdown arrow (button was wider than the arrow) */
@media (min-width: 1024.02px) {
    .header__submenu-toggle {
        width: auto;
        margin-left: 6px;
    }
}

/* Home hero on phones: keep the original row of three photos, but make them all the same size (square, evenly spaced, with equal space above and below) */
@media (max-width: 576px) {
    section.hero .hero__gallery {
        align-items: stretch;
        margin-top: 32px;
    }
    section.hero .hero-cta-main {
        margin-top: 32px;
    }
    section.hero .hero__photo,
    section.hero .hero__photo--1,
    section.hero .hero__photo--2,
    section.hero .hero__photo--3 {
        flex: 1 1 0;
        width: auto;
        aspect-ratio: 1 / 1;
    }
    section.hero .hero__photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}


/* Mobile header: logo and ENG / UKR in better proportion, slimmer header (phones only) */
@media (max-width: 576px) {
    .header {
        padding: 18px 0;
    }
    .header__nav > a img {
        max-width: 185px;
    }
    .lang__switcher {
        gap: 6px;
    }
    .lang__switcher span {
        font-size: 15px;
    }
}

/* Mobile tap areas: invisible 44px hit zones for ENG / UKR, menu button and the Join Us arrow (looks unchanged) */
@media (max-width: 1024px) {
    .lang__switcher span a {
        position: relative;
    }
    .lang__switcher span a::before {
        content: "";
        position: absolute;
        inset: -13px -7px;
    }
    .burger {
        box-sizing: content-box;
        padding: 12px 7px;
        margin: -12px -7px;
    }
    .burger::before { top: 12px; left: 7px; width: calc(100% - 14px); }
    .burger::after { top: calc(100% - 12px - var(--burger-line-height)); left: 7px; width: calc(100% - 14px); }
    .burger .burger__line { left: 7px; width: calc(100% - 14px); }
    .burger.burger--active::before,
    .burger.burger--active::after { top: 50%; }
    .header__submenu-toggle {
        position: relative;
    }
    .header__submenu-toggle::before {
        content: "";
        position: absolute;
        inset: -13px -11px;
    }
}


/* Mobile page titles: one consistent H1 style across Home, Publications, Fellowship, Careers, Internship, Team and other page headers (phones only). The Ukrainian Internship title is left as is: it is in Cyrillic, which Junicode does not support. The extra Careers/Publications selectors override a Safari-only theme rule that forced 42px on iPhones. */
@media (max-width: 767px) {
    section.hero h1.hero__title,
    .head-section h1,
    .careers-head-section.head-section h1,
    .head-section--publications.head-section h1,
    h1.fellowship-hero__title,
    :root:not(:lang(uk)) h1.internship-hero__title {
        font-family: 'Junicode Condensed', serif !important;
        font-weight: 700 !important;
        font-size: 56px !important;
        line-height: 0.85 !important;
        letter-spacing: -0.05em !important;
    }
}


/* Desktop page titles: one consistent style on inner pages (Junicode Condensed bold, same size); Home keeps its larger landing title (tablet and desktop) */
@media (min-width: 768px) {
    .head-section h1,
    .careers-head-section.head-section h1,
    .head-section--publications.head-section h1,
    h1.fellowship-hero__title,
    :root:not(:lang(uk)) h1.internship-hero__title {
        font-family: 'Junicode Condensed', serif !important;
        font-weight: 700 !important;
        font-size: clamp(96px, 14vw, 180px) !important;
        line-height: 0.81 !important;
        letter-spacing: -0.05em !important;
    }
    .head-section:not(.head-section--publications) {
        padding-top: 30px;
    }
    .internship-hero__content {
        padding-top: 40px;
    }
}
/* Ukrainian page titles: Cyrillic falls back to a wider font, so titles are sized to match the visual width of the English ones (about 61% of the English size) */
@media (min-width: 768px) {
    :root:lang(uk) .head-section h1,
    :root:lang(uk) .careers-head-section.head-section h1,
    :root:lang(uk) .head-section--publications.head-section h1,
    :root:lang(uk) h1.internship-hero__title {
        letter-spacing: -0.02em !important;
        line-height: 0.9 !important;
    }
}
@media (max-width: 767px) {
    :root:lang(uk) .head-section h1,
    :root:lang(uk) .careers-head-section.head-section h1,
    :root:lang(uk) .head-section--publications.head-section h1,
    :root:lang(uk) h1.internship-hero__title {
        letter-spacing: -0.02em !important;
        line-height: 0.95 !important;
    }
}

/* Ukrainian Internship title: EB Garamond has deeper descenders, so it needs looser line spacing than the other titles to stay clear of the paragraph */
@media (min-width: 768px) {
    :root:lang(uk) h1.internship-hero__title {
        line-height: 1.08 !important;
    }
}


/* Ukrainian homepage steps (01. Аналітика…): scale the Playfair titles so the longest word fits the title column like English, with line spacing that keeps lines apart */
:root:lang(uk) .steps__item h2 {
    font-size: clamp(34px, 5.4vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    word-spacing: 0;
}


/* Ukrainian homepage hero: italic intro sized so the block matches the English intro height (Cyrillic needs 3 lines where English needs 2); the title stays in English at the English size */
@media (min-width: 768px) {
    :root:lang(uk) section.hero p.hero__lead {
        font-size: clamp(20px, 2.2vw, 32px);
        line-height: 1.08;
        letter-spacing: -0.02em;
        max-width: 82%;
    }
}
@media (max-width: 767px) {
    :root:lang(uk) section.hero p.hero__lead {
        font-size: 18px;
        line-height: 1.2;
        letter-spacing: -0.01em;
    }
}


/* Ukrainian headings: one Cyrillic font (EB Garamond) for all page titles, and Playfair scaled to the same letter height as the English Junicode headings so sizes read the same in both languages */
@media all {
    :root:lang(uk) .head-section h1,
    :root:lang(uk) .careers-head-section.head-section h1,
    :root:lang(uk) .head-section--publications.head-section h1,
    :root:lang(uk) h1.internship-hero__title {
        font-family: 'EB Garamond', serif !important;
        font-weight: 700 !important;
    }
    :root:lang(uk) .section__header h2,
    :root:lang(uk) h3.career-list__title,
    :root:lang(uk) h3.team-list__name,
    :root:lang(uk) h3.internship-tracks__title,
    :root:lang(uk) h3.internship-work__title,
    :root:lang(uk) h3.internship-benefits__title {
    }
    :root:lang(uk) h2.internship-facts__heading,
    :root:lang(uk) h2.internship-partners__heading,
    :root:lang(uk) h2.internship-structure__heading,
    :root:lang(uk) h2.internship-tracks__heading,
    :root:lang(uk) h2.internship-work__heading,
    :root:lang(uk) h2.internship-process__heading,
    :root:lang(uk) h2.internship-stats__heading,
    :root:lang(uk) h3.internship-stats__subheading,
    :root:lang(uk) h2.internship-faq__heading {
    }
}

/* Section headers: put the "See more" link under the title on all screen sizes, as on mobile */
.section__header:has(.section__more) {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}
/* Ukrainian "See more" link: Playfair capitals matched to the English link's capital height */
:root:lang(uk) .section__more {
    font-size-adjust: cap-height 0.665;
}


/* Publication pages: smaller "Read now" / "Download PDF" links with more space between them */
.publication-header__actions {
    gap: 28px;
}
.publication-header__actions .text-post__action {
    font-size: 46px;
    margin-top: 0;
}
:root:lang(uk) .publication-header__actions .text-post__action {
    font-size-adjust: cap-height 0.665;
}
@media (max-width: 576px) {
    .publication-header__actions {
        gap: 20px;
    }
    .publication-header__actions .text-post__action {
        font-size: 28px !important;
    }
}


/* "See more" section links: smaller on desktop (max 30px instead of 60px) */
.section__more {
    font-size: clamp(18px, 1.9vw, 30px);
}

/* Ukrainian Publications header: same description size and spacing as the English page (overrides Ukrainian-only theme rules) */
:root:lang(uk) .head-section .head-container__cta .head-section__cta p.publication-head-p {
    margin: 14px 0 24px !important;
}
@media (min-width: 768px) {
    :root:lang(uk) .head-section .head-container__cta .head-section__cta p.publication-head-p {
        margin-top: 50px !important;
    }
}
@media (max-width: 726px) {
    :root:lang(uk) .head-section .head-container__cta .head-section__cta p.publication-head-p {
        margin: 0 0 16px !important;
    }
}
@media (max-width: 576px) {
    :root:lang(uk) .head-section .head-container__cta .head-section__cta p.publication-head-p {
    }
}


/* Main menu: smaller words now that there are five items */
@media (min-width: 1280px) {
    .header__nav__menu .header__list > li > a, .header .lang__switcher a { font-size: 17px; }
    .header__nav__menu .header__list { gap: 32px; }
}
@media (min-width: 1024.02px) and (max-width: 1279px) {
    .header__nav__menu .header__list > li > a, .header .lang__switcher a { font-size: 14px; }
    .header__nav__menu .header__list { gap: 24px; }
}

/* Work With Us form: field text flush left with the intro */
.wwu-hero .serpens-form__input { padding-left: 0; padding-right: 0; font-family: Inter, sans-serif; font-size: 16px; letter-spacing: 0; }
.wwu-hero .serpens-form__input::placeholder { font-family: Inter, sans-serif; font-size: 16px; letter-spacing: 0; }
.wwu-hero .serpens-form__submit { font-family: Inter, sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0; text-transform: uppercase; padding: 14px 20px; }


/* Work With Us: wider side margins on desktop, as in the Figma (72px at 1440) */
@media (min-width: 768px) {
    .wwu-hero, .elementor-element-205bafd { --container-offset: clamp(20px, 5vw, 72px); }
}

/* Work With Us: intro + form start at the bottom point of the title's "W" (about 0.255 of the title size) */
.wwu-hero .elementor-element-d9f3bde { padding-left: 0 !important; }
@media (min-width: 768px) {
    .wwu-hero .elementor-element-d9f3bde { padding-left: 0 !important; }
}

/* Work With Us on phones: intro like Publications (16px), compact form */
@media (max-width: 767px) {
    .wwu-hero .elementor-element-e6cc43d p { font-size: 16px !important; line-height: 1.4 !important; }
    .wwu-hero .serpens-form__field { margin-bottom: 14px !important; }
    .wwu-hero .serpens-form__input { padding-top: 10px; padding-bottom: 10px; font-size: 15px; }
    .wwu-hero .serpens-form__input::placeholder { font-size: 15px; }
    .wwu-hero .serpens-form__field--textarea textarea { min-height: 84px !important; height: 84px !important; }
    .wwu-hero .serpens-form__submit { padding: 12px 18px; font-size: 13px; }
}

/* Work With Us on desktop: intro and form run to the end of the title ("Us"); title is 4.22 x its font size */
@media (min-width: 768px) {
    .wwu-hero .elementor-element-d9f3bde { width: min(59.08vw, 760px) !important; max-width: none !important; }
}

/* Links inside page intro text (e.g. Internship: Ukraine Global Scholars) */
.internship-hero__text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.internship-hero__text a:hover { opacity: .7; }

/* Internship hero (desktop): intro text hangs from the top of the title's last line, so a longer text no longer pushes the title lines apart */
@media (min-width: 1025px) {
    .internship-hero__aside { vertical-align: top !important; margin-top: .5em; }
    .internship-hero__text > br:first-child, .internship-hero__text > br:first-child + br { display: none; }
}

/* Work With Us (Ukrainian): room under the title for descenders in "Співпраця" */
:root:lang(uk) .wwu-hero .elementor-element-e6cc43d { margin-top: 10px; }
@media (min-width: 768px) {
    :root:lang(uk) .wwu-hero .elementor-element-e6cc43d { margin-top: calc(clamp(60px, 7.6vw, 110px) * 0.3); }
}


/* Ukrainian site: EB Garamond for all text; sizes, weights, capitals and spacing unchanged */
:root:lang(uk) { --font-display: 'EB Garamond', serif; }
:root:lang(uk) body,
:root:lang(uk) body *:not(svg):not(path):not(i):not([class*="icon"]) { font-family: 'EB Garamond', serif !important; }
:root:lang(uk) input::placeholder, :root:lang(uk) textarea::placeholder { font-family: 'EB Garamond', serif !important; }

/* Ukrainian homepage: the big "Serpens Center for International Security" title stays identical to English */
:root:lang(uk) section.hero h1.hero__title { font-family: 'Junicode Condensed', serif !important; }
@media (min-width: 768px) { :root:lang(uk) section.hero h1.hero__title { font-size: clamp(60px, 14.555cqw, 201px) !important; } }

/* Ukrainian site: EB Garamond letters scaled to look the same size as the English fonts (titles keep English sizes) */
:root:lang(uk) main, :root:lang(uk) footer, :root:lang(uk) [class*="modal"] { font-size-adjust: 0.5; }
:root:lang(uk) :is(.btn--standard, .btn--secondary, .hero__note, .section__more, .publications__link, .publications_list__link, .page-numbers, .cta__submit, .contact-modal__submit, .text-post__action, .serpens-ui-text--l, .serpens-ui-text--xl, .mc-serif, .mc-serif *, .hero__lead) { font-size-adjust: none !important; }
:root:lang(uk) .head-section h1, :root:lang(uk) .careers-head-section.head-section h1, :root:lang(uk) .head-section--publications.head-section h1, :root:lang(uk) h1.fellowship-hero__title { line-height: 0.92 !important; }

/* Internship header (both languages), as in the mockup: full-width title, intro text beside the last line, button below */
:root:lang(uk) h1.internship-hero__title { font-size: clamp(64px, 9.7vw, 140px) !important; line-height: 0.92 !important; }
@media (max-width: 767px) { :root:lang(uk) h1.internship-hero__title { font-size: 44px !important; } }
@media (min-width: 1025px) {
  .internship-hero__content { display: block !important; }
  .internship-hero__main { display: inline !important; }
  :root:not(:lang(uk)) h1.internship-hero__title { font-size: clamp(96px, 11.8vw, 170px) !important; line-height: 0.86 !important; display: inline !important; }
  :root:lang(uk):root h1.internship-hero__title { display: inline !important; font-size: clamp(72px, 9.7vw, 140px) !important; }
  .internship-hero__content > .internship-hero__aside { display: inline-block !important; vertical-align: top !important; width: auto !important; max-width: min(680px, 48%) !important; margin: calc(clamp(96px, 11.8vw, 170px) * 0.42) 0 0 36px !important; padding-top: 0 !important; }
  :root:lang(uk) .internship-hero__content > .internship-hero__aside { max-width: 520px !important; margin: calc(clamp(72px, 10.5vw, 150px) * 0.3) 0 0 32px !important; }
  .internship-hero__content > .internship-hero__apply { display: table !important; margin-top: 40px !important; }
  :root:not(:lang(uk)) .internship-hero__content { max-width: 1200px; }
  :root:lang(uk) .internship-hero__content { max-width: 1300px; }
}

/* Ukrainian homepage intro line: closer to the English size, same width as English */
@media (min-width: 768px) {
  :root:lang(uk) section.hero p.hero__lead { font-size: clamp(22px, 2.95vw, 42px) !important; line-height: 1.05 !important; max-width: 80% !important; }
}

/* Ukrainian form fields (they don't inherit the scaling) */
:root:lang(uk) :is(input, textarea, select), :root:lang(uk) :is(input, textarea)::placeholder { font-size-adjust: 0.5; }

/* Ukrainian headings: semi-bold and ~17% smaller so they match the weight and size of the English titles */
:root:lang(uk):root body :is(h1, h2, h3) { font-weight: 600 !important; }
:root:lang(uk) h1 { font-size-adjust: 0.34 !important; }
:root:lang(uk) :is(h2, h3) { font-size-adjust: 0.37 !important; }
:root:lang(uk) :is(.mc-serif, .mc-serif *) { font-size-adjust: none !important; }
:root:lang(uk):root body section.hero h1.hero__title { font-size-adjust: none !important; font-weight: 700 !important; }
:root:lang(uk):root h1.internship-hero__title { font-size: clamp(72px, 9.7vw, 140px) !important; }
@media (max-width: 767px) { :root:lang(uk):root h1.internship-hero__title { font-size: 52px !important; } }

/* Ukrainian paragraphs: a little more line spacing so the scaled letters don't touch */
:root:lang(uk) main p:not(.hero__lead):not(.hero__note):not(.mc-headline p) { line-height: 1.28 !important; }

/* Ukrainian paragraphs: normal letter spacing (the tight tracking was tuned for Inter) */
:root:lang(uk) main p:not(.hero__lead):not(.hero__note), :root:lang(uk) .internship-hero__text { letter-spacing: 0 !important; }

/* Site margins from the mockups (desktop): page content 72px from the edge at 1440 (scales down to 20px), header ~30px, homepage hero full width */
@media (min-width: 768px) {
  :root { --container-offset: clamp(20px, 5vw, 72px); }
  header, .header { --container-offset: clamp(20px, 2.1vw, 30px); }
  section.hero { --container-offset: 20px; }
  .team-list__row, .internship-hero__container { padding-left: var(--container-offset) !important; padding-right: var(--container-offset) !important; }
}
