/* ===================================================================
   Archelms Frontend - Global Styles
   =================================================================== */

:root {
    --container-max: 1468px;
    --primary: #5f76e8;
    --dark: #1a1a2e;
    --topbar-height: 90px;
}

/* Fixed Top Bar (90px) */
#topbar {
    min-height: var(--topbar-height);
    height: var(--topbar-height);
    background: rgb(21, 26, 34) !important;
}
#topbar .navbar-brand {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 0;
}
#topbar .brand-sub {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    display: block;
}
#topbar .nav-link {
    font-size: 0.85rem;
    padding-top: 0;
    padding-bottom: 0;
    line-height: var(--topbar-height);
    color: #fff;
}
#topbar .nav-link.active,
#topbar .nav-link:hover {
    color: #D67054;
}

/* User icon circle */
.user-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #88321A;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.user-icon-circle:hover {  
    color: #fff;
	background: #D67054;
}

/* Kullanıcı açılır menüsü */
.user-dropdown {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px;
    min-width: 200px;
}
.user-dropdown .dropdown-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #88321A;
    padding: 6px 12px;
}
.user-dropdown .dropdown-divider {
    margin: 6px 0;
}
.user-dropdown .dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #333;
}
.user-dropdown .dropdown-item:hover {
    background: rgba(136, 50, 26, 0.08);
    color: #88321A;
}
.user-dropdown .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}
#topbar .navbar-toggler {
    padding: 2px 6px;
    font-size: 0.75rem;
}

/* Body padding for fixed topbar */
body {
    padding-top: var(--topbar-height);
}

/* Ana arama kutusu */
.search-box .form-control {
    border-radius: 8px 0 0 8px;
    border: 1px solid #D67054;
    border-right: none;
    font-size: 0.75rem;
    height: 35px;
    line-height: 31px;
    padding-top: 0;
    padding-bottom: 0;
}
.search-box .form-control:focus {
    border-color: rgb(136, 50, 26);
    box-shadow: none;
}
.search-box .btn {
    border-radius: 0 8px 8px 0;
    border: 1px solid #D67054;
    border-left: none;
    background: #fff;
    color: rgb(136, 50, 26);
    height: 35px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 31px;
}
.search-box .btn:hover {
    background: rgb(136, 50, 26);
    color: #fff;
}
.search-box .form-control:focus ~ .btn,
.search-box .form-control:focus + .btn,
.search-box .input-group:focus-within .btn {
    border-color: rgb(136, 50, 26);
}

/* Kategori Swiper */
.categories-slider-wrapper {
    position: relative;
}
.categories-swiper {
    padding: 8px 8px;
    overflow: hidden;
}
.category-card {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;  
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #88321A;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
	border: 1px solid #D67054;
}
.category-card:hover {
    border-color: rgb(214, 112, 84);
	background-color: #D67054;
    color: #fff;
    box-shadow: 0 2px 8px rgba(95,118,232,0.15);
}
.category-card.active {
    border-color: #D67054;
    background-color: #88321A;
    color: #fff;
    box-shadow: 0 3px 10px rgba(136, 50, 26, 0.35);
    transform: translateY(-1px);
}

/* Dış ok butonları */
.cat-nav-btn {
    width: 30px;
    height: 60px;
    background: #88321A;
    border: 1px solid #e9ecef;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.cat-nav-prev {
    border-radius: 8px 0 0 8px;
}
.cat-nav-next {
    border-radius: 0 8px 8px 0;
}
.cat-nav-btn:hover {
    color: #D67054;
    border-color: #D67054;
    box-shadow: 0 2px 8px rgba(95,118,232,0.15);
}

/* Kurs Kartları */
.course-card {
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
    height: 250px;
    position: relative;
    background-color: #444;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.course-card .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75) 50%);
    padding: 40px 16px 16px 16px;
}
.course-card .card-body .card-title {
    color: rgb(214, 112, 84);
}
.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
}
.course-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.course-card-link:hover {
    text-decoration: none;
    color: inherit;
}
.course-price-badge {
    background: rgba(136, 50, 26, 0.92);
    color: #fff;
    margin-left: auto;
}

/* Kurslarım sayfası */
.my-courses-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.course-card-tall {
    height: 300px;
}
.course-summary {
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Kurs kartında ilerleme rozeti (sağ üst) */
.course-progress-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 20px;
    padding: 4px 10px;
    backdrop-filter: blur(2px);
}

/* ===== Auth (Giriş / Kayıt) sayfaları — design/user uyarlaması ===== */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--topbar-height));
    padding: 4rem 1rem 3rem;
}
.auth-page .auth-header {
    text-align: center;
    color: #333;
    margin-bottom: 3.5rem;
}
.auth-page .auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}
.auth-page .auth-header p {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}
.auth-page .auth-header p a {
    font-weight: 700;
    text-decoration: underline;
    color: #88321A;
    transition: color 0.2s;
}
.auth-page .auth-header p a:hover {
    color: #D67054;
}
.auth-page .auth-card {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 24rem;
    padding: 2rem;
    padding-top: 3rem;
    position: relative;
    z-index: 10;
}
.auth-page .icon-wrapper {
    position: absolute;
    top: -3rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border-radius: 9999px;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 10px solid transparent;
    background-clip: padding-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-page .icon-wrapper svg {
    height: 3rem;
    width: 3rem;
    color: #88321A;
    stroke: #88321A;
    fill: none;
    stroke-width: 1.5;
}
.auth-page form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.auth-page .field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.auth-page .field-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.25rem;
}
.auth-page .field-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    outline: none;
    color: #374151;
    transition: box-shadow 0.15s, border-color 0.15s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-family: inherit;
    font-size: 1rem;
}
.auth-page .field-group input:focus {
    box-shadow: 0 0 0 2px #D67054;
    border-color: transparent;
}
.auth-page .field-group input.is-first {
    border-color: #88321A;
}
.auth-page .remember-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}
.auth-page .remember-wrap input[type="checkbox"] {
    accent-color: #88321A;
    width: 1rem;
    height: 1rem;
    margin: 0;
}
.auth-page .submit-wrap {
    padding-top: 0.5rem;
}
.auth-page .submit-wrap button {
    width: 100%;
    background-color: #88321A;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-size: 1rem;
    font-family: inherit;
}
.auth-page .submit-wrap button:hover {
    background-color: #D67054;
}
.auth-page .submit-wrap button:active {
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}
.auth-page .forgot-link {
    margin-top: 1.5rem;
    text-align: center;
}
.auth-page .forgot-link a {
    font-size: 0.875rem;
    color: #88321A;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
.auth-page .forgot-link a:hover {
    color: #4f5ae0;
    text-decoration: underline;
}
.auth-page .alert {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
@media (max-width: 480px) {
    .auth-page .auth-card {
        padding: 1.5rem 1.25rem;
        padding-top: 2.5rem;
    }
    .auth-page .icon-wrapper {
        top: -2.5rem;
        padding: 0.75rem;
    }
    .auth-page .icon-wrapper svg {
        height: 2.5rem;
        width: 2.5rem;
    }
    .auth-page .auth-header h1 {
        font-size: 1.25rem;
    }
}

/* Sayfalama */
.custom-pagination .page-link {
    background: #88321A;
    color: #fff;
    border-color: rgb(214, 112, 84);
    margin: 0 5px;
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 4px 8px;
    min-width: 28px;
    text-align: center;
}
.custom-pagination .page-item.active .page-link {
    background: #fff;
    color: rgb(214, 112, 84);
    border-color: rgb(214, 112, 84);
}
.custom-pagination .page-link:hover {
    background: rgba(214, 112, 84, 0.85);
    color: #fff;
    border-color: rgb(214, 112, 84);
}
.custom-pagination .page-item.disabled .page-link {
    background: #D67054;
    color: rgba(255,255,255,0.7);
    border-color: rgb(214, 112, 84);
    pointer-events: none;
}

/* Kurs Hero Arkaplan */
.course-hero {
    width: 100%;
    min-height: 600px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    display: flex;
    align-items: flex-start;
    color: #fff;
    text-shadow: 0 0 4px rgba(0,0,0,0.6);
    position: relative;
    padding: 100px 0 0 0;
}
.course-hero .container {
    position: relative;
    z-index: 1;
}
.course-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgb(224, 214, 201));
    pointer-events: none;
}

/* Kurs Başlığı */
.course-title {    
    font-size: 2rem;
    font-weight: 700 !important;
    color: #fff;
    line-height: 1.4;
}

/* Sol blok zemini */
.hero-left {
    background: rgba(0, 0, 0, 0.5);
    padding: 32px;
    border-radius: 12px;
}
.course-meta {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.course-meta-item {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}
.course-meta-sep {
    width: 8px;
    height: 8px;
    background: #88321A;
    transform: rotate(45deg);
    flex-shrink: 0;
}
.course-description {
    margin-top: 24px;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* İzle Butonu */
.course-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 12px 32px;
    background: #88321A;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.6px;
    border: 1px solid #555;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.course-watch-btn:hover {
    background: rgb(196, 98, 72);
    color: #fff;
    transform: translateY(-1px);
}

/* Satın Alma Barı */
.purchase-bar {
    padding: 40px 0;
}
.purchase-box {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}
.btn-buy {
    background: #88321A;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px 42px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    display: inline-block;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn-buy:hover {
    background: rgb(196, 98, 72);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.purchase-course-title {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}
.purchase-price {
    color: #88321A;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 4px;
}

/* Eğitim Hakkında */
.about-course {
    padding: 24px 0 48px;
}
.about-course .card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.about-course-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}
.about-course-content {
    color: #555;
    line-height: 1.7;
}

/* Galeri */
.course-gallery {
    padding: 0 0 32px;
}
.gallery-thumb {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.gallery-thumb img {
    height: 140px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.gallery-thumb:hover img {
    transform: scale(1.05);
}

/* Bölümler */
.course-sections {
    padding: 0 0 48px;
}
.course-sections .card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.course-sections-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}
.topic-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.topic-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}
.topic-splitter {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid #e9ecef;
    opacity: 1;
}

/* Bölüm öğesi (sol kapak görseli) */
.topic-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
/* Ücretsiz ön izlemeli videolar tıklanabilir */
.topic-item-preview {
    cursor: pointer;
    border-radius: 12px;
    padding: 8px;
    margin: -8px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.topic-item-preview:hover {
    background: rgba(136, 50, 26, 0.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.topic-item-preview .topic-thumb-play {
    color: #fff;
}
/* Kurslarım detay sayfasında video bağlantısı */
.topic-item-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 12px;
    padding: 8px;
    margin: -8px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.topic-item-link:hover {
    background: rgba(136, 50, 26, 0.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}
.topic-preview-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    background: rgba(136, 50, 26, 0.92);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 3px 9px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.topic-thumb-wrap {
    position: relative;
    width: 168px;
    height: 104px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.topic-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.topic-thumb-placeholder {
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}
.topic-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.22);
    transition: background 0.2s ease;
}
.topic-item:hover .topic-thumb-play {
    background: rgba(0, 0, 0, 0.38);
}
.topic-body {
    flex: 1;
    min-width: 0;
}
.topic-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #88321A;
    background: #eef1ff;
    border-radius: 20px;
    padding: 3px 10px;
    margin-top: 8px;
}
.topic-section-title .topic-meta {
    margin-top: 0;
}

/* Bölüm bloğu: başlık üstte, videolar altta */
.topic-block {
    padding: 2px 0;
}
.topic-head {
    margin-bottom: 14px;
}
.topic-section-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topic-section-no {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #88321A;
    background: #eef1ff;
    border-radius: 20px;
    padding: 3px 10px;
    flex-shrink: 0;
}
.topic-block .topic-item {
    margin-bottom: 12px;
}
.topic-block .topic-item:last-child {
    margin-bottom: 0;
}
.video-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
@media (max-width: 575.98px) {
    .topic-thumb-wrap {
        width: 112px;
        height: 70px;
    }
}

/* Video Popup */
#videoModal .modal-content {
    background: rgb(214, 112, 84); /* orijinal turuncu */
    border: none;
    border-radius: 26px;
    position: relative;
    padding: 16px;
}
#videoModal .modal-body {
    padding: 0;
}
#videoModal .ratio {
    border-radius: 18px;
    overflow: hidden;
}
#videoModal .video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: #fff; /* X simgesi (background-image) korunur */
    border-radius: 50%;
    padding: 7px;
    opacity: 0.92;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
#videoModal .video-modal-close:hover {
    opacity: 1;
}

/* Bölüm Video Ön İzleme Popup */
#topicVideoModal .modal-content {
    background: #222;
    border: none;
    border-radius: 26px;
    position: relative;
    padding: 16px;
}
#topicVideoModal .modal-body {
    padding: 0;
}
.topic-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}
.topic-video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Container özelleştirmesi */
.container {
    max-width: var(--container-max);
}

/* Mobilde kenar boşluğu sıfırla */
@media (max-width: 575.98px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
    .container > .row {
        margin-left: 0;
        margin-right: 0;
    }
    .container > .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Body temel */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
    background: #f4f1ec;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main içeriği esnet, footer alta yapışsın */
#main-content {
    flex: 1;
}

/* Link */
a {
    color: var(--primary);
}
a:hover {
    color: #3d54d0;
}

/* Footer */
.site-footer {
    background: rgb(21, 26, 34);
    color: rgba(255,255,255,0.7);
    padding: 2rem 0;
    font-size: 0.875rem;
}
.site-footer a {
    color: rgba(255,255,255,0.9);
}
