/* Color Variables based on the provided color scheme */
:root {
  --ivory: #f8faedff;
  --teal: #008080ff;
  --yellow-green: #abc837ff;
  --tangerine: #ef8a17ff;
  --eerie-black: #212529ff;
}

/* General Styles */
body {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  background-color: var(--ivory);
  color: var(--eerie-black);
  line-height: 1.6;
  position: relative;
}

/* Background pattern */
.background-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--ivory);
  background-image: linear-gradient(
      30deg,
      rgba(0, 128, 128, 0.03) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(0, 128, 128, 0.03) 87.5%,
      rgba(0, 128, 128, 0.03)
    ),
    linear-gradient(
      150deg,
      rgba(0, 128, 128, 0.03) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(0, 128, 128, 0.03) 87.5%,
      rgba(0, 128, 128, 0.03)
    ),
    linear-gradient(
      30deg,
      rgba(0, 128, 128, 0.03) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(0, 128, 128, 0.03) 87.5%,
      rgba(0, 128, 128, 0.03)
    ),
    linear-gradient(
      150deg,
      rgba(0, 128, 128, 0.03) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(0, 128, 128, 0.03) 87.5%,
      rgba(0, 128, 128, 0.03)
    ),
    linear-gradient(
      60deg,
      rgba(171, 200, 55, 0.05) 25%,
      transparent 25.5%,
      transparent 75%,
      rgba(171, 200, 55, 0.05) 75%,
      rgba(171, 200, 55, 0.05)
    ),
    linear-gradient(
      60deg,
      rgba(171, 200, 55, 0.05) 25%,
      transparent 25.5%,
      transparent 75%,
      rgba(171, 200, 55, 0.05) 75%,
      rgba(171, 200, 55, 0.05)
    );
  background-size: 40px 70px;
  background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
  z-index: -1;
  opacity: 0.6;
}

.line-card {
  background-color: white;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  margin: 20px auto;
  max-width: 1200px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

/* Decorative elements */
.line-card::before {
  display: none;
}

/* Header Styles */
.header {
  background-color: var(--teal);
  color: white;
  border-bottom: none;
  padding: 1.5rem 0;
  position: relative;
}

.header::after {
  display: none;
}

.logo {
  max-height: 120px;
  width: auto;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 2;
}

.company-name {
  font-family: "Exo 2", "Segoe UI", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.section-title-main {
  color: var(--teal);
  border-bottom: 3px solid var(--yellow-green);
  padding-bottom: 10px;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 5px;
  position: relative;
}

.section-title-main::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100px;
  height: 3px;
  background-color: var(--tangerine);
}

.company-tagline {
  font-family: "Roboto Condensed", "Arial", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-top: 5px;
  margin-bottom: 20px;
  text-transform: lowercase;
  color: var(--teal);
  position: relative;
  z-index: 2;
}

/* QR Code styling */
.qr-code {
  max-width: 150px;
  height: auto;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  margin-top: 10px;
}

.print-qr-wrapper {
  text-align: center;
}

/* Top row padding for web view */
.container.mt-4 {
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (min-width: 768px) {
  .print-qr-wrapper {
    text-align: right;
  }
}

@media print {
  .container.mt-4 {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
}

.tagline {
  font-family: "Roboto Condensed", "Arial", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  margin-top: 5px;
  position: relative;
  z-index: 2;
}

.contact-info {
  font-family: "Roboto Condensed", "Arial", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.5px;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.contact-info a {
  text-decoration: none;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: var(--yellow-green) !important;
  text-decoration: none;
}

/* Section Styles */
.services {
  background-image: linear-gradient(to bottom, rgba(248, 250, 237, 0.2), rgba(248, 250, 237, 0));
  position: relative;
}

.section-title {
  font-family: "Exo 2", "Segoe UI", sans-serif;
  color: var(--teal);
  border-bottom: 3px solid var(--yellow-green);
  padding-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--tangerine);
}

.service-category {
  position: relative;
}

.service-category:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 128, 128, 0.1), transparent);
}

.service-category h3 {
  font-family: "Exo 2", "Segoe UI", sans-serif;
  color: var(--tangerine);
  font-size: 1.5rem;
  font-weight: 700;
  border-left: 4px solid var(--tangerine);
  padding-left: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
}

.service-subcategory h4 {
  font-family: "Roboto Condensed", "Arial", sans-serif;
  color: var(--teal);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.service-subcategory h4::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--teal), transparent);
}

/* List Styles */
.service-list {
  background-color: rgba(248, 250, 237, 0.3);
  border-radius: 5px;
  padding: 15px;
  margin-top: 10px;
  border-left: 2px solid var(--yellow-green);
  transition: all 0.3s ease;
}

.service-list:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-left-color: var(--tangerine);
}

.service-list ul li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 2em;
}

.fa-check {
  color: var(--yellow-green);
  font-size: 0.9em;
  background-color: rgba(171, 200, 55, 0.1);
  padding: 4px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.15em;
}

.list-unstyled li {
  margin-bottom: 10px;
  font-weight: 500;
  transition: transform 0.2s;
}

.list-unstyled li:hover {
  transform: translateX(3px);
}

.service-list ul li .fas {
  color: var(--tangerine);
  margin-right: 8px;
}

/* Uncategorized services list styling */
.services-list {
  margin: 15px 0;
  padding: 15px 15px 5px 15px;
  background-color: rgba(248, 250, 237, 0.3);
  border-radius: 6px;
}

.service-items li {
  margin-bottom: 12px;
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  padding: 8px 12px;
  padding-left: 2em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.service-items li:hover {
  transform: translateX(3px);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.service-items li .fas {
  color: var(--teal);
  width: 1em;
  text-align: center;
  position: absolute;
  left: 0.5em;
  top: 50%;
  transform: translateY(-50%);
}

.service-items li:hover .fas {
  color: var(--yellow-green);
}

/* Contact Section */
.contact-section {
  background-color: var(--teal);
  color: white;
  border-top: 5px solid var(--yellow-green);
  padding: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(171, 200, 55, 0.3), transparent 70%);
  z-index: 1;
}

.contact-section .section-title {
  color: white;
  border-bottom: 3px solid white;
}

.contact-section .section-title::after {
  background-color: var(--tangerine);
}

.contact-section p,
.contact-section a {
  position: relative;
  z-index: 2;
}

.contact-section a {
  color: var(--ivory);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
}

.contact-section a:hover {
  color: var(--yellow-green);
  text-decoration: none;
  transform: translateX(3px);
}

/* New tag styling */
.new-tag {
  font-family: "Exo 2", sans-serif;
  color: white;
  background-color: var(--tangerine);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 0 3px 3px 0;
  font-size: 0.8rem;
  animation: pulse 2s infinite;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  margin-left: 5px;
}

.new-tag::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid var(--tangerine);
}

.new-tag::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background-color: var(--tangerine);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

@keyframes blink {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

/* Button styling */
.btn-primary {
  background-color: var(--teal);
  border-color: var(--teal);
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px 24px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s;
}

.btn-primary:hover {
  background-color: var(--tangerine);
  border-color: var(--tangerine);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover::before {
  left: 100%;
}

/* Hide print button when printing */
@media print {
  .print-controls {
    display: none;
  }

  .container-fluid.line-card {
    margin: 0;
    padding: 0;
    box-shadow: none;
    max-width: 100%;
  }

  .container {
    max-width: 100%;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }

  /* Reduce horizontal margins and padding */
  .row {
    --bs-gutter-x: 0.3rem;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-12 {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .service-list {
    padding: 4px;
    margin-top: 2px;
    border-left: 1px solid var(--yellow-green);
  }

  .services-list {
    padding: 4px 4px 2px 4px;
    margin: 4px 0;
  }

  ul.service-items li {
    font-size: 0.75rem;
    page-break-inside: avoid;
    margin-bottom: 4px;
    padding: 2px 4px;
    padding-left: 1.5em;
    font-weight: 600;
  }

  ul.service-items li .fas {
    font-size: 0.75rem;
    width: 0.8em;
    text-align: center;
    position: absolute;
    left: 0.5em;
    top: 50%;
    transform: translateY(-50%);
  }

  .line-card::before {
    display: none;
  }

  .header {
    background-color: transparent;
    border-bottom: none;
    padding: 0.3rem 0;
  }

  .header::after {
    display: none;
  }

  .contact-section {
    background-color: transparent;
    padding: 0.1rem 0;
    border-top: 1px solid var(--teal);
    margin-top: 0.1rem;
    color: var(--eerie-black);
  }

  .contact-section::before {
    display: none;
  }

  .background-pattern {
    display: none;
  }

  /* Force columns to maintain layout in print */
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-12 {
    float: left !important;
  }

  .col-md-3 {
    width: 25% !important;
  }

  .col-md-4 {
    width: 33.33% !important;
  }

  .col-md-6 {
    width: 50% !important;
  }

  .col-md-12 {
    width: 100% !important;
  }

  .row {
    display: block !important;
    clear: both !important;
    overflow: hidden !important;
  }

  .row::after {
    content: "";
    display: table;
    clear: both;
  }

  /* Scale down text */
  body {
    font-size: 68%;
    line-height: 1.4;
  }

  .logo {
    max-height: 45px;
  }

  .company-name {
    font-size: 1.7rem;
    margin-bottom: 0;
  }

  .company-tagline {
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 20px;
  }

  .tagline {
    font-size: 0.6rem;
    margin-top: 0;
  }

  .section-title {
    font-size: 0.95rem;
    padding-bottom: 1px;
    margin-bottom: 0.2rem;
  }

  .section-title-main {
    font-size: 1.7rem;
    padding-bottom: 4px;
    margin-bottom: 8px;
    border-bottom-width: 2px;
  }

  .section-title-main::after {
    height: 2px;
    width: 80px;
  }

  .service-category h3 {
    font-size: 0.95rem;
    padding-left: 4px;
    margin-bottom: 0.1rem;
    letter-spacing: 0.5px;
    border-left: 2px solid var(--tangerine);
  }

  .service-subcategory h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
  }

  .py-4 {
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
  }

  .mt-3,
  .mt-4,
  .mt-5 {
    margin-top: 0.1rem !important;
  }

  .service-category {
    margin-top: 0.1rem !important;
    margin-bottom: 0.1rem !important;
  }

  .service-subcategory {
    margin-top: 0.1rem !important;
    margin-bottom: 0.1rem !important;
  }

  .fa-check {
    font-size: 0.75em;
    padding: 1px;
    margin-right: 3px;
  }

  .list-unstyled li {
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 0.85rem;
  }

  .services.py-4,
  .contact-section.py-4 {
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
  }

  .contact-section p {
    margin-bottom: 0.05rem;
    margin-top: 0;
    font-size: 0.85rem;
  }

  .service-category:not(:last-child)::after {
    display: none;
  }

  .service-subcategory h4::after {
    height: 1px;
  }

  .company-name,
  .company-tagline {
    margin-top: 0;
  }

  /* Reduce margins between category sections */
  .service-category + .service-category {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Make footer more compact */
  footer p {
    margin-bottom: 0.1rem;
  }

  /* Fix contact footer alignment */
  .contact-section .col-md-6 {
    width: 50% !important;
    float: left !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .contact-section .col-md-6.text-md-end {
    text-align: right !important;
  }

  .contact-section .row {
    margin-top: 0 !important;
  }

  .contact-section a {
    color: var(--teal);
  }

  .contact-section .section-title {
    color: var(--teal);
    border-bottom-color: var(--yellow-green);
    border-width: 1px;
    margin-bottom: 0.2rem;
  }

  .contact-section .section-title::after {
    height: 1px;
  }

  .row {
    display: block !important;
    clear: both !important;
    overflow: hidden !important;
  }

  .row::after {
    content: "";
    display: table;
    clear: both;
  }

  /* Scale down the new tag for print */
  .new-tag {
    font-size: 0.6rem;
    padding: 1px 3px;
    margin-left: 3px;
    box-shadow: none;
  }

  .new-tag::before {
    display: none;
  }

  .new-tag::after {
    display: none;
  }

  /* Turn off animations in print */
  @keyframes pulse {
    0%,
    50%,
    100% {
      opacity: 1;
    }
  }

  /* Reduce spacing in list items */
  .list-unstyled {
    margin-bottom: 0.1rem;
  }

  /* QR Code print styling */
  .qr-code {
    max-width: 120px;
    border-width: 1px;
    box-shadow: none;
    margin: 0;
    display: inline-block !important;
  }

  /* Override column widths in the header for print */
  .container.mt-4 .col-md-9 {
    width: 65% !important;
    text-align: left !important;
    float: left !important;
  }

  .container.mt-4 .col-md-3 {
    width: 35% !important;
    float: right !important;
    text-align: right !important;
    display: block !important;
  }

  .print-qr-wrapper {
    text-align: right !important;
  }

  /* Text alignment in header for print */
  .company-name.section-title-main,
  .company-tagline {
    text-align: left !important;
  }

  /* Reset flex for print */
  .d-flex {
    display: block !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .company-name {
    font-size: 1.7rem;
    margin-top: 15px;
  }

  .tagline {
    font-size: 1rem;
  }

  .logo {
    max-height: 90px;
  }

  /* Hide QR code on mobile */
  .qr-code {
    display: none;
  }

  .col-md-6.text-md-end {
    text-align: left !important;
    margin-top: 15px;
  }

  .service-list {
    padding: 10px;
  }
}
