﻿/*
Last Updated: 13-July-2025, 19:54 GMT +0000
File: assets/css/style.css
Description: Added styles for the new social media icons in the footer.
*/

/* CSS Reset for removing default browser margins */
html, body {
    margin: 0;
    padding: 0;
}

/* Apply Vazirmatn font to the whole site */
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

/* --- Home Page List --- */
.list-group-item-action {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* New animated play icon styles */
.play-icon-animated {
    width: 28px;
    height: 28px;
    background: linear-gradient(145deg, #0d6efd, #0dcaf0);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.play-icon-animated::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid white;
    margin-left: 3px;
    transition: border-left-color 0.3s ease;
}

.list-group-item-action:hover .play-icon-animated {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.6);
}

.lecture-title {
    text-align: left;
    flex-grow: 1;
    color: #212529;
}

/* New class for reliable spacing */
.lecture-item-inner {
    gap: 1.5rem; /* Creates a 1.5rem gap between the icon and the title */
}

/* --- Player Page --- */
#player-card {
    background: #ffffff;
    transition: box-shadow 0.3s ease;
}

.player-cover {
    width: 100%;
    aspect-ratio: 1 / 1; /* Enforce 1x1 aspect ratio */
    overflow: hidden;
    border-radius: .5rem .5rem 0 0; /* Match card rounding */
}
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area, maintaining aspect ratio */
}

/* Player Controls */
.player-controls .btn#play-pause-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #0d6efd, #0dcaf0);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: white;
}

.player-controls .btn#play-pause-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}

.player-controls .btn#play-pause-btn i {
    font-size: 2rem;
}


#progress-bar-container {
    background-color: #e9ecef;
    border-radius: 5px;
    padding: 0;
}

#progress-bar {
    transition: width 0.1s linear;
}

#like-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#like-btn.active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

#like-btn.active .fa-heart {
    font-weight: 900; /* From far to fas */
}

/* Volume Controls */
.volume-controls {
    position: relative;
}
.volume-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.volume-slider-container {
    display: none; /* Hidden by default, shown with JS */
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 15px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 150px;
    z-index: 20;
}
.volume-slider-container.show {
    display: block; /* JS toggles this class */
}
#volume-slider {
    cursor: pointer;
}


/* Custom container width */
.main-container {
    max-width: 500px;
}

/* Banner Styles */
.banner-wrapper, .bottom-banner-wrapper {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center banners horizontally */
    gap: 1.5rem; /* Space between banners */
}

.banner {
    background-color: #f0f0f0;
    border-radius: .5rem;
    overflow: hidden;
    line-height: 0; /* Remove extra space below image */
}

.banner img {
    max-width: 100%;
    height: auto;
    display: block;
}

.banner.banner-square {
    max-width: 440px;
    max-height: 550px;
    width: 100%; /* Ensure it's responsive within the max-width */
}

.bottom-banner-wrapper .banner-rectangle {
    max-width: 440px;
    width: 100%;
}


/* Responsive adjustments for banners */
@media (max-width: 480px) {
    .banner {
        width: 100%;
    }
}

/* --- General Share Buttons --- */
.home-share-buttons, .player-share-buttons {
    text-align: center;
}
.home-share-buttons {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: .5rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}
.home-share-buttons .btn, .player-share-buttons .btn {
    color: white;
    margin: 0 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    -webkit-tap-highlight-color: transparent; /* Fix for touch highlight */
}
.home-share-buttons .btn:hover, .player-share-buttons .btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Fix for the white circle on click/touch */
.home-share-buttons .btn:focus, .player-share-buttons .btn:focus {
    outline: none;
    box-shadow: none; /* Explicitly remove any focus box-shadow */
}
.home-share-buttons .btn:active, .player-share-buttons .btn:active {
    transform: scale(0.95); /* A subtle press-down effect */
    box-shadow: none;
    transition: transform 0.1s ease;
}

.btn-facebook { background-color: #3b5998; }
.btn-twitter { background-color: #1da1f2; }
.btn-whatsapp { background-color: #25d366; }
.btn-telegram { background-color: #0088cc; }
.btn-copy { background-color: #6c757d; }

/* ROBUST FIX: Explicitly maintain background color on hover to fix the white circle issue */
.btn-facebook:hover { background-color: #3b5998 !important; color: white !important; }
.btn-twitter:hover { background-color: #1da1f2 !important; color: white !important; }
.btn-whatsapp:hover { background-color: #25d366 !important; color: white !important; }
.btn-telegram:hover { background-color: #0088cc !important; color: white !important; }
.btn-copy:hover { background-color: #6c757d !important; color: white !important; }


/* Custom Tooltip Styles */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    z-index: 10;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    background-color: #343a40; /* Dark background */
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    bottom: 125%; /* Position above the button */
}

[data-tooltip]::after {
    content: '';
    border-style: solid;
    border-width: 5px;
    border-color: #343a40 transparent transparent transparent; /* Arrow */
    bottom: 125%;
    margin-bottom: -10px; /* Connect arrow to tooltip body */
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px); /* Move up slightly on hover */
}

/* Navigation Card Styles */
.navigation-card {
    transition: all 0.3s ease-in-out;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden; /* Important for the pseudo-element */
    background-color: #fff;
    border-radius: .5rem; /* Match other cards */
}

/* Gradient swipe effect on hover */
.navigation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(200, 220, 255, 0.5), rgba(220, 240, 255, 0.3));
    transition: left 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 0; /* Behind the content */
}

.navigation-card:hover::before {
    left: 0; /* Slide in on hover */
}

.navigation-card a {
    display: block;
    position: relative; /* To be on top of the pseudo-element */
    z-index: 1;
}

.navigation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .5rem 1.25rem rgba(0, 80, 170, 0.1)!important;
    border-color: #b8d4ff;
}

/* New styles for navigation card icons */
.nav-icon-container {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.navigation-card:hover .nav-icon-container {
    background-color: #0d6efd;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.5);
}

/* Home Link Card Styles */
.home-link-card {
    background-color: #f0f8ff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3e%3cpath fill='%23e0ecff' fill-opacity='1' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,186.7C960,213,1056,235,1152,218.7C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3e%3c/path%3e%3c/svg%3e");
    background-size: cover;
    background-position: bottom;
    transition: all 0.3s ease-in-out;
    border: 1px solid #dbe9ff;
    text-align: center;
}
.home-link-card a {
    color: #0b5ed7;
    font-weight: bold;
}
.home-link-icon {
    font-size: 1.75rem;
    transition: transform 0.3s ease;
}
.home-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
    border-color: #a3c7ff;
}
.home-link-card:hover .home-link-icon {
    transform: scale(1.2) rotate(-10deg);
}

/* Footer Social Icons */
.footer-social-icons .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 8px;
    font-size: 1.2rem;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}
.footer-social-icons .social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.social-youtube { background: #ff0000; }
.social-telegram { background: #0088cc; }
.social-instagram { background: #d6249f; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }