/* Diagnostics Page - Modern Design with Animations */

:root {
  --primary-color:  #001d4f;      /* Dark Blue */
  --secondary-color: #303F9F;    /* Slightly Lighter Blue */
  --accent-color: #E53935;       /* Red Accent */
  --light-color: #f8f9fa;        /* Light Gray */
  --dark-color: #333333;         /* Dark Gray */
  --text-color: #333333;         /* Dark Gray */
  --text-muted: #6c757d;         /* Medium Gray */
  --card-bg: #FFFFFF;            /* White */
  --border-radius: 12px;         /* Rounded corners */
  --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);  /* Shadow */
}

/* Diagnostics Page Layout */
.diagnostics-page {

  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

/* Background elements */
.diagnostics-page::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-color: rgba(26, 35, 126, 0.03);
  top: -150px;
  right: -150px;
  z-index: 1;
}

.diagnostics-page::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: rgba(26, 35, 126, 0.02);
  bottom: -100px;
  left: -100px;
  z-index: 1;
}

/* Hero Section */
.diagnostics-hero {
  background-color: #001d4f ;

  color: white;
  border-radius: 0 0 50px 50px;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  margin-bottom: 4rem;
}

.diagnostics-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url('../images/pattern.svg');
  background-size: cover;
  opacity: 0.05;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Hero Form Styles */
.hero-form {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 25px;
  height: auto;
  max-height: none;
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  border: 3px solid white; /* Added white border for aesthetic appeal */
  scroll-behavior: auto !important; /* Prevent smooth scrolling */
  overflow-anchor: none; /* Prevent browser scroll anchoring */
}

.hero-form .booking-form-header {
  margin-bottom: 1.5rem;
}

.hero-form .booking-form-title {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.hero-form .booking-form-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.hero-form .form-label {
  font-weight: 500;
  color: var(--dark-color);
}

.hero-form .booking-form-content {
  color: var(--dark-color);
  overflow: hidden !important;
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}

/* Prevent scrolling when form is submitted */
.no-scroll {
  overflow: hidden !important;
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}

/* Success message styling */
#bookingAlerts .alert-success {
  background-color: rgba(212, 237, 218, 0.9);
  border-color: #c3e6cb;
  color: #155724;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

#bookingAlerts .alert-heading {
  color: #155724;
  font-weight: 600;
  margin-bottom: 10px;
}

#bookingAlerts hr {
  border-top-color: #c3e6cb;
  opacity: 0.5;
}

#bookingAlerts .alert-danger {
  background-color: rgba(248, 215, 218, 0.9);
  border-color: #f5c6cb;
  color: #721c24;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.hero-form .booking-form-header {
  background-color: var(--primary-color);
  margin: -25px -25px 20px -25px;
  padding: 20px 25px;
  border-radius: 15px 15px 0 0;
  color: white;
}

.hero-form .form-control,
.hero-form .form-select {
  border-radius: 8px;
  padding: 0.6rem 1rem;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.hero-form .form-control:focus,
.hero-form .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 29, 79, 0.15);
}

.hero-form .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hero-form .btn-primary:hover {
  background-color: #00163a;
  border-color: #00163a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hero-form #bookNowBtn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.hero-form #bookNowBtn:hover {
  background-color: #00163a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards 0.3s;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.hero-stat {
  flex: 1;
  min-width: 200px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.hero-stat:nth-child(1) {
  animation: fadeInUp 0.8s ease forwards 0.4s;
}

.hero-stat:nth-child(2) {
  animation: fadeInUp 0.8s ease forwards 0.6s;
}

.hero-stat:nth-child(3) {
  animation: fadeInUp 0.8s ease forwards 0.8s;
}

.hero-stat:hover {
  transform: translateY(-10px);
  background-color: rgba(255, 255, 255, 0.15);
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, #f0f0f0);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* Fallback for browsers that don't support background-clip: text */
}

.hero-stat-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.hero-image-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  opacity: 0;
  transform: translateX(50px);
  animation: fadeInRight 1s ease forwards 0.5s;
  overflow: visible; /* Allow image to overflow container */
}

.hero-image {
  max-width: 120%;
  max-height: 500px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
  animation: float 6s ease-in-out infinite;
  margin-left: 8%; /* Shift image slightly to the left to allow for larger size */
}

/* Diagnostic Tests Section */
.diagnostic-tests-section {
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards 0.3s;
}

.title-underline {
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 1.5rem auto;
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  animation: expandWidth 0.8s ease forwards 0.3s;
}

/* Diagnostic Test Cards */
.diagnostic-tests-container {
  margin-top: 3rem;
}

.diagnostic-tests-container .col-lg-3,
.diagnostic-tests-container .col-md-4,
.diagnostic-tests-container .col-sm-6 {
  padding: 15px;
}

.diagnostic-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  height: 100%;
  transition: all 0.5s ease;
  position: relative;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(30px);
  display: flex;
  flex-direction: column;
}

.diagnostic-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animation delays for cards */
.diagnostic-card:nth-child(1) {
  animation: fadeInUp 0.8s ease forwards 0.3s;
}

.diagnostic-card:nth-child(2) {
  animation: fadeInUp 0.8s ease forwards 0.4s;
}

.diagnostic-card:nth-child(3) {
  animation: fadeInUp 0.8s ease forwards 0.5s;
}

.diagnostic-card:nth-child(4) {
  animation: fadeInUp 0.8s ease forwards 0.6s;
}

.diagnostic-card:nth-child(5) {
  animation: fadeInUp 0.8s ease forwards 0.7s;
}

.diagnostic-card:nth-child(6) {
  animation: fadeInUp 0.8s ease forwards 0.8s;
}

.diagnostic-card:nth-child(7) {
  animation: fadeInUp 0.8s ease forwards 0.9s;
}

.diagnostic-card:nth-child(8) {
  animation: fadeInUp 0.8s ease forwards 1s;
}

.diagnostic-card:nth-child(9) {
  animation: fadeInUp 0.8s ease forwards 1.1s;
}

.diagnostic-card:nth-child(10) {
  animation: fadeInUp 0.8s ease forwards 1.2s;
}

.diagnostic-card:nth-child(11) {
  animation: fadeInUp 0.8s ease forwards 1.3s;
}

.diagnostic-card:nth-child(12) {
  animation: fadeInUp 0.8s ease forwards 1.4s;
}

.diagnostic-card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  margin-top: 2rem;
  transition: all 0.3s ease;
}

.diagnostic-card:hover .diagnostic-card-icon {
  transform: scale(1.1) rotate(5deg);
}

.diagnostic-card-content {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.diagnostic-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 10px;
  word-wrap: break-word;
  hyphens: auto;
}

.diagnostic-card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 3px;
}

.diagnostic-card-description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.diagnostic-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: auto;
}

.diagnostic-card-btn i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.diagnostic-card-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(26, 35, 126, 0.2);
  color: white;
  text-decoration: none;
}

.diagnostic-card-btn:hover i {
  transform: translateX(5px);
}

/* Booking Section */
.booking-section {
  padding: 5rem 0;
  background-color: #f8f9fa;
  position: relative;
  z-index: 2;
}

.booking-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  position: relative;
}

.booking-header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.booking-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url('../images/pattern.svg');
  background-size: cover;
  opacity: 0.1;
  z-index: 1;
}

.booking-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.booking-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.booking-content {
  padding: 2rem;
}

.test-table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.test-table thead {
  background-color: var(--primary-color);
  color: white;
}

.test-table th {
  padding: 1rem;
  font-weight: 600;
}

.test-table td {
  padding: 1rem;
  vertical-align: middle;
}

.test-table tbody tr {
  transition: all 0.3s ease;
}

.test-table tbody tr:hover {
  background-color: rgba(26, 35, 126, 0.05);
}

.discount-badge {
  background-color: var(--accent-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.booking-form-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  height: 100%;
}

.booking-form-header {
  background-color: var(--primary-color);
  background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.booking-form-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url('../images/pattern.svg');
  background-size: cover;
  opacity: 0.1;
  z-index: 1;
}

.booking-form-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.booking-form-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.booking-form-content {
  padding: 2rem;
}

.form-control {
  border-radius: 8px;
  padding: 0.8rem 1rem;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.15);
}

.form-select {
  border-radius: 8px;
  padding: 0.8rem 1rem;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.15);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.btn-book-now {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-book-now:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(26, 35, 126, 0.2);
}

.btn-book-now i {
  transition: transform 0.3s ease;
}

.btn-book-now:hover i {
  transform: translateX(5px);
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes expandWidth {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .diagnostics-page {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-image-container {
    margin-top: 3rem;
  }

  .hero-image {
    max-width: 100%;
    margin-left: 0;
  }

  .section-title {
    font-size: 2.4rem;
  }

  .booking-title {
    font-size: 1.8rem;
  }

  .booking-form-container {
    margin-top: 2rem;
  }
}

@media (max-width: 767px) {
  .diagnostics-page {
    padding: 40px 0;
  }

  .diagnostics-hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-image {
    max-width: 90%;
    max-height: 350px;
    margin: 0 auto;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-stat {
    min-width: 100%;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .booking-header {
    padding: 1.5rem;
  }

  .booking-content {
    padding: 1.5rem;
  }

  .booking-title {
    font-size: 1.6rem;
  }

  .booking-subtitle {
    font-size: 1rem;
  }
}

/* Bookings Admin Page */
.bookings-section {
  padding: 3rem 0 5rem;
  background-color: var(--light-bg-color);
}

.booking-card {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-top: 2rem;
  border: none;
  animation: fadeInUp 0.8s ease forwards;
}

.booking-card .table {
  margin-bottom: 0;
}

.booking-card .table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.booking-card .table td {
  padding: 1rem;
  vertical-align: middle;
}

.booking-card .badge {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 50px;
}

.alert-info {
  background-color: rgba(0, 29, 79, 0.1);
  border-color: rgba(0, 29, 79, 0.2);
  color: var(--primary-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.alert-info i {
  font-size: 1.5rem;
  margin-right: 1rem;
}

/* Custom Alert Styles */
#bookingAlerts {
  margin-bottom: 1.5rem;
}

.custom-alert {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  position: relative;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: slideInDown 0.5s ease forwards;
}

.success-alert {
  background-color: rgba(25, 135, 84, 0.1);
  border-left: 4px solid #198754;
  color: #0f5132;
}

.error-alert {
  background-color: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
  color: #842029;
}

.alert-icon {
  margin-right: 1rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-alert .alert-icon {
  color: #198754;
}

.error-alert .alert-icon {
  color: #dc3545;
}

.alert-content {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
}

.custom-alert .btn-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 24px;
  height: 24px;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  background-color: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-alert .btn-close::before,
.custom-alert .btn-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
}

.custom-alert .btn-close::before {
  transform: rotate(45deg);
}

.custom-alert .btn-close::after {
  transform: rotate(-45deg);
}

.custom-alert .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.custom-alert .btn-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

@keyframes slideInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Prevent scrolling on form submission */
.no-scroll {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}