/* ============================== */
/*       INDEX PAGE STYLES        */
/* ============================== */

/* Expertise / Flip Card Carousel */
.expertise-header {
  margin-bottom: 60px;
}

.expertise-section {
  padding: 100px 0;
  text-align: center;
}
.expertise-header h2 {
  font-size: 42px;
}
.expertise-subtext {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------------------------------- */
/* FLIP CARD CAROUSEL */
/* ---------------------------------- */

.card-carousel {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

/* Flip Card Container */
.flip-card {
  width: 320px;
  height: 420px;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease;
}

/* Hover Jump (only if not flipped and not flipping) */
.flip-card:not(.flipped):not(.flipping):hover {
  transform: translateY(-10px);
}

/* Paper Bend Effect */
.flip-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  opacity: 0;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #222 0%, #444 100%);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  z-index: 2;
}

/* Show bend only if not flipped and not flipping */
.flip-card:not(.flipped):not(.flipping):hover::after {
  width: 40px;
  height: 40px;
  opacity: 1;
}

/* Inner container that flips */
.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  z-index: 1;
}

/* Flip the card when .flipped is added */
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* ---------------------- */
/* FRONT & BACK STYLING   */
/* ---------------------- */

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  color: #fff;
  text-align: center;
  overflow: hidden;  /* In case we need to hide edges */
}

/* Flip Card Front: Lightened Gradient */
.flip-card-front {
  /* Use a lighter purple gradient */
  background: linear-gradient(135deg, #662773 0%, #994c99 100%);
  color: #fff;
}

/* Flip Card Back: Keep it dark */
.flip-card-back {
  background: linear-gradient(135deg, #1f1f1f 0%, #444 100%);
  color: #fff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
}

/* -------------- */
/* FRONT CONTENT  */
/* -------------- */

.front-content {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* Bigger icon near top */
.front-content .card-icon {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, 0);
  max-width: 130px;
}

/* Title ~2/3 down */
.front-content h3 {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Click to Learn More" just below the title, no background */
.front-content .learn-more-text {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  color: #fff;
  margin: 0;
}

/* -------------- */
/* BACK CONTENT   */
/* -------------- */

.back-icon {
  max-width: 100px;
  margin-top: 20px;
  margin-bottom: 15px;
}

/* Back Title */
.flip-card-back h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Back Paragraph */
.flip-card-back p {
  font-size: 16px;
  line-height: 1.5;
  max-width: 90%;
  margin: 15px auto 0;
}

/* Prevent bending effect during flip */
.flip-card.flipping::after {
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

/* Contact Us Section */
.contact-us {
  padding: 80px 0;
  background-color: #fff;
  text-align: center;
}

.contact-us .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-us h2 {
  font-size: 36px;
  color: #333;
  margin-bottom: 10px;
}

.contact-us .contact-subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 40px;
}

.contact-us form {
  text-align: left;
}

.contact-us .form-group {
  margin-bottom: 20px;
}

.contact-us label {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
  color: #333;
}

.contact-us .required {
  color: red;
}

.contact-us input[type="text"],
.contact-us input[type="email"],
.contact-us input[type="tel"],
.contact-us textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

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

.contact-us .radio-group {
  display: flex;
  gap: 20px;
  margin-top: 5px;
}

.contact-us .radio-group label {
  display: flex;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
}

.contact-us .radio-group input[type="radio"] {
  margin-right: 8px;
}

.contact-us .btn {
  display: inline-block;
  background-color: #662773;
  color: #fff;
  padding: 12px 25px;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.contact-us .btn:hover {
  background-color: #333;
  color: #fff;
}

/* Error and Success Messages */
.error-message {
  color: red;
  font-size: 14px;
  margin-top: 5px;
  min-height: 18px; /* Reserve space so layout doesn't jump if errors appear/disappear */
}

.error {
  border: 2px solid red !important; /* Highlight the field with a red border */
}

/* Success message styling */
.success-message {
  color: green;
  font-size: 16px;
  margin-bottom: 20px;
  min-height: 20px; /* Reserve space for success text */
}
