/* Google font for top bar effect (scoped use) */
@import url("https://fonts.googleapis.com/css?family=Luckiest+Guy&display=swap");

/* Custom styles */
body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #fdfbf5;
}

/* Special serif font for main headings */
.font-serif-display {
    font-family: 'Playfair Display', serif;
    color: #0a2045; /* Dark blue for headings */
}

/* === Override heading color ONLY in hero slider === */
.hero-slide .font-serif-display {
    color: #ffc400 !important; /* Make slider headings BRAND YELLOW (and force it) */
}

/* === HEADER STATES === */
.site-header-mobile-solid {
    background-color: #fdfbf5; /* light-tan */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}
@media (min-width: 768px) {
    .site-header-mobile-solid {
        position: static;
        box-shadow: none;
    }
    .site-header-desktop-transparent {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background-color: transparent;
        box-shadow: none;
        z-index: 40;
    }
}

/* === TOP BAR BACKGROUND (final cheetah print fix) === */
#top-bar {
  /* Keep your golden gradient overlay */
  background:
    linear-gradient(rgba(255, 196, 0, 0.88), rgba(255, 196, 0, 0.88)),
    url('/media/cheetah_print_bg.png');

  /* Make cheetah print small & repeating instead of stretched */
  background-size: 150px 150px;  /* adjust this value to control how small the spots look */
  background-repeat: repeat;     /* tile pattern */
  background-position: top center;
  overflow: visible;
  position: relative;
}


/* container stays the same — and keeps everything centered */
.matrix-container {
  position: relative;
  display: flex;
  justify-content: center;     /* center horizontally */
  align-items: center;         /* center vertically */
  width: 100%;
  height: 100%;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  text-align: center;          /* make sure text is centered */
}

/* wrapper for the new 2-span version */
.matrix-text-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* =========================================================
   CODEPEN-STYLE 2-PART BOUNCE (FINAL, TIGHT, CENTERED)
   ========================================================= */
.matrix-text {
  font-family: "Luckiest Guy", cursive;
  font-weight: 400;
  font-size: clamp(1rem, 2.3vw, 1.4rem);
  color: #fff;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 0.1em 20px rgba(0, 0, 0, 1),
    0.05em -0.03em 0 rgba(0, 0, 0, 1),
    0.05em 0.005em 0 rgba(0, 0, 0, 1),
    0em 0.08em 0 rgba(0, 0, 0, 1),
    0.05em 0.08em 0 rgba(0, 0, 0, 1),
    0px -0.03em 0 rgba(0, 0, 0, 1),
    -0.03em -0.03em 0 rgba(0, 0, 0, 1),
    -0.03em 0.08em 0 rgba(0, 0, 0, 1),
    -0.03em 0 0 rgba(0, 0, 0, 1);
}
.matrix-text span {
  display: inline-block;
  transform: scale(0.9);
}
.matrix-text span:first-child {
  animation: bop 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}
.matrix-text span:last-child {
  margin-left: 0.35rem; /* keep them close like a sentence */
  animation: bopTilt 1s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}

@keyframes bop {
  0% { transform: scale(0.9); }
  50%, 100% { transform: scale(1); }
}
@keyframes bopTilt {
  0% { transform: scale(0.9); }
  80%, 100% { transform: scale(1) rotateZ(-3deg); }
}

/* mobile: stack the two lines but keep center */
@media (max-width: 640px) {
  .matrix-text {
    white-space: normal;
    line-height: 1.1;
  }
  .matrix-text span {
    display: block;
    margin-left: 0;
  }
}

/* === MOBILE MENU BUTTON (Ensure Visibility) === */
#mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;  /* 40px */
    height: 2.5rem; /* 40px */
    padding: 0.25rem; /* p-1 */
}

/* Hero slider container styling */
.hero-slide {
    overflow: hidden;
    position: relative;
}
/* Inner div holding the background image and animation */
.hero-slide .hero-bg-animate {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: none;
    will-change: transform;
}
/* Specific Background Images */
.hero-bg-animate.hero-slide-1 { background-image: url('/media/office_01.jpg'); }
.hero-bg-animate.hero-slide-2 { background-image: url('/media/office_02.jpg'); }
.hero-bg-animate.hero-slide-3 { background-image: url('/media/office_03.jpg'); }

/* === Navigation link styling === */
.nav-link {
    position: relative;
    text-decoration: none;
    color: #0a2045;
    font-weight: 600;
    padding-bottom: 8px;
    transition: color 0.3s ease-in-out;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffc400;
    transition: width 0.3s ease-in-out;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link:hover,
.nav-link.active {
    color: #ffc400;
}
/* === END Navigation link styling === */

/* === Desktop Dropdown Menu Styling === */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    min-width: 14rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 50;
}
.group:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.submenu-link {
    display: block;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    color: #0a2045;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.submenu-link:hover {
    background-color: #fbfaf5;
    color: #ffc400;
}
/* === END Desktop Dropdown Styling === */

/* === Mobile Accordion Menu Styling === */
#mobile-menu {
    background-color: #fdfbf5; /* solid bg under transparent desktop header */
}
.mobile-nav-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    color: #0a2045;
    cursor: pointer;
    transition: background-color 0.2s ease;
    list-style: none;
}
.mobile-nav-summary::-webkit-details-marker {
    display: none;
}
.mobile-nav-group[open] > .mobile-nav-summary .chevron-icon {
    transform: rotate(180deg);
}
.chevron-icon {
    transition: transform 0.2s ease-in-out;
}
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border-radius: 0.375rem;
    font-weight: 500;
    color: #333;
}
.mobile-nav-link:hover {
    background-color: #fbfaf5;
    color: #ffc400;
}
/* === END Mobile Accordion Styling === */

/* Testimonial slider */
.testimonial-slide { display: none; }
.testimonial-slide.active { display: block; }

/* Service Tab Styling */
.service-tab-button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f5f2e9;
    border-radius: 8px;
    font-weight: 600;
    color: #0a2045;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.service-tab-button:hover { background-color: #f0ebda; }
.service-tab-button.active {
    background-color: #0a2045;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.service-tab-pane { display: none; }
.service-tab-pane.active { display: block; }

/* === Service Tab "Learn More" Button === */
.service-link-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.15rem;
  background-color: #0a2045;
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transition: all 0.25s ease-in-out;
}
.service-link-btn:hover {
  background-color: #ffc400;
  color: #0a2045;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

/* --- CSS FOR SLIDER ANIMATIONS (KEN BURNS) --- */
@keyframes kenBurns {
    0% { transform: scale(1.05) translate(0, 0); }
    100% { transform: scale(1) translate(-2%, 1%); }
}
.swiper-slide-active .hero-bg-animate {
    animation: kenBurns 15s infinite alternate ease-in-out;
}
.slide-content-animate {
    animation: slideInFromLeft 1s ease-out 0.3s forwards;
    opacity: 0; will-change: transform, opacity;
}
@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-50px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* --- STYLING FOR SWIPER NAVIGATION BUTTONS --- */
.swiper-button-prev,
.swiper-button-next {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
    width: 44px; height: 44px; background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer; transition: background-color 0.3s ease;
}
.swiper-button-prev:hover,
.swiper-button-next:hover { background-color: rgba(0, 0, 0, 0.5); }
.swiper-button-prev { left: 16px; }
.swiper-button-next { right: 16px; }
.swiper-button-prev::after, .swiper-button-next::after { display: none; }

/* --- STYLING FOR ESTIMATOR MODAL --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-fade-in { animation: fadeIn 0.3s ease-out forwards; }
.modal-content-slide-up { animation: slideUp 0.3s ease-out 0.1s forwards; opacity: 0; }

/* === CHEETAH PRINT CTA BACKGROUND === */
#cta-banner {
    background:
        linear-gradient(rgba(255, 196, 0, 0.8), rgba(255, 196, 0, 0.8)),
        url('/media/cheetah_print_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* === STATS SECTION BACKGROUND === */
#stats-section {
    background-image: url('/media/office_02.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}
#stats-section::before {
    content: ''; position: absolute; inset: 0;
    background-color: #0a2045; opacity: 0.8; z-index: 0;
}
#stats-section > div { position: relative; z-index: 10; }

/* === FOOTER BACKGROUND === */
#main-footer {
     background:
        linear-gradient(rgba(255, 196, 0, 0.8), rgba(255, 196, 0, 0.8)),
        url('/media/cheetah_print_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* === Back to Top Button (base appearance) === */
#back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #ffc400; /* brand-yellow */
    color: #0a2045; /* brand-blue */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* this class is added/removed by JS */
#back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top-btn:hover {
    background-color: #e6b000; /* Darker gold on hover */
}

/* === MOBILE SAFE-AREA OVERRIDE === */
@media (max-width: 768px) {
    #back-to-top-btn {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 0px);
        right: 16px;
        width: 56px;
        height: 56px;
        border: 2px solid rgba(255,255,255,0.8); /* halo */
        pointer-events: auto;
    }
}
/* === HERO SLIDER SMALL TEXT OUTLINE (Readability) === */
.hero-slide p,
.hero-slide .text-sm,
.hero-slide .hero-slide-subline,
.hero-slide .slide-caption {
  color: #ffffff !important;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}
