/* =========================================================
   ThrillSense main stylesheet
   Cleaned and condensed
   ========================================================= */

:root {
  --ts-purple: #262541;
  --ts-orange: #ffc371;
  --ts-red: #e14e4e;
  --ts-red-dark: #b83b3b;
  --ts-blue: #58caff;
  --ts-pink: #ff5f6d;
  --ts-bg: #f8f8f8;
  --ts-text-muted: #666;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ts-bg) !important;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span {
  color: var(--ts-purple) !important;
}

/* =========================================================
   Utilities
   ========================================================= */

.color-white,
.card-title,
.card-title .date,
.card-text,
.featured-main .date {
  color: #fff !important;
}

.title-alt,
.text-alt {
  color: var(--ts-purple) !important;
}

.text-date {
  color: var(--ts-purple) !important;
  font-size: 12px !important;
  margin-bottom: 0 !important;
}

.info-by,
.carousel-caption,
.hero-content h1 {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.mobile-nav,
.mobile-navlinks {
  display: none !important;
}

.hidden-mobile {
  display: initial;
}

.padding-4 {
  padding: 1.5rem !important;
}

.section-spacer {
  width: 100%;
  height: 30px;
  background: linear-gradient(to right, var(--ts-pink), var(--ts-orange));
  border: none;
}

/* Highlight underline effects */
.gradient-highlight span,
.gradient-highlight-blue span,
.gradient-highlight-red span {
  position: relative;
  display: inline-block;
  padding-bottom: 0.2em;
}

.gradient-highlight span::after,
.gradient-highlight-blue span::after,
.gradient-highlight-red span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50%;
  z-index: -1;
}

.gradient-highlight span::after {
  background: var(--ts-orange);
}

.gradient-highlight-blue span::after {
  background: var(--ts-blue);
}

.gradient-highlight-red span::after {
  background: var(--ts-pink);
}

/* =========================================================
   Header and navigation
   ========================================================= */

.navbar-expand-lg .navbar-collapse {
  margin-left: 120px;
}

.nav-link {
  color: #fff !important;
}

@media (min-width: 992px) {
  .navbar .nav-link {
    position: relative;
    padding-bottom: 0.35rem;
  }

  .navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0;
    height: 4px;
    background-color: var(--ts-orange);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
  }

  .navbar .nav-link:hover::after,
  .navbar .nav-link:focus::after {
    transform: scaleX(1);
  }
}

.navbar-toggler .custom-toggler {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  width: 26px;
  height: 19px;
}

.navbar-toggler .line {
  display: block;
  height: 2px;
  background: #fff !important;
  border-radius: 2px;
  transition: all 0.35s ease;
}

.navbar-toggler:not(.collapsed) .line1 {
  transform: rotate(45deg);
}

.navbar-toggler:not(.collapsed) .line2 {
  opacity: 0;
}

.navbar-toggler:not(.collapsed) .line3 {
  transform: rotate(-45deg);
}

/* =========================================================
   Hero and carousel
   ========================================================= */

.hero {
  position: relative;
  height: 90vh;
  overflow: hidden;
}

.gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(250, 250, 250, 1), rgba(250, 250, 250, 0.3), transparent);
}

.hero-content {
  position: absolute;
  bottom: 10%;
  left: 5%;
  z-index: 2;
  text-align: left;
}

.hero-content h1 {
  margin-bottom: 1rem;
  color: #fff !important;
  font-size: 2.5rem;
  font-weight: 800;
}

.hero.carousel,
.hero.carousel .carousel-inner,
.hero.carousel .carousel-item,
.hero.carousel .carousel-item img {
  height: 80vh;
}

.hero.carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  display: block !important;
  bottom: 20%;
  padding: 0 15px;
  color: #fff;
}

.btn-read {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background-color: var(--ts-red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(225, 78, 78, 0.4);
}

.btn-read:hover {
  background-color: var(--ts-red-dark);
}

/* =========================================================
   Cards and featured sections
   ========================================================= */

.featured h2 {
  color: #fff;
  font-size: 1.75rem;
}

.featured-main img,
.sm-card img,
.news-page .featured-card img,
.news-page .news-list-item img {
  transition: transform 0.5s ease;
}

.featured-main:hover img,
.sm-card:hover img {
  transform: scale(1.15);
}

.news-page .featured-card:hover img,
.news-page .news-list-item a:hover img {
  transform: scale(1.08);
}

.featured-main .card-img-top {
  height: 326px;
  object-fit: cover;
  border-radius: 10px;
}

.featured-main .card-body {
  margin-bottom: 10px;
  padding: 1.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
  color: #fff;
}

.featured-main .card-title {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.card-title {
  font-size: 1rem;
}

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

.overlay-gradient {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.date {
  color: #ccc;
  font-size: 0.85rem;
}

.featured-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--ts-orange) !important;
  color: #000 !important;
}

.featured-card:hover {
  filter: brightness(1.05);
}

.featured-card a {
  color: #000 !important;
  text-decoration: none;
}

.featured-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.featured-card .card-img-top {
  margin-bottom: 1rem;
}

.news-title {
  color: #000 !important;
}

.park-img {
  max-width: 150px;
  max-height: 150px;
  margin: 10px auto 0;
}

/* =========================================================
   News pages
   ========================================================= */

.news-page .hero-news {
  position: relative;
  display: flex;
  min-height: 16vh;
  padding-top: 76px;
  padding-left: 25px;
  background-color: var(--ts-purple);
}

.news-page .hero-news .hero-text h1,
.news-page .hero-news .hero-text p {
  color: #fff !important;
}

.news-page .featured-card.lead-story {
  border-radius: 10px;
  overflow: hidden;
}

.news-page .lead-img {
  display: block;
  height: 320px;
  object-fit: cover;
}

.news-page .featured-card.side-story {
  border-radius: 8px;
  overflow: hidden;
}

.news-page .side-thumb {
  flex: 0 0 110px;
  max-width: 110px;
}

.news-page .side-img {
  display: block;
  height: 84px;
  object-fit: cover;
}

.news-page .list-thumb {
  width: 120px;
  height: 80px;
  flex: 0 0 120px;
  object-fit: cover;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.list-thumb {
  transform: none !important;
}

/* =========================================================
   Articles, sidebar and author box
   ========================================================= */

@media (min-width: 992px) {
  .post-content {
    padding-right: 25px;
  }

  .sidebar-col {
    padding-left: 25px;
  }
}

.sidebar-section {
  padding-top: 1rem;
  border-top: 2px solid #eee;
}

.sidebar-title {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar-card {
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.sidebar-card:hover {
  transform: translateY(-2px);
}

.sidebar-img {
  width: 75px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.sidebar-text {
  color: #111;
  font-size: 0.85rem;
}

.sidebar-date {
  color: #888;
  font-size: 0.75rem;
}

.author-box {
  padding-top: 0 !important;
  border-top: none !important;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.author-bio {
  color: #555;
  font-size: 0.85rem;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  flex-shrink: 0;
  background-color: var(--ts-purple);
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* =========================================================
   Search modal
   ========================================================= */

.ts-search-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ts-search-icon-btn:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.ts-search-icon-btn:focus {
  border-radius: 999px;
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}

.ts-search-modal .modal-dialog {
  max-width: 680px;
}

.ts-search-modal .modal-content {
  position: relative;
  border: none;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ts-search-modal .modal-body {
  padding: 2.25rem;
}

.ts-search-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f3f3f5;
  color: var(--ts-purple);
  cursor: pointer;
}

.ts-search-close:hover {
  background: #e8e8ec;
}

.ts-search-kicker {
  margin: 0 0 0.4rem;
  color: #777 !important;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ts-search-heading {
  margin: 0 3rem 1.4rem 0;
  color: var(--ts-purple) !important;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
}

.ts-modal-search-form {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.ts-search-input-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-height: 54px;
  padding: 0 1rem;
  border: 1px solid #e3e3e8;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
}

.ts-search-input-wrap i {
  color: var(--ts-purple);
  font-size: 1.05rem;
}

.ts-search-input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ts-purple);
  font-size: 1rem;
}

.ts-search-input-wrap input::placeholder {
  color: #888;
}

.ts-modal-search-form button {
  padding: 0 1.35rem;
  border: none;
  border-radius: 999px;
  background: var(--ts-purple);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.ts-modal-search-form button:hover {
  opacity: 0.92;
}

.ts-search-helper {
  margin: 0.85rem 0 0;
  color: var(--ts-text-muted) !important;
  font-size: 0.95rem;
}

.modal-backdrop.show {
  opacity: 0.72;
}

/* =========================================================
   Tablet and mobile
   ========================================================= */

@media (max-width: 991.98px) {
  html {
    height: -webkit-fill-available;
  }

  body.nav-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
    touch-action: none;
  }

  .navbar {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2200 !important;
    min-height: 64px;
    padding-top: max(0.6rem, env(safe-area-inset-top)) !important;
    background: rgba(0, 0, 0, 0.62) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .navbar-brand img {
    height: 34px !important;
  }

  .navbar-toggler {
    position: fixed !important;
    top: max(0.85rem, calc(env(safe-area-inset-top) + 0.55rem)) !important;
    right: 1rem !important;
    z-index: 2401 !important;
    display: block !important;
    padding: 0.55rem !important;
    margin-top: 0 !important;
    border: none;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, 0.2) !important;
  }

  #mainNav.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2300 !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    height: 100dvh !important;
    min-height: -webkit-fill-available;
    padding: max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem)) 1.5rem max(7rem, calc(env(safe-area-inset-bottom) + 6rem));
    background: radial-gradient(circle at top left, rgba(255, 195, 113, 0.18), transparent 35%), rgba(0, 0, 0, 0.96);
    overflow-y: auto !important;
    overscroll-behavior: contain;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    -webkit-overflow-scrolling: touch;
  }

  #mainNav.fullscreen.show {
    opacity: 1;
    transform: translateY(0);
  }

  #mainNav.fullscreen.collapse {
    display: flex !important;
    height: 100dvh !important;
  }

  #mainNav.fullscreen ul.navbar-nav {
    align-items: stretch !important;
    justify-content: flex-start;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  #mainNav.fullscreen .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
    text-align: left;
  }

  #mainNav.fullscreen .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.05rem 0;
    color: #fff !important;
    font-size: clamp(1.25rem, 7vw, 1.75rem);
    font-weight: 600;
    line-height: 1.1;
    text-align: left;
  }

  #mainNav.fullscreen .nav-link:hover,
  #mainNav.fullscreen .nav-link:focus {
    color: var(--ts-orange) !important;
  }

  #mainNav.fullscreen .d-lg-none {
    display: block !important;
  }

  #mainNav.fullscreen .d-none.d-lg-block {
    display: none !important;
  }

  .featured .row.gx-4 {
    flex-direction: column;
  }

  .featured .col-lg-6 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .featured-main img.card-img-top {
    height: 200px;
  }

  .card-img {
    height: 150px;
  }

  .hero-content {
    bottom: 10%;
    padding: 0 10px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .btn-read.btn-lg {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
  }

  .news-page .lead-img {
    height: 200px;
  }

  .news-page .side-img {
    height: 70px;
  }

  .news-page .list-thumb {
    width: 96px;
    height: 64px;
  }

  .author-avatar {
    width: 55px;
    height: 55px;
  }

  .author-bio {
    font-size: 0.83rem;
  }
}

@media (max-width: 768px) {
  .hero,
  .hero.carousel,
  .hero.carousel .carousel-inner,
  .hero.carousel .carousel-item,
  .hero.carousel .carousel-item img {
    height: 60vh;
  }

  .hero-content h1 {
    font-size: 24px !important;
  }

  .hidden-mobile {
    display: none !important;
  }

  .carousel-caption {
    bottom: 10%;
    padding: 0 10px;
    font-size: 1rem;
  }

  .carousel-caption h1 {
    font-size: 1.5rem;
    font-weight: 600;
  }

  .btn-read.btn-lg {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }

  .post-content {
    padding: 0 1rem;
  }

  .news-list-item > a {
    align-items: stretch !important;
    min-height: 96px;
    border-radius: 8px;
    overflow: hidden;
  }

  .news-list-item .list-thumb {
    width: 110px !important;
    height: auto !important;
    min-height: 100% !important;
    align-self: stretch !important;
    flex: 0 0 110px;
    object-fit: cover;
    border-radius: 0 !important;
  }

  .news-list-item > a > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 0.75rem 0.75rem 0;
  }

  .ts-article div[style*="float: right"],
  .ts-article div[style*="float: left"] {
    float: none !important;
    width: 100% !important;
    margin: 1.25rem 0 !important;
  }

  .ts-article figure,
  .ts-article img {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ts-article figcaption {
    font-size: 0.9rem !important;
  }
}

@media (max-width: 575.98px) {
  .padding-4 {
    padding: 0.5rem !important;
  }

  .featured-main .card-title {
    font-size: 1rem !important;
  }

  .news-page .lead-img {
    height: 160px;
  }

  .news-page .side-thumb {
    display: none;
  }

  .author-box .d-flex {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .author-avatar {
    width: 50px;
    height: 50px;
  }

  .author-box h6 {
    font-size: 0.9rem;
  }

  .author-bio {
    font-size: 0.8rem;
  }

  .ts-search-modal .modal-dialog {
    margin: 1rem;
  }

  .ts-search-modal .modal-body {
    padding: 1.6rem;
  }

  .ts-modal-search-form {
    flex-direction: column;
  }

  .ts-search-input-wrap {
    border-radius: 16px;
  }

  .ts-modal-search-form button {
    min-height: 50px;
  }

  .ts-search-hero {
    padding-top: 6rem !important;
  }

  .ts-search-page-form {
    align-items: stretch !important;
    border-radius: 18px !important;
  }

  .ts-search-page-form button {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
  }
}
