@keyframes category-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.about-image {
    width: 50%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 5px 8px 15px rgba(0, 0, 0, 0.6);
}
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}
.about-intro .about-image {
    width: 100%;
    height: auto;
    margin: -70px 0 -120px;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
.about-intro-text {
    position: relative;
    z-index: 1;
}
.about-page {
    padding-left: 5%;
    padding-right: 5%;
    background: var(--black);
}
.about-page .about-intro p {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.8;
    color: #cfcfcf;
    margin: 0 0 22px;
    text-align: left;
}
.about-page .about-intro p.about-quote {
    font-size: clamp(1.4rem, 2.2vw, 2.2rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--white);
    margin-bottom: 36px;
}
.about-page .container {
    max-width: none;
}
.about-page .second > p {
    text-align: center;
}
.about-page h1 {
    text-align: left;
    margin-bottom: 20px;
    margin-top: 40px;
    font-size: 20px;
    font-weight: 300;
    text-shadow: #919191 5px 5px 5px;
    scroll-margin-top: 100px;
}
.about-page h2 {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
    text-shadow: #0a0a0a 5px 5px 5px;
    scroll-margin-top: 100px;
}
.about-page p {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    max-width: none;
    margin: 20px 0;
    font-size: 1.2rem;
    text-align: justify;
}
.achievements {
    position: relative;
    margin-right: -5vw;
    padding-right: min(38vw, 560px);
    overflow: hidden;
}
.achievements-driver {
    position: absolute;
    right: -150px;
    top: 20px;
    width: min(40vw, 580px);
    height: auto;
    opacity: 1;
    filter: brightness(0.7) contrast(1.05);
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.achievements-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    margin: 60px 0 40px 0;
}
.achievements-heading-text {
    position: relative;
    z-index: 2;
    text-align: center;
}
.achievements-heading-text h2 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(0, 171, 162, 0.9), rgba(255, 255, 255, 0.95));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin: 0;
    padding: 20px 0;
}
.categories-container {
    margin: 60px 0;
    max-width: none;
}
.categories-container.tabs-on .category-item {
    display: none;
}
.categories-container.tabs-on .category-item.active {
    display: flex;
    animation: category-fade 0.4s ease;
}
.category-abbr {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    font-size: clamp(8rem, 18vw, 19rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 5px;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.13);
    text-shadow: none;
}
.category-full,
.category-item p {
    position: relative;
    z-index: 1;
}
.category-full {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}
.category-item {
    margin: 0;
    padding: 80px 6%;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.category-item p {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.category-tab {
    font-family: inherit;
    font-size: 2.4rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.4);
    background: none;
    border: none;
    border-bottom: 3px solid rgba(255, 255, 255, 0.15);
    padding: 18px 64px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.category-tab:hover,
.category-tab.active {
    color: var(--white);
    border-bottom-color: var(--accent);
}
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 50px 0 0;
}
.dynamic-controls:not([hidden]) {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 40px;
}
.dynamic-controls button {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.dynamic-controls button:hover:not(:disabled),
.dynamic-controls button:focus-visible {
    border-color: var(--white);
    color: var(--accent);
}
.dynamic-controls button:disabled {
    opacity: 0.3;
    cursor: default;
}
.event-card {
    background: rgba(10, 10, 10, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    border: 2px solid rgba(0, 171, 162, 0.2);
}
.event-card:hover {
    border-color: var(--white);
    box-shadow: 0 20px 40px rgba(0, 171, 162, 0.3);
}
.event-card:hover .event-image {
    transform: scale(1.1);
}
.event-content {
    padding: 25px;
}
.event-content p {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--white);
    margin: 0;
    text-align: left;
}
.event-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}
.event-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.event-list {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin: 10px 0 20px 20px;
    text-align: left;
}
.event-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 25px 20px;
    min-height: 150px;
    display: flex;
    align-items: flex-start;
}
.event-title {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}
.first h2 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #767575 5px 5px 5px;
}
.fourth .dinamic-events {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 32px;
    margin: 24px 0 60px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-color: #777 transparent;
    scrollbar-width: thin;
    padding: 24px 0 20px;
}
.fourth .dinamic-events .event-card {
    flex: 0 0 min(68%, 800px);
    min-width: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    scroll-snap-align: start;
    text-align: left;
}
.fourth .dinamic-events .event-card:hover {
    transform: none;
    box-shadow: none;
}
.fourth .event-card:hover .event-image-wrapper {
    box-shadow: 0 0 24px rgba(0, 171, 162, 0.5);
}
.fourth .event-card:hover .event-image {
    transform: none;
}
.fourth .event-content {
    padding: 24px 0 0;
}
.fourth .event-content p {
    text-align: left;
    color: #cfcfcf;
}
.fourth .event-content p + p {
    margin-top: 16px;
}
.fourth .event-image {
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}
.fourth .event-image-wrapper {
    transition: box-shadow 0.4s ease;
}
.fourth .event-overlay {
    min-height: 0;
    align-items: flex-end;
    padding: 70px 28px 24px;
}
.fourth h1 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #767575 5px 5px 5px;
}
.second h1 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #767575 5px 5px 5px;
}
.static-events,
.dinamic-events {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
}
.static-events .event-card,
.dinamic-events .event-card {
    flex: 0 0 calc((100% - 80px) / 3);
    min-width: 320px;
}
.third h1 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #989898 5px 5px 5px;
}
.timeline-container {
    position: relative;
    max-width: 1100px;
    margin: 60px auto;
}
.timeline-line {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 154px;
    width: 1px;
    background: rgba(255, 255, 255, 0.25);
}
.timeline-year {
    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 56px;
    text-align: left;
}
.timeline-year:last-child {
    padding-bottom: 0;
}
.year-dot {
    flex: 0 0 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--black);
    border: 2px solid var(--white);
}
.year-label {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 800;
    margin: 0;
    color: var(--white);
}
.year-marker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    align-self: start;
}
.year-results {
    min-width: 0;
}
.year-results .place-bronze {
    color: #cd7f32;
}
.year-results .place-gold {
    color: #d4af37;
}
.year-results .place-label {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: #bfbfbf;
}
.year-results .place-silver {
    color: #c0c0c0;
}
.year-results .result-competition {
    color: var(--accent);
}
.year-results .result-place {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-right: 0.5em;
    vertical-align: baseline;
    white-space: nowrap;
}
.year-results .result-place sup {
    font-size: 0.45em;
    line-height: 0;
    vertical-align: baseline;
}
.year-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.year-results ul li {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfcfcf;
    font-size: 1rem;
    line-height: 1.6;
}
.year-results ul li:first-child {
    padding-top: 4px;
}
.year-results ul li:first-child.result-wrapped {
    padding-top: 10px;
}
.year-results ul li b {
    color: var(--white);
}
.year-results ul li.result-wrapped {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 1em;
}
.year-results ul li.result-wrapped .result-place {
    margin-right: 0;
    transform: translateY(-4px);
}
/* About/Rólunk Page Styles */

.about-preview,
.about-page {
    background: var(--white);
    color: rgb(255, 255, 255);
    background-image:
    linear-gradient(
      rgb(0, 0, 0),
      rgb(0, 0, 0),
      rgba(0, 171, 162, 0.6)
    ),
    url('../images/logo1.png');
    transition: background 0.9s ease;
}

.about-page {
    background: #000;
    background-image: none;
}

@media (max-width: 900px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .achievements {
        margin-right: 0;
        padding-right: 0;
        display: flex;
        flex-direction: column;
    }

    .achievements-driver {
        position: static;
        order: 2;
        align-self: center;
        width: min(70%, 280px);
        margin: 10px -5vw 20px auto;
        opacity: 0.9;
        filter: brightness(0.65) contrast(1.05);
    }

    .achievements-heading {
        order: 1;
    }

    .achievements .timeline-container {
        order: 3;
        width: 100%;
    }

    .achievements-heading-text h2 {
        font-size: 2.2rem;
        padding: 15px 0;
    }

    .category-tab {
        padding: 12px 22px;
        font-size: 1.5rem;
    }

    .category-tabs {
        gap: 14px;
    }

    .category-abbr {
        font-size: 6rem;
    }

    .static-events,
    .dinamic-events {
        display: grid;
        grid-template-columns: 1fr;
    }

    .static-events .event-card,
    .dinamic-events .event-card {
        min-width: 0;
    }

    .static-events {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-title {
        font-size: 1.4rem;
    }

    .fourth .dinamic-events {
        gap: 20px;
    }

    .fourth .dinamic-events .event-card {
        flex-basis: 88%;
    }

    .timeline-container {
        margin: 40px auto 60px;
    }

    .timeline-line {
        left: 69px;
        top: 8px;
        bottom: 8px;
    }

    .timeline-year {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 20px;
        padding-bottom: 36px;
    }

    .year-label {
        font-size: 1.45rem;
    }

    .year-results ul li {
        font-size: 0.9rem;
    }
}
.linkedin-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1);
}

.linkedin-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.3);
}

@media (prefers-reduced-motion: reduce) {
    .fourth .dinamic-events {
        scroll-behavior: auto;
    }
}
