/* ------------------- */
/* 1. Global Styles & Variables
/* ------------------- */
:root {
    --bg-color: rgb(17, 24, 39);
    --surface-color: rgb(31, 41, 55);
    --primary-text: rgb(229, 231, 235);
    --secondary-text: rgb(156, 163, 175);
    --accent-color: rgb(52, 211, 153);
    --accent-hover: rgb(110, 231, 183);
    --font-headings: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
}

*, *::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(--primary-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
}

/* ------------------- */
/* 2. Header
/* ------------------- */
.header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(49, 60, 79, 0.5);
}

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

.header__logo {
    font-family: var(--font-headings);
    font-size: 1.75rem;
    font-weight: 700;
}
.header__logo:hover {
    color: var(--primary-text);
}

.header__nav-list {
    display: flex;
    gap: 35px;
}

.header__nav-link {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

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

/* ------------------- */
/* 3. Footer
/* ------------------- */
.footer {
    background-color: var(--surface-color);
    padding-top: 60px;
    border-top: 1px solid rgba(49, 60, 79, 0.5);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer__column--brand {
    grid-column: span 1;
}

.footer__logo {
    font-family: var(--font-headings);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
}
.footer__logo:hover {
    color: var(--primary-text);
}

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

.footer__socials {
    display: flex;
    gap: 15px;
}

.footer__socials a {
    color: var(--secondary-text);
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer__list li {
    margin-bottom: 12px;
}

.footer__list a {
    color: var(--secondary-text);
}

.footer__list a:hover {
    color: var(--accent-hover);
}

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.footer__bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--bg-color);
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* ------------------- */
/* 4. Responsive
/* ------------------- */
@media (max-width: 900px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        padding: 20px;
        border-bottom: 1px solid rgba(49, 60, 79, 0.5);
    }
    .header__nav.is-active {
        display: block;
    }

    .header__nav-list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .header__burger-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .footer__container {
        grid-template-columns: 1fr 1fr;
    }
    .footer__column--brand {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__tagline {
        margin-left: auto;
        margin-right: auto;
    }
    .footer__socials {
        justify-content: center;
    }
    .footer__list--contacts li {
        justify-content: center;
    }
}

/* ------------------- */
/* 5. Buttons
/* ------------------- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn--primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.btn--primary:hover {
    background-color: var(--accent-hover);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(52, 211, 153, 0.2);
}


/* ------------------- */
/* 6. Hero Section
/* ------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 85px); /* Full viewport height minus header height */
    padding: 80px 0;
    text-align: center;
    overflow: hidden; /* To contain the glow background */
}

.hero__glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.1), transparent 60%);
    transform: translate(-50%, -50%);
    animation: glow-pulse 15s infinite alternate ease-in-out;
    z-index: -1;
}

@keyframes glow-pulse {
    0% {
        transform: translate(-55%, -55%) scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: translate(-45%, -45%) scale(1.1);
        opacity: 1;
    }
}

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

.hero__title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero__animated-text {
    color: var(--accent-color);
    position: relative;
}

/* Blinking cursor effect */
.hero__animated-text::after {
    content: '|';
    display: inline-block;
    animation: blink 0.7s infinite;
    font-weight: 400;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--secondary-text);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Responsive for Hero */
@media (max-width: 768px) {
    .hero {
        min-height: calc(100vh - 75px);
        padding: 60px 0;
    }
    .hero__title {
        font-size: 2.5rem;
    }
    .hero__subtitle {
        font-size: 1.1rem;
    }
    .hero__glow-bg {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }
}

/* ------------------- */
/* 7. Section Header (Reusable)
/* ------------------- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-header__title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-text);
    line-height: 1.7;
}


/* ------------------- */
/* 8. Stories Section
/* ------------------- */
.stories {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.stories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

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

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.story-card__image-wrapper {
    height: 220px;
    overflow: hidden;
}

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

.story-card:hover .story-card__image {
    transform: scale(1.05);
}

.story-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes footer stick to bottom */
}

.story-card__category {
    display: inline-block;
    align-self: flex-start; /* Makes the element only as wide as its content */
    background-color: rgba(52, 211, 153, 0.1);
    color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.story-card__title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.story-card__title a {
    transition: color 0.3s ease;
}

.story-card__title a:hover {
    color: var(--accent-color);
}

.story-card__excerpt {
    color: var(--secondary-text);
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the 'read more' link down */
}

.story-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 700;
    align-self: flex-start; /* Aligns link to the left */
    transition: gap 0.3s ease;
}

.story-card__read-more:hover {
    gap: 12px;
    text-decoration: underline;
    color: var(--accent-hover);
}

.story-card__read-more i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.story-card__read-more:hover i {
    transform: translateX(4px);
}


/* Responsive for Stories */
@media (max-width: 768px) {
    .stories {
        padding: 80px 0;
    }
    .section-header__title {
        font-size: 2.2rem;
    }
}

/* Update Button styles to include secondary */
.btn--secondary {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn--secondary:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 5px 15px rgba(52, 211, 153, 0.15);
    transform: translateY(-2px);
}


/* ------------------- */
/* 9. Career Section
/* ------------------- */
.career {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.career__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start; /* Changed to flex-start */
    margin-top: 50px;
}

.career__info-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

/* Decorative line */
.career__info-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.career__info p {
    color: var(--secondary-text);
    margin-bottom: 20px;
    line-height: 1.8;
}

.career__info .btn {
    margin-top: 20px;
}

.accordion-item {
    border-bottom: 1px solid var(--surface-color);
}

.accordion-item:first-child {
    border-top: 1px solid var(--surface-color);
}

.accordion-item__header {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.accordion-item__header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.accordion-item__title {
    font-family: var(--font-headings);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-text);
}

.accordion-item__icon {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

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

.accordion-item__text {
    padding: 0 10px 0 10px;
    color: var(--secondary-text);
    line-height: 1.7;
}

/* Active state for accordion */
.accordion-item.is-active .accordion-item__icon {
    transform: rotate(180deg);
}

.accordion-item.is-active .accordion-item__content {
    max-height: 200px; /* Adjust if content is larger */
    padding-bottom: 20px;
}

/* Responsive for Career */
@media (max-width: 900px) {
    .career__layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* ------------------- */
/* 10. Insights Section
/* ------------------- */
.insights {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.insights__scroll-wrapper {
    overflow-x: auto;
    padding: 20px 0; /* Padding to see shadows */
    /* This makes scrolling smooth on touch devices */
    -webkit-overflow-scrolling: touch; 
}

/* Custom Scrollbar */
.insights__scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}
.insights__scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}
.insights__scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}
.insights__scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.insights__grid {
    display: grid;
    grid-auto-flow: column;
    /* Each column will be at least 280px wide */
    grid-auto-columns: minmax(280px, 1fr); 
    gap: 30px;
    /* Add padding to the container to not cut off cards at edges */
    padding-left: calc((100vw - 1200px) / 2 + 20px);
    padding-right: calc((100vw - 1200px) / 2 + 20px);
}

/* Fallback for browsers not supporting calc in this context */
@media (min-width: 1240px) {
    .insights__grid {
        padding-left: 20px;
        padding-right: 20px;
    }
}
@media (max-width: 1240px) {
    .insights__grid {
        padding-left: 20px;
        padding-right: 20px;
    }
}


.insight-card {
    background: linear-gradient(145deg, #212b3f, var(--bg-color));
    border: 1px solid rgb(49, 60, 79);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.insight-card__icon {
    margin: 0 auto 20px;
    width: 60px;
    height: 60px;
    background-color: rgba(52, 211, 153, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insight-card__icon i {
    width: 30px;
    height: 30px;
    color: var(--accent-color);
}

.insight-card__title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-text);
}

.insight-card__text {
    color: var(--secondary-text);
    line-height: 1.6;
    font-size: 0.95rem;
}


/* Responsive for Insights */
@media (max-width: 768px) {
    .insights {
        padding: 80px 0;
    }
    
    .insights__scroll-wrapper {
        overflow-x: visible;
        padding: 0;
    }

    .insights__grid {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0; /* Reset padding for vertical layout */
    }
}

/* ------------------- */
/* 11. Community & Contact Section
/* ------------------- */
.community-contact {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.community-contact__layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* Image column is slightly smaller */
    gap: 60px;
    align-items: center;
}

.community-contact__image-wrapper {
    width: 100%;
    height: 100%;
}

.community-contact__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    max-height: 550px;
}

.community-contact__title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.community-contact__description {
    font-size: 1.1rem;
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    background-color: var(--surface-color);
    border: 1px solid rgb(49, 60, 79);
    border-radius: 8px;
    padding: 14px;
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--secondary-text);
    opacity: 0.7;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: rgba(52, 211, 153, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    color: var(--accent-hover);
    text-align: left;
}
.form-success i {
    flex-shrink: 0;
}


/* Responsive for Contact */
@media (max-width: 900px) {
    .community-contact__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .community-contact__image-wrapper {
        max-height: 300px;
    }
    .community-contact__title {
        font-size: 2.2rem;
    }
}

/* Update button styles to include small version */
.btn--small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ------------------- */
/* 12. Cookie Popup
/* ------------------- */
.cookie-popup {
    position: fixed;
    bottom: -150px; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-top: 1px solid rgb(49, 60, 79);
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    bottom: 0;
}

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.cookie-popup p {
    color: var(--secondary-text);
}

.cookie-popup a {
    color: var(--accent-color);
    text-decoration: underline;
}
.cookie-popup a:hover {
    color: var(--accent-hover);
}

/* Responsive for Cookie Popup */
@media (max-width: 600px) {
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}

/* ------------------- */
/* 13. Policy Pages
/* ------------------- */
.pages {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.pages .container {
    max-width: 800px; /* Narrower container for better readability */
}

.pages h1, .pages h2 {
    color: var(--primary-text);
    font-family: var(--font-headings);
    margin-bottom: 20px;
}

.pages h1 {
    font-size: 2.8rem;
    color: var(--accent-color);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--surface-color);
    padding-bottom: 20px;
}

.pages h2 {
    font-size: 1.8rem;
    margin-top: 40px;
}

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

.pages ul {
    list-style-position: inside;
    margin: 20px 0;
}

.pages li {
    margin-bottom: 10px;
}

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

.pages a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
}

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