/* ======================================================= */
/* MEDIA QUERY: TARGETING SMALL SCREENS (Phones/Small Tablets) */
/* ======================================================= */
@media screen and (max-width: 991px) {
  .d-flex.has-4-cols {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }
  .d-flex.has-4-cols .col {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 50%;
    flex: 1 1 50%;
    max-width: 50%;
  } 
      .section-2-parent {
        padding-left: 30px;
        max-width: 780px;
    }
}



@media(max-width: 550px) {
  .carousel-title-black,
  .service-large-title,
  .large-title,
  .whySection-large-title {
    font-size: 32px !important;
    margin-bottom: 24px;
  }
}
@media (max-width: 768px) {
  /* --- 1. OVERRIDE FIXED POSITIONING --- */
  .hero {
    /* Crucial: Remove fixed position for mobile scrolling */
    position: relative;
    /* Replace fixed height with a standard padding-based height */

    /* Ensure the background image/video covers the new height */
    background-size: cover;
    /* Remove the large margin-top applied to the next section */
    /* This prevents a huge gap from appearing under the new 'relative' hero */
    margin-top: 0 !important;
  }

  /* --- FIXING THE NEXT SECTION'S MARGIN --- */
  /* Override the large margin-top set by the sibling selector */
  .hero + section {
    margin-top: 0;
  }

  /* --- 2. CONTAINER & ALIGNMENT --- */
  .hero .d-flex {
    /* Add significant padding to give the content vertical space */
    padding: 80px 0;
    height: auto;
  }
  /* --- 3. HERO CONTENT & TEXT SCALING --- */
  .hero-content {
    /* Reset the negative transform to center the content vertically */
    transform: translateY(0);
    margin: 0;
    text-align: center; /* Center the text for mobile */
  }

  /* Main Heading */
  .hero h2,
  .frost-secure-heading {
    font-size: 48px; /* Scale down heading text */
    line-height: 1.1;
  }

  /* Description Paragraph */
  .hero p {
    /* Remove excessive horizontal padding used on desktop */
    font-size: 16px;
    letter-spacing: normal; /* Remove tracking for better readability */
  }

  /* Video Background */
  /* Ensure the video scales down but might need to be hidden for performance */
  #wavesVideo {
    position: absolute; /* Keep it absolute within the new relative .hero */
    /* You might want to hide it completely on very small devices for performance: */
    /* display: none; */
  }

  /* Remove excessive padding from the text surrounding the content */
  .hero p.frost-secure-desc {
    padding: 1rem 0;
  }
  section {
    position: relative;
    padding: 2rem 0.5rem;
  }
  .carousel-title-black,
  .service-large-title,
  .large-title,
  .whySection-large-title {
    font-size: 48px;
    margin-bottom: 24px;
  }
  .whySection-cards {
    display: none;
  }

  #accordionFlush {
    display: block;
  }
  .frost-secure {
    display: block;
  }

  .service-description,
  .desc,
  .whySection-desc {
    width: 100%;
    /* max-width: 400px; */
    text-align: center;
    padding: 15px;
    font-size: 16px;
    font-weight: 400;
    line-height: 25px;
    color: #081a34;
  }
  .service-large-title p {
    margin-bottom: 0px;
    display: inline;
  }
  .accordion-button::after {
    background-image: none !important;
  }
  .frost-secure-image img {
    width: 100%;
  }
  .whySection {
    display: block;
  }
  .whySection .secure-mail {
    display: flex;
    justify-content: center;
  }
  .whySection-icon {
    margin-bottom: 20px;
  }
  .whySection-card-title {
    margin-bottom: 10px;
  }
  .frost-sercure-carousel-card {
    border: 1px solid black;
    border-radius: 8px;
    padding: 50px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border: none;
  }
  .whySection-top {
    gap: 0px;
  }
  .whySection-desc {
    padding: 0px;
  }
  .footer-top {
    height: 100%;
  }
  .vertical-separator {
    margin: 69px 0px 52px 0px;
    width: 100%;
    height: 2px;
  }
  .company-detail {
    flex-direction: column;
  }

  .section-2-parent {
    padding-left: 30px;
  }
  .service-card-desc {    
    margin-top: 0px !important;
  }
  .service-card-title {
    font-size: 20px !important;
    
}
  .swiper-pagination {
    justify-content: center; /* Centers dots horizontally */
  }
  .desc {
    color: #f1f1f1;
    max-width: 810px;
    text-align: center;
    padding: 15px;
    font-size: 16px;
    font-weight: 400;
    line-height: 25px;
  }
  .frostSecure .swiper-pagination {
    margin-top: 0px;
    margin-bottom: 40px;
  }
  .section-5-parent {
    padding: 60px 17px;
  }
  .contact-title {
    display: flex;   
    justify-content: center;
}
}

.service-cards {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Desktop: Normal card layout without accordion */
@media (min-width: 769px) {
  .service-card {
    cursor: default;
    pointer-events: none;
  }

  .service-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }

  .service-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .service-card-title {
    opacity: 1 !important;
    max-height: 100px !important;
    text-align: left !important;
  }

  .service-card-desc {
    max-height: 200px !important;
    opacity: 1 !important;  
  }
}

/* Mobile: Accordion functionality */
@media (max-width: 768px) {
  .service-cards {
    grid-template-columns: 1fr;
    margin: 0px 50px;
  }

  .service-card {
    cursor: pointer;
  }

  .service-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }
}

/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .service-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small desktop: 4 columns */
@media (min-width: 1025px) and (max-width: 1280px) {
  .service-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  transition: all 0.3s ease;
}

.service-icon {
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.service-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #081a34;
  line-height: 1.4;
  transition: all 0.3s ease;
  text-align: left;
}

/* Closed state - horizontal layout with title visible */
.service-card:not(.active) .service-card-header {
  flex-direction: row;
  justify-content: flex-start;
}

.service-card:not(.active) .service-card-title {
  opacity: 1;
  max-height: 100px;
}

/* Open state - vertical layout with title below icon */
.service-card.active .service-card-header {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
}

.service-card.active .service-card-title {
  opacity: 1;
  max-height: 100px;
}

.service-card-desc {
  color: #081a34;
  line-height: 140%;
  font-size: 14px;
  max-height: 0;
  font-weight: 400;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  margin-top: 16px;
}

.service-card.active .service-card-desc {
  max-height: 200px;
  opacity: 1;
}

@media (max-width: 768px) {
  .service-cards {
    grid-template-columns: 1fr;
  }
}
