/* ====================
   GLOBAL STYLES
   ==================== */
:root {
    --bg-color: #111827;
    --surface-color: #1F2937;
    --text-color: #E5E7EB;
    --primary-color: #34D399;
    --secondary-color: #9CA3AF; /* Changed from #4B5563 for better contrast */
    --border-color: #374151;

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Roboto Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-color);
}

ul {
    list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    line-height: 1.2;
}

/* ====================
   HEADER
   ==================== */
.header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: color-mix(in srgb, var(--bg-color) 80%, transparent);
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.header__nav {
    display: none; /* Hidden on mobile */
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header__nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

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

.header__nav-link--cta {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.header__nav-link--cta:hover {
    background-color: #A7F3D0; /* Lighter shade of primary */
    color: var(--bg-color);
}

.header__burger-menu {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* ====================
   FOOTER
   ==================== */
.footer {
    background-color: var(--surface-color);
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer__tagline {
    color: var(--secondary-color);
    max-width: 250px;
}

.footer__heading {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.footer__link {
    color: var(--secondary-color);
}

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

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--secondary-color);
}

.footer__text {
    color: var(--secondary-color);
}

/* ====================
   RESPONSIVE STYLES
   ==================== */
@media (min-width: 768px) {
    body {
        font-size: 17px;
    }

    .header__nav {
        display: block; /* Show nav on tablets and desktops */
    }

    .header__burger-menu {
        display: none; /* Hide burger on tablets and desktops */
    }

    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 3rem;
    }
}


/* ====================
   BUTTON
   ==================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.8rem 1.75rem;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.button:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.button__icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.button:hover .button__icon {
    transform: translateX(5px);
}


/* ====================
   HERO SECTION
   ==================== */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    overflow: hidden;
    position: relative;
}

.hero__container {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.hero__content {
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    min-height: 90px; /* Reserve space to prevent layout shift during animation */
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero__visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 15%, transparent) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* ====================
   HERO RESPONSIVE STYLES
   ==================== */
@media (min-width: 768px) {
    .hero__content {
        text-align: left;
    }

    .hero__title {
        font-size: 3.5rem;
        min-height: 170px; /* Adjust space for larger font */
    }
    
    .hero__subtitle {
        font-size: 1.25rem;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 1024px) {
     .hero__container {
        grid-template-columns: 3fr 2fr;
        gap: 4rem;
    }
    .hero__title {
        font-size: 4rem;
    }
}

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

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .section {
        padding: 6rem 0;
    }
    .section-header__title {
        font-size: 2.75rem;
    }
}

/* ====================
   COURSES SECTION
   ==================== */
.courses__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.course-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
    box-shadow: 0 0 30px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.course-card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-color);
}

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

.course-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.course-card__title {
    font-size: 1.3rem;
    font-weight: 700;
}

.course-card__duration {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--secondary-color);
    background-color: var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.course-card__description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-body);
    font-size: 0.85rem;
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 100px; /* pill-shape */
}


/* ====================
   COURSES RESPONSIVE STYLES
   ==================== */

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

@media (min-width: 1024px) {
    .courses__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Center the 4th item on a 3-column grid */
    .courses__grid > *:nth-child(4) {
        grid-column: 2;
    }
}

@media (min-width: 1200px) {
    .courses__grid {
        grid-template-columns: repeat(4, 1fr);
    }
     /* Reset column span for 4-column grid */
    .courses__grid > *:nth-child(4) {
        grid-column: auto;
    }
}

/* ====================
   PROCESS SECTION
   ==================== */
.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 3rem; /* Space for the line and markers */
}

/* The vertical line */
.process__timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 19px; /* (Marker width / 2) - (Line width / 2) = (40/2) - (2/2) */
    width: 2px;
    background-color: var(--border-color);
}

.process__item {
    position: relative;
    margin-bottom: 3rem;
}
.process__item:last-child {
    margin-bottom: 0;
}

.process__marker {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.process__item:hover .process__marker {
    border-color: var(--primary-color);
    color: var(--text-color);
}

.process__marker i {
    width: 20px;
    height: 20px;
}

.process__content {
    padding-top: 0.25rem;
}

.process__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.process__description {
    color: var(--secondary-color);
    line-height: 1.7;
}

/* Animation styles */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ====================
   PROCESS RESPONSIVE STYLES
   ==================== */

@media (max-width: 767px) {
    .process__timeline {
        padding-left: 2.5rem;
    }
     .process__timeline::before {
        left: 14px; /* (30/2) - (2/2) */
    }
     .process__marker {
        width: 30px;
        height: 30px;
    }
    .process__marker i {
        width: 16px;
        height: 16px;
    }
    .process__title {
        font-size: 1.3rem;
    }
}

/* ====================
   FAQ SECTION
   ==================== */
.faq__list {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

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

.faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.faq__question-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

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

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

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding-bottom 0.4s ease-out;
}

.faq__answer p {
    color: var(--secondary-color);
    line-height: 1.7;
    padding-right: 2rem; /* Give text some space from the edge */
}

.faq__item.is-active .faq__answer {
    /* max-height is set by JS, but we can have a fallback */
    max-height: 300px; 
    padding-bottom: 1.5rem;
}


/* ====================
   CONTACT SECTION
   ==================== */
.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 4rem;
}

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

.contact__info-text {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    max-width: 400px;
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
/* Re-using footer list styles for contacts */
.contact__info-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.contact__info-list .footer__icon { margin-top: 5px; }


.contact__form {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.form-input.has-error {
    border-color: #F87171; /* red-400 */
}

.form-group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox {
    flex-shrink: 0;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-top: 0.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.form-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-checkbox:checked::before {
    content: '✔';
    position: absolute;
    top: -1px;
    left: 2px;
    color: var(--bg-color);
    font-size: 1rem;
}

.form-label-checkbox {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}
.form-label-checkbox a {
    text-decoration: underline;
}

.contact__submit-button {
    width: 100%;
}
.contact__submit-button:disabled {
    background-color: var(--border-color);
    color: var(--secondary-color);
    cursor: not-allowed;
}
.contact__submit-button:disabled:hover {
    background-color: var(--border-color);
    border-color: transparent;
    color: var(--secondary-color);
}
.contact__submit-button:disabled .button__icon {
    transform: none;
}

.form__error-message {
    color: #F87171;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form__success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
    .contact__form {
        padding: 2.5rem;
    }
}

/* ====================
   ABOUT SECTION
   ==================== */
.about {
    background-color: var(--surface-color);
}

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

.about__description p {
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about__description p:last-child {
    margin-bottom: 0;
}

.about__team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.team-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.team-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-card:hover .team-card__image {
    transform: scale(1.1);
}

.team-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    transition: background 0.3s ease;
}

.team-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.team-card__role {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-family: var(--font-body);
}

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

/* ====================
   COOKIE POPUP
   ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    transform: translateY(0);
}

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-popup__text {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

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

.cookie-popup__button {
    padding: 0.6rem 1.2rem; /* smaller button */
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .cookie-popup__content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ====================
   STATIC PAGES (privacy, terms, etc.)
   ==================== */
.pages {
    padding: 4rem 0;
}

.pages .container {
    max-width: 800px; /* Optimal width for reading */
}

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

.pages h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pages p, 
.pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
}

.pages p {
    margin-bottom: 1.5rem;
}

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

.pages li {
    margin-bottom: 0.75rem;
}

.pages a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

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

.pages strong {
    font-weight: 500;
    color: var(--text-color);
}

@media (max-width: 767px) {
    .pages h1 {
        font-size: 2.25rem;
    }
    .pages h2 {
        font-size: 1.5rem;
    }
    .pages p, .pages li {
        font-size: 1rem;
    }
}