/**
 * ttp-compat.css - WebStarts layout compatibility layer
 * Overrides position:absolute flow-breaking, styles navigation,
 * handles color classes, responsive layout, and WebStarts element patterns
 */

/* ===== COLOR CLASS OVERRIDES ===== */
/* These override the existing site.css values with the specified pet-services palette */
.clr-bkg-24 { background-color: #1a2942 !important; }
.clr-txt-24 { color: #1a2942 !important; }
.clr-brd-24 { border-color: #1a2942 !important; }
.clr-txt-hvr-24:hover { color: #1a2942 !important; }
.clr-bkg-hvr-24:hover { background-color: #1a2942 !important; }
.clr-txt-act-24.active { color: #1a2942 !important; }
.clr-bkg-act-24.active { background-color: #1a2942 !important; }

.clr-txt-51 { color: #4a7aa7 !important; }
.clr-txt-hvr-51:hover { color: #4a7aa7 !important; }

.clr-txt-75 { color: #ffffff !important; }
.clr-brd-75 { border-color: #ffffff !important; }
.clr-txt-hvr-75:hover { color: #ffffff !important; }

.clr-bkg-72 { background-color: #2c8c99 !important; }
.clr-txt-72 { color: #2c8c99 !important; }

.clr-txt-63 { color: #333333 !important; }

.clr-txt-hvr-61:hover { color: #5599cc !important; }
.clr-txt-61 { color: #5599cc !important; }

.clr-bkg-74 { background-color: #f5f5f5 !important; }

/* ===== POSITION:ABSOLUTE OVERRIDE ===== */
/* Convert absolute-positioned content elements to normal flow */
/* Target elements that WebStarts positioned absolutely but should flow */
.wse-txt-con[style*="position:absolute"],
.wse-txt-con[style*="position: absolute"] {
  position: relative !important;
}

.wse-img[style*="position:absolute"],
.wse-img[style*="position: absolute"] {
  position: relative !important;
}

.wse-box[style*="position:absolute"],
.wse-box[style*="position: absolute"] {
  position: relative !important;
}

.wse-btn[style*="position:absolute"],
.wse-btn[style*="position: absolute"] {
  position: relative !important;
}

.wse-men[style*="position:absolute"],
.wse-men[style*="position: absolute"] {
  position: relative !important;
}

div[objtype][style*="position:absolute"],
div[objtype][style*="position: absolute"] {
  position: relative !important;
}

/* Preserve absolute inside column-inner (grid layout needs it less aggressively) */
.wse-col .wse-column-inner > div {
  position: relative !important;
  margin-bottom: 15px;
}

/* Sections that use position:relative should keep it */
section.wse-col[style*="position:relative"] {
  position: relative !important;
}

/* ===== GLOBAL LAYOUT ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333333;
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
header {
  position: relative;
  z-index: 100;
}

#header-wrap {
  position: relative;
}

#header-full {
  position: relative;
}

#header-full .content-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

#header-bg {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

#header-bg .content-fixed {
  width: 100%;
  height: 100%;
}

/* ===== NAVIGATION BAR ===== */
.wse-men {
  width: 100%;
  z-index: 1000;
}

nav.horizontal {
  width: 100%;
  background-color: #1a2942;
}

nav.horizontal ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #1a2942;
}

nav.horizontal ul li {
  width: auto !important;
  flex: 0 1 auto;
}

nav.horizontal ul li a {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-bottom: 3px solid transparent;
}

nav.horizontal ul li a:hover {
  color: #5599cc !important;
  background-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: #2c8c99;
}

nav.horizontal ul li a.active,
nav.horizontal ul li.active a {
  color: #ffffff !important;
  border-bottom-color: #2c8c99;
  background-color: rgba(44, 140, 153, 0.2);
}

/* Nav link inner spans should inherit color */
nav.horizontal ul li a .page-title,
nav.horizontal ul li a .page-title-inner {
  color: inherit !important;
}

/* ===== MOBILE MENU TOGGLE ===== */
.menu-toggle {
  display: none;
  cursor: pointer;
  padding: 10px 15px;
  z-index: 1001;
}

.menu-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background-color: #ffffff !important;
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* ===== SLIDEOUT MENU (mobile) ===== */
.slideout-menu {
  background-color: #1a2942 !important;
}

.slideout-menu a {
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.slideout-menu a:hover,
.slideout-menu a.active {
  background-color: rgba(44, 140, 153, 0.3) !important;
  color: #5599cc !important;
}

/* ===== SECTIONS / STRIPS ===== */
.wse-str,
section.wse-col,
.content-full,
#body-page {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.content-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* ===== TEXT CONTAINERS ===== */
.wse-txt-con {
  max-width: 900px;
  padding: 15px 20px;
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.wse-txt-con h1, .wse-txt-con h2, .wse-txt-con h3,
.wse-txt-con h4, .wse-txt-con h5, .wse-txt-con h6 {
  margin-top: 0.5em;
  margin-bottom: 0.3em;
  line-height: 1.3;
}

.wse-txt-con p {
  margin-bottom: 0.8em;
}

/* ===== IMAGES ===== */
.wse-img {
  overflow: hidden;
}

.wse-img img,
img.load-image,
img.loaded {
  max-width: 100%;
  height: auto;
  display: block;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Image containers inside columns */
.wse-column-inner .wse-img {
  text-align: center;
  margin-bottom: 10px;
}

.wse-column-inner .wse-img img {
  margin: 0 auto;
}

/* Fade-in for loaded images */
img.load-image {
  transition: opacity 0.3s ease;
}

img.load-image:not(.loaded) {
  opacity: 0;
}

/* ===== BACKGROUND IMAGES ===== */
.bgImg {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 200px;
}

.bg-container {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* ===== BOXES ===== */
.wse-box {
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.wse-box .wseI {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  z-index: -1;
}

/* ===== BUTTONS ===== */
.wse-btn a {
  display: inline-block;
  padding: 10px 25px;
  text-decoration: none;
  border: 2px solid;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.wse-btn a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ===== COLUMNS GRID ===== */
.wse-columns {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.wse-column {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}

.wse-column-inner {
  padding: 15px;
  position: relative;
}

.wse-column-bg {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

/* Specific column counts */
.wse-columns-1 .wse-column { flex-basis: 100%; }
.wse-columns-2 .wse-column { flex-basis: 50%; }
.wse-columns-3 .wse-column { flex-basis: 33.333%; }
.wse-columns-4 .wse-column { flex-basis: 25%; }

/* ===== GALLERY ===== */
.wsg-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.wsg-thumb-container {
  flex: 0 0 auto;
}

.wsg-thumb {
  overflow: hidden;
  border-radius: 4px;
}

.wsg-thumb img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.wsg-thumb:hover img {
  transform: scale(1.05);
}

/* ===== HIDE SHADOW ELEMENTS ===== */
.wseSHBL,
.wseSHBR,
.wseSHTL,
.wseSHTR {
  display: none !important;
}

/* ===== HIDE NULL NODES ===== */
pre.nullNode,
xmp.nullNode {
  display: none;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  background-color: #1a2942;
  color: #ffffff;
  margin-top: 20px;
}

footer .content-inner {
  padding: 20px;
}

#footer-bg {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

/* ===== BODY PAGE AREA ===== */
#body-wrap {
  position: relative;
  min-height: 50vh;
}

#body-full .content-inner {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* ===== FONT SIZE HELPERS ===== */
.fs-10 { font-size: 10px; }
.fs-12 { font-size: 12px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-22 { font-size: 22px; }
.fs-24 { font-size: 24px; }
.fs-28 { font-size: 28px; }
.fs-30 { font-size: 30px; }
.fs-32 { font-size: 32px; }
.fs-36 { font-size: 36px; }
.fs-40 { font-size: 40px; }
.fs-48 { font-size: 48px; }

/* ===== ANIMATION CLASSES ===== */
.wse-ani-fade-in { animation: ttpFadeIn 0.6s ease forwards; }
.wse-ani-fade-in-down { animation: ttpFadeInDown 0.6s ease forwards; }
.wse-ani-fade-in-up { animation: ttpFadeInUp 0.6s ease forwards; }
.wse-ani-fade-in-left { animation: ttpFadeInLeft 0.6s ease forwards; }
.wse-ani-fade-in-right { animation: ttpFadeInRight 0.6s ease forwards; }

@keyframes ttpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ttpFadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ttpFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ttpFadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes ttpFadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== PERSONALIZATION / MISC ===== */
.wse-personalize {
  position: relative;
}

/* Ensure wseA links are clickable */
a.wseA {
  display: block;
  text-decoration: none;
}

a.wseA[style*="cursor:default"] {
  cursor: default;
}

/* wseI inner containers */
.wseI {
  position: relative;
  overflow: hidden;
}

/* wseT text inside buttons */
.wseT {
  position: relative;
  z-index: 1;
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 980px) {
  nav.horizontal ul li a {
    padding: 10px 8px;
    font-size: 12px;
  }

  .content-inner {
    padding: 0 15px;
  }

  .wse-txt-con {
    max-width: 100%;
  }

  .wse-columns-3 .wse-column,
  .wse-columns-4 .wse-column {
    flex-basis: 50%;
  }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
  /* Show hamburger menu */
  .menu-toggle {
    display: block !important;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
  }

  /* Hide desktop nav */
  nav.horizontal ul {
    display: none !important;
  }

  /* Column stacking */
  .wse-columns {
    flex-direction: column;
  }

  .wse-column,
  .wse-columns-2 .wse-column,
  .wse-columns-3 .wse-column,
  .wse-columns-4 .wse-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  .wse-column-inner {
    padding: 10px;
  }

  /* Text containers full-width on mobile */
  .wse-txt-con {
    max-width: 100%;
    padding: 10px 15px;
  }

  /* Images responsive */
  .wse-img {
    width: 100% !important;
  }

  .wse-img img {
    width: 100%;
  }

  /* Boxes full width */
  .wse-box {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Buttons centered */
  .wse-btn {
    text-align: center;
    width: 100% !important;
  }

  /* Gallery smaller */
  .wsg-thumb-container {
    flex-basis: 48%;
  }

  /* Hide elements marked hidden-phone */
  .hidden-phone {
    display: none !important;
  }

  /* Footer adjustments */
  footer .content-inner {
    text-align: center;
  }

  /* Header title sizing */
  .wse-txt-h5 .fs-36 {
    font-size: 24px !important;
  }
}

/* ===== RESPONSIVE: SMALL PHONE ===== */
@media (max-width: 480px) {
  nav.horizontal ul li a {
    font-size: 11px;
    padding: 8px 5px;
  }

  .wsg-thumb-container {
    flex-basis: 100%;
  }

  .wse-txt-h5 .fs-36 {
    font-size: 20px !important;
  }
}

/* ===== PRINT ===== */
@media print {
  nav.horizontal,
  .menu-toggle,
  .slideout-menu,
  .slideout-mask,
  footer,
  .wseSHBL, .wseSHBR, .wseSHTL, .wseSHTR {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .wse-txt-con {
    max-width: 100%;
  }

  img {
    max-width: 100% !important;
  }
}

/* === FIX: Force nav visibility (WebStarts hides by default, expects _ws to show) === */
nav.horizontal,
nav.horizontal ul,
nav.horizontal li,
nav.horizontal a,
.wse-men,
.wse-men nav {
  visibility: visible !important;
  opacity: 1 !important;
}

header,
#header-wrap {
  position: relative !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
  display: block !important;
}

#header-full,
#header-fixed,
.content-full,
.content-fixed,
.content-inner {
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}

/* Fix column inner to not collapse */
.wse-col,
.wse-columns,
.wse-column {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
}

.wse-column-inner {
  position: relative !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
}

/* Header background */
#header-bg {
  position: absolute !important;
  top: 0;
  left: 0;
  z-index: 0;
}

#header-wrap {
  z-index: 1;
  position: relative !important;
}

/* Body content fix */
#body-content,
#body-full,
#body-fixed {
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}

/* Fix strips and sections */
.wse-str {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 50px;
}

.wse-str > .wseI {
  position: relative !important;
  width: 100%;
  min-height: inherit;
}

/* Fix footer */
footer,
#footer-wrap,
#footer-full,
#footer-fixed {
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}

/* Ensure images inside .wseI are visible */
.wse-img .wseI,
.wse-img .wseI img {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Fix text animations - make visible immediately */
.wse-ani {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Fix the copyright/footer text */
#footer-wrap .wse-txt-con,
footer .wse-txt-con {
  text-align: center;
  padding: 15px;
}

/* === FIX: Override data-menu-moretab hidden from site-base.css === */
[data-menu-moretab="1"],
nav[data-menu-moretab="1"],
nav.horizontal[data-menu-moretab="1"] {
  visibility: visible !important;
  display: flex !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
}

/* Force header to have real height */
header {
  min-height: 60px !important;
  overflow: visible !important;
  display: block !important;
  position: relative !important;
}

header * {
  visibility: visible !important;
}
