/* ================ TOKENS ================ */
:root {
  --primary: #00A4FF;
  --primary-dark: #00389B;
  --primary-light: #E6F4FF;
  --bg: #f7f7f7;
  --text: #1f2937;
  --text-light: #6b7280;
  --white: #ffffff;
  --success: #10b981;
  --success-light: #d1fae5;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* ================ FONTAWESOME ICON FIXES ================ */
/* Ensure FontAwesome icons display properly in RTL */
[dir="rtl"] .fas,
[dir="rtl"] .far,
[dir="rtl"] .fab,
[dir="rtl"] .fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

/* Global FontAwesome icon fix for all pages */
.fas,
.far,
.fab,
.fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ================ HERO SECTION ================ */
.contact-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-shapes {
  position: absolute;
  inset: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: 5%;
  animation-delay: -7s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-30px) rotate(120deg);
  }

  66% {
    transform: translateY(30px) rotate(240deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 0.5rem;
}

/* ================ CONTACT METHODS SECTION ================ */
.contact-methods-section {
  padding: 6rem 0;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.method-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.method-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.method-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--white);
}

.method-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.method-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.method-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.method-value {
  font-weight: 600;
  color: var(--text);
  font-size: 1.125rem;
}

.method-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  width: fit-content;
  margin: 0 auto;
}

.method-action:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ================ COPY BUTTON STYLES ================ */
.copy-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.copy-btn .btn-text,
.copy-btn .btn-icon,
.copy-btn .btn-success {
  transition: all 0.3s ease;
}

.copy-btn .btn-success {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  color: var(--success);
}

.copy-btn.copied {
  background: var(--success-light);
  border-color: var(--success);
}

.copy-btn.copied .btn-text,
.copy-btn.copied .btn-icon {
  opacity: 0;
}

.copy-btn.copied .btn-success {
  opacity: 1;
}

.copy-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* ================ EMAIL BUTTON STYLES ================ */
.email-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.email-btn .btn-text,
.email-btn .btn-icon {
  transition: all 0.3s ease;
}

.email-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.email-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.email-btn .btn-icon {
  margin-left: 0.5rem;
}

/* ================ CONTACT FORM SECTION ================ */
.contact-form-section {
  padding: 6rem 0;
  background: var(--bg);
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.form-header p {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.6;
}

.modern-form {
  display: grid;
  gap: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

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

.form-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  z-index: 2;
}

.form-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  font-size: 1rem;
  background: var(--white);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 164, 255, 0.1);
}

.form-input.textarea {
  resize: vertical;
  min-height: 120px;
  padding-top: 1rem;
}

.checkbox-wrapper {
  margin-top: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-input:checked+.checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-input:checked+.checkbox-custom::after {
  content: '✓';
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
}

.checkbox-text {
  color: var(--text-light);
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.submit-button {
  position: relative;
  background: var(--gradient);
  color: var(--white);
  border: none;
  padding: 1rem 3rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  min-width: 200px;
  box-shadow: var(--shadow);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.button-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
}

.button-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.submit-button.loading .button-content {
  opacity: 0;
}

.submit-button.loading .button-loading {
  opacity: 1;
}

/* ================ SUCCESS MESSAGE ================ */
.success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border: 1px solid var(--success);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 400px;
  width: 90%;
  display: none;
}

.success-message.show {
  display: block;
  animation: successSlideIn 0.3s ease;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.success-icon {
  width: 60px;
  height: 60px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: var(--success);
}

.success-message h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.success-message p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.success-close {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.success-close:hover {
  background: var(--primary-dark);
}

/* ================ FAQ SECTION ================ */
.faq-section {
  padding: 6rem 0;
  background: var(--white);
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-question h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  flex: 1;
  padding-right: 1rem;
}

.faq-question i {
  color: var(--primary);
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.5rem;
  max-height: 200px;
}

.faq-answer p {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 768px) {
  .hero-stats {
    gap: 2rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .methods-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 2rem;
    margin: 0 1rem;
  }

  .hero-content {
    padding: 1rem;
  }
}

@media (max-width: 480px) {

  .contact-methods-section,
  .contact-form-section,
  .faq-section {
    padding: 4rem 0;
  }

  .method-card {
    padding: 1.5rem;
  }

  .form-container {
    padding: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ================ CUSTOM SCROLLBAR ================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), #002a7a);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #f1f5f9;
}

/* ================ CUSTOM SELECTION COLORS ================ */
::selection {
  background: rgba(0, 164, 255, 0.2);
  color: var(--primary-dark);
}

::-moz-selection {
  background: rgba(0, 164, 255, 0.2);
  color: var(--primary-dark);
}

/* ================ ENHANCED BACK TO TOP BUTTON ================ */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: var(--gradient);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 164, 255, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  font-size: 18px;
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--primary-dark), #002a7a);
  box-shadow: 0 12px 32px rgba(0, 164, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Pulse animation for attention */
.back-to-top.pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(0, 164, 255, 0.4);
  }

  50% {
    box-shadow: 0 8px 24px rgba(0, 164, 255, 0.6), 0 0 20px rgba(0, 164, 255, 0.3);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}