/**
 * home.css
 *
 * Homepage stylesheet for the BridgePoints Insight website.
 * Contains styles for the hero banner, service sections, news carousel,
 * Swiper navigation, fraction pagination, form elements, grid items,
 * and responsive layout adjustments.
 */

/* ============================================
   Hero Banner
   ============================================ */

.about-piece {
  background-image: url(../images/home.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.about-piece .container-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 215px 0 145px;
  z-index: 9;
}

.about-piece::after {
  content: '';
  width: 100%;
  height: 100%;
  background-color: #10122b;
  opacity: 0.36;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

/* ============================================
   Button Links
   ============================================ */

.btn-link::before {
  content: '';
  width: 100%;
  height: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: #005cb9;
  transition: height 0.3s linear;
  z-index: -1;
}

.btn-link:hover::before {
  height: 100%;
}

.btn-link-white {
  border: 1px solid #fff;
}

.btn-link-white::before {
  background-color: #ffffff;
}

.btn-link-black {
  border: 1px solid #000000;
}

.btn-link-black::before {
  background-color: #000000;
}

/* ============================================
   Footer Background
   ============================================ */

.footer-bg {
  background-image: url(../images/graphic-divider-grid.webp);
  background-size: cover;
  background-repeat: no-repeat;
}

/* ============================================
   Service Section
   ============================================ */

.service-piece {
  background-color: #ffffff;
  background-image: url(../images/contours-pink.svg);
  background-position: top right;
  background-repeat: no-repeat;
  background-size: contain;
}

/* ============================================
   Arrow Animation
   ============================================ */

.arrowhead::before {
  content: '';
  display: block;
  position: absolute;
  background: #005cb9;
  height: 1px;
  width: 14px;
  top: 50%;
  right: 1px;
  left: auto;
  transform-origin: right top;
  transform: translate(-10px, -1px) scaleX(1);
  transition: transform 0.5s ease;
}

.arrowhead::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 0 solid #005cb9;
  border-width: 1px 1px 0 0;
  transform-origin: right top;
  transform: translate(-10px, -0.5px) rotate(45deg);
  transition: transform 0.5s ease;
}

/* ============================================
   Grid Items
   ============================================ */

.grid-item {
  transform: scale(1);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
  transition: transform 0.7s ease, background-color 0.7s ease, box-shadow 0.7s ease;
}

.grid-item:hover {
  background: #f5d9db !important;
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

.grid-item:hover .arrowhead::before {
  transform: translateY(-1px) scaleX(1.7);
}

.grid-item:hover .arrowhead::after {
  transform: translateY(-0.5px) rotate(45deg);
}

.new-more:hover .arrowhead::before {
  transform: translateY(-1px) scaleX(1.7);
}

.new-more:hover .arrowhead::after {
  transform: translateY(-0.5px) rotate(45deg);
}

/* ============================================
   Swiper Carousel
   ============================================ */

.swiper-container {
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.swiper-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #0066CC;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #0066CC;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.swiper-nav-btn::before {
  content: '';
  width: 100%;
  height: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: #005cb9;
  overflow: hidden;
  transition: height 0.3s linear;
  z-index: -1;
}

.swiper-nav-btn:hover .icon {
  color: #fff;
  transition: color 0.3s ease;
}

.swiper-nav-btn:hover::before {
  height: 100%;
}

.swiper-nav-btn.swiper-button-disabled {
  border-color: #e0e0e0;
  color: #e0e0e0;
  cursor: not-allowed;
}

.swiper-next {
  left: 20px;
}

/* ============================================
   Fraction Pagination
   ============================================ */

.swiper-page-info {
  width: auto;
  font-size: 14px;
  color: #666;
  z-index: 10;
  left: 40px;
  position: relative;
}

.fraction-pagination {
  position: relative;
  width: 40px;
  height: 40px;
  color: #86909c;
}

.fraction-slash {
  position: absolute;
  width: 35px;
  height: 1px;
  background-color: #666;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(300deg);
  line-height: 2;
}

.fraction-current {
  position: absolute;
  top: 0;
  left: 5px;
  font-size: 16px;
}

.fraction-total {
  position: absolute;
  bottom: 0;
  right: 5px;
  font-size: 16px;
}

/* ============================================
   Form Elements
   ============================================ */

.form-group input,
.form-group textarea {
  padding: 10px;
}

.form-group #countryCodes {
  width: 300px;
  height: 46px;
  padding: 10px;
  margin-right: 20px;
}

.form-group #phone {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
}

input, select, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #005cb9;
  box-shadow: 0 0 0 1px #005cb9;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ============================================
   Country Selector
   ============================================ */

.country-selector {
  position: relative;
  width: 80px;
  margin-right: 8px;
}

.country-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}

.country-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  background: #222;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
}

.country-dropdown.active {
  display: block;
}

.country-search {
  padding: 12px;
  border-bottom: 1px solid #444;
}

.country-search input {
  width: 100%;
  padding: 8px;
  background: #333;
  border: none;
  border-radius: 4px;
  color: #fff;
  outline: none;
}

.country-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
}

.country-item:hover {
  background: #333;
}

.country-item.active {
  background: #444;
}

.country-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   Submit Button
   ============================================ */

.submit-btn {
  background-color: #005cb9;
  color: white;
  border: none;
  height: 50px;
  line-height: 50px;
  padding: 0 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #0050c5cc;
}

/* ============================================
   News Carousel Images
   ============================================ */

.new-container .new-img img {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 100%;
  min-height: 100%;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

@media (max-width: 768px) {
  .form-container {
    padding: 1.5rem;
  }

  .about-piece .container-content {
    padding: 150px 0 100px;
  }
}

@media (max-width: 700px) {
  .form-group #countryCodes {
    width: 100%;
    height: 46px;
    padding: 10px;
    margin: 0;
    margin-bottom: 1rem;
  }
}

@media (min-width: 1500px) {
  .container {
    max-width: 1500px;
  }

  .zone {
    max-width: 1500px;
    margin: 0 auto;
  }
}

@media (max-width: 1500px) {
  .zone {
    width: 100%;
  }
}
