/* Research Submission Page Styles - Cool-toned Islamic Theme */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Scheherazade+New:wght@400;700&display=swap');

/* Poppins font import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Inter font import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables for consistent design - matching Naat Rang */
:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #3b82f6;
  --accent-teal: #0d9488;
  --light-teal: #a7f3d0;
  --cool-gray: #f8fafc;
  --warm-white: #fefefe;
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #64748b;
  --border-teal: #14b8a6;
  --shadow-blue: rgba(30, 58, 138, 0.15);
  --shadow-teal: rgba(13, 148, 136, 0.2);
  --font-arabic: 'Amiri', 'Scheherazade New', serif;
  --font-english: 'Inter', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --gradient-cool: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #0d9488 100%);
  
  /* Consistent Typography Sizes - matching Naat Rang */
  --h1-size: 3.5rem;
  --h2-size: 2.5rem;
  --h3-size: 1.5rem;
  --body-size: 1.125rem;
  --subtitle-size: 1.25rem;
  --label-size: 1.4rem;
  --input-size: 1.1rem;
  --button-size: 1.3rem;
}

/* Base Styles */
.research-submission-page {
  background: var(--cool-gray);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

.research-submission-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(13, 148, 136, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(30, 58, 138, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Container */
.container-fluid {
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
}

/* Hero Section - matching Naat Rang exactly */
.hero-section {
  background: url(../images/cover1.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1;
}

.hero-section .container-fluid {
  position: relative;
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-english);
  font-size: var(--h1-size);
  font-weight: 700;
  margin: 0 0 15px 0;
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--subtitle-size);
  font-weight: 500;
  margin: 0 0 50px 0;
  opacity: 0.95;
  /* font-style: italic; */
  color: #cbd5e1;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

/* Form Container - matching Naat Rang content wrapper */
.research-form-container {
  max-width: 1000px;
  margin: 80px auto;
  padding: 0 20px;
  position: relative;
}

.research-form-wrapper {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px var(--shadow-blue),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 80px 60px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.research-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-teal) 0%, var(--primary-blue) 50%, var(--accent-teal) 100%);
}

/* Form Header - matching Naat Rang section headers */
.form-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.form-header-ornament {
  margin: 0 auto 20px;
  width: 60px;
  height: 60px;
  color: var(--accent-teal);
  background: rgba(13, 148, 136, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-header-ornament svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.research-form-wrapper h2 {
  font-family: var(--font-english);
  font-size: var(--h2-size);
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0 0 20px 0;
  position: relative;
  text-align: center;
  padding-bottom: 15px;
}

.research-form-wrapper h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-teal) 50%, transparent 100%);
  border-radius: 2px;
}

.form-subtitle {
  font-size: var(--subtitle-size);
  font-family: var(--font-english);
  color: var(--text-medium);
  margin: 0;
  
}

/* Form Groups */
.form-group {
  margin-bottom: 30px;
  position: relative;
}

/* Labels - consistent with Naat Rang */
.research-form-wrapper label {
  font-family: var(--font-english);
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: var(--subtitle-size);
  position: relative;
}

.label-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: var(--accent-teal);
  vertical-align: middle;
}

/* Form Controls - enhanced styling */
.research-form-wrapper input[type="text"],
.research-form-wrapper input[type="email"],
.research-form-wrapper input[type="file"],
.research-form-wrapper input[type="date"],
.research-form-wrapper select,
.research-form-wrapper textarea {
  width: 100%;
  padding: 15px 18px;
  border: 2px solid rgba(13, 148, 136, 0.2);
  border-radius: 12px;
  font-size: var(--input-size);
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.research-form-wrapper input:focus,
.research-form-wrapper select:focus,
.research-form-wrapper textarea:focus {
  border-color: var(--accent-teal);
  outline: none;
  background: white;
  box-shadow: 
    0 0 0 3px rgba(13, 148, 136, 0.1),
    0 8px 25px rgba(13, 148, 136, 0.15);
  transform: translateY(-2px);
}

.research-form-wrapper textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Select dropdown styling */
.research-form-wrapper select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%230d9488' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

/* File Upload */
.file-upload-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.research-form-wrapper input[type="file"] {
  position: relative;
  z-index: 2;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}

.research-form-wrapper input[type="file"]::-webkit-file-upload-button {
  background: var(--gradient-hero);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-english);
  margin-right: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.research-form-wrapper input[type="file"]::-webkit-file-upload-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* Success and Error Messages */
#file-success-message,
#file-error-message {
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

#file-success-message {
  background: rgba(167, 243, 208, 0.2);
  border: 2px solid rgba(13, 148, 136, 0.3);
  color: var(--accent-teal);
}

#file-error-message {
  background: rgba(248, 215, 218, 0.8);
  border: 2px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

/* Submit Section - matching Naat Rang button styling */
.submit-wrapper {
  text-align: center;
  margin-top: 50px;
  position: relative;
}

.submit-ornament {
  margin: 0 auto 25px;
  width: 100px;
  height: 20px;
  color: var(--accent-teal);
  opacity: 0.7;
}

.submit-ornament svg {
  width: 100%;
  height: 100%;
}

/* Submit Button - enhanced to match Naat Rang */
.research-form-wrapper input[type="submit"] {
  background: var(--gradient-hero);
  color: white;
  padding: 18px 40px;
  border: none;
  border-radius: 12px;
  font-size: var(--button-size);
  font-weight: 700;
  font-family: var(--font-english);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px var(--shadow-blue);
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.research-form-wrapper input[type="submit"]:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px var(--shadow-teal);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
}

.research-form-wrapper input[type="submit"]:active {
  transform: translateY(-1px);
}

.research-form-wrapper input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Modal Overlay - enhanced styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 24px;
  padding: 50px 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 10px 25px rgba(13, 148, 136, 0.2);
  border: 1px solid rgba(13, 148, 136, 0.2);
  transform: scale(0.8) translateY(50px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
}

.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
}

.modal-icon.success {
  background: linear-gradient(135deg, var(--accent-teal), #0f766e);
  color: white;
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.3);
}

.modal-icon.error {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.modal-title {
  font-family: var(--font-english);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 15px 0;
}

.modal-message {
  font-size: var(--body-size);
  font-family: var(--font-body);
  color: var(--text-medium);
  line-height: 1.6;
  margin: 0 0 35px 0;
}

.modal-button {
  background: var(--gradient-hero);
  color: white;
  padding: 15px 35px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-english);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
}

.modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* Toast Notifications - enhanced */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 16px;
  padding: 20px 25px;
  margin-bottom: 12px;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.15),
    0 4px 15px rgba(13, 148, 136, 0.1);
  border-left: 5px solid var(--accent-teal);
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 350px;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  position: relative;
  backdrop-filter: blur(10px);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: var(--accent-teal);
}

.toast.error {
  border-left-color: #dc2626;
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-icon.success {
  color: var(--accent-teal);
}

.toast-icon.error {
  color: #dc2626;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-family: var(--font-english);
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 5px 0;
  font-size: 1rem;
}

.toast-message {
  font-family: var(--font-body);
  color: var(--text-medium);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 5px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: bold;
}

.toast-close:hover {
  color: var(--text-dark);
  background: rgba(13, 148, 136, 0.1);
}

/* Success Animation - enhanced */
.success-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  pointer-events: none;
}

.checkmark {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--accent-teal);
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px var(--accent-teal);
  animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
  position: relative;
  filter: drop-shadow(0 8px 25px rgba(13, 148, 136, 0.3));
}

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--accent-teal);
  fill: white;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 60px var(--accent-teal);
  }
}

/* Responsive Design - matching Naat Rang structure */
@media (max-width: 1024px) {
  :root {
    --h1-size: 2.8rem;
    --h2-size: 2.2rem;
    --h3-size: 1.4rem;
    --body-size: 1.1rem;
    --subtitle-size: 1.2rem;
    --label-size: 1.3rem;
    --input-size: 1rem;
    --button-size: 1.2rem;
  }
  
  .research-form-wrapper {
    padding: 60px 40px;
  }
  
  .modal-content {
    padding: 40px 30px;
  }
}

@media (max-width: 768px) {
  :root {
    --h1-size: 2.4rem;
    --h2-size: 1.8rem;
    --h3-size: 1.3rem;
    --body-size: 1rem;
    --subtitle-size: 1.1rem;
    --label-size: 1.2rem;
    --input-size: 1rem;
    --button-size: 1.1rem;
  }
  
  .hero-section {
    padding: 80px 15px;
    background-attachment: scroll;
  }
  
  .research-form-container {
    margin: 60px auto;
    padding: 0 15px;
  }
  
  .research-form-wrapper {
    padding: 40px 30px;
  }
  
  .research-form-wrapper input[type="text"],
  .research-form-wrapper input[type="email"],
  .research-form-wrapper input[type="file"],
  .research-form-wrapper input[type="date"],
  .research-form-wrapper select,
  .research-form-wrapper textarea {
    padding: 12px 15px;
    border-radius: 10px;
  }
  
  .research-form-wrapper input[type="submit"] {
    padding: 16px 35px;
  }
  
  .modal-content {
    padding: 35px 25px;
    margin: 0 15px;
  }
  
  .toast {
    min-width: auto;
    margin: 0 10px 10px 10px;
  }
  
  .toast-container {
    right: 0;
    left: 0;
  }
}

@media (max-width: 480px) {
  :root {
    --h1-size: 2.1rem;
    --h2-size: 1.6rem;
    --h3-size: 1.2rem;
    --body-size: 0.95rem;
    --subtitle-size: 1rem;
    --label-size: 1.1rem;
    --input-size: 0.9rem;
    --button-size: 1rem;
  }
  
  .hero-section {
    padding: 60px 15px;
    background-attachment: scroll;
  }
  
  .research-form-container {
    margin: 40px auto;
    padding: 0 10px;
  }
  
  .research-form-wrapper {
    padding: 30px 20px;
    border-radius: 20px;
  }
  
  .form-group {
    margin-bottom: 25px;
  }
  
  .label-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
  }
  
  .research-form-wrapper input[type="text"],
  .research-form-wrapper input[type="email"],
  .research-form-wrapper input[type="file"],
  .research-form-wrapper input[type="date"],
  .research-form-wrapper select,
  .research-form-wrapper textarea {
    padding: 10px 12px;
    border-radius: 8px;
  }
  
  .research-form-wrapper input[type="submit"] {
    padding: 15px 30px;
    min-width: 180px;
  }
  
  .modal-content {
    padding: 30px 20px;
    border-radius: 20px;
  }
  
  .modal-icon {
    width: 70px;
    height: 70px;
    font-size: 35px;
  }
  
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    margin-bottom: 8px;
    padding: 15px 20px;
    border-radius: 12px;
  }
}

/* Print Styles */
@media print {
  .research-submission-page {
    background: white !important;
  }
  
  .hero-section {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    min-height: auto !important;
    padding: 40px 20px !important;
  }
  
  .hero-title,
  .hero-subtitle {
    color: black !important;
    background: none !important;
    -webkit-text-fill-color: black !important;
  }
  
  .research-form-wrapper {
    box-shadow: none !important;
    border: 2px solid #333 !important;
    background: white !important;
  }
  
  .modal-overlay,
  .toast-container,
  .success-animation {
    display: none !important;
  }
  
  .research-form-wrapper input[type="submit"] {
    background: white !important;
    color: black !important;
    border: 2px solid #333 !important;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .research-form-wrapper,
  .research-form-wrapper input,
  .research-form-wrapper textarea,
  .research-form-wrapper select,
  .modal-overlay,
  .modal-content,
  .toast,
  .checkmark,
  .research-form-wrapper input[type="submit"] {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-blue: #000;
    --secondary-blue: #333;
    --accent-teal: #000;
    --text-dark: #000;
    --text-medium: #333;
    --border-teal: #000;
  }
}

/* Focus states for keyboard navigation */
/* .research-form-wrapper input:focus,
.research-form-wrapper select:focus,
.research-form-wrapper textarea:focus,
.research-form-wrapper input[type="submit"]:focus,
.modal-button:focus,
.toast-close:focus {
  outline: 3px solid var(--accent-teal);
  outline-offset: 2px;
} */

/* Loading states */
.research-form-wrapper.loading {
  opacity: 0.7;
  pointer-events: none;
}

.research-form-wrapper input[type="submit"].loading {
  position: relative;
}

.research-form-wrapper input[type="submit"].loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}