/* Contact Details & Micro-interactions */

/* Primary Actions */
.contact-primary {
  /* Fluid padding that adapts to available space */
  padding: clamp(var(--space-4), 3vw, var(--space-6)) clamp(var(--space-5), 4vw, var(--space-8));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(var(--space-4), 3vw, var(--space-6));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: clamp(var(--space-4), 3vw, var(--space-6));
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fluid padding for natural button sizing */
  padding: clamp(var(--space-2), 2vw, var(--space-3)) clamp(var(--space-5), 4vw, var(--space-6));
  border-radius: 30px;
  border: none;
  font-weight: var(--font-weight-medium);
  /* Fluid font size */
  font-size: clamp(0.9rem, 1.5vw + 0.5rem, var(--font-size-body));
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  min-width: min(250px, 100%);
  cursor: pointer;
  transform: translateZ(0);
  -webkit-font-smoothing: subpixel-antialiased;
  backface-visibility: hidden;
}

.contact-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(-45deg) translateY(-50%);
  animation: button-shine 6s ease-in-out infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes button-shine {
  0% {
    opacity: 0;
    transform: rotate(-45deg) translateY(200%);
  }
  10% {
    opacity: 0.8;
  }
  20% {
    opacity: 0;
    transform: rotate(-45deg) translateY(-200%);
  }
  100% {
    opacity: 0;
    transform: rotate(-45deg) translateY(-200%);
  }
}

.contact-btn.primary {
  background: linear-gradient(135deg, #3f79e6, #2057d6);
  color: #fff;
  box-shadow: 
    0 6px 12px rgba(32, 87, 214, 0.3),
    0 1px 1px rgba(255, 255, 255, 0.1) inset;
}

.contact-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(32, 87, 214, 0.4),
    0 1px 1px rgba(255, 255, 255, 0.2) inset;
}

.contact-btn.primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    0 4px 8px rgba(32, 87, 214, 0.25),
    0 1px 1px rgba(255, 255, 255, 0.1) inset;
}

.contact-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.contact-btn.secondary:active {
  transform: translateY(0) scale(0.98);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-2);
  font-size: 1.2em;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.contact-btn:hover .btn-icon {
  transform: scale(1.1);
}

.contact-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: var(--space-2) 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9em;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.divider-text {
  padding: 0 var(--space-3);
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 0.05em;
}

/* Contact Details */
.contact-details {
  display: grid;
  /* Intrinsic sizing: adapts to content while maintaining balance */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(var(--space-4), 3vw, var(--space-6));
  padding: 0 clamp(var(--space-5), 4vw, var(--space-8)) clamp(var(--space-5), 4vw, var(--space-8));
}

/* Desktop: 2-column layout for location and schedule */
@media (min-width: 640px) {
  .contact-details {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-location,
.contact-schedule {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-2);
  /* Fluid padding for natural spacing */
  padding: clamp(var(--space-4), 3vw, var(--space-5));
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), 
              box-shadow 0.3s cubic-bezier(0.19, 1, 0.22, 1),
              background 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  opacity: 1 !important;
  display: block !important;
}

.contact-location::after,
.contact-schedule::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(63, 121, 230, 0) 0%,
    rgba(63, 121, 230, 0.03) 45%,
    rgba(63, 121, 230, 0.04) 50%,
    rgba(63, 121, 230, 0.03) 55%,
    rgba(63, 121, 230, 0) 100%
  );
  animation: ambient-light 8s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
  pointer-events: none;
}

@keyframes ambient-light {
  0% { transform: translateX(0); opacity: 0; }
  25% { opacity: 1; }
  50% { transform: translateX(50%); opacity: 1; }
  75% { opacity: 0; }
  100% { transform: translateX(100%); opacity: 0; }
}

.contact-location:hover,
.contact-schedule:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 15px rgba(63, 121, 230, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.location-header,
.schedule-header {
  display: flex;
  align-items: center;
  margin-bottom: clamp(var(--space-3), 2vw, var(--space-4));
  gap: clamp(var(--space-2), 2vw, var(--space-3));
}

.location-icon,
.schedule-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(63, 121, 230, 0.15);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2em;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), 
              background 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.contact-location:hover .location-icon,
.contact-schedule:hover .schedule-icon {
  transform: scale(1.1);
  background: rgba(63, 121, 230, 0.25);
}

.location-title,
.schedule-title {
  color: rgba(255, 255, 255, 0.9);
  /* Fluid title sizing */
  font-size: clamp(1.1rem, 2vw + 0.5rem, var(--font-size-h5));
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
  margin: 0;
}

.location-address p,
.schedule-times {
  color: rgba(255, 255, 255, 0.7);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  margin: 0;
  /* Fluid text sizing for readability */
  font-size: clamp(0.85rem, 1.5vw + 0.3rem, 0.95rem);
}

.schedule-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  position: relative;
}

.schedule-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.schedule-day {
  color: rgba(255, 255, 255, 0.9);
  font-weight: var(--font-weight-medium);
  padding-right: var(--space-4); /* Added spacing between day and time */
}

.schedule-hours {
  color: rgba(255, 255, 255, 0.7);
}

/* Contact Card 3D tilt effect */
.contact-card-inner {
  transform-style: preserve-3d;
}

.contact-card.tilting .contact-card-inner {
  transition: transform 0.1s linear;
}

/* ========================================= */
/* RESPONSIVE REARRANGEMENT WITH PURPOSE    */
/* ========================================= */

/* Tablet Portrait (481px - 640px): 2-column maintained with adjusted spacing */
@media (min-width: 481px) and (max-width: 640px) {
  .contact-details {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
  
  .contact-location,
  .contact-schedule {
    padding: var(--space-4);
  }
  
  .location-icon,
  .schedule-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1em;
  }
}

/* Mobile (320px - 480px): Single column with priority-based spacing */
@media (max-width: 480px) {
  .contact-primary {
    padding: var(--space-4) var(--space-5);
    gap: var(--space-4);
  }
  
  .contact-details {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: 0 var(--space-4) var(--space-5);
  }
  
  .contact-btn {
    min-width: 100%;
    padding: var(--space-3) var(--space-5);
    font-size: 0.95rem;
  }
  
  .contact-location,
  .contact-schedule {
    padding: var(--space-4);
  }
  
  .location-icon,
  .schedule-icon {
    width: 32px;
    height: 32px;
    font-size: 1em;
  }
  
  .location-title,
  .schedule-title {
    font-size: 1.15rem;
  }
  
  .location-address p,
  .schedule-times {
    font-size: 0.9rem;
  }
  
  .schedule-row {
    margin-bottom: var(--space-2);
  }
  
  /* Reduce hover effects on mobile for better performance */
  .contact-location:hover,
  .contact-schedule:hover {
    transform: translateY(-1px);
  }
}

/* Extra Small Mobile (< 360px): Compact layout */
@media (max-width: 359px) {
  .contact-primary {
    padding: var(--space-3) var(--space-4);
  }
  
  .contact-details {
    padding: 0 var(--space-3) var(--space-4);
    gap: var(--space-3);
  }
  
  .contact-btn {
    padding: var(--space-2) var(--space-4);
    font-size: 0.9rem;
  }
  
  .contact-location,
  .contact-schedule {
    padding: var(--space-3);
  }
  
  .location-icon,
  .schedule-icon {
    width: 28px;
    height: 28px;
  }
  
  .location-title,
  .schedule-title {
    font-size: 1.05rem;
  }
  
  .location-address p,
  .schedule-times {
    font-size: 0.85rem;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .contact-btn,
  .contact-btn:hover,
  .contact-location,
  .contact-schedule,
  .contact-location:hover,
  .contact-schedule:hover,
  .location-icon,
  .schedule-icon {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}
