@import './variables.css';

/* Force square edges across the site */
* {
  border-radius: 0 !important;
}

.rcf-logo { height: 48px; width: auto; display: block; }
@media (max-width: 991px){ .rcf-logo { height: 30px; } }

.hero-logo {
  height: 300px;
  width: auto;
  margin: 0 auto 1rem;
}

:root {
  /* This is a fallback color, will be changed by JavaScript */
  --random-filter-color: rgba(255, 0, 0, 0.7);
}

.hero-image {
  min-height: 300px;
  background:
    linear-gradient(135deg, var(--random-filter-color), var(--random-filter-color)),
    url('../images/hero.png') center/cover no-repeat;
  background-blend-mode: overlay;
}


/* Base typography */
body {
  background-color: var(--color-bg-light);
  color: var(--color-text-main);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
}

a {
  color: var(--color-link);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

img,
video {
  max-width: 100%;
  height: auto;
}

@media (max-width: 576px) {
  .hero-logo {
    height: 150px;
  }

  .hero-image {
    min-height: 200px;
  }
}

/* Buttons */
.btn {
  transition: background-color .3s ease, transform .2s ease, box-shadow .2s ease;
  background-color: var(--color-btn-primary-bg);
  border-color: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-text);
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: var(--color-btn-primary-hover-bg);
  border-color: var(--color-btn-primary-hover-bg);
  color: var(--color-btn-primary-hover-text);
}

/* Button color overrides */
.btn-success {
  background-color: var(--color-category-culture);
  border-color: var(--color-category-culture);
  color: var(--color-btn-primary-hover-text);
}

.btn-primary {
  background-color: var(--color-btn-primary-bg);
  border-color: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-text);
}

/* About page hero with red–black–green accented rainbow gradient */
.about-hero {
  min-height: 300px;
  background: linear-gradient(90deg, #e3342f, #000000, #2ecc71, #ffed4a, #3490dc, #9f7aea);
  color: #fff;
  background-size: 400% 400%;
  animation: aboutGradient 20s ease infinite;
}

@media (max-width: 576px) {
  .about-hero {
    min-height: 200px;
  }
}

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

/* Add color and new sections */
.story-strip {
  background: linear-gradient(to right, darkred, darkgreen, black);
  background-size: 300% 100%; /* Make the gradient wider than the element */
  animation: smoothColorCycle 10s ease-in-out infinite;
  color: white; /* Ensures text is visible */
}

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

.timeline {
  position: relative;
  border-left: 4px solid var(--color-text-main);
  margin-left: 1rem;
  padding-left: 1.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.1rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  background-color: var(--color-link);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rcf-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(0.5); }
}

.about-timeline .timeline-item.active,
.about-timeline .timeline-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.about-timeline .timeline-item.active .fw-semibold,
.about-timeline .timeline-item:hover .fw-semibold {
  color: var(--color-link);
}

.about-timeline .timeline-item.active::before,
.about-timeline .timeline-item:hover::before {
  width: 1.5rem;
  height: 1.5rem;
  left: -2.4rem;
  top: 0;
  background-image: url('../images/logo.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-color: transparent;
  animation: rcf-pulse 1.5s infinite;
}

.newsletter {
  background-color: var(--color-btn-secondary-hover-bg);
  padding: 2rem 1rem;
}

.newsletter .captcha {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-divider {
  border: 0;
  height: 4px;
  background: linear-gradient(to right, var(--color-gradient-start), var(--color-gradient-end));
  opacity: 1;
}

/* Contact page */
.site-contact {
  text-align: center;
}

.contact-form {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp .6s ease forwards;
  text-align: left;
}

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

/* Spotlight "Did You Know" cards */
.did-you-know {
  background: linear-gradient(135deg, var(--color-category-culture), var(--color-category-stem));
  border: 1px solid var(--color-border-light);
}

.fact-card {
  background-color: var(--color-btn-secondary-bg);
  border: 1px solid var(--color-border-light);
  transition: transform .3s ease, box-shadow .3s ease;
}

.fact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 1.5rem rgba(0,0,0,0.1);
}

/* Blog and Event cards */
.blog-index .card,
.events-index .card,
.programs-index .card {
  border: 1px solid var(--color-border-light);
  background-color: var(--color-btn-secondary-bg);
}

.blog-index .badge {
  background-color: var(--color-btn-secondary-bg);
  color: var(--color-text-main);
}

/* Enhanced blog article cards */
.spotlight-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 .25rem .5rem rgba(0, 0, 0, 0.05);
}

.spotlight-card:hover {
  transform: scale(1.02);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.15);
  border-color: var(--color-link);
}

/* Featured Series banner */
.featured-series {
  background-color: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-text);
}

/* Live search dropdown */
.live-search .dropdown-menu {
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

.live-search .form-control {
  width: 10rem;
}


@media (max-width: 767.98px) {
  .live-search {
    width: 100%;
    margin-right: 0 !important;
  }
  .live-search .form-control {
    width: 100%;
  }

}
