<?php
/*
type: file
fileName: kids.css
*/
/* =================================================================== */
/* "KIDS MODULE" STYLESHEET (kids.css)                     */
/* DESIGNED BY TAIA (FOR MATEUS)                           */
/* =================================================================== */

/* --- 1. ძირითადი "საბავშვო" ცვლადები და კონტეინერი --- */
/*
 * ეს სტილები გადაეწერება style.css-ის ცვლადებს
 * მხოლოდ .kids-module-wrapper-ში ყოფნისას.
 * ეს გვაძლევს უნიკალურ დიზაინს დანარჩენი საიტის შეცვლის გარეშე.
*/
.kids-module-wrapper {
    /* --- ფერთა პალიტრა --- */
    --kids-primary: #3498db;      /* მეგობრული ლურჯი */
    --kids-secondary: #f39c12;     /* მხიარული ნარინჯისფერი */
    --kids-accent: #2ecc71;       /* წარმატების მწვანე (ტრეკერისთვის) */
    --kids-heart: #e74c3c;         /* ფავორიტის წითელი */
    --kids-bg: #f8faff;           /* ძალიან ღია, ცივი ფონი */
    --kids-heading: #2c3e50;      /* მუქი, დესატურირებული ლურჯი */
    --kids-text: #34495e;         /* ოდნავ ღია ტექსტი */
    
    /* --- ძირითადი style.css-ის ცვლადების გადაწერა --- */
    --primary-color: var(--kids-primary); /* ვცვლით საიტის წითელს ლურჯით */
    --heading-color: var(--kids-heading);
    --text-color: var(--kids-text);

    /* --- ტიპოგრაფია --- */
    /* ვიყენებთ უფრო "მომრგვალებულ", მეგობრულ შრიფტს, ვიდრე საიტის BPG Nino Mtavruli */
    font-family: 'Inter', 'FiraGO', sans-serif;
    background-color: var(--kids-bg);
    min-height: 100vh;
}

/* --- 2. მოდულის მთავარი გვერდი (kids.php) --- */

/* --- სათაურის ბლოკი --- */
.kids-header {
    background: linear-gradient(135deg, var(--kids-primary) 0%, var(--kids-secondary) 100%);
    color: #ffffff;
    padding: 4rem 2rem;
    border-radius: 0 0 var(--border-radius-lg, 16px) var(--border-radius-lg, 16px);
    text-align: center;
    box-shadow: var(--shadow-md, 0 10px 15px -3px rgba(0, 0, 0, 0.07));
    margin-bottom: 2.5rem;
}

.kids-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    margin: 0;
}

/* --- ფილტრაციის ზოლი (იდეა #2) --- */
.kids-filters-container {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: var(--border-radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
    position: sticky;
    top: 90px; /* ეწებება ჰედერის ქვემოთ */
    z-index: 900;
    margin-bottom: 2rem;
}

.kids-search-bar .form-control {
    border-radius: 50px; /* მომრგვალებული, მეგობრული ველი */
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color, #e2e8f0);
}
.kids-search-bar .form-control:focus {
    border-color: var(--kids-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

.kids-category-filters .nav-pills .nav-link {
    color: var(--kids-text);
    background-color: var(--kids-bg);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.kids-category-filters .nav-pills .nav-link:hover {
    background-color: #eaf5fc;
}

.kids-category-filters .nav-pills .nav-link.active {
    background-color: var(--kids-primary);
    color: #ffffff;
    border-color: var(--kids-primary);
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
}

/* --- ფლეილისტების და ბიბლიოთეკის ბლოკი --- */
.kids-sidebar-widget {
    background: #ffffff;
    border-radius: var(--border-radius-lg, 16px);
    box-shadow: var(--shadow-md, 0 10px 15px -3px rgba(0, 0, 0, 0.07));
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.kids-sidebar-widget h5 {
    font-family: var(--font-headings, 'BPG Nino Mtavruli');
    color: var(--kids-heading);
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--kids-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* ფლეილისტის ბარათი */
.playlist-card-link {
    text-decoration: none;
    margin-bottom: 1rem;
    display: block;
    border-radius: var(--border-radius-md, 8px);
    overflow: hidden;
    transition: all 0.3s ease;
}
.playlist-card-link:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md, 0 10px 15px -3px rgba(0, 0, 0, 0.07));
}
.playlist-card {
    display: flex;
    align-items: center;
    background: var(--kids-bg);
}
.playlist-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 1rem;
}
.playlist-card-title {
    font-weight: 600;
    color: var(--kids-heading);
    margin: 0;
}

/* ბიბლიოთეკის ბმული */
.library-promo-card {
    background: linear-gradient(45deg, var(--kids-accent), #27ae60);
    color: #ffffff;
    border-radius: var(--border-radius-md, 8px);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.library-promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(46, 204, 113, 0.5);
}
.library-promo-card i {
    font-size: 2.5rem;
    margin-right: 1.2rem;
}
.library-promo-card h6 {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}
.library-promo-card p {
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 0.9rem;
}

/* --- 3. ვიდეო ბარათი (მთავარი კომპონენტი) --- */
.video-card {
    background: #ffffff;
    border-radius: var(--border-radius-lg, 16px);
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%; /* სვეტების გასასწორებლად */
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md, 0 10px 15px -3px rgba(0, 0, 0, 0.07));
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
    background-color: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 180px; /* ფიქსირებული სიმაღლე */
    object-fit: cover;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
    opacity: 0.7;
}

/* Play ღილაკის ოვერლეი */
.video-thumbnail::before {
    content: '\f04b'; /* FontAwesome Play Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    font-size: 2rem;
    color: #ffffff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}
.video-thumbnail:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--border-radius-sm, 4px);
}

/* ფავორიტის ღილაკი */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #ced4da; /* ნაცრისფერი (არააქტიური) */
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1rem;
    line-height: 1;
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
    transition: all 0.2s ease;
    z-index: 10;
}
.favorite-btn:hover {
    transform: scale(1.1);
}
.favorite-btn.active {
    color: var(--kids-heart); /* წითელი (აქტიური) */
}
.favorite-btn i {
    pointer-events: none; /* რომ ღილაკზე დაჭერა იმუშავოს */
}

/* --- ★★★ START: Facebook Share Button Style ★★★ --- */
.share-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #1877F2; /* Facebook ლურჯი */
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1rem; /* ვათანაბრებთ favorite-btn-ს */
    line-height: 1;
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
    transition: all 0.2s ease;
    z-index: 10; /* ფავორიტის ღილაკის მსგავსად */
    display: inline-flex; /* Icon-ის ცენტრირებისთვის */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: 10px; /* გამოიყენება playlist გვერდზე */
}
.share-btn:hover {
    transform: scale(1.1);
    color: #ffffff;
    background: #1877F2;
}
/* playlist გვერდზე პირველი ღილაკი რომ არ იყოს მიწეპებული */
.video-details-bar .share-btn {
    margin-left: 10px;
}
/* video-card-ზე (kids.php) მოშორება margin-left-ის */
.video-thumbnail .share-btn {
    margin-left: 0;
}
/* --- ★★★ END: Facebook Share Button Style ★★★ --- */


.video-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-title {
    font-family: var(--font-headings, 'BPG Nino Mtavruli');
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--kids-heading);
    text-decoration: none;
    margin-bottom: 0.5rem;
    flex-grow: 1; /* აიძულებს ფსკერს ქვემოთ */
    line-height: 1.4;
}
.video-title:hover {
    color: var(--kids-primary);
}

.video-rating {
    font-size: 0.9rem;
    color: var(--kids-secondary);
}
.video-rating .fa-star {
    cursor: pointer;
    transition: transform 0.2s;
}
.video-rating .fa-star:hover {
    transform: scale(1.2);
}
.video-rating .avg-rating-text {
    font-size: 0.8rem;
    color: var(--subtle-text-color, #718096);
    margin-left: 0.5rem;
}

/* --- 4. ფლეილისტის გვერდი (kids_playlist.php) --- */

/* ვიზუალური ტრეკერი (იდეა #3) */
.playlist-tracker-container {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: var(--border-radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
    margin-bottom: 2rem;
}
.playlist-tracker-header {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    padding-bottom: 1rem;
    margin-bottom: 1rem; /* შევამცირე 1.5-დან */
}
.playlist-tracker-header h2 {
    color: var(--kids-heading);
    margin: 0;
}

/* --- ★★★ START: MERGED STYLES (Supports BOTH trackers) ★★★ --- */

/* --- A. ძველი, ციფრებიანი ტრეკერი (kids_playlist.php-სთვის) --- */
.playlist-tracker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin-top: 1rem; /* დავამატე დაშორება */
}
.tracker-step {
    flex-shrink: 0;
}
.tracker-step a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    background: var(--kids-bg);
    color: var(--kids-text);
    border: 2px solid var(--border-color, #e2e8f0);
    transition: all 0.3s ease;
}
.tracker-step a:hover {
    background: #eaf5fc;
    border-color: var(--kids-primary);
}
.tracker-step.current a {
    background: var(--kids-primary);
    color: #ffffff;
    border-color: var(--kids-primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}
.tracker-step.completed a {
    background: var(--kids-accent);
    color: #ffffff;
    border-color: var(--kids-accent);
    opacity: 0.8;
}
.tracker-step.completed a:hover {
    opacity: 1;
}

/* --- B. ახალი, სათაურებიანი სია (kids_video.php-სთვის) --- */
.playlist-video-list .list-group-item {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm, 4px);
    margin-bottom: 5px;
    background-color: var(--kids-bg);
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.2s ease;
}
.playlist-video-list .list-group-item:hover {
    background-color: #eaf5fc;
    transform: translateX(5px);
    border-color: var(--kids-primary);
}
.playlist-video-list .list-group-item.active {
    background-color: var(--kids-primary);
    border-color: var(--kids-primary);
    color: #ffffff;
}
.playlist-video-list .list-group-item.active:hover {
     transform: translateX(0);
}
.video-list-index {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 25px; /* For alignment */
    color: var(--kids-primary);
}
.list-group-item.active .video-list-index {
     color: #ffffff;
}
.video-list-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--kids-heading);
}
.list-group-item.active .video-list-title {
    font-weight: 600;
    color: #ffffff;
}
.list-group-item small {
     transition: color 0.2s ease;
}
.list-group-item.active small {
    color: rgba(255,255,255,0.7);
}
/* --- ★★★ END: MERGED STYLES ★★★ --- */


/* --- ვიდეოს გვერდი (პლეერი) --- */
.video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius-lg, 16px);
    box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
    background: #000;
    margin-bottom: 1.5rem;
}
.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-page-title {
    color: var(--kids-heading);
    font-weight: 700;
}

.video-page-description {
    color: var(--kids-text);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* --- 5. დამხმარე და მობილური სტილები --- */

/* "No results" შეტყობინება JS ფილტრაციისთვის */
.no-results-message {
    display: none; /* By default hidden */
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: var(--border-radius-lg, 16px);
    color: var(--kids-text);
}
.no-results-message i {
    font-size: 3rem;
    color: var(--kids-secondary);
    margin-bottom: 1rem;
}

/* Mobile First Styles */
.kids-module-wrapper {
    min-height: 100vh;
}

/* Header Responsive */
.kids-header {
    padding: 3rem 1rem !important;
}

.kids-header h1 {
    font-size: clamp(1.8rem, 6vw, 3rem) !important;
    line-height: 1.2;
}

/* Filters Responsive */
.kids-filters-container {
    padding: 1rem !important;
    margin-bottom: 1.5rem;
}

.nav-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.nav-scroll-wrapper::-webkit-scrollbar {
    height: 4px;
}

.nav-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.kids-category-filters .nav-pills {
    flex-wrap: nowrap;
    padding-bottom: 5px;
}

.kids-category-filters .nav-link {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem !important;
}

/* Video Cards Responsive */
.video-card {
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-thumbnail img {
    height: 200px;
    object-fit: cover;
}

.video-overlay {
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .play-button {
    transform: scale(1.1);
}

.video-duration {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.favorite-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.favorite-btn:hover {
   
}