/* Global Styles */
:root {
  --primary-color: #dc3545;
  --secondary-color: #6c757d;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

/* General Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

/* Navbar */
.navbar {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  max-height: 40px;
  width: auto;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

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

.social-icons a {
  transition: all 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
}

.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
  font-weight: 600;
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  color: white;
  padding: 6rem 0;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
}

.play-button {
  transition: all 0.3s ease;
}

.play-button:hover {
  transform: scale(1.1);
  color: var(--primary-color) !important;
}

/* Breaking News */
.breaking-news {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.breaking-news-label {
  border-radius: 4px;
  white-space: nowrap;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
}

.ticker {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  padding: 0 2rem;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Section Headers */
.section-header {
  position: relative;
  margin-bottom: 2rem;
}

.section-divider {
  height: 4px;
  width: 60px;
  background-color: var(--primary-color);
  margin-top: 0.5rem;
}

/* Featured News */
.main-news-item {
  overflow: hidden;
  border-radius: 0.5rem;
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.news-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.news-title-sm {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}

.secondary-news-item {
  transition: all 0.3s ease;
}

.secondary-news-item:hover {
  transform: translateY(-5px);
}

/* Cards */
.card {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
  height: 180px;
  object-fit: cover;
}

/* Schedule Table */
.schedule-table th,
.schedule-table td {
  padding: 1rem;
}

.time-column {
  width: 100px;
}

.schedule-table th {
  background-color: #f8f9fa;
}

.schedule-table tr:hover {
  background-color: #f1f1f1;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Footer */
footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

footer h5 {
  font-weight: 600;
  margin-bottom: 1.25rem;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Live TV Page */
.channel-card {
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.channel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 2rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* About Page */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-member img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
}

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background-color: #e9ecef;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
}

.timeline-badge {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-left: -25px;
  border-radius: 50%;
  text-align: center;
  font-size: 1.4em;
  line-height: 50px;
  background-color: var(--primary-color);
  color: white;
  z-index: 100;
}

.timeline-panel {
  position: relative;
  float: left;
  width: 46%;
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(even) .timeline-panel {
  float: right;
}

.timeline-item:nth-child(odd) .timeline-panel::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -10px;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  background-color: #fff;
  box-shadow: 1px -1px 1px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(even) .timeline-panel::after {
  content: "";
  position: absolute;
  top: 20px;
  left: -10px;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  background-color: #fff;
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* Contact Page */
.map-container {
  height: 400px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info-item {
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
}

/* Contact Form */
.contact-form label {
  font-weight: 500;
}

/* Programs Page */
.program-filter-btn {
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  margin: 0 0.25rem 0.5rem;
  transition: all 0.3s ease;
}

.program-filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.program-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.program-card img {
  height: 200px;
  object-fit: cover;
}

.program-meta {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.program-meta i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* News Page */
.news-filter {
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.news-card {
  transition: transform 0.3s ease;
  height: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.news-card img {
  height: 180px;
  object-fit: cover;
}

.news-categories {
  margin-bottom: 2rem;
}

.category-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem 0.5rem 0;
  border-radius: 50px;
  background-color: #f8f9fa;
  color: #333;
  transition: all 0.3s ease;
}

.category-badge:hover,
.category-badge.active {
  background-color: var(--primary-color);
  color: white;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .timeline:before {
    left: 60px;
  }

  .timeline-badge {
    left: 60px;
  }

  .timeline-panel {
    width: calc(100% - 90px);
    float: right;
  }

  .timeline-item:nth-child(odd) .timeline-panel::after {
    left: -10px;
    right: auto;
    box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  .program-card img,
  .news-card img {
    height: 160px;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 3rem 0;
  }

  .section-header {
    text-align: center;
  }

  .section-divider {
    margin-left: auto;
    margin-right: auto;
  }

  .news-overlay {
    padding: 1rem;
  }

  .news-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .breaking-news-label {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  .ticker-item {
    padding: 0 1rem;
  }

  .card-img-top {
    height: 160px;
  }
}

/* Mobile Optimization */
@media (max-width: 767.98px) {
  /* Adjust navbar for mobile */
  .navbar-collapse {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
  }

  /* Ensure menu items are properly spaced on mobile */
  .navbar-nav .nav-item {
    margin-bottom: 0.5rem;
  }

  /* Adjust social icons spacing on mobile */
  .social-icons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
  }

  /* Make language switcher centered on mobile */
  .navbar-collapse .me-3 {
    margin: 1rem 0;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  /* Improve table responsiveness */
  .schedule-table th,
  .schedule-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  /* Adjust section padding for mobile */
  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Improve card spacing on mobile */
  .card {
    margin-bottom: 1.5rem;
  }

  /* Adjust footer spacing on mobile */
  footer .col-lg-2,
  footer .col-lg-3,
  footer .col-lg-4 {
    margin-bottom: 1.5rem;
  }
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Improve form elements on mobile */
@media (max-width: 575.98px) {
  .form-control,
  .btn {
    font-size: 0.9rem;
  }

  .input-group {
    width: 100%;
  }
}

/* Live TV Page */
.program-info {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.next-programs {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.next-program-item {
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 0;
}

.next-program-item:last-child {
  border-bottom: none;
}

.program-time {
  font-weight: bold;
  color: #0d6efd;
}
