/* FONT FACES */
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Thin.ttf') format('truetype'); font-weight: 100; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-ThinItalic.ttf') format('truetype'); font-weight: 100; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-ExtraLight.ttf') format('truetype'); font-weight: 200; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-ExtraLightItalic.ttf') format('truetype'); font-weight: 200; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-LightItalic.ttf') format('truetype'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-MediumItalic.ttf') format('truetype'); font-weight: 500; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-SemiBoldItalic.ttf') format('truetype'); font-weight: 600; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-ExtraBoldItalic.ttf') format('truetype'); font-weight: 800; font-style: italic; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Black.ttf') format('truetype'); font-weight: 900; font-style: normal; }
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-BlackItalic.ttf') format('truetype'); font-weight: 900; font-style: italic; }

/* BASE */
body {
    font-family: 'Raleway', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.main-content {
    flex: 1;
}

/* PAGE HEADER */
.page-header {
    position: relative;
    overflow: hidden;
    padding: 80px 40px 60px;
    padding-top: 110px;
    text-align: center;
    color: white;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: -20px; /* compensate for blur edge fade */
    background: url('../images/header_2.avif');
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    z-index: 0;
}
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #00569d80;
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

.page-title {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 48px;
    font-weight: 700;
    /*margin: 0 0 20px;*/
    letter-spacing: 1px;
}

.page-subtitle {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 20px;
    font-weight: 300;
    margin: 0;
    margin-top: 20px;
    opacity: 0.95;
}

/* ABOUT SECTIONS */
.about-section {
    padding: 80px 40px;
}

.about-section--white {
    background: #ffffff;
}

.about-section--blue {
    background: #E9F9FF;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* SECTION HEADING */
.section-heading {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #00579D;
    margin: 0 0 35px;
    padding-bottom: 14px;
    border-bottom: 2px solid #00579D;
    letter-spacing: 0.3px;
}

/* BODY TEXT */
.about-text {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
}

.about-text p {
    margin: 0 0 16px;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* PHOTO GRID */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.photo-item {
    overflow: hidden;
    border-top: 3px solid #00579D;
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.03);
}

.photo-caption {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #666;
    margin: 8px 0 0;
    padding: 0 4px 8px;
}

/* CERTIFICATES LAYOUT */
.certs-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    align-items: start;
}

.certs-layout:has(.certs-images:empty),
.certs-layout:not(:has(.certs-images)) {
    grid-template-columns: 1fr;
}

/* CERTIFICATE LIST */
.certs-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid #e0eef8;
}

.cert-item:first-child {
    padding-top: 10px;
}

.cert-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cert-bullet {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    margin-top: 0;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00579D;
    font-size: 12px;
    line-height: 1;
}

.cert-bullet::before {
    content: '◆';
}

.cert-item p {
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin: 0;
    flex: 1;
}

.cert-pdf-links {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-self: center;
    margin-left: 16px;
    flex-direction: column;
}

.cert-pdf-btn {
    display: inline-block;
    background: #00579D;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: background 0.2s ease;
    width: fit-content;
}

.cert-pdf-btn:hover {
    background: #003d75;
}

.certs-empty {
    font-family: Arial, sans-serif;
    font-size: 15px;
    color: #b2bec3;
    font-style: italic;
    padding: 20px 0;
}

.certs-intro {
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin: 0 0 32px;
}

.cert-category {
    margin: 36px 0 0;
}

.cert-category:first-of-type {
    margin-top: 0;
}

.cert-category-title {
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #00579D;
    margin: 0 0 2px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d0e4f5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-category + .certs-list {
    margin-top: 0;
}

.cert-item p strong {
    color: #00579D;
    font-weight: 700;
}

/* CERTIFICATE IMAGES */
.certs-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 100px;
}

.cert-image-link {
    display: block;
    text-decoration: none;
    border: 2px solid #dde8f4;
    transition: border-color 0.2s ease;
}

.cert-image-link:hover {
    border-color: #00579D;
}

.cert-image-link img {
    width: 100%;
    height: auto;
    display: block;
}

.cert-image-label {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #555;
    padding: 6px 10px;
    background: #f5f9ff;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .certs-layout {
        grid-template-columns: 1fr 220px;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 20px 40px;
        padding-top: 40px;
    }

    .page-title {
        font-size: 36px;
    }

    .page-subtitle {
        font-size: 17px;
    }

    .about-section {
        padding: 50px 20px;
    }

    .section-heading {
        font-size: 26px;
    }

    .about-text {
        font-size: 15px;
        margin-bottom: 35px;
    }

    .certs-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .certs-images {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cert-pdf-links {
        flex-direction: column;
        gap: 10px;
    }

    .cert-pdf-btn {
        width: fit-content;
    }

    .cert-image-link {
        width: calc(50% - 8px);
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 30px;
    }

    .section-heading {
        font-size: 22px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .cert-image-link {
        width: 100%;
    }
}

/* ===================== TIMELINE ===================== */
.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
    margin: 20px 0 0;
    --tl-top: 64px;
    --tl-bot: 100px;
}

/* Horizontal track line */
.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(var(--tl-top) + 7px);
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,86,157,0.35) 8%, rgba(0,86,157,0.35) 92%, transparent);
}

.tl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    cursor: pointer;
}

.tl-top {
    height: var(--tl-top);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
}

.tl-bot {
    height: var(--tl-bot);
}

/* Year label — always visible above dot */
.tl-year-label {
    font-size: 15px;
    font-weight: 600;
    color: #00569d;
    letter-spacing: 1px;
    opacity: 0.55;
    line-height: 1;
    transition: opacity 0.18s ease;
}
.tl-item:hover .tl-year-label,
.tl-item:focus-within .tl-year-label,
.tl-item--active .tl-year-label {
    opacity: 1;
}

/* Dot on the line */
.tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 0;
    background: #fff;
    border: 2.5px solid #00569d;
    padding: 0;
    cursor: pointer;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    transform: rotate(45deg);
    transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), background 0.18s ease, box-shadow 0.18s ease;
    outline: none;
}
.tl-item:hover .tl-dot,
.tl-item:focus-within .tl-dot,
.tl-item--active .tl-dot {
    background: #00569d;
    transform: rotate(45deg) scale(1.6);
    box-shadow: 0 0 0 5px rgba(0,86,157,0.15);
}

/* Floating event label — slides to hovered dot, below the line */
.tl-event-badge {
    position: absolute;
    top: calc(var(--tl-top) + 7px + 22px);
    left: 0;
    background: #00569d;
    color: #fff;
    padding: 8px 14px 9px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, left 0.2s ease;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 240px;
    white-space: normal;
    text-align: center;
}
.tl-badge-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.3;
}
.tl-badge-desc {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.4;
}

/* Mobile: vertical timeline */
.tl-mobile-label {
    display: none;
}

@media (max-width: 700px) {
    /* Switch to vertical layout */
    .timeline {
        flex-direction: column;
        padding: 0 0 0 20px;
        margin: 20px 0 0;
        gap: 0;
    }
    /* Vertical line */
    .timeline::before {
        left: 26px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 2px;
        height: auto;
        background: rgba(0,86,157,0.3);
    }
    .tl-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding: 14px 0;
    }
    .tl-top, .tl-bot {
        display: none;
    }
    .tl-dot {
        flex-shrink: 0;
        margin-top: 3px;
    }
    /* Mobile label — always in DOM, shown when active */
    .tl-mobile-label {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .tl-mobile-year {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1.5px;
        color: #00569d;
        opacity: 0.55;
    }
    .tl-mobile-title {
        font-size: 14px;
        font-weight: 700;
        color: #1a1a2e;
        line-height: 1.3;
    }
.tl-mobile-desc {
        font-size: 12px;
        color: #555;
        line-height: 1.45;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(.25,0,.2,1), opacity 0.3s ease;
        opacity: 0;
    }

    .tl-item--active .tl-mobile-desc {
        opacity: 1;
        max-height: 500px; 
    }
    .tl-item--active .tl-mobile-year {
        opacity: 1;
    }
    /* Hide desktop badge on mobile */
    .tl-event-badge {
        display: none;
    }
}
