@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: 60px;
}
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: 50px !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 {
    font-size: clamp(60px, 14.555cqw, 201px);
}
	    :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;
    }
    section.hero > .container:not(.hero-cta-main) {
        max-width: var(--container-width);
    }
}
/* Home intro line: upright Junicode Condensed instead of italic, slightly larger, with line spacing that doesn't let lines overlap */
section.hero p.hero__lead {
    font-style: normal;
}
@media (min-width: 768px) {
    section.hero p.hero__lead {
        font-size: clamp(34px, 5cqw, 70px);
        line-height: 1.05;
        margin-bottom: 26px !important;
    }
}
@media (max-width: 767px) {
    section.hero p.hero__lead {
        font-size: 24px;
        line-height: 1.15;
    }
}


/* 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 {
        font-size: clamp(60px, 7.6vw, 110px) !important;
        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 {
        font-size: 34px !important;
        letter-spacing: -0.02em !important;
        line-height: 0.95 !important;
    }
}

/* Ukrainian Internship title: Playfair Display 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: Ukrainian intro sized to match the English hero visually (Cyrillic runs wider); the title stays in English at the English size */
@media (min-width: 768px) {
    :root:lang(uk) section.hero p.hero__lead {
        font-size: clamp(24px, 3.5vw, 50px);
        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;
    }
}
