/* Triumph Community Hub additions on top of the Kind Heart theme.
   Keep theme overrides here rather than editing templatemo-kind-heart-charity.css
   so the theme can be upgraded without losing them. */

:root {
  /* Palette taken from the Triumph Community Hub logo. */
  --primary-color:              #3c1a84;   /* royal purple */
  --secondary-color:            #2a1060;   /* deep purple for headings */
  --accent-gold:                #e0a526;
  --accent-gold-deep:           #c98f12;
  --accent-red:                 #c8102e;
  --custom-btn-bg-color:        #3c1a84;
  --custom-btn-bg-hover-color:  #c98f12;
  --site-footer-bg-color:       #241056;
  --section-bg-color:           #f7f3fc;
  --overlay-purple:             30, 12, 70;
}

/* Buttons: purple, turning gold on hover. */
.custom-btn:hover, .custom-btn:focus { background: var(--accent-gold-deep); color: var(--white-color); }

/* --- Header and navigation ------------------------------------------- */
.site-header a { color: var(--white-color); }
.site-header .social-icon-link { background: rgba(255, 255, 255, 0.15); }
.navbar-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; margin-right: 24px; }
.navbar-brand .logo { max-height: 76px; width: auto; }
.navbar-brand span { font-size: 18px; }
.navbar-brand small { font-size: 11px; }
@media (min-width: 992px) and (max-width: 1299px) {
  /* Not enough room for the name beside the logo and the full menu. */
  .navbar-brand span { display: none; }
}
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav { align-items: center; }
  .navbar-expand-lg .navbar-nav .nav-link { padding-left: 10px; padding-right: 10px; white-space: nowrap; }
}

.navbar .dropdown-menu {
  border: 0;
  border-radius: var(--border-radius-small);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 10px 0;
  max-width: none;   /* theme caps dropdowns at 50px */
  min-width: 240px;
}
.navbar .dropdown-item {
  display: block;    /* theme makes items inline-block */
  padding: 8px 20px;
  font-size: 15px;
  color: var(--secondary-color);
}
.navbar .dropdown-item:hover, .navbar .dropdown-item.active {
  color: var(--primary-color);
  background: var(--section-bg-color);
}
@media (min-width: 992px) {
  /* Open dropdowns on hover for mouse users; click still works. */
  .navbar .nav-item.dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
  .navbar .nav-item.dropdown > .dropdown-menu { margin-top: 0; }
}
.navbar-nav .nav-link.active { color: var(--primary-color); }
.navbar-nav .nav-link.nav-donate {
  border: 2px solid var(--accent-red);
  border-radius: var(--border-radius-large);
  padding: 10px 26px !important;
  white-space: nowrap;
}

/* --- Page header for inner pages -------------------------------------- */
.page-header-section {
  background-image: url('../images/news/close-up-volunteer-oganizing-stuff-donation.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
  padding-top: 140px;
  padding-bottom: 100px;
}
.page-header-section .section-overlay {
  background: rgba(var(--overlay-purple), 0.55);
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.page-header-section .container { position: relative; z-index: 2; }
.page-header-section h1 { color: var(--white-color); }
.page-header-section p { color: rgba(255, 255, 255, 0.85); max-width: 720px; margin: 0 auto; }
.breadcrumb { justify-content: center; margin-bottom: 0; }
.breadcrumb-item a { color: var(--white-color); }
.breadcrumb-item.active, .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.7); }

/* --- Hero ------------------------------------------------------------- */
/* Same approach as Triumph Care Support: the photo at full strength under one
   flat tinted overlay, with a large centred headline on top. */
#hero-slide .carousel-item { position: relative; }
#hero-slide .carousel-item::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(var(--overlay-purple), 0.5);
}
#hero-slide .carousel-caption {
  clip-path: none;
  background: none;
  color: var(--white-color);
  text-align: center;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center !important;
  padding: 100px 8%;
}
#hero-slide .carousel-caption h1 { color: var(--white-color); font-size: 60px; max-width: 900px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
#hero-slide .carousel-caption h1 span { color: var(--accent-gold); }
#hero-slide .carousel-caption p { color: rgba(255, 255, 255, 0.95); font-size: 19px; max-width: 700px; }
#hero-slide .carousel-caption .custom-btn { margin-top: 12px; }
#hero-slide .carousel-control-prev, #hero-slide .carousel-control-next { z-index: 3; }
@media (max-width: 991px) {
  #hero-slide .carousel-caption { padding: 80px 24px 60px; }
  #hero-slide .carousel-caption h1 { font-size: 40px; }
  #hero-slide .carousel-caption p { font-size: 16px; }
}
@media (max-width: 575px) {
  #hero-slide .carousel-caption h1 { font-size: 28px; }
}
@media (max-width: 767px) {
  /* Swipe works on touch; the arrows sit on top of the caption at this width. */
  #hero-slide .carousel-control-prev, #hero-slide .carousel-control-next { display: none; }
}

/* --- Cards ------------------------------------------------------------ */
.service-card {
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-medium);
  padding: 32px 28px;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08); }
.service-card .service-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--section-bg-color);
  color: var(--primary-color);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 18px;
}
.service-card h5 a { color: var(--dark-color); }
.service-card h5 a:hover { color: var(--primary-color); }
.service-card p { margin-bottom: 0; }

.custom-block-image { height: 220px; object-fit: cover; }
.custom-block-wrap { height: 100%; }
.service-image-card { display: flex; flex-direction: column; cursor: pointer; }
.service-image-card .custom-block { display: flex; flex-direction: column; flex: 1; }
.service-image-card .custom-block .custom-btn { margin-top: auto; }
.service-image-card .service-image-link { display: block; overflow: hidden; }
.service-image-card .custom-block-image { width: 100%; transition: transform 0.3s ease; }
.service-image-card:hover .custom-block-image { transform: scale(1.04); }
.service-image-card h5 a { color: var(--dark-color); }
.service-image-card h5 a:hover { color: var(--primary-color); }

.event-card {
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-medium);
  overflow: hidden;
  height: 100%;
  display: flex;
}
.event-card .event-date {
  background: var(--custom-btn-bg-color);
  color: var(--white-color);
  min-width: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 10px;
}
.event-card .event-date strong { font-size: 32px; line-height: 1; }
.event-card .event-date span { text-transform: uppercase; font-size: 13px; letter-spacing: 1px; }
.event-card .event-body { padding: 20px 22px; }
.event-card .event-body h5 { margin-bottom: 6px; }
.event-card .event-body h5 a { color: var(--dark-color); }
.event-card .event-body h5 a:hover { color: var(--primary-color); }
.event-meta { font-size: 14px; color: var(--p-color); }
.event-meta i { color: var(--primary-color); margin-right: 4px; }

.impact-card {
  background: var(--white-color);
  border-radius: var(--border-radius-medium);
  padding: 30px 26px;
  height: 100%;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.impact-card i { font-size: 36px; color: var(--primary-color); }
.impact-card .counter-number { font-size: 44px; color: var(--custom-btn-bg-color); }
.impact-card h5 { margin-top: 6px; }
.impact-card p { font-size: 15px; margin-bottom: 0; }

.testimonial-card {
  background: var(--white-color);
  border-radius: var(--border-radius-medium);
  padding: 32px;
  height: 100%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.testimonial-card .quote-icon { font-size: 36px; color: var(--primary-color); }
.testimonial-card blockquote { font-size: 17px; line-height: 1.7; }
.testimonial-card .avatar-image { width: 56px; height: 56px; object-fit: cover; }

.partner-card {
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-medium);
  padding: 28px;
  height: 100%;
  text-align: center;
}
.partner-card img { max-height: 90px; width: auto; margin-bottom: 16px; }

/* --- Gallery ---------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 991px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid a { display: block; border-radius: var(--border-radius-small); overflow: hidden; }
.gallery-grid img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.3s ease; }
.gallery-grid a:hover img { transform: scale(1.04); }
.album-card { position: relative; border-radius: var(--border-radius-medium); overflow: hidden; display: block; }
.album-card img { width: 100%; height: 280px; object-fit: cover; }
.album-card .album-caption {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: var(--white-color); padding: 40px 20px 18px;
}
.album-card .album-caption h5 { color: var(--white-color); margin-bottom: 2px; }
.album-card .album-caption small { opacity: 0.85; }

/* Lightbox (no plugin needed). */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: none; align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1;
  cursor: pointer; padding: 10px;
}
.lightbox .lightbox-close { top: 16px; right: 20px; }
.lightbox .lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lightbox-caption {
  position: absolute; bottom: 20px; left: 0; right: 0;
  text-align: center; color: #fff; font-size: 14px;
}

/* --- Forms and alerts ------------------------------------------------- */
.custom-form label { font-size: 14px; color: var(--secondary-color); margin-bottom: 4px; }
.custom-form .form-select {
  background-color: var(--section-bg-color);
  border: 0;
  border-radius: var(--border-radius-large);
  padding: 12px 20px;
  margin-bottom: 24px;
  color: var(--p-color);
}
.custom-form .invalid-feedback { display: block; margin-top: -18px; margin-bottom: 14px; padding-left: 20px; }
.custom-form .is-invalid { border: 2px solid #dc3545 !important; }
.site-alerts { position: relative; z-index: 5; }
.site-alerts .alert { border-radius: var(--border-radius-small); margin: 20px auto 0; max-width: 960px; }

/* --- Content pages ---------------------------------------------------- */
.rich-text p, .rich-text li { color: var(--p-color); font-size: var(--p-font-size); line-height: 1.8; }
.rich-text img { max-width: 100%; height: auto; border-radius: var(--border-radius-small); }
.rich-text h2, .rich-text h3, .rich-text h4 { margin-top: 28px; }
.rich-text blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 10px 20px; margin: 24px 0;
  background: var(--section-bg-color);
  border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;
}
.detail-image { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--border-radius-medium); }
/* Portrait images (posters, flyers) are shown whole rather than cropped. */
.detail-image.is-portrait { max-height: none; object-fit: contain; max-width: 520px; display: block; margin: 0 auto 1.5rem; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 12px; margin-bottom: 14px; color: var(--p-color); }
.info-list li i { color: var(--primary-color); font-size: 20px; }
.info-list a { color: var(--secondary-color); }
.info-list a:hover { color: var(--primary-color); }

.sidebar-card {
  background: var(--section-bg-color);
  border-radius: var(--border-radius-medium);
  padding: 28px;
  margin-bottom: 30px;
}
.sidebar-card h5 { margin-bottom: 16px; }
.sidebar-card .list-group-item { background: transparent; border: 0; padding: 8px 0; }
.sidebar-card .list-group-item a { color: var(--secondary-color); }
.sidebar-card .list-group-item a:hover, .sidebar-card .list-group-item a.active { color: var(--primary-color); }
.sidebar-card .news-block-two-col-image-wrap img { height: 80px; width: 110px; object-fit: cover; border-radius: var(--border-radius-small); }

.bank-details {
  background: var(--white-color);
  border-radius: var(--border-radius-medium);
  padding: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.bank-details dt { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--p-color); }
.bank-details dd { font-size: 18px; margin-bottom: 14px; }

.pagination .page-link { border-radius: 50%; margin: 0 4px; color: var(--secondary-color); border-color: var(--border-color); }
.pagination .page-item.active .page-link { background: var(--primary-color); border-color: var(--primary-color); }

.map-embed { border: 0; width: 100%; height: 360px; border-radius: var(--border-radius-medium); }

/* --- Footer ----------------------------------------------------------- */
.site-footer .logo { max-height: 100px; width: auto; }
.site-footer p, .site-footer li { color: rgba(255, 255, 255, 0.85); }
.site-footer .charity-number { font-size: 14px; opacity: 0.8; }
.site-footer-bottom .social-icon-link { background: rgba(255, 255, 255, 0.15); }

/* Collapsed (phone) menu: let long dropdown items and the brand wrap. */
@media (max-width: 991px) {
  .navbar .dropdown-item { white-space: normal; }
  /* Phone and tablet: logo only, so the hamburger stays on the same row. */
  .navbar-brand span { display: none; }
  .navbar-brand .logo { max-height: 76px; }
  .navbar .dropdown-menu { box-shadow: none; padding-left: 12px; width: 100%; position: static; }
}

/* --- FAQ accordion ---------------------------------------------------- */
.faq-accordion .accordion-item { border: 1px solid var(--border-color); border-radius: var(--border-radius-small) !important; margin-bottom: 12px; overflow: hidden; }
.faq-accordion .accordion-button { font-size: 18px; font-weight: var(--font-weight-semibold); color: var(--dark-color); padding: 18px 22px; box-shadow: none; }
.faq-accordion .accordion-button:not(.collapsed) { background: var(--section-bg-color); color: var(--primary-color); }
.faq-accordion .accordion-button:focus { box-shadow: none; border-color: var(--border-color); }
.faq-accordion .accordion-body { color: var(--p-color); line-height: 1.7; padding: 4px 22px 20px; }
.faq-accordion .accordion-body a { color: var(--primary-color); }

/* --- Donate page -------------------------------------------------------
   The theme overlay is a light 35% tint, too faint for white text over a
   bright photo. Use a strong gradient: near-solid behind the text on the
   left, lighter towards the bank-details card on the right. */
.donate-section .section-overlay {
  background: rgba(var(--overlay-purple), 0.68);
}
.donate-section .text-white { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
@media (max-width: 991px) {
  .donate-section .section-overlay { background: rgba(var(--overlay-purple), 0.8); }
}

/* --- Brand accents ----------------------------------------------------- */
.service-card .service-icon { background: #fdf3da; color: var(--accent-gold-deep); }
.impact-card i, .info-list li i, .event-meta i, .testimonial-card .quote-icon { color: var(--accent-gold-deep); }
.rich-text blockquote { border-left-color: var(--accent-gold); }
.navbar-nav .nav-link:hover { color: var(--primary-color); }
.navbar-nav .nav-link.active { color: var(--primary-color); font-weight: 600; }
.navbar .dropdown-item:hover, .navbar .dropdown-item.active { color: var(--primary-color); }
.site-footer-title { color: var(--accent-gold); }
.site-footer .footer-menu-link:hover, .site-footer-link:hover { color: var(--accent-gold); }
.section-bg .custom-text-box-icon, .custom-text-box-icon { color: var(--accent-gold-deep); }
.counter-number, .counter-number-text { color: var(--primary-color); }
.navbar-nav .nav-link.nav-donate {
  background: var(--accent-red); border-color: var(--accent-red); color: var(--white-color) !important;
}
.navbar-nav .nav-link.nav-donate:hover { background: #a30d25; border-color: #a30d25; }

/* --- Site search ------------------------------------------------------- */
/* One joined control: a text box and a button, both with a small radius. */
.site-search { display: flex; align-items: stretch; margin: 0; }
.site-search input[type="search"] {
  -webkit-appearance: none; appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45); border-right: 0;
  border-radius: 8px 0 0 8px;
  padding: 0 14px; font-size: 14px; line-height: 1.2; width: 220px; max-width: 100%;
  background: rgba(255, 255, 255, 0.14); color: var(--white-color);
  box-shadow: none; outline: none;
}
.site-search input[type="search"]::placeholder { color: rgba(255, 255, 255, 0.78); }
.site-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.site-search input[type="search"]:focus { background: rgba(255, 255, 255, 0.24); border-color: var(--accent-gold); }
.site-search button {
  -webkit-appearance: none; appearance: none;
  border: 1px solid var(--accent-gold); border-radius: 0 8px 8px 0;
  background: var(--accent-gold); color: var(--secondary-color);
  padding: 0 14px; font-size: 15px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.site-search button:hover { background: var(--accent-gold-deep); border-color: var(--accent-gold-deep); color: var(--white-color); }
/* The box and the button always share one explicit height. */
.site-search input[type="search"], .site-search button { box-sizing: border-box; height: 40px; }
.site-search-large input[type="search"], .site-search-large button { height: 58px; }
.site-search-mobile input[type="search"], .site-search-mobile button { height: 48px; }

/* Larger variants (results page, mobile menu): light box, purple button. */
.site-search-large input[type="search"], .site-search-mobile input[type="search"] {
  width: 100%; background: var(--white-color); color: var(--dark-color);
  border: 1px solid #cfc6e6; border-right: 0;
}
.site-search-large input[type="search"]::placeholder, .site-search-mobile input[type="search"]::placeholder { color: var(--p-color); }
.site-search-large input[type="search"]:focus, .site-search-mobile input[type="search"]:focus { background: var(--white-color); border-color: var(--primary-color); }
.site-search-large input[type="search"] { padding: 0 18px; font-size: 18px; }
.site-search-mobile input[type="search"] { padding: 0 14px; font-size: 16px; }
.site-search-large button, .site-search-mobile button { background: var(--primary-color); border-color: var(--primary-color); color: var(--white-color); padding: 0 20px; font-size: 18px; }
.site-search-large button:hover, .site-search-mobile button:hover { background: var(--secondary-color); border-color: var(--secondary-color); }

.search-result { display: block; padding: 18px 22px; margin-bottom: 12px; border: 1px solid var(--border-color); border-radius: var(--border-radius-small); transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.search-result:hover { border-color: var(--accent-gold); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07); }
.search-result h5 { color: var(--primary-color); margin-bottom: 4px; }
.search-result p { color: var(--p-color); margin: 6px 0 0; }
.search-result mark { background: #fdf0c4; color: inherit; padding: 0 2px; border-radius: 3px; }
@media (min-width: 992px) and (max-width: 1199px) { .site-search input[type="search"] { width: 160px; } }
