@import url("https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@700&family=Open+Sans:wght@400;500;700&display=swap");

/* ============================================================
   Hero Section
   ============================================================ */
.hero-section {
  width: 100%;
  position: relative;
  background-image: url("/images/service page hero image.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 494px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.top-rated-area-rug-container {
  width: 626px;
  position: relative;
  font-size: 55px;
  line-height: 127%;
  display: flex;
  font-family: "Open Sans Condensed";
  color: #fff;
  text-align: center;
  align-items: center;
  height: 125px;
}

.rated-area-rug-top-rated-area-rug-container {
  width: 100%;
}

.top-rated-area-rug {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  color: inherit;
  display: block;
  text-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 0, 0, 0.6);
}

.hero-subheading {
  width: 571px;
  position: relative;
  font-size: 21px;
  line-height: 38px;
  font-weight: 500;
  font-family: "Open Sans", sans-serif;
  color: #fff;
  text-align: center;
  display: inline-block;
  height: 38px;
  margin-top: 10px;
  margin-bottom: 26px;
  text-shadow:
    2px 15px 15px rgba(0, 0, 0, 0.95),
    0 0 20px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 0, 0, 0.6),
    2px 2px 3px rgba(0, 0, 0, 1);
}

.hero-button {
  width: 200px;
  position: relative;
  border-radius: 25px;
  background-color: #40b3f1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.3s ease;
  margin-top: 30px;
}

.hero-button:hover {
  background-color: #2b86b7;
}

.hero-button-text {
  width: 74px;
  position: relative;
  font-size: 18px;
  font-family: "Open Sans", sans-serif;
  color: #fff;
  text-align: center;
  display: inline-block;
}

@media (max-width: 768px) {
  .hero-section {
    height: 400px;
    padding: 0 15px;
  }

  .top-rated-area-rug-container {
    width: 100%;
    font-size: 32px;
    line-height: 1.2;
    height: auto;
    min-height: 80px;
  }

  .hero-subheading {
    width: 100%;
    font-size: 16px;
    line-height: 1.4;
    height: auto;
    margin-top: 20px;
    margin-bottom: 5px;
  }

  .hero-button {
    width: 180px;
    height: 45px;
    margin-top: 20px;
  }

  .hero-button-text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 350px;
  }

  .top-rated-area-rug-container {
    font-size: 28px;
    min-height: 70px;
  }

  .hero-subheading {
    font-size: 14px;
    margin-top: 15px;
  }

  .hero-button {
    width: 160px;
    height: 40px;
  }

  .hero-button-text {
    font-size: 14px;
  }
}

/* ============================================================
   All Services Section
   ============================================================ */
.rectangle-div {
  width: 100%;
  position: relative;
  background: #eaf8ff;
  height: auto;
  min-height: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 20px;
  clear: both;
  opacity: 1;
  visibility: visible;
  z-index: 1000;
}

.our-247-services-container {
  width: 326px;
  position: relative;
  font-size: 36px;
  line-height: 60px;
  font-weight: 600;
  font-family: "Open Sans Condensed";
  text-align: center;
  display: flex;
  align-items: center;
  height: 60px;
  color: #000;
  margin-bottom: 10px;
}

.our-247-services-our-247-services-container {
  width: 100%;
}

.span {
  color: #2b86b7;
}

.turning-cores-into {
  width: 394px;
  position: relative;
  font-size: 20px;
  line-height: 35px;
  font-weight: 500;
  font-family: "Open Sans";
  color: #000;
  text-align: center;
  display: inline-block;
  margin-bottom: 30px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  margin-top: 20px;
  position: relative;
  z-index: 1001;
}

/* ============================================================
   Service Card — Flip Animation
   ============================================================ */
/* ============================================================
   Service Card — Flip Animation (Desktop Defaults)
   ============================================================ */
.service-card {
  width: 100%;
  position: relative;
  border-radius: 16px;
  height: 336px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 1.3s ease,
    box-shadow 1.3s ease;
  z-index: 1002;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.service-card.flip {
  position: relative;
  background-color: transparent;
}

.service-card.flip > .front,
.service-card.flip > .back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition-duration: 1.3s;
  transition-property: transform, opacity;
  overflow: hidden; /* Kept safely on the faces only */
}

.service-card.flip > .front {
  z-index: 2;
  transform: rotateY(0deg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.service-card.flip > .back {
  z-index: 1;
  transform: rotateY(-180deg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

.service-card.flip:hover > .front {
  z-index: 1;
  transform: rotateY(180deg);
}

.service-card.flip:hover > .back {
  z-index: 5;
  transform: rotateY(0deg);
}

.service-card.flip > .front img,
.service-card.flip > .back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Back side overlay and content */
.back-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.back-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px;
  text-align: center;
      margin-top: -50%;
}

.back-description {
  font-size: 35px;
  line-height: 26px;
  color: #fff;
  margin-bottom: 20px;
  max-width: 480px;
}

.view-details-btn {
  background-color: #2b86b7;
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  font-family: "Open Sans", sans-serif;
  transition: background-color 0.3s ease;
  display: inline-block;
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
}

.view-details-btn:hover {
  background-color: #2ca7e0;
  color: #fff;
  text-decoration: none;
}

/* Ensure links/controls remain clickable */
.services-grid *,
.service-card * {
  pointer-events: auto;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   FIXED RESPONSIVE BREAKPOINTS (No overflow limits)
   ============================================================ */
@media (max-width: 768px) {
  body {
    overflow-x: hidden !important;
  }

  .rectangle-div.services-rectangle {
    width: 100vw !important;
    height: auto !important;
    min-height: auto !important;
    padding: 40px 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
    background: linear-gradient(
      180deg,
      rgba(165, 199, 240, 0.39) 99.99%
    ) !important;
  }

  .our-247-services-container {
    width: 280px !important;
    font-size: 32px !important;
    line-height: 48px !important;
    height: auto !important;
    text-align: center !important;
    margin-bottom: 10px !important;
  }

  .turning-cores-into {
    width: 320px !important;
    font-size: 16px !important;
    line-height: 28px !important;
    text-align: center !important;
    margin-bottom: 30px !important;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-top: 30px !important;
    width: 100% !important;
    max-width: 95% !important;
  }

  .service-card {
    height: 300px !important;
    border-radius: 16px !important;
    /* REMOVED overflow: hidden !important; to keep links active */
    overflow: visible !important;
    transform-style: preserve-3d !important;
  }

  .service-card.flip {
    perspective: 1000px !important;
  }

  .service-card.flip > .front,
  .service-card.flip > .back {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 16px !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
  }

  .back-content {
    padding: 15px !important;
  }

  .back-description {
    font-size: 14px !important;
    line-height: 22px !important;
    margin-bottom: 15px !important;
  }

  .view-details-btn {
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .rectangle-div.services-rectangle {
    width: 100vw !important;
    min-height: auto !important;
    padding: 30px 10px !important;
  }

  .our-247-services-container {
    width: 240px !important;
    font-size: 28px !important;
    line-height: 42px !important;
    margin-bottom: 10px !important;
  }

  .turning-cores-into {
    width: 280px !important;
    font-size: 14px !important;
    line-height: 24px !important;
    margin-bottom: 25px !important;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    margin-top: 25px !important;
    width: 100% !important;
    max-width: 95% !important;
  }

  .service-card {
    height: 280px !important;
    border-radius: 16px !important;
    /* REMOVED overflow: hidden !important; to keep links active */
    overflow: visible !important;
    transform-style: preserve-3d !important;
  }

  .back-content {
    padding: 12px !important;
  }

  .back-description {
    font-size: 13px !important;
    line-height: 20px !important;
    margin-bottom: 12px !important;
  }

  .view-details-btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
}

/* ============================================================
   CTA: Heirloom Rugs
   ============================================================ */
.cta-heirloom {
  position: relative;
  width: 100%;
  min-height: 437px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cta-heirloom__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.cta-heirloom__overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 37%);
}

.cta-heirloom__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 24px;
  text-align: center;
  color: #fff;
}

.cta-heirloom__title {
  margin: 0 0 16px 0;
  font-family: "Open Sans Condensed", "Open Sans", Arial, sans-serif;
  font-weight: 700;
  font-size: 41px;
  line-height: 1.2;
}

.cta-heirloom__desc {
  margin: 0 auto 24px auto;
  max-width: 760px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 600;
  color: #ffffff;
}

.cta-heirloom__btn {
  display: inline-block;
  background: #2b86b7;
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  padding: 12px 28px;
  font-size: 18px;
  font-family: "Open Sans", Arial, sans-serif;
  /* transition: background-color 0.2s ease-in-out; */
}

.cta-heirloom__btn:hover {
  background: #40B3F1;
  color: #fff;
}

@media (max-width: 992px) {
  .contact-cta__heading {
    text-align: left !important;
  }
  .cta-heirloom {
    min-height: 420px;
  }

  .cta-heirloom__title {
    font-size: 36px;
  }

  .cta-heirloom__desc {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .cta-heirloom {
    min-height: 380px;
  }

  .cta-heirloom__content {
    padding: 20px;
  }

  .cta-heirloom__title {
    font-size: 30px;
  }

  .cta-heirloom__desc {
    font-size: 16px;
    max-width: 95%;
  }

  .cta-heirloom__btn {
    font-size: 16px;
    padding: 10px 22px;
  }
}

@media (max-width: 480px) {
  .cta-heirloom {
    min-height: 340px;
  }

  .cta-heirloom__title {
    font-size: 26px;
  }

  .cta-heirloom__desc {
    font-size: 15px;
    line-height: 1.6;
  }

  .cta-heirloom__btn {
    font-size: 15px;
    padding: 10px 20px;
  }
}

/* ============================================================
   Contact CTA Section
   ============================================================ */
.contact-cta {
  background: #2b86b7;
  padding: 50px 0;
}

.contact-cta__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: start;
}

.contact-cta__heading {
  grid-column: 1 / -1;
  text-align: center;
  margin: 0 0 12px 0;
  font-size: 25px;
  font-weight: bold;
  color: #2b86b7;
}

.contact-cta__address {
  font-size: 18px;
  color: #2b86b7;
  margin: 8px 0 16px 0;
  font-weight: bold;
}

.contact-cta__hours {
  font-size: 16px;
  color: #000;
  margin: 0 0 16px 0;
}

.contact-cta__phone {
  color: #2b86b7;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.contact-info-card {
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.contact-info-card-1 {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 30px 20px 20px;
  background: #fff;
  max-width: 500px;
  margin: 40px 0;
  text-align: left;
}

.contact-info-card-1::before {
  content: "WORKING HOURS";
  position: absolute;
  top: -14px;
  left: 20px;
  background: #fff;
  padding: 0 10px;
  font-weight: 600;
  color: #2b86b7;
  font-size: 16px;
}

/* Contact Form */
.contact-cta__form {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #7b7b7b;
}

.form-field input,
.form-field textarea {
  border: 1px solid #2b86b7;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
}

.form-field input:hover,
.form-field textarea:hover {
  border: 1px solid rgba(2, 80, 122, 0.36);
  box-shadow: 0 4px 20px rgba(0, 80, 117, 0.3);
  background-color: #f9fcff;
}

.form-field input:focus,
.form-field textarea:focus {
  border: 1px solid rgba(3, 164, 250, 0.36);
  box-shadow: 0 4px 20px rgba(0, 80, 117, 0.3);
  background-color: #fff;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 8px;
}

.btn-primary {
  background: #2b86b7;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 25px;
  min-width: 160px;
  text-align: center;
  box-sizing: border-box;
  text-decoration: none;
  display: inline-block;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.btn-primary:hover {
  background: #fff;
  color: #2b86b7;
  border: 1px solid #2b86b7;
}

.btn-primary-1 {
  cursor: pointer;
  background: #fff;
  color: #2b86b7;
  border: 1px solid #2b86b7;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 25px;
  min-width: 160px;
  text-align: center;
  box-sizing: border-box;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.btn-primary-1:hover {
  background: #23729a;
  color: #fff;
}

@media (max-width: 992px) {
  .contact-cta__container {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-primary-1 {
    text-align: center;
  }
}
