/* ======== GOOGLE FONTS IMPORT ======== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&family=Rubik:wght@400;500&display=swap');

/* ======== CSS VARIABLES ======== */
:root {
    /* Colors */
    --color-primary: #007BFF;
    --color-primary-hover: #0056b3;
    --color-dark: #1D2C3E;
    --color-light: #F9FAFB;
    --color-gray: #6C757D;
    --color-white: #FFFFFF;
    --color-border: #E0E0E0;

    /* Fonts */
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Rubik', sans-serif;

    /* Transitions */
    --transition-fast: all 0.3s ease;

    /* Header Height */
    --header-height: 5rem; /* 80px */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
    -webkit-font-smoothing: antialiased;
    padding-top: var(--header-height); /* Offset for fixed header */
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.3;
}

/* Utility Class */
.container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ======== HEADER (Mobile First) ======== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transition: var(--transition-fast);
}

.header__container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

.header__logo-text {
    color: var(--color-dark);
}

.header__logo:hover .header__logo-text {
    color: var(--color-primary);
}

.header__toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-dark);
    z-index: 101;
}

.header__toggle:hover {
    color: var(--color-primary);
}

.header__nav {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-white);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    padding: 6rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
}

/* Active state for mobile menu */
.header__nav.is-active {
    right: 0;
}

.header__nav-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header__nav-link {
    font-family: var(--font-family-headings);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-dark);
}

.header__nav-link:hover {
    color: var(--color-primary);
}

.header__nav-link--cta {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-align: center;
}

.header__nav-link--cta:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-white);
}

/* ======== HEADER (Desktop) ======== */
@media (min-width: 992px) {
    .header__toggle {
        display: none;
    }

    .header__nav {
        position: static;
        top: auto;
        right: auto;
        width: auto;
        max-width: none;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        transition: none;
    }

    .header__nav-list {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .header__nav-link {
        font-size: 1rem;
    }

    .header__nav-link--cta {
        padding: 0.6rem 1.5rem;
    }
}

/* ======== FOOTER (Mobile First) ======== */
.footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 4rem 0 2rem;
    margin-top: 4rem; /* Spacer */
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer__logo-text {
    color: var(--color-white);
}

.footer__description {
    font-size: 0.9rem;
    color: var(--color-gray);
    max-width: 300px;
}

.footer__title {
    font-size: 1.125rem;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    font-size: 0.9rem;
    color: var(--color-gray);
}

.footer__link:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer__contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-gray);
}

.footer__contact-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.footer__copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray);
    font-size: 0.85rem;
    color: var(--color-gray);
}

/* ======== FOOTER (Tablet & Desktop) ======== */
@media (min-width: 768px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer__container {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr; /* 4 columns */
        gap: 2rem;
    }
}

/* ======== BUTTONS (Reusable) ======== */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    font-family: var(--font-family-headings);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* ======== HERO SECTION (Mobile First) ======== */
.hero {
    position: relative;
    width: 100%;
    /* 100vh - header height */
    min-height: calc(100vh - var(--header-height)); 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-dark); /* Fallback */
    overflow: hidden;
    text-align: center;
    padding: 4rem 0;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 700px;
    margin: 0 auto;
}

.hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--color-light);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ======== HERO SECTION (Desktop) ======== */
@media (min-width: 768px) {
    .hero {
        text-align: left;
    }

    .hero__content {
        margin: 0;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .hero__description {
        font-size: 1.25rem;
    }
}

/* ======== REUSABLE SECTION STYLES ======== */
.section {
    padding: 5rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__title {
    font-size: 2.5rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.section__subtitle {
    font-size: 1.125rem;
    color: var(--color-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ======== REUSABLE BUTTONS (Additions) ======== */
.btn--secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

/* ======== COURSES SECTION (Mobile First) ======== */
.courses {
    background-color: var(--color-white); /* Slightly different from body bg */
}

.courses__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.course-card {
    background-color: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.course-card__image-wrapper {
    position: relative;
    width: 100%;
    /* Aspect ratio 16:9 */
    padding-top: 56.25%; 
    overflow: hidden;
}

.course-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--color-light); /* Placeholder bg */
}

.course-card__icon {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.course-card__icon i {
    width: 24px;
    height: 24px;
}

.course-card__content {
    padding: 2.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes card content grow */
}

.course-card__title {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

.course-card__description {
    font-size: 0.95rem;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes button to the bottom */
}

.course-card__link {
    width: 100%;
}

/* ======== COURSES SECTION (Tablet & Desktop) ======== */
@media (min-width: 768px) {
    .courses__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 992px) {
    .courses__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section {
        padding: 6rem 0;
    }

    .section__title {
        font-size: 2.75rem;
    }
}

/* ======== ABOUT US SECTION (Mobile First) ======== */
.about {
    background-color: var(--color-light);
}

.about__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about__image-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.about__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Force section header to be left-aligned */
.about__content .section__header,
.about__content .section__subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.about__description {
    font-size: 1.05rem;
    color: var(--color-gray);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about__features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about__feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about__feature-item i {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 5px;
}

.about__feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.about__feature-item p {
    font-size: 0.95rem;
    color: var(--color-gray);
    line-height: 1.6;
}

/* ======== ABOUT US SECTION (Desktop) ======== */
@media (min-width: 992px) {
    .about__container {
        grid-template-columns: 1fr 1.1fr; /* Image slightly smaller */
        gap: 5rem;
    }
}

/* ======== CAREER SECTION (Mobile First) ======== */
.career {
    background-color: var(--color-white);
}

.career__content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

/* Ensure image appears after content on mobile */
.career__content {
    order: 2;
}
.career__image-wrapper {
    order: 1;
}

.career__image {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.career__sub-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.career__description {
    font-size: 1.05rem;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.career__features-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.career__features-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-dark);
}

.career__features-list i {
    color: var(--color-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.career__note {
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-top: 1rem;
}

/* Partners */
.partners {
    text-align: center;
}

.partners__title {
    font-size: 1.25rem;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
}

.partners__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: center;
}

.partner-logo {
    font-family: var(--font-family-headings);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-gray);
    opacity: 0.6;
    padding: 1rem;
    transition: var(--transition-fast);
}

.partner-logo:hover {
    opacity: 1;
    color: var(--color-dark);
}


/* ======== CAREER SECTION (Desktop) ======== */
@media (min-width: 768px) {
    .partners__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .career__content-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }

    /* Reset order for desktop */
    .career__content {
        order: 1;
    }
    .career__image-wrapper {
        order: 2;
    }
}

/* ======== FAQ SECTION (Mobile First) ======== */
.faq {
    background-color: var(--color-light);
}

.faq__container {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}

.faq__item {
    border-bottom: 1px solid var(--color-border);
}

.faq__item:last-child {
    border-bottom: none;
}

.faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--color-white);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-family-headings);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-dark);
    transition: var(--transition-fast);
}

.faq__question:hover {
    background-color: var(--color-light);
}

.faq__icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq__answer {
    max-height: 0; /* Collapsed by default */
    overflow: hidden;
    background-color: var(--color-white);
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq__answer p {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.95rem;
    color: var(--color-gray);
    line-height: 1.7;
}

/* Active state for FAQ item */
.faq__item.is-active .faq__answer {
    max-height: 200px; /* Set to a reasonable max height */
    padding-top: 0;
}

.faq__item.is-active .faq__question {
    color: var(--color-primary);
}

.faq__item.is-active .faq__icon {
    transform: rotate(180deg);
}

/* ======== FAQ SECTION (Desktop) ======== */
@media (min-width: 768px) {
    .faq__question {
        font-size: 1.25rem;
    }

    .faq__answer p {
        font-size: 1rem;
    }
}

/* ======== CONTACT SECTION (Mobile First) ======== */
.contact {
    background-color: var(--color-white);
}

.contact__form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.form__group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form__label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.form__input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-family-body);
    font-size: 1rem;
    color: var(--color-dark);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: var(--transition-fast);
}

.form__input::placeholder {
    color: var(--color-gray);
    opacity: 0.8;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Checkbox */
.form__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: -0.5rem;
}

.form__checkbox {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

.form__checkbox-label {
    font-size: 0.9rem;
    color: var(--color-gray);
    line-height: 1.5;
}

.form__checkbox-label a {
    color: var(--color-primary);
    text-decoration: underline;
}

.form__checkbox-label a:hover {
    color: var(--color-primary-hover);
}

/* Button */
.contact__btn {
    width: 100%;
    font-size: 1.125rem;
    padding: 1rem;
}

/* Success Message */
.form__success-message {
    display: none; /* Hidden by default */
    padding: 1rem;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0; /* For fade in */
    transition: opacity 0.3s ease;
}

.form__success-message.is-visible {
    display: flex; /* Show when class is added */
    opacity: 1;
}

/* ======== CONTACT SECTION (Desktop) ======== */
@media (min-width: 768px) {
    .contact__form-wrapper {
        padding: 3rem;
    }
}

/* ======== COOKIE POPUP (Mobile First) ======== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Hidden by default */
    left: 0;
    width: 100%;
    background-color: var(--color-dark);
    color: var(--color-light);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

/* 'is-visible' class will be added by JS */
.cookie-popup.is-visible {
    bottom: 0;
}

.cookie-popup__content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.cookie-popup__text {
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-popup__text a {
    color: var(--color-white);
    text-decoration: underline;
}

.cookie-popup__text a:hover {
    color: var(--color-primary);
}

.cookie-popup__btn {
    padding: 0.6rem 1.5rem;
    flex-shrink: 0;
}

/* ======== COOKIE POPUP (Desktop) ======== */
@media (min-width: 768px) {
    .cookie-popup__content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 1.5rem;
    }

    .cookie-popup__text {
        font-size: 1rem;
    }
}

.pages {
    padding: 3rem 0;
    background-color: var(--color-white);
    min-height: 60vh; /* Щоб сторінка не виглядала порожньою */
}

.pages .container {
    max-width: 800px; /* Вужчий контейнер для кращої читабельності */
}

.pages h1 {
    font-size: 1.75rem;
    color: var(--color-dark);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 1rem;
}

.pages h2 {
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.pages p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray);
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.pages li {
    font-size: 1rem;
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.pages strong {
    font-weight: 700;
    color: var(--color-dark);
}

.pages a {
    color: var(--color-primary);
    text-decoration: underline;
}

.pages a:hover {
    color: var(--color-primary-hover);
}