/* ============================================================
   TATSS Website - Global Styles
   To-a-T Software Services
   Bootstrap 5 + Custom Overrides
   ============================================================ */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Blue Color Palette --- */
/* 
  --deep-twilight:   #03045e
  --french-blue:     #023e8a
  --bright-teal-blue:#0077b6
  --blue-green:      #0096c7
  --turquoise-surf:  #00b4d8
  --sky-aqua:        #48cae4
  --frosted-blue:    #90e0ef
  --frosted-blue-2:  #ade8f4
  --light-cyan:      #caf0f8
*/

/* --- CSS Custom Properties --- */
:root {
  /* Blue palette */
  --deep-twilight: #03045e;
  --french-blue: #023e8a;
  --bright-teal-blue: #0077b6;
  --blue-green: #0096c7;
  --turquoise-surf: #00b4d8;
  --sky-aqua: #48cae4;
  --frosted-blue: #90e0ef;
  --frosted-blue-2: #ade8f4;
  --light-cyan: #caf0f8;

  /* Semantic aliases mapped to palette */
  --bs-primary: #0077b6;
  --bs-primary-rgb: 0, 119, 182;
  --primary: var(--bright-teal-blue);
  --primary-dark: var(--french-blue);
  --primary-light: var(--blue-green);
  --accent: var(--turquoise-surf);
  --accent-light: var(--sky-aqua);
  --dark-text: #0F172A;
  --body-text: #334155;
  --light-bg: var(--light-cyan);
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --section-py-desktop: 64px;
  --section-py-tablet: 56px;
  --section-py-mobile: 40px;
  --transition: 200ms ease;
}

/* --- Base Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--body-text);
  background-color: var(--white);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-text);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.75rem; font-weight: 800; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

p {
  margin-bottom: 1rem;
  max-width: 72ch;
}
.text-center p {
  margin-left: auto;
  margin-right: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* --- Section Spacing --- */
.section-padding {
  padding-top: var(--section-py-desktop);
  padding-bottom: var(--section-py-desktop);
}
@media (max-width: 992px) {
  .section-padding {
    padding-top: var(--section-py-tablet);
    padding-bottom: var(--section-py-tablet);
  }
}
@media (max-width: 576px) {
  .section-padding {
    padding-top: var(--section-py-mobile);
    padding-bottom: var(--section-py-mobile);
  }
}

/* Alternating section backgrounds */
.bg-light-custom {
  background-color: var(--light-bg);
}
.section-divider-bottom {
  border-bottom: 1px solid #d1d5db;
}
.bg-primary-gradient {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
}
.bg-primary-gradient h2,
.bg-primary-gradient h3,
.bg-primary-gradient p {
  color: var(--white);
}

/* --- Header / Navigation --- */
.navbar {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 0.35rem 0;
  transition: box-shadow var(--transition);
  z-index: 1050;
}
.navbar.scrolled {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  background-color: var(--white);
}
.navbar-brand img {
  height: 90px;
  width: auto;
}
.navbar .nav-link {
  color: var(--body-text);
  font-weight: 500;
  font-size: 1.05rem !important;
  padding: 0.35rem 0.85rem;
  transition: color var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary);
}

/* Mobile menu */
@media (max-width: 1199.98px) {
  .offcanvas-xl {
    max-width: 300px;
  }
  .offcanvas-xl .nav-link {
    font-size: 1rem;
    padding: 0.6rem 0;
  }
  .navbar {
    padding: 0.3rem 0;
  }
  .navbar-brand img {
    height: 85px;
  }
}

/* --- Hero Section --- */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
  background: url('../Images/home/HomeFirstpanelBackground.jpg') center center / cover no-repeat;
  color: var(--white);
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  z-index: 1;
}
.hero-section .container {
  position: relative;
  z-index: 2;
}
.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #48CAE4;
}

/* --- Hero Text Rotator --- */
.hero-rotator {
  position: relative;
  height: 11rem;
  overflow: hidden;
}
.hero-rotator-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-rotator-line.active {
  opacity: 1;
  transform: translateX(0);
}
.hero-rotator-line.slide-out {
  opacity: 0;
  transform: translateX(-80px);
}

@media (max-width: 768px) {
  .hero-rotator {
    height: 9rem;
  }
}
@media (max-width: 576px) {
  .hero-rotator {
    height: 10rem;
  }
}

.hero-section .lead {
  color: rgba(255,255,255,0.9);
}
.hero-section .hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  max-width: 560px;
}

/* --- Hero Subtitle Banner --- */
.hero-subtitle-section {
  background: linear-gradient(135deg, var(--french-blue) 0%, var(--blue-green) 100%);
  color: var(--white);
  padding: 2.5rem 0;
  text-align: center;
}
.hero-subtitle-section p {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,255,255,0.95);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0 48px;
    text-align: center;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-subtitle-section {
    padding: 2rem 0;
  }
  .hero-subtitle-section p {
    font-size: 1.05rem;
  }
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  overflow: hidden;
  background: url('../Images/home/HomeFirstpanelBackground.jpg') center center / cover no-repeat;
  color: var(--white);
  padding: 60px 0 50px;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  z-index: 1;
}
.page-hero .container {
  position: relative;
  z-index: 2;
}
.page-hero h1 {
  color: #48CAE4;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.page-hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  max-width: 70%;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 48px 0 36px;
  }
  .page-hero h1 {
    font-size: 1.85rem;
  }
  .page-hero p {
    max-width: 100%;
  }
}

/* --- Buttons --- */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  border-radius: 8px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  min-height: 44px;
  transition: all var(--transition);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: 8px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  min-height: 44px;
  transition: all var(--transition);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-light {
  background-color: var(--white);
  color: var(--primary);
  border-radius: 8px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  min-height: 44px;
  border: none;
  transition: all var(--transition);
}
.btn-light:hover,
.btn-light:focus {
  background-color: var(--light-bg);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  border-color: var(--white);
  color: var(--white);
  border-radius: 8px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  min-height: 44px;
  transition: all var(--transition);
}
.btn-outline-light:hover {
  background-color: var(--white);
  color: var(--primary);
}

/* --- Cards --- */
.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  background: var(--white);
  height: 100%;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-body {
  padding: 1.5rem;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark-text);
}
.card .card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--bright-teal-blue) 0%, var(--turquoise-surf) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--white);
  font-size: 1.25rem;
}
.card-img-top {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  height: 200px;
  object-fit: cover;
}
.card a.stretched-link::after {
  border-radius: var(--radius-md);
}

/* Equal height cards */
.row-eq-height > [class*="col"] {
  display: flex;
}
.row-eq-height > [class*="col"] > .card {
  width: 100%;
}

/* --- Trust Bar --- */
.trust-bar {
    background-color: #E6EEF5;
    border-top: 2px solid var(--turquoise-surf);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}
.trust-bar .trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-text);
  text-align: left;
}
.trust-bar .trust-item i {
  color: var(--primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.trust-bar .trust-item p {
  margin-bottom: 0;
}

/* --- Section Headings --- */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}
.section-heading h2 {
  margin-bottom: 1rem;
}
.section-heading p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  color: var(--body-text);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--deep-twilight) 0%, var(--bright-teal-blue) 100%);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}
.cta-section p {
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* --- Logo Carousel --- */
.logo-carousel {
  padding: 48px 0;
}
.logo-carousel .carousel-item img,
.logo-carousel .logo-slide img {
  height: 50px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.5);
  transition: filter var(--transition);
}
.logo-carousel .carousel-item img:hover,
.logo-carousel .logo-slide img:hover {
  filter: grayscale(0%) opacity(1);
}

/* --- Feature List --- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--body-text);
}
.feature-list li > i {
  position: absolute;
  left: 0;
  top: 0.25rem;
}

/* --- Content Image --- */
.content-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 100%;
  height: auto;
}

/* --- Stats Section --- */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}
.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--body-text);
  margin-top: 0.5rem;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--deep-twilight);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}
.site-footer h5 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.site-footer a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}
.site-footer a:hover {
  color: var(--white);
  text-decoration: none;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer ul li {
  margin-bottom: 0.5rem;
}
.footer-brand img {
  height: 64px;
  margin-bottom: 1rem;
}
.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  max-width: 300px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
}

/* --- Contact Form --- */
.contact-form .form-control,
.contact-form .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}
.contact-form label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--dark-text);
}
.form-check-label {
  font-size: 0.875rem;
}

/* Success / Error states */
.form-success {
  display: none;
  background-color: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  color: #166534;
}
.form-error {
  display: none;
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: #991b1b;
  font-size: 0.9rem;
}

/* --- Pricing Cards --- */
.pricing-card {
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  background: var(--white);
  transition: all var(--transition);
}
.pricing-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.pricing-card .price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
}
.pricing-card .price-period {
  font-size: 0.9rem;
  color: var(--body-text);
}

/* --- Breadcrumb --- */
.breadcrumb {
  background: none;
  padding: 0;
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* --- Related Pages --- */
.related-pages {
  background-color: var(--light-bg);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  cursor: pointer;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* --- Detail Page Layout --- */
.detail-section {
  padding: 48px 0;
}
.detail-section + .detail-section {
  padding-top: 0;
}
.detail-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.detail-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  color: var(--white);
  text-decoration: none;
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utility --- */
.text-primary-custom {
  color: var(--primary) !important;
}
.text-accent {
  color: var(--accent) !important;
}
.fw-800 {
  font-weight: 800;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 1rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 576px) {
  body {
    padding-left: 0;
    padding-right: 0;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-section h1 {
    font-size: 1.75rem;
  }
  .trust-bar .trust-item {
    font-size: 0.82rem;
  }
}

/* --- Logo Carousel --- */
.logo-carousel-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
}
.logo-carousel-wrapper::before,
.logo-carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.logo-carousel-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}
.logo-carousel-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}
.logo-carousel-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: logoScroll 30s linear infinite;
}
.logo-carousel-track .client-logo {
  height: 65px;
  width: auto;
  max-width: 182px;
  object-fit: contain;
  flex-shrink: 0;
}
@keyframes logoScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
