/* ============================================
   Magners Country Picker Styles
   HeroBanner Split Layout Implementation
   ============================================ */

/* Font Face Declarations */
@font-face {
    font-family: 'Resolve Sans Extrabold';
    src: url('assets/fonts/ResolveSansExtraboldNrw-6093479.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties (Colors) */
:root {
    --c-black: #000000;
    --c-white: #ffffff;
    --c-red: #E4002B;
    --c-skyblue: #E2EBEE;
    --c-greyblue: #789DB1;
    --c-darkgrey: #666666;
    --c-lightgrey: #bbbbbb;
    --c-grey: #999999;
    --c-blue: #002856;
    --c-green: #005C39;
    --c-gold: #C6A352;
    --c-darkgold: #C6A352;
    --c-skygold: #EFE3CE;
    --c-yellow: #FFC600;
    --c-lightgreen: #009A44;

    /* Spacing */
    --spacing-tiny: 4px;
    --spacing-xxs: 8px;
    --spacing-xs: 12px;
    --spacing-s: 16px;
    --spacing-m: 22px;
    --spacing-l: 32px;
    --spacing-xl: 40px;
    --spacing-xxl: 100px;
    --spacing-mega: 180px;

    /* Breakpoints */
    --bp-xs: 360px;
    --bp-sm: 470px;
    --bp-md: 769px;
    --bp-lg: 1023px;
    --bp-xl: 1290px;
    --bp-xxl: 1590px;

    /* Typography - Typekit font families */
    --font-body: "new-atten", "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Resolve Sans Extrabold", sans-serif;
    --font-cta: "Resolve Sans Extrabold", sans-serif;
    --font-size-base: 16px;
    --font-line-height-base: 1.5;

    /* Animation */
    --transition-easing: cubic-bezier(0.77, 0, 0.18, 1);
    --transition-duration: 0.4s;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%; /* 10px base for rem calculations */
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    position: relative;
    margin: 0;
    font-family: var(--font-body), sans-serif;
    font-size: 1.6rem;
    line-height: var(--font-line-height-base);
    text-size-adjust: 100%;
    color: var(--c-black);
    background-color: var(--c-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading), sans-serif;
    margin: 0;
    font-style: normal;
    text-rendering: optimizeLegibility;
    font-weight: 400;
}

h1, h2 {
    text-transform: uppercase;
}

h1 {
    font-size: clamp(4.6rem, 4.6rem + 2.4vw, 7rem);
    line-height: clamp(5.6rem, 5.6rem + 2.4vw, 8rem);
    line-height: 1.15;
}

h2 {
    font-size: clamp(4.2rem, 4.2rem + 0.6vw, 4.8rem);
    line-height: clamp(5.2rem, 5.2rem + 0.8vw, 6rem);
    line-height: 1.235;
}

h3 {
    font-size: clamp(2.6rem, 2.6rem + 1vw, 3.6rem);
    line-height: clamp(3.2rem, 3.2rem + 1.4vw, 4.6rem);
}

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

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

/* HeroBanner Layout */
.hero-banner {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 0;
}

@media (max-width: 1023px) {
    .hero-banner {
        flex-direction: column;
    }
}

.hero-banner__image {
    flex: 0.5;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 1023px) {
    .hero-banner__image {
        display: none;
    }
}

.hero-banner__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-banner__content {
    flex: 0.5;
    width: 100%;
    padding: 0 80px 2rem 80px;
    min-height: 100vh;
    display: flex;
    gap: 0.25rem;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    background-color: var(--c-green);
}

@media (max-width: 1023px) {
    .hero-banner__content {
        flex: 1;
        min-height: 100vh;
    }
}

@media (max-width: 769px) {
    .hero-banner__content {
        padding: 0 20px 28px 20px !important;
    }
    
    .country-picker {
        margin-top: 100px;
    }
}

@media (min-width: 1024px) and (max-width: 1289px) {
    .hero-banner__content {
        padding: 0 40px 48px 40px;
        flex: 1;
    }
    
    .country-picker {
        margin-top: 100px;
    }
}

.hero-banner__content h1,
.hero-banner__content h2,
.hero-banner__content h3,
.hero-banner__content span {
    color: var(--c-white);
}

.hero-banner__signature {
    margin-top: auto;
    width: 35%;
    opacity: 0.5;
}

.hero-banner__signature img {
    width: 100%;
    height: auto;
}

/* Country Picker */
.country-picker {
    /* Container styles - minimal, content is in hero-banner__content */
    position: relative;
    margin-top: 100px;
}

.country-picker__logo {
    text-align: center;
    margin: 0 auto;
    margin-bottom: 4.5rem;
}

.country-picker__logo img {
    width: auto;
    height: auto;
    max-width: 330.94px;
    max-height: 178.56px;
    display: block;
    margin: 0 auto;
}

.country-picker h2 {
    margin-top: 0;
    margin-bottom: 2.25rem;
    text-align: center;
}

.country-picker h3 {
    font-family: var(--font-cta), sans-serif;
    font-size: clamp(1.8rem, 1.8rem + 0.1vw, 1.9rem);
    line-height: clamp(2.3rem, 2.3rem + 0.2vw, 2.8rem);
    font-weight: 400;
    text-transform: capitalize;
    color: var(--c-white);
    margin-bottom: 16px;
    text-align: center;
}

@media (min-width: 1590px) {
    .country-picker h3 {
        font-size: clamp(1.8rem, 1.8rem + 0.3vw, 2.1rem);
        line-height: clamp(2.2rem, 2.2rem + 0.4vw, 2.6rem);
    }
}

.country-picker-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
    width: 100%;
}

.country-picker-button {
    padding: 8px 14px;
    background: transparent;
    min-width: 205px;
    width: fit-content;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 10px;
}

@media (max-width: 769px) {
    .country-picker-button {
        width: 100%;
        min-width: 100%;
    }
}

.country-picker-button:focus {
    outline: 2px solid var(--c-white);
    outline-offset: 2px;
}

.flag-image {
    width: 40px;
    height: 40px;
    border-radius: 100%;
    border: 1px solid var(--c-white);
    overflow: hidden;
    flex-shrink: 0;
}

.flag-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.country-picker-button span {
    align-content: center;
    font-family: var(--font-body), sans-serif;
    font-size: 18px;
    color: var(--c-white);
    display: flex;
    align-items: center;
    position: relative;
}

.country-picker-button span:after {
    content: "";
    display: block;
    height: 2px;
    width: 100%;
    position: absolute;
    bottom: -2px;
    left: 0;
    transform-origin: right;
    transform: scaleX(0);
    background-color: var(--c-white);
    transition: transform var(--transition-duration) var(--transition-easing);
}

@media (hover: hover) {
    .country-picker-button:focus span:after,
    .country-picker-button:hover span:after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* Accessibility */
.sr-only {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
