/* ==========================================================================
   Rainbow Guest House - Contact Page Stylesheet
   Styles for /contact (contact.jsp) and form interactions
   ========================================================================== */

:root {
  --ast-global-color-0: #8E43F0; /* Primary Purple */
  --ast-global-color-1: #6300E2; /* Hover Purple */
  --ast-global-color-2: #150E1F; /* Dark Heading */
  --ast-global-color-3: #584D66; /* Body Text */
  --ast-global-color-4: #F3F1F6; /* Soft Light Background */
  --ast-global-color-5: #FFFFFF; /* White */
  --ast-global-color-6: #000000; /* Black */

  --color-error: #cf2e2e;
  --color-error-bg: #fff5f5;
  --color-error-border: #f8b4b4;
  --color-success: #0b6b2b;
  --color-success-bg: #e6f7ec;
  --color-success-border: #c2ebd0;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Lato', 'Open Sans', sans-serif;
  --font-button: 'Open Sans', sans-serif;

  --transition-fast: 0.25s ease;
  --transition-normal: 0.35s ease;
  --max-width: 1200px;
  --header-height: 96px;
}

/* Base Body Styling for Contact Page */
body.page-contact {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ast-global-color-3);
  background-color: var(--ast-global-color-5);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Hero Section: Contact Us
   ========================================================================== */
.contact-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background-color: #1a1622;
  padding: 170px 0 95px 0;
  overflow: hidden;
}

.contact-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/oyo-10079-rainbow-guest-33-1.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
  transform: scale(1.02);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(21, 14, 31, 0.65) 0%, rgba(14, 10, 20, 0.55) 100%);
  z-index: 2;
  pointer-events: none;
}

.contact-hero-content {
  position: relative;
  z-index: 3;
  max-width: 680px;
}

.contact-hero-title {
  color: #ffffff;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 22px;
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
}

.contact-hero-desc {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.05rem;
  line-height: 1.68;
  margin-bottom: 0;
  font-weight: 400;
  max-width: 620px;
}

/* ==========================================================================
   Main Contact Section (2 Columns: Information & Form)
   ========================================================================== */
.contact-main-section {
  background-color: var(--ast-global-color-4); /* #F3F1F6 */
  padding: 95px 0 105px 0;
}

.contact-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 75px;
  align-items: start;
}

/* Left Column: Details */
.contact-details-col {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.info-group {
  display: flex;
  flex-direction: column;
}

.info-sublabel {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ast-global-color-2);
  margin-bottom: 8px;
  font-family: var(--font-heading);
  letter-spacing: -0.1px;
}

.info-mainlabel,
address.info-mainlabel {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ast-global-color-2);
  line-height: 1.45;
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-style: normal;
  letter-spacing: -0.2px;
}

.info-mainlabel a {
  color: var(--ast-global-color-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.info-mainlabel a:hover {
  color: var(--ast-global-color-0);
}

.contact-social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  color: #ffffff;
  font-size: 1.15rem;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.social-icon-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0.92;
  color: #ffffff;
}

.icon-location { background-color: #6c757d; }
.icon-tripadvisor { background-color: #00aa6c; }
.icon-facebook { background-color: #3b5998; }
.icon-twitter { background-color: #1da1f2; }

/* Right Column: Contact Form */
.contact-form-col {
  background: transparent;
}

.rainbow-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ast-global-color-2);
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.form-label .required {
  color: var(--color-error);
  font-weight: 700;
}

.form-input,
.form-textarea {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #dcdbe4;
  border-radius: 4px;
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #2b2b2b;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.form-input {
  height: 50px;
}

.form-textarea {
  resize: vertical;
  min-height: 135px;
  line-height: 1.6;
}

/* Focus State */
.form-input:focus,
.form-textarea:focus {
  border-color: var(--ast-global-color-0);
  box-shadow: 0 0 0 3px rgba(142, 67, 240, 0.16);
  background-color: #ffffff;
}

/* Invalid State */
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-input:user-invalid,
.form-textarea:user-invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(207, 46, 46, 0.14);
  background-color: #fffbfa;
}

/* Valid State (after interaction) */
.form-input.is-valid,
.form-textarea.is-valid,
.form-input:user-valid,
.form-textarea:user-valid {
  border-color: #107e3e;
  box-shadow: 0 0 0 2px rgba(16, 126, 62, 0.12);
}

/* Inline Field Error Message */
.field-error {
  display: none;
  color: var(--color-error);
  font-size: 0.84rem;
  font-weight: 500;
  margin-top: 6px;
  line-height: 1.4;
  animation: fadeInError 0.22s ease-out;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-action {
  margin-top: 4px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--ast-global-color-0);
  color: #ffffff;
  font-family: var(--font-button);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 38px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(142, 67, 240, 0.25);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn-submit:hover:not(:disabled) {
  background-color: var(--ast-global-color-1);
  box-shadow: 0 4px 14px rgba(99, 0, 226, 0.35);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-submit:disabled,
.btn-submit.is-loading {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

.btn-submit.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Global Form Feedback Alert */
.form-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
  display: none;
  animation: fadeInDown 0.3s ease-out;
}

.form-feedback.success {
  display: block;
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.form-feedback.error {
  display: block;
  background-color: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error-border);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Google Maps Embed Section
   ========================================================================== */
.map-embed-section {
  width: 100%;
  height: 450px;
  background-color: #e5e3df;
  position: relative;
  overflow: hidden;
}

.map-embed-section iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(1.05);
}

/* ==========================================================================
   Floating Quick Action Buttons (WhatsApp & Phone)
   ========================================================================== */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-btn:hover {
  transform: scale(1.1);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.floating-phone { background: var(--ast-global-color-0); }
.floating-whatsapp { background: #25D366; }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .contact-hero {
    padding: 140px 0 80px 0;
    min-height: 420px;
  }
  .contact-hero-title {
    font-size: 3rem;
  }
  .contact-two-col {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

@media (max-width: 600px) {
  .contact-hero {
    padding: 125px 0 70px 0;
    min-height: 380px;
  }
  .contact-hero-title {
    font-size: 2.35rem;
  }
  .contact-hero-desc {
    font-size: 0.98rem;
  }
  .contact-main-section {
    padding: 60px 0 70px 0;
  }
  .info-mainlabel,
  address.info-mainlabel {
    font-size: 1.2rem;
  }
  .map-embed-section {
    height: 360px;
  }
  .floating-actions {
    bottom: 18px;
    right: 18px;
  }
  .floating-btn {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}
