/* Custom styles for scholarship system */

/* Performance Optimizations */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Reduce animations on mobile for better performance */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Enhanced Navigation - Mobile First */
.navbar {
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
  color: #333 !important;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
}

/* Hero Section - Mobile First Responsive */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 1rem 0;
}

.hero-row {
  min-height: 60vh;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-row {
    min-height: 65vh;
    padding-top: 1.5rem;
  }
}

@media (min-width: 992px) {
  .hero-row {
    min-height: 70vh;
    padding-top: 2rem;
  }
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-buttons .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: transform 0.2s ease;
  min-width: 200px;
}

.hero-buttons .btn:hover {
  transform: translateY(-2px);
}

/* Hero Image - Simplified for Mobile */
.hero-image {
  position: relative;
  height: 300px;
  margin-bottom: 2rem;
}

.hero-visual {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-illustration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.floating-elements {
  position: relative;
  z-index: 2;
  height: 100%;
}

.floating-card {
  position: absolute;
  background: white;
  color: #333;
  padding: 0.75rem 1rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  max-width: 160px;
}

.floating-card i {
  font-size: 1.2rem;
}

.card-1 {
  top: 10%;
  right: 10%;
}

.card-2 {
  top: 60%;
  right: 5%;
}

.card-3 {
  top: 35%;
  left: 5%;
}

/* Features Section - Mobile Optimized */
.features-section {
  padding: 4rem 0;
  background: #f8f9fa;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.feature-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.feature-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0;
  color: #333;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* How It Works Section - Mobile Optimized */
.how-it-works-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.step-card {
  position: relative;
  padding: 2rem 1rem;
}

.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.step-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-size: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin: 1.5rem auto 1rem;
}

.step-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.step-card p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* CTA Section - Mobile Optimized */
.cta-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 0;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
}

.cta-section .btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: transform 0.2s ease;
}

.cta-section .btn:hover {
  transform: translateY(-2px);
}


/* Password Visibility Toggle Styles - Mobile Responsive */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper .password-input {
  padding-right: 50px !important; /* More space for mobile */
  width: 100%;
  min-height: 48px; /* Better touch target for mobile */
}

.password-toggle-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  font-size: 18px;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  z-index: 10;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none !important;
  border: none !important;
  min-width: 32px; /* Prevent shrinking */
  flex-shrink: 0; /* Prevent shrinking */
}

.password-toggle-icon:hover {
  color: #495057;
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.password-toggle-icon:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle-icon i {
  pointer-events: none;
  font-size: 16px;
  line-height: 1;
}

/* Mobile specific adjustments for password fields */
@media (max-width: 767px) {
  .password-input-wrapper {
    position: relative;
    display: block; /* Change to block for better mobile layout */
    width: 100%;
  }

  .password-input-wrapper .password-input {
    padding-right: 55px !important;
    width: 100%;
    min-height: 52px; /* Larger touch target */
    font-size: 16px; /* Prevent zoom on iOS */
    display: block;
  }

  .password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    width: 36px;
    height: 36px;
    padding: 10px;
    z-index: 100; /* Higher z-index for mobile */
    touch-action: manipulation; /* Better touch handling */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
  }

  .password-toggle-icon i {
    font-size: 16px;
  }

  /* Ensure proper spacing on mobile */
  .form-section .row .col-md-6 {
    margin-bottom: 1.5rem;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
  .password-input-wrapper .password-input {
    padding-right: 48px !important;
    min-height: 50px;
  }

  .password-toggle-icon {
    right: 14px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}

/* Desktop adjustments */
@media (min-width: 992px) {
  .password-input-wrapper .password-input {
    padding-right: 45px !important;
    min-height: 48px;
  }

  .password-toggle-icon {
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .password-toggle-icon i {
    font-size: 14px;
  }
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-image {
    height: 400px;
  }

  .hero-illustration {
    font-size: 12rem;
  }

  .floating-card {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    max-width: 180px;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .feature-card {
    padding: 2.5rem 2rem;
  }

  .feature-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }

  .step-icon {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }
}

/* Responsive Design - Desktop */
@media (min-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-image {
    height: 500px;
  }

  .hero-illustration {
    font-size: 15rem;
  }

  .floating-card {
    padding: 1.2rem 1.5rem;
    font-size: 1rem;
    max-width: 200px;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .feature-card {
    padding: 3rem 2.5rem;
  }

  .feature-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .step-icon {
    width: 120px;
    height: 120px;
    font-size: 3rem;
  }

  .cta-section h2 {
    font-size: 2.5rem;
  }
}

/* Standard Application Styles */
.card {
  border-radius: 10px;
  overflow: hidden;
}

.card-header {
  background-color: #0d6efd;
  color: white;
  padding: 1.25rem;
}

.form-section {
  padding: 20px;
  border-radius: 8px;
  background-color: #f8f9fa;
  border-left: 4px solid #0d6efd;
}

.form-section h4 {
  color: #0d6efd;
  margin-bottom: 20px;
}

.progress {
  height: 10px;
  border-radius: 5px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.progress-bar {
  background-color: #0d6efd;
  transition: width 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
}

.btn-success:hover {
  background-color: #157347;
  border-color: #146c43;
}

.is-invalid {
  border-color: #dc3545 !important;
}

.form-text {
  color: #6c757d;
  font-size: 0.875rem;
}

/* Custom styling for form labels */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Custom styling for required field indicators */
.text-danger {
  color: #dc3545;
}

/* Custom styling for form groups */
.mb-3 {
  margin-bottom: 1rem !important;
}

/* Admin styles */
.sidebar {
  min-height: 100vh;
  background-color: #343a40;
  color: white;
  padding-top: 20px;
}

.sidebar-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  transition: all 0.3s;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
  padding: 20px;
}

.dashboard-card {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.dashboard-card:hover {
  transform: translateY(-5px);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.welcome-section {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

/* Admin profile styles */
.profile-card {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-header {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px 10px 0 0;
}

.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-right: 20px;
}

.tab-content {
  padding: 20px;
}

.user-table-container {
  overflow-x: auto;
}

/* Admin login styles */
.admin-login-form {
  max-width: 450px;
  margin: 100px auto;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.form-title {
  text-align: center;
  margin-bottom: 30px;
  color: #0d6efd;
}

.admin-badge {
  background-color: #0d6efd;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  margin-left: 10px;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6c757d;
}

/* Admin registration styles */
.admin-form {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.security-notice {
  margin-top: 20px;
  padding: 15px;
  background-color: #f8d7da;
  border-radius: 5px;
  color: #721c24;
}

/* Custom Profile Page Start */
/* Ensure profile tabs are always visible */
.profile-tabs-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.profile-tabs-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  margin: 0;
}

.profile-tabs-header h5 {
  color: white;
  margin: 0;
  font-weight: 600;
}

/* Always visible tabs styling */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
  background: #f8f9fa;
  padding: 0.5rem 1rem 0;
  margin: 0;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  color: #6c757d;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  margin-right: 0.25rem;
  transition: all 0.3s ease;
  background: transparent;
  position: relative;
}

.nav-tabs .nav-link:hover {
  border: none;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  transform: translateY(-2px);
}

.nav-tabs .nav-link.active {
  background: white;
  color: #667eea;
  border: none;
  border-bottom: 3px solid #667eea;
  font-weight: 600;
}

.nav-tabs .nav-link i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Tab content styling */
.tab-content {
  background: white;
  padding: 2rem;
  min-height: 400px;
}

/* Profile picture enhancements */
.profile-picture-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.profile-picture-card:hover {
  transform: translateY(-5px);
}

.profile-picture-container {
  position: relative;
  display: inline-block;
}

.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-picture-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  border: 4px solid #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-picture-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.profile-picture-container:hover .profile-picture-overlay {
  opacity: 1;
}

.profile-picture-overlay i {
  color: white;
  font-size: 1.5rem;
}

/* Form styling improvements */
.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button styling */
.btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}


/* Responsive design */
@media (max-width: 768px) {
  .nav-tabs {
    flex-wrap: wrap;
  }

  .nav-tabs .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
  }

  .tab-content {
    padding: 1rem;
  }
}
/* Custom Profile Page ends */

/* DataTables Styling Fixes - Added to fix dropdown arrow overlap */
.dataTables_wrapper .dataTables_length {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
  width: auto;
  min-width: 60px;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  appearance: none;
}

.dataTables_wrapper .dataTables_length select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  font-weight: 500;
}

/* Fix for DataTables info and pagination alignment */
.dataTables_wrapper .dataTables_info {
  padding-top: 0.75rem;
  margin-bottom: 0;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 0.5rem;
}

/* Ensure proper spacing between DataTables controls */
.dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.dataTables_wrapper .row > div {
  padding-left: 0;
  padding-right: 0;
}

/* Fix for responsive DataTables */
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
  margin-left: 0.5rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Improve table header styling */
.dataTables_wrapper table.dataTable thead th {
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  background-color: #f8f9fa;
}

/* Fix for mobile responsiveness */
@media (max-width: 768px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    text-align: center;
    margin-bottom: 1rem;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    text-align: center;
    margin-top: 1rem;
  }
}

/* Performance optimizations for mobile */
@media (max-width: 767px) {
  .hero-image {
    height: 250px;
    margin-bottom: 1rem;
  }

  .hero-illustration {
    font-size: 6rem;
  }
}

@media (max-width: 768px) {
  /* Disable complex animations on mobile */
  .floating-card {
    animation: none !important;
    position: static !important;
    margin: 0.5rem auto;
    display: block;
    max-width: 200px;
  }

  /* Simplify gradients on mobile */
  .hero-section {
    background: #667eea;
  }

  .how-it-works-section {
    background: #667eea;
  }

  .cta-section {
    background: #667eea;
  }
}

/* Footer email link styling */
.footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #667eea !important;
  text-decoration: underline;
}

/* Standard footer email links */
footer a {
  transition: color 0.3s ease;
}

footer a:hover {
  color: #667eea !important;
  text-decoration: underline;
}

.hero-section .container {
  height: 100%;
}

.hero-section .row {
  align-items: center;
  justify-content: center;
}
