/* Contact Section Styles - Revamped Magic Theme */

.contact-section {
  display: none;
  width: 100vw;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 25;
  overflow: hidden;
  background-color: var(--color-overlay);
  /* Deep Teal from theme */
  background-image: none;
}

/* Floating orbs background */
.bg-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-text) 0%, transparent 70%);
  bottom: -50px;
  left: -50px;
  animation-delay: -7s;
  opacity: 0.2;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -30px) scale(1.05);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }

  75% {
    transform: translate(20px, 10px) scale(1.02);
  }
}

/* Subtle grid pattern overlay */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 2;
}

/* Main Content Wrapper */
.contact-content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Remove center alignment here to allow scrolling */
  /* align-items: center; */
  /* justify-content: center; */
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  overflow-y: auto;
  /* Allow scrolling on small screens if needed */
}

.contact-inner {
  margin: auto;
  /* This is the key for safe centering */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Decorative top line */
.decorator-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--color-text), transparent);
  margin: 0 auto 20px;
  opacity: 0;
  /* Animated by JS */
  transform-origin: top;
}

/* Header Section */
.contact-header-section {
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0;
  /* Animated by JS */
}

.contact-main-title {
  font-family: 'Montserrat', sans-serif;
  /* Keep Montserrat as requested */
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 300;
  /* Lighter weight for elegance */
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
  text-transform: none;
  line-height: 1.1;
}

.contact-main-title span {
  display: inline-block;
  position: relative;
  font-weight: 600;
  /* Emphasize "Magic" */
}

.contact-main-title span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-text), transparent);
  transform: scaleX(0);
  animation: underlineExpand 1s ease-out 1.2s forwards;
}

@keyframes underlineExpand {
  to {
    transform: scaleX(1);
  }
}

.contact-subtitle {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: #ffffff;
  font-weight: 300;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 600px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Details Grid - Cards */
.contact-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1000px;
  margin-bottom: 40px;
  opacity: 0;
  /* Animated by JS */
}

/* Individual Card */
.contact-card {
  position: relative;
  background: transparent;
  border: none;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: none;
}

/* Card Icon */
.card-icon {
  font-size: 2.5rem;
  color: var(--color-text);
  margin-bottom: 15px;
  transition: all 0.4s ease;
  display: inline-flex;
}

.contact-card:hover .card-icon {
  color: var(--color-accent);
  transform: scale(1.1);
}

/* Card Label */
.card-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 10px;
  opacity: 0.8;
}

/* Card Content */
.card-content {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 300;
  color: #fff;
  line-height: 1.6;
}

.card-content a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.card-content a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card-content a:hover {
  color: var(--color-text);
}

.card-content a:hover::after {
  transform: scaleX(1);
}

.phone-divider {
  display: inline-block;
  margin: 0 8px;
  color: var(--color-text);
  opacity: 0.5;
}

/* Social Links - Clean Style */
.contact-social-section {
  text-align: center;
  opacity: 0;
  /* Animated by JS */
}

.contact-social-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(248, 220, 191, 0.4);
  margin-bottom: 20px;
}

.contact-social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  flex-direction: row;
  /* Explicitly set to row */
}

.contact-social-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 220, 191, 0.2);
  border-radius: 50%;
  /* Keep circular for socials as per reference */
  color: #fff;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-size: 1.2rem;
}

.contact-social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--color-text);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: -1;
}

.contact-social-link:hover {
  border-color: var(--color-text);
  color: var(--color-overlay);
  transform: translateY(-5px);
}

.contact-social-link:hover::before {
  width: 100%;
  height: 100%;
}

/* Bottom decorator */
.bottom-decorator {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  /* Animated by JS */
}

.decorator-dot {
  width: 4px;
  height: 4px;
  background: var(--color-text);
  border-radius: 50%;
  opacity: 0.5;
}

.decorator-line-h {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 220, 191, 0.3), transparent);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .contact-section {
    background-attachment: scroll;
  }

  .contact-content-wrapper {
    padding: 2rem 1rem;
    /* Reduced top padding */
    justify-content: center;
    /* Center content vertically */
    height: 100%;
    /* Ensure full height usage */
  }

  .contact-header-section {
    margin-bottom: 1.5rem;
    /* Reduced margin */
  }

  .contact-main-title {
    font-size: clamp(2rem, 8vw, 3rem);
    /* Slightly smaller */
    margin-bottom: 0.5rem;
  }

  .contact-subtitle {
    font-size: 0.9rem;
    max-width: 90%;
  }

  .contact-details-grid {
    grid-template-columns: 1fr;
    gap: 5px;
    /* Reduced gap */
    max-width: 400px;
    margin-bottom: 20px;
    /* Reduced margin */
  }

  .contact-card {
    padding: 10px 15px;
    /* Reduced padding */
  }

  .card-icon {
    font-size: 1.8rem;
    /* Smaller icon */
    margin-bottom: 5px;
  }

  .card-label {
    font-size: 9px;
    margin-bottom: 5px;
  }

  .card-content {
    font-size: 1rem;
  }

  .contact-social-section {
    margin-top: 10px;
  }

  .contact-social-label {
    margin-bottom: 10px;
  }

  .contact-social-links {
    gap: 12px;
  }

  .contact-social-link {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .bottom-decorator {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .contact-content-wrapper {
    padding: 1rem;
  }

  .contact-main-title {
    font-size: 2.2rem;
  }

  .contact-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}