/*
 * Public site UI touch-up. Loaded after the theme's own stylesheets
 * (public/css/frontend/*.css, linked by frontend.blade.php) and scoped to
 * body.vv-polish, which layouts/Index.jsx sets on every route except
 * /register-online - that page keeps its existing design untouched.
 * Colours are the theme's own: navy #002c72, orange #f14f11.
 */

/* ---------- General ---------- */
body.vv-polish a,
body.vv-polish .btn,
body.vv-polish .xw-btn {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
body.vv-polish a:focus-visible,
body.vv-polish .btn:focus-visible {
  outline: 2px solid #f14f11;
  outline-offset: 2px;
}
body.vv-polish .btn-sec .btn {
  padding: 8px 28px;
  border-radius: 30px;
  box-shadow: 0 6px 16px rgba(0, 44, 114, 0.18);
}
body.vv-polish .btn-sec .btn:hover {
  transform: translateY(-2px);
}
/* CMS-entered body content: keep pasted images/tables inside the column. */
body.vv-polish main img,
body.vv-polish .page-content img,
body.vv-polish .xw-section__content img {
  max-width: 100%;
}
body.vv-polish table {
  max-width: 100%;
}

/* ---------- News & notices list cards (News, Notices, home notices) ---------- */
body.vv-polish .xw-sidebar-widget--news {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 44, 114, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
body.vv-polish .xw-sidebar-widget--news:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 44, 114, 0.16);
}
body.vv-polish .xw-sidebar-widget--news a {
  border-color: #e3e7ef;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}
body.vv-polish .xw-sidebar-widget--news a:hover {
  background-color: #fbfcfe;
}
/* The date sat mid-image in white with no backing: move it to a dark
   gradient strip just above the weekday label so it reads on any photo. */
body.vv-polish .xw-sidebar-widget--news__overlay {
  background: linear-gradient(180deg, rgba(0, 44, 114, 0) 35%, rgba(0, 20, 60, 0.7) 100%);
}
body.vv-polish .xw-sidebar-widget--news:hover .xw-sidebar-widget--news__overlay {
  background: linear-gradient(180deg, rgba(241, 79, 17, 0.1) 0%, rgba(0, 20, 60, 0.75) 100%);
}
body.vv-polish .xw-sidebar-widget--news__left h5 {
  top: auto;
  bottom: 24px;
  transform: none;
  padding: 0 8px 4px;
  font-size: 14px;
  line-height: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
body.vv-polish .xw-sidebar-widget--news__left p {
  margin: 0;
  letter-spacing: 0.3px;
}
body.vv-polish .xw-sidebar-widget--news__right {
  padding: 14px 16px;
}
body.vv-polish .xw-sidebar-widget--news__right h5 {
  color: #002c72;
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.vv-polish .xw-sidebar-widget--news__right > p {
  text-align: left;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.vv-polish .xw-sidebar-widget--news__right > p * {
  font-size: 13px !important;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
}
/* Same-height cards on the News/Notices lists. */
body.vv-polish .news-list .row > [class*="col-"] {
  display: flex;
}
body.vv-polish .news-list .xw-sidebar-widget--news {
  flex: 1;
  display: flex;
  margin-bottom: 24px;
}
body.vv-polish .news-list .xw-sidebar-widget--news > a {
  flex: 1;
  display: flex;
}
body.vv-polish .news-list .xw-sidebar-widget--news > a::before,
body.vv-polish .news-list .xw-sidebar-widget--news > a::after {
  display: none;
}
body.vv-polish .news-list .xw-sidebar-widget--news__left {
  float: none;
  flex: 0 0 160px;
  height: auto;
  min-height: 160px;
}
body.vv-polish .news-list .xw-sidebar-widget--news__left figure {
  position: absolute;
  inset: 0;
  margin: 0;
}
body.vv-polish .news-list .xw-sidebar-widget--news__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
body.vv-polish .news-list .xw-sidebar-widget--news__right h6 {
  margin-top: auto;
  padding-top: 6px;
}
@media (max-width: 575.98px) {
  body.vv-polish .news-list .xw-sidebar-widget--news > a {
    flex-direction: column;
  }
  body.vv-polish .news-list .xw-sidebar-widget--news__left {
    flex-basis: auto;
    width: 100%;
    height: 200px;
  }
}

/* ---------- Home: Latest News ---------- */
body.vv-polish .news_content .row > [class*="col-"] {
  display: flex;
}
body.vv-polish .news-item {
  flex: 1;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 44, 114, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
body.vv-polish .news-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 44, 114, 0.2);
}
body.vv-polish .news-item > a {
  display: flex;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
body.vv-polish .news-item figure {
  flex: 0 0 40%;
  width: auto;
  margin: 0;
  padding: 8px;
  background: #f4f6fa;
  border-radius: 14px 0 0 14px;
}
body.vv-polish .news-item figure img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  max-height: 190px;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 10px;
}
body.vv-polish .news-item__date {
  top: auto;
  bottom: 16px;
  left: 16px;
  color: #fff;
  font-weight: 600;
  background-color: #f14f11;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
body.vv-polish .news-item__text {
  flex: 1;
  min-width: 0;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 18px;
}
body.vv-polish .news-item__text h4 {
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.vv-polish .news-item__text .news_des {
  min-height: 0;
  max-height: 4.2em;
  line-height: 1.4;
}
body.vv-polish .news-item__text .news_des * {
  font-size: 13px;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
}
body.vv-polish .news-item__text .xw-btn {
  margin-top: auto;
  border-radius: 20px;
}
@media (max-width: 575.98px) {
  body.vv-polish .news-item > a {
    flex-direction: column;
  }
  body.vv-polish .news-item figure {
    border-radius: 14px 14px 0 0;
  }
  body.vv-polish .news-item figure img {
    max-height: 220px;
  }
}

/* ---------- Home: Our Facilities ---------- */
body.vv-polish .xw-section--why-us .facility {
  display: flex;
}
body.vv-polish .xw-section--why-us .facility .white-box {
  flex: 1;
  background: #fff;
  opacity: 1;
  border-radius: 14px;
  padding: 18px 20px 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
body.vv-polish .xw-section--why-us .facility .white-box:hover {
  background: #f14f11;
  transform: translateY(-4px);
}
body.vv-polish .facility h4.title {
  margin: 10px 0 8px;
}
body.vv-polish .facility h4.title a {
  font-size: 18px;
  font-weight: 700;
}
body.vv-polish .facility p.description {
  color: #555;
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---------- Gallery albums (home + /gallery): uniform tiles ---------- */
body.vv-polish .gallery-album .row > [class*="col-"] {
  display: flex;
}
body.vv-polish .gallery-album .img-wrapper {
  flex: 1;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #002c72;
}
body.vv-polish .gallery-album .img-wrapper > a {
  height: 100%;
}
body.vv-polish .gallery-album .img-wrapper img {
  width: 100%;
  height: 100%;
  max-height: none;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
body.vv-polish .gallery-album .img-wrapper:hover img {
  transform: scale(1.05);
}
body.vv-polish .gallery-album .img-wrapper .caption {
  padding: 28px 16px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
}
body.vv-polish .gallery-album .img-wrapper .caption h6 {
  margin-bottom: 6px;
}
body.vv-polish .gallery-album .img-wrapper .caption h6 a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Gallery details: even grid (Fancybox still opens the full image) ---------- */
body.vv-polish .gallery-img .img-wrapper {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #eef1f6;
  box-shadow: 0 4px 14px rgba(0, 44, 114, 0.1);
}
body.vv-polish .gallery-img .img-wrapper a {
  height: 100%;
  cursor: zoom-in;
}
body.vv-polish .gallery-img .img-wrapper img {
  width: 100%;
  height: 100%;
  max-height: none;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform 0.4s ease;
}
body.vv-polish .gallery-img .img-wrapper:hover img {
  transform: scale(1.05);
}

/* ---------- Footer ---------- */
body.vv-polish .xw-footer-widget .vv-footer-more {
  color: #fcbd11;
  font-weight: 600;
  white-space: nowrap;
}
body.vv-polish .xw-footer-widget .vv-footer-more:hover {
  color: #fff;
}
/* Facebook page plugin before/without the SDK: show its fallback link as a
   tidy "follow us" link instead of a bare line next to Quick Links. */
body.vv-polish .xw-footer-widget .fb-page blockquote {
  margin: 0;
}
body.vv-polish .xw-footer-widget .fb-page:not([fb-xfbml-state="rendered"]) blockquote a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}
body.vv-polish .xw-footer-widget--social-links ul li a {
  transition: transform 0.2s ease, background-color 0.2s ease;
}
body.vv-polish .xw-footer-widget--social-links ul li a:hover {
  transform: translateY(-2px);
}
