/* Contact Section Styles - Revamped Magic Theme */

/* Hide all scrollbars in contact section */
.contact-section,
.contact-section *,
.contact-content-wrapper {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.contact-section::-webkit-scrollbar,
.contact-section *::-webkit-scrollbar,
.contact-content-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

.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;
}

/* Contact Form Styles */
.contact-form-section {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  opacity: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form .form-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.8;
}

.contact-form .form-input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(248, 220, 191, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.contact-form .form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-form .form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(170, 205, 190, 0.12);
}

.contact-form textarea.form-input {
  resize: none;
  min-height: 70px;
  max-height: 70px;
}

.form-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--color-accent), #8bb8a8);
  color: var(--color-overlay);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
  box-shadow: 0 4px 15px rgba(170, 205, 190, 0.3);
  margin-top: 0.25rem;
}

.form-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(170, 205, 190, 0.4);
}

.form-submit-btn:active {
  transform: translateY(0);
}

.form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-submit-btn ion-icon {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.form-submit-btn:hover ion-icon {
  transform: translateX(4px);
}

/* Form Alert */
.form-alert {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
  display: none;
  margin-bottom: 0.5rem;
}

.form-alert.show {
  display: block;
  animation: slideIn 0.3s ease;
}

.form-alert.error {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff8a8a;
}

.form-alert.success {
  background: rgba(78, 205, 196, 0.15);
  border: 1px solid rgba(78, 205, 196, 0.3);
  color: #6ee7df;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spinner for loading state */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Client Portal Link */
.client-portal-link {
  text-align: center;
  margin: 0;
  opacity: 0;
}

.client-portal-link p {
  font-size: 1rem;
  color: rgba(248, 220, 191, 0.6);
}

.client-portal-link a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.client-portal-link a:hover {
  color: var(--color-text);
}

/* 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;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  overflow-y: auto;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 2rem;
}

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

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

.contact-main-title {
  font-family: 'Montserrat', sans-serif;
  /* Keep Montserrat as requested */
  font-size: clamp(2.5rem, 6vw, 4rem);
  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(0.95rem, 1.2vw, 1.15rem);
  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(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 800px;
  margin: 0;
  opacity: 0;
  /* Animated by JS */
}

/* Individual Card */
.contact-card {
  position: relative;
  background: transparent;
  border: none;
  padding: 25px 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.25rem;
  color: var(--color-text);
  margin-bottom: 12px;
  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: 8px;
  opacity: 0.8;
}

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

.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;
}

/* Keep phone numbers on same line */
.contact-card .card-content:has(.phone-divider),
.card-content.phone-numbers {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

/* 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: 15px;
}

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

.contact-social-link {
  width: 44px;
  height: 44px;
  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: 1rem;
}

.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: 0;
  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;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .contact-content-wrapper {
    padding: 70px 1rem 2rem;
    justify-content: flex-start;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .contact-inner {
    padding-bottom: 2rem;
    gap: 1rem;
  }

  .decorator-line {
    height: 30px;
  }

  .contact-header-section {
    margin-bottom: 0;
  }

  .contact-main-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 0.35rem;
  }

  .contact-subtitle {
    font-size: 0.8rem;
    max-width: 90%;
    line-height: 1.4;
  }

  /* Form mobile styles */
  .contact-form-section {
    margin: 0;
  }

  .contact-form {
    gap: 0.5rem;
  }

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

  .contact-form .form-input {
    padding: 0.6rem 0.75rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .contact-form textarea.form-input {
    min-height: 60px;
    max-height: 60px;
  }

  .form-submit-btn {
    width: 100%;
    padding: 0.7rem 1.25rem;
    font-size: 0.8rem;
  }

  .client-portal-link p {
    font-size: 0.8rem;
  }

  .contact-details-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100%;
  }

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

  .card-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  .card-label {
    font-size: 8px;
    margin-bottom: 4px;
  }

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

  .contact-social-section {
    margin-top: 0;
  }

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

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

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

  .bottom-decorator {
    margin-top: 0;
  }
}

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

  .contact-inner {
    gap: 0.75rem;
  }

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

  .contact-subtitle {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .contact-form .form-label {
    font-size: 8px;
  }

  .contact-form .form-input {
    padding: 0.5rem 0.65rem;
    font-size: 16px;
  }

  .contact-form textarea.form-input {
    min-height: 50px;
    max-height: 50px;
  }

  .contact-card {
    padding: 8px 10px;
  }

  .card-icon {
    font-size: 1.3rem;
  }

  .contact-social-link {
    width: 32px;
    height: 32px;
  }
}