﻿/*
    TSE Akademi home page (screen: Anasayfa, Eğitim Detayı pencere). Script: js/akademi/home.js.
    Hero slider: 3 slides, 7 s each, 0.45 s change (style guide: Geçiş), pause / previous / next.
    Sizes: two-column hero from 992 px; below it the visual moves under the text (tablet) or hides (phone).
*/

/* ---------- Hero ---------- */
.ak-hero {
    position: relative;
    overflow: hidden;
    padding: calc(44px * var(--ak-d)) 0 calc(112px * var(--ak-d));
    background: var(--ak-navy-900);
    color: rgba(255, 255, 255, 0.86);
}

.ak-hero::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -12%;
    width: 900px;
    height: 900px;
    background: repeating-radial-gradient(circle, transparent 0 30px, rgba(255, 255, 255, 0.035) 30px 31px);
    pointer-events: none;
}

.ak-hero .ak-container { position: relative; z-index: 1; }

.ak-hero-slides { display: grid; }

.ak-hero-slide {
    display: grid;
    grid-area: 1 / 1;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: calc(36px * var(--ak-d));
    opacity: 0;
    visibility: hidden;
    transform: translateX(24px);
    transition: opacity var(--ak-transition-slide), transform var(--ak-transition-slide), visibility 0s linear var(--ak-duration-slide);
}

.ak-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

.ak-hero-slide.is-leaving { transform: translateX(-24px); }

.ak-hero-title {
    margin: 0 0 calc(20px * var(--ak-d));
    color: var(--ak-white);
    font-family: var(--ak-font-heading);
    font-size: var(--ak-fs-display);
    font-weight: 600;
    line-height: var(--ak-lh-display);
    letter-spacing: -0.01em;
}

.ak-hero-text { max-width: 540px; margin: 0 0 calc(28px * var(--ak-d)); font-size: var(--ak-fs-lead); line-height: var(--ak-lh-lead); }
.ak-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Visuals: course card + certificate, video card, certificate */
.ak-hero-visual { position: relative; display: flex; justify-content: center; min-height: 250px; }

.ak-hero-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 210px;
    padding: calc(24px * var(--ak-d));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--ak-radius-panel);
    background: var(--ak-navy-800) repeating-radial-gradient(circle at 120% 120%, transparent 0 18px, rgba(255, 255, 255, 0.06) 18px 19px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
    color: var(--ak-white);
}

.ak-hero-card-eyebrow { color: rgba(255, 255, 255, 0.7); font-size: var(--ak-fs-xs); font-weight: 600; letter-spacing: 0.12em; }
.ak-hero-card-code { margin: calc(40px * var(--ak-d)) 0 4px; font-family: var(--ak-font-heading); font-size: var(--ak-fs-h1); font-weight: 600; line-height: 1.1; }
.ak-hero-card-code small { font-size: 0.55em; font-weight: 500; }
.ak-hero-card-sub { margin: 0; color: rgba(255, 255, 255, 0.86); font-size: var(--ak-fs-body); }

.ak-hero-pill {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--ak-radius-pill);
    background: var(--ak-white);
    color: var(--ak-navy-900);
    font-size: var(--ak-fs-label);
    font-weight: 600;
}

.ak-hero-pill .bi { width: 14px; height: 14px; }

.ak-hero-cert {
    position: absolute;
    right: 0;
    bottom: -8px;
    width: 190px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--ak-white);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    color: var(--ak-navy-900);
    transform: rotate(-4deg);
    animation: ak-hero-float 6s var(--ak-ease-standard) infinite;
}

.ak-hero-cert-title { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.ak-hero-cert-title .bi { width: 14px; height: 14px; }
.ak-hero-cert-line { display: block; height: 6px; margin-bottom: 8px; border-radius: 3px; background: var(--ak-line); }
.ak-hero-cert-line.is-short { width: 60%; }
.ak-hero-cert-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.ak-hero-cert-foot svg.ak-sign { width: 52px; height: 20px; }
.ak-hero-cert-foot .bi { width: 26px; height: 26px; color: var(--ak-navy-900); }

@keyframes ak-hero-float {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-8px); }
}

/* Video visual */
.ak-hero-player {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--ak-radius-panel);
    background: linear-gradient(150deg, var(--ak-navy-800), #06264f);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.ak-hero-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: calc(-28px * var(--ak-d)) 0 0 calc(-28px * var(--ak-d));
    border-radius: 50%;
    background: var(--ak-white);
    color: var(--ak-navy-900);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.12);
    animation: ak-hero-pulse 2.4s var(--ak-ease-standard) infinite;
}

.ak-hero-play .bi { width: 30px; height: 30px; margin-left: 4px; }

@keyframes ak-hero-pulse {
    0%, 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.12); }
    50% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.04); }
}

.ak-hero-player-bar { position: absolute; right: 20px; bottom: 20px; left: 20px; }
.ak-hero-player-meta { display: flex; justify-content: space-between; margin-bottom: 8px; color: rgba(255, 255, 255, 0.8); font-size: var(--ak-fs-label); }
.ak-hero-player-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); }
.ak-hero-player-track span { display: block; width: 38%; height: 100%; border-radius: 2px; background: var(--ak-red-600); }

/* Certificate visual */
.ak-hero-certificate {
    width: 100%;
    max-width: 340px;
    padding: calc(28px * var(--ak-d));
    border: 10px solid var(--ak-white);
    border-radius: 14px;
    outline: 1px solid var(--ak-line);
    outline-offset: -18px;
    background: var(--ak-white);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    color: var(--ak-navy-900);
    text-align: center;
    transform: rotate(-2deg);
}

.ak-hero-certificate .bi-award { width: 40px; height: 40px; color: var(--ak-red-600); }
.ak-hero-certificate-title { margin: 12px 0 18px; font-family: var(--ak-font-heading); font-size: var(--ak-fs-body); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ak-hero-certificate .ak-hero-cert-line { margin-right: auto; margin-left: auto; }
.ak-hero-certificate .ak-hero-cert-line.is-name { width: 70%; height: 10px; background: var(--ak-navy-900); opacity: 0.85; }

/* Controls */
.ak-hero-controls { display: flex; align-items: center; gap: calc(24px * var(--ak-d)); margin-top: calc(36px * var(--ak-d)); }
.ak-hero-count { min-width: 58px; color: rgba(255, 255, 255, 0.7); font-size: var(--ak-fs-ui); font-variant-numeric: tabular-nums; }
.ak-hero-count b { color: var(--ak-white); font-weight: 600; }
.ak-hero-bars { display: flex; gap: 8px; }

.ak-hero-bar {
    position: relative;
    width: 52px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.ak-hero-bar::before,
.ak-hero-bar span {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 2px;
}

.ak-hero-bar::before { right: 0; background: rgba(255, 255, 255, 0.25); }
.ak-hero-bar span { width: 0; background: var(--ak-white); }
.ak-hero-bar.is-done span { width: 100%; }
.ak-hero-bar.is-active span { animation: ak-hero-progress 7s linear forwards; }
.ak-hero.is-paused .ak-hero-bar.is-active span { animation-play-state: paused; }
.ak-hero-bar:focus-visible { outline: 2px solid var(--ak-white); outline-offset: 2px; border-radius: 4px; }

@keyframes ak-hero-progress { from { width: 0; } to { width: 100%; } }

.ak-hero-nav { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Stats ---------- */
.ak-stats-band { background: var(--ak-gray-light); }
.ak-stats-band + .ak-catalog-section { padding-top: calc(52px * var(--ak-d)); }

.ak-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: calc(-48px * var(--ak-d));
    border: 1px solid var(--ak-line);
    border-radius: var(--ak-radius-panel);
    background: var(--ak-white);
    box-shadow: 0 18px 40px rgba(0, 33, 71, 0.1);
}

.ak-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: calc(20px * var(--ak-d)) 16px;
}

.ak-stat + .ak-stat { border-left: 1px solid var(--ak-line); }

.ak-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ak-blue-50);
    color: var(--ak-navy-900);
}

.ak-stat-icon .bi { width: 20px; height: 20px; }
.ak-stat-value { display: block; color: var(--ak-navy-900); font-family: var(--ak-font-heading); font-size: var(--ak-fs-h2); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ak-stat-label { display: block; color: var(--ak-text-500); font-size: var(--ak-fs-ui); }

/* ---------- Steps (Nasıl çalışır?) ---------- */
.ak-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: calc(24px * var(--ak-d));
    margin: 0 0 calc(28px * var(--ak-d));
    padding: 0;
    list-style: none;
}

.ak-step {
    position: relative;
    padding: calc(28px * var(--ak-d)) calc(24px * var(--ak-d));
    border-radius: var(--ak-radius-card);
    background: var(--ak-gray-light);
    transition: transform var(--ak-duration-base) var(--ak-ease-standard), box-shadow var(--ak-duration-base) var(--ak-ease-standard), background-color var(--ak-duration-base) var(--ak-ease-standard);
}

.ak-step:hover { background: var(--ak-white); box-shadow: var(--ak-shadow-card-hover); transform: translateY(-4px); }

.ak-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: calc(20px * var(--ak-d));
    border-radius: 12px;
    background: var(--ak-navy-900);
    color: var(--ak-white);
}

.ak-step-icon .bi { width: 22px; height: 22px; }

/* The step's number is decoration: drawn from data-no (not page text), so it needs no reading contrast */
.ak-step-no::before { content: attr(data-no); }
.ak-step-no {
    position: absolute;
    top: 24px;
    right: 24px;
    color: rgba(0, 33, 71, 0.14);
    font-family: var(--ak-font-heading);
    font-size: var(--ak-fs-h2);
    font-weight: 600;
    line-height: 1;
}

.ak-step h3 { margin: 0 0 8px; color: var(--ak-navy-900); font-size: var(--ak-fs-h4); }
.ak-step p { margin: 0; color: var(--ak-text-700); font-size: var(--ak-fs-body); line-height: 1.6; }

/* ---------- Sizes ---------- */
@media (max-width: 1199.98px) {
    .ak-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ak-hero-visual { min-height: 220px; }
    .ak-hero-card { max-width: 300px; height: 190px; }
    .ak-hero-cert { width: 170px; }
}

@media (max-width: 991.98px) {
    .ak-hero { padding: calc(36px * var(--ak-d)) 0 calc(76px * var(--ak-d)); }
    .ak-hero-slide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
    .ak-hero-visual { min-height: 0; }
    .ak-hero-card { height: 200px; padding: 18px; }
    .ak-hero-card-code { margin-top: calc(32px * var(--ak-d)); font-size: var(--ak-fs-h2); }
    .ak-hero-cert { display: none; }
}

@media (max-width: 767.98px) {
    .ak-hero-slide { grid-template-columns: 1fr; }
    .ak-hero-visual { display: none; }
    /* Large phones: icon beside the number, short cells */
    .ak-stats { margin-top: calc(-52px * var(--ak-d)); }
    .ak-stat { gap: 10px; padding: 12px 10px; }
    .ak-stat-icon { width: 32px; height: 32px; border-radius: 9px; }
    .ak-stat-icon .bi { width: 18px; height: 18px; }
    .ak-stat-value { font-size: var(--ak-fs-h3); }
    .ak-stat-label { font-size: var(--ak-fs-xs); line-height: 1.35; }
}

@media (max-width: 575.98px) {
    .ak-hero { padding: calc(28px * var(--ak-d)) 0 calc(72px * var(--ak-d)); }
    .ak-hero-title { line-height: 1.2; }

    /* Phones: three narrow cells, the small icon sits above the number */
    .ak-stat { flex-direction: column; gap: 4px; padding: 10px 6px; text-align: center; }
    .ak-stat-icon { width: 28px; height: 28px; border-radius: 8px; }
    .ak-stat-icon .bi { width: 16px; height: 16px; }
    .ak-hero-text { margin-bottom: calc(24px * var(--ak-d)); }
    .ak-hero-controls { gap: 12px; }
    .ak-hero-bar { width: 36px; }
    /* Steps as compact rows: icon on the left, title and text beside it */
    .ak-steps { grid-template-columns: 1fr; gap: 10px; }
    .ak-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; padding: 14px 16px; }
    .ak-step-icon { grid-row: 1 / span 2; width: 36px; height: 36px; margin: 0; border-radius: 10px; }
    .ak-step-icon .bi { width: 18px; height: 18px; }
    .ak-step-no { top: 12px; right: 14px; font-size: var(--ak-fs-h4); }
    .ak-step h3 { margin: 0 0 2px; padding-right: 28px; }
}

/* Touch screens: 44 px targets for the slider controls */
@media (max-width: 991.98px), (pointer: coarse) {
    .ak-hero-nav .ak-icon-btn { width: 44px; height: 44px; }
    .ak-hero-bar { height: 44px; }
}

@media (max-width: 575.98px) {
    .ak-hero-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ak-hero-cert, .ak-hero-play { animation: none; }
}
