@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --brand-color: #bb0000;
  --brand-font: 'Inter', sans-serif;
  --border-color: #F5F5F5;
}

/* Ensure headings have proper bold weight */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

.font-bold {
  font-weight: 700 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.font-medium {
  font-weight: 500 !important;
}

body {
  font-family: var(--brand-font);
  background-color: #fff;
}

.container {
  max-width: 1448px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.story-card {
  max-width: 100%;
}

/* Ensure all story cards in sliders have the same height */
.stories-swiper .swiper-slide {
  height: auto;
}

/* Remove these overrides */
.stories-swiper .card-content {
  /* Remove all properties */
}

.stories-swiper .story-img-container {
  /* Remove all properties */
}

.stories-swiper .story-img-container img.view-assets-icon {
  /* Remove all properties */
}

.stories-swiper .card-content:hover .view-assets-icon {
  /* Remove all properties */
}

.stories-swiper .card-content > div:last-child {
  /* Remove all properties */
}


/* Responsive slide sizing */
@media (min-width: 1024px) {
  .swiper-slide {
    width: calc(25% - 10px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .swiper-slide {
    width: calc(33.333% - 10px);
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .swiper-slide {
    width: calc(50% - 10px);
  }
}

@media (max-width: 639px) {
  .swiper-slide {
    width: 100%;
  }
}

.header-border {
  border-left: 4px solid var(--brand-color);
}

.dashed-border {
  border: 1px dashed var(--brand-color);
  color: var(--brand-color);
}

.hover\:text-brand:hover {
  color: var(--brand-color);
}

.border-light {
  border-color: var(--border-color);
}

.bg-light {
  background-color: var(--border-color);
}

.brand-color {
  color: var(--brand-color);
}

.brand-bg {
  background-color: var(--brand-color);
}

.brand-border {
  border-color: var(--brand-color);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--brand-color);
}

.btn-primary {
  background-color: var(--brand-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* Card styles */
.story-card {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Active tab style */
.asset-tab.active {
  color: var(--brand-color);
  border-color: var(--brand-color);
}

/* Featured story style */
.featured-story {
  height: 400px;
}

/* Category labels */
.category-label {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  color: white;
}

/* Article type badges */
.article-badge {
  display: inline-block;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* View and share stats */
.view-stats {
  display: flex;
  align-items: center;
  color: #6B7280;
  font-size: 0.75rem;
}

/* Story container with proper spacing */
.stories-swiper-container {
  position: relative;
  margin: 0;
  padding: 0;
}

/* Swiper container with proper overflow */
.swiper.stories-swiper {
  width: 100%;
  overflow: visible;
  padding: 20px 0;
  margin: -20px 0;
}


/* Card content with shadows */
.card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Hover effect */
.card-content:hover {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12), 0 10px 10px rgba(0, 0, 0, 0.08);
}

/* Wrapper alignment */
.swiper-wrapper {
  display: flex;
  align-items: stretch;
}

/* Navigation button styles */
.swiper-button-disabled {
  opacity: 0.5 !important;
  cursor: not-allowed;
}

/* Legacy shadow classes */
.shadow-subtle {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.hover\:shadow-hover:hover {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12), 0 10px 10px rgba(0, 0, 0, 0.08);
}

/* Fix for Safari border radius */
.rounded-t-xl {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

/* Custom button styles */
.swiper-prev:focus, .swiper-next:focus {
  outline: none;
}

/* Tailwind custom utility classes */
@layer utilities {
  .text-brand {
    color: var(--brand-color);
  }
  
  .bg-brand {
    background-color: var(--brand-color);
  }
}

/* Story card hover effects */
.story-card-thumb {
  position: relative;
  width: 195px;
  height: 100px;
  overflow: hidden;
  border-radius: 0.375rem;
}

.story-card-thumb img.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(196, 196, 196, 0) 0%, rgba(118, 61, 158, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.group:hover .story-card-thumb::before {
  opacity: 1;
}

/* Large story card hover effects */
.card-content {
  position: relative;
}

.card-content .story-img-container {
  position: relative;
  overflow: hidden;
}

.card-content .story-img-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(196, 196, 196, 0) 0%, rgba(196, 196, 196, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card-content:hover .story-img-container::before {
  opacity: 1;
}

.view-assets-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 65px;
  height: 65px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.group:hover .view-assets-icon,
.card-content:hover .view-assets-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Tooltip styles */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: black;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid black;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.group:hover [data-tooltip]::after,
.group:hover [data-tooltip]::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Search input styles */
.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 48px;
  background: #F3F3F3;
  border: none;
  border-radius: 12px;
  padding: 0 48px 0 16px;
  font-size: 16px;
  color: #1F2937;
}

.search-input::placeholder {
  color: #6B7280;
}

.search-input:focus {
  outline: none;
}

.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #858585;
  pointer-events: none;
}

.search-icon::before {
  content: '';
  position: absolute;
  left: -12px;
  top: -12px;
  height: 24px;
  width: 1px;
  background-color: #858585;
  opacity: 0.5;
}

/* Story hero styles */
.story-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .story-hero-grid {
    grid-template-columns: 70% 30%;
  }
}

.embargo-notice {
  background-color: #FEF08A;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  border-radius: 0.375rem;
}

@media (min-width: 768px) {
  .embargo-notice {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
}

.story-hero .title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: #111827;
}

@media (min-width: 768px) {
  .story-hero .title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
}

.story-hero .subtitle {
  font-size: 1.125rem;
  color: #4B5563;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .story-hero .subtitle {
    font-size: 1.25rem;
  }
}

.story-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .story-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.share-section {
  margin-bottom: 1.5rem;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .share-section {
    margin-bottom: 2rem;
  }
  
  .share-buttons {
    gap: 1rem;
  }
}

/* Share button styles */
.share-button {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.share-button svg {
  width: 24px;
  height: 24px;
  color: white;
}

.share-button.facebook {
  background-color: #1877F2;
}

.share-button.twitter {
  background-color: #000000;
}

.share-button.linkedin {
  background-color: #0A66C2;
}

.share-button.email,
.share-button.more {
  background-color: #9C9D9D;
}

.share-button:hover {
  opacity: 0.9;
}

/* Dropdown styles */
.dropdown-content {
  display: none;
  position: relative;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
  padding: 1.5rem;
  margin-top: 0.5rem;
}

.download-dropdown.active .dropdown-content {
  display: block;
}

/* Remove overlay styles since we don't need them anymore */
.dropdown-overlay {
  display: none;
}

@media (min-width: 768px) {
  .dropdown-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    margin-top: 0;
  }
}

.download-button {
  background-color: var(--brand-color);
  color: white;
  width: 100%;
  padding: 0.875rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: opacity 0.2s;
}

@media (min-width: 768px) {
  .download-button {
    padding: 1rem;
    font-size: 1.25rem;
  }
}

.download-button:hover {
  opacity: 0.9;
}

.download-button svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.2s;
}

.download-dropdown.active .download-button svg {
  transform: rotate(180deg);
}

.select-all {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E5E7EB;
}

.select-all input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid #D1D5DB;
  margin-top: 0.25rem;
}

.select-all-text h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.25rem;
}

.select-all-text p {
  font-size: 0.875rem;
  color: #6B7280;
}
/*
.download-section {
margin-bottom: 1.5rem;
}
*/
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.section-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #6B7280;
}

.section-header h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
}

.subsection {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.subsection-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  margin-bottom: 0.5rem;
}

.download-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  margin-left: 20px;
}

.download-option input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 2px solid #D1D5DB;
}

.download-option span {
  font-size: 0.875rem;
  color: #111827;
}

.download-selected {
  background-color: var(--brand-color);
  color: white;
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.download-selected:hover {
  opacity: 0.9;
}

.download-selected svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  white-space: nowrap;
  margin: 0 -1rem;
  padding: 0 1rem;
  margin-bottom: 24px;
  gap: 8px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-nav button {
  padding: 12px 32px;
  font-size: 18px;
  font-weight: 500;
  color: white;
  background-color: #9C9D9D;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .tab-nav {
    margin: 0;
    padding: 0;
    margin-bottom: 24px;
  }
}

.tab-nav button.active {
  background-color: var(--brand-color);
}

.tab-nav button:hover:not(.active) {
  background-color: #D1D1D1;
}

/* Video Layout Styles */

.video-main {
  position: relative;
}

.video-prev,
.video-next {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  border-radius: 0.375rem;
  background-color: white;
  transition: all 0.2s ease;
}

.video-prev:hover,
.video-next:hover {
  border-color: #D1D5DB;
  background-color: #F9FAFB;
}

/* Custom scrollbar styling */
.video-thumbs-wrapper::-webkit-scrollbar {
  width: 6px;
}

.video-thumbs-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.video-thumbs-wrapper::-webkit-scrollbar-thumb {
  background-color: #D1D5DB;
  border-radius: 3px;
}

.video-thumbs-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #D1D5DB transparent;
}

.download-button-small {
  background-color: var(--brand-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.download-button-small:hover {
  opacity: 0.9;
}

.media-details {
  background-color: var(--brand-color);
  color: white;
  padding: 1.5rem 2rem;
  margin-top: -2px;
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

.media-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.media-detail-item.description {
  white-space: normal;
  min-width: 0;
  padding-right: 1rem;
}

.media-detail-value {
  font-size: 0.875rem;
  line-height: 1.4;
}

.download-asset-button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.download-asset-button:hover {
  opacity: 0.8;
}

/* Responsive styles for media details */
@media (max-width: 1024px) {
  .media-detail-item.description {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .media-details {
    padding: 1.25rem;
  }
  .media-detail-item.description {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
  }

  .download-asset-button {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {

  .media-detail-item {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .media-detail-item.description {
    flex-direction: column;
    align-items: flex-start;
  }
}

.content-section {
    margin: 2rem 0;
    position: relative;
}

.truncated-content {
    position: relative;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.truncated-content.expanded {
    max-height: none;
}

.truncated-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #374151;
}

.truncated-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.truncated-content.expanded::after {
    opacity: 0;
}

.read-more-btn {
    display: block;
    margin: 1rem auto 0;
    padding: 0.75rem 2rem;
    background-color: var(--brand-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.read-more-btn:hover {
    opacity: 0.9;
}

/* Story Cards - Base Styles */
.card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.story-img-container {
    position: relative;
    overflow: hidden;
}

.story-img-container img:not(.view-assets-icon) {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.view-assets-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 65px;
    height: 65px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.story-img-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(196, 196, 196, 0) 0%, rgba(196, 196, 196, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Hover Effects */
.card-content:hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12), 0 10px 10px rgba(0, 0, 0, 0.08);
}

.card-content:hover .story-img-container::before {
    opacity: 1;
}

.card-content:hover .view-assets-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Ensure consistent height in grid layout */
.grid .card-content {
    height: 100%;
}

/* Shadow styles */
.shadow-subtle {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.hover\:shadow-hover:hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12), 0 10px 10px rgba(0, 0, 0, 0.08);
}

.category-box {
height: 100%;
text-align: center;
}

.swiper-slide {
  height: 80px;
}