/* Animations and Visual Effects */

/* Hover Lift Effect */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Card Hover Effects */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Video Card Specific Styles */
.video-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.video-card .card-img-top {
    transition: all 0.3s ease;
}

.video-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Cover Image Styles */
.video-card .position-relative {
    overflow: hidden;
}

.video-card .card-img-top {
    transition: transform 0.3s ease;
}

.video-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badge Styles */
.video-card .badge {
    transition: all 0.2s ease;
}

.video-card:hover .badge {
    transform: scale(1.05);
}

/* Default Cover Gradient */
.video-card .card-img-top:not([src]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Video Detail Page Cover Styles */
.video-detail-cover {
    transition: all 0.3s ease;
    overflow: hidden;
}

.video-detail-cover:hover {
    transform: scale(1.02);
}

.video-detail-cover img {
    transition: transform 0.3s ease;
}

.video-detail-cover:hover img {
    transform: scale(1.05);
}

/* Tag-based Cover Styles */
.tag-cover {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Cover Badge Animations */
.cover-badge {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cover-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Cover Text Animations */
.cover-text {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Effects */
.btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

/* Button Ripple Effect */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Navigation Hover Effects */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--navbar-text);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Form Input Focus Effects */
.form-control, .form-select {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.form-control:focus, .form-select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-primary);
}

/* Badge Hover Effects */
.badge {
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.1);
}

/* Icon Hover Effects */
.fa, .fas, .far, .fab {
  transition: all 0.3s ease;
}

.card:hover .fa,
.card:hover .fas,
.card:hover .far,
.card:hover .fab {
  transform: scale(1.1);
}

/* Image Hover Effects */
.card-img-top {
  transition: all 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--brand-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide In Animation */
.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Bounce Animation */
.bounce {
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Shake Animation */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Progress Bar Animation */
.progress-bar {
  transition: width 1s ease-in-out;
}

/* Modal Animation */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

/* Dropdown Animation */
.dropdown-menu {
  animation: dropdownFade 0.2s ease-out;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tooltip Animation */
.tooltip {
  animation: tooltipFade 0.3s ease-out;
}

@keyframes tooltipFade {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Alert Animation */
.alert {
  animation: alertSlide 0.5s ease-out;
}

@keyframes alertSlide {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Table Row Hover */
.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.01);
}

/* Pagination Hover */
.pagination .page-link {
  transition: all 0.3s ease;
}

.pagination .page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* List Group Item Hover */
.list-group-item {
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
  transform: translateX(5px);
}

/* Breadcrumb Hover */
.breadcrumb-item a {
  transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
  color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Accordion Animation */
.accordion-button {
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
  transform: scale(1.02);
}

/* Tab Animation */
.nav-tabs .nav-link {
  transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
  transform: translateY(-2px);
}

/* Carousel Animation */
.carousel-item {
  transition: transform 0.6s ease-in-out;
}

/* Offcanvas Animation */
.offcanvas {
  transition: transform 0.3s ease-in-out;
}

/* Toast Animation */
.toast {
  animation: toastSlide 0.3s ease-out;
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--brand-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .hover-lift:hover,
  .card:hover,
  .btn:hover,
  .nav-link:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* ===== HOME PAGE STYLES ===== */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 4rem 0;
  border-radius: 0 0 2rem 2rem;
}

.min-vh-75 {
  min-height: 75vh;
}

.text-gradient {
  background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-icon {
  filter: drop-shadow(0 10px 20px rgba(0, 123, 255, 0.3));
  animation: heroFloat 6s ease-in-out infinite;
}

.hero-bg-gradient {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 50%, transparent 100%);
  border-radius: 50%;
  z-index: -1;
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: cardFloat 4s ease-in-out infinite;
}

.floating-card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-card-2 {
  top: 50%;
  right: 15%;
  animation-delay: 1s;
}

.floating-card-3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 2s;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Stats Section */
.stats-section {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stat-card {
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Section Headers */
.section-header {
  border-bottom: 2px solid #f8f9fa;
  padding-bottom: 1rem;
}

.section-title {
  color: #495057;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #007bff, #6f42c1);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 0.95rem;
}

/* Enhanced Cards */
.video-card,
.product-card,
.post-card {
  transition: all 0.3s ease;
  border: none;
  overflow: hidden;
}

.video-card:hover,
.product-card:hover,
.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.video-cover,
.product-cover,
.post-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.video-cover img,
.product-cover img,
.post-cover img {
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card:hover .video-cover img,
.product-card:hover .product-cover img,
.post-card:hover .post-cover img {
  transform: scale(1.05);
}

.default-cover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  height: 100%;
  color: #6c757d;
}

.video-overlay,
.product-overlay,
.post-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-overlay,
.product-card:hover .product-overlay,
.post-card:hover .post-overlay {
  opacity: 1;
}

.video-badges,
.product-badges,
.post-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.video-badges .badge,
.product-badges .badge,
.post-badges .badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
}

/* Empty States */
.empty-state {
  background: #f8f9fa;
  border-radius: 1rem;
  border: 2px dashed #dee2e6;
}

.empty-state i {
  opacity: 0.5;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
  border-radius: 1rem;
  overflow: hidden;
}

.cta-card {
  position: relative;
  background: transparent;
}

.cta-bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.9) 0%, rgba(111, 66, 193, 0.9) 100%);
  z-index: 1;
}

.cta-content {
  z-index: 2;
}

/* Newsletter Section */
.newsletter-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
}

.newsletter-form .input-group {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
}

.newsletter-form .form-control {
  border: none;
  padding: 0.75rem 1rem;
}

.newsletter-form .input-group-text {
  border: none;
  background: white;
  padding: 0.75rem 1rem;
}

.newsletter-form .btn {
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .min-vh-75 {
    min-height: 60vh;
  }
  
  .floating-card {
    display: none;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .cta-card {
    padding: 2rem 1rem !important;
  }
  
  .newsletter-card {
    padding: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .cta-content .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
