/* GAMCA Cochin Custom Theme - Bootstrap 5 Enhancements */

:root {
  --primary-blue: #174ea6;
  --primary-teal: #009688;
  --accent-blue: #e3f0ff;
  --accent-teal: #e0f7fa;
  --deep-blue: #0a2540;
  --soft-gray: #f6fafd;
  --text-dark: #1a2a3a;
  --cta-yellow: #ffe082;
}

/* Cross-Browser Reset */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* Performance optimization */
  overflow-y: scroll;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
  background: var(--soft-gray);
  color: var(--text-dark);
  letter-spacing: 0.01em;
  font-size: 1.08rem;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
  /* Smooth scrolling performance */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Ensure no horizontal scroll */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 100%;
}

/* Responsive Container Widths */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-teal);
  border-radius: 2rem;
  box-shadow: 0 2px 12px rgba(0,191,174,0.10);
  padding: 0.4rem 1.2rem;
  font-size: 1rem;
  color: var(--primary-teal);
  font-weight: 600;
  margin-bottom: 0.5rem;
  border: 1.5px solid #b2f2e9;
}

header.bg-primary, footer.bg-primary {
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
  box-shadow: 0 2px 16px rgba(0,123,255,0.08);
}
header.bg-primary {
  border-bottom: 2px solid #00bfae;
}
footer.bg-primary {
  border-top: 2px solid #00bfae;
}

/* Header Gradient Text */
/* ============================
   MODERN PROFESSIONAL THEME
   ============================ */

/* Modern Header Effects */
.modern-header {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-header.scrolled {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12) !important;
}

/* Modern Navigation Links */
.modern-nav-link {
  position: relative;
  overflow: hidden;
}

.modern-nav-link::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0066cc, #0052a3);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.modern-nav-link:hover {
  background: rgba(0, 102, 204, 0.06) !important;
  color: #0066cc !important;
}

.modern-nav-link:hover::before {
  width: 60%;
}

/* Modern CTA Button */
.modern-cta-btn {
  position: relative;
  overflow: hidden;
}

.modern-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.modern-cta-btn:hover {
  background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 102, 204, 0.5) !important;
}

.modern-cta-btn:hover::before {
  left: 100%;
}

/* Mobile Navigation Items */
.mobile-nav-item:hover {
  background: rgba(0, 102, 204, 0.08) !important;
  transform: translateX(5px);
  padding-left: 22px !important;
}

/* Smooth Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Professional Shadows */
.shadow-professional {
  box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15) !important;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================
   GOOGLE REVIEWS CAROUSEL
   ============================ */

/* Auto-scrolling animation - Always visible in viewport */
@keyframes scroll-reviews {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-374px * 12));
  }
}

.reviews-carousel-wrapper {
  overflow: visible;
  position: relative;
  padding: 10px 0;
  max-width: 100%;
  width: 100%;
}

.reviews-carousel {
  display: flex;
  gap: 24px;
  animation: scroll-reviews 60s linear infinite;
  align-items: stretch;
  flex-wrap: nowrap;
  will-change: transform;
}

/* Review cards - fixed height */
.review-card {
  min-width: 350px;
  max-width: 350px;
  min-height: 220px;
  max-height: 220px;
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.review-card p {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.5 !important;
  margin-bottom: auto !important;
}

.review-card .d-flex:last-child {
  margin-top: auto;
}

/* Pause on hover */
.reviews-carousel-wrapper:hover .reviews-carousel {
  animation-play-state: paused;
}

/* Review card hover effect */
.review-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 102, 204, 0.2) !important;
}

/* Smooth gradient masks on edges */
.reviews-carousel-wrapper::before,
.reviews-carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.reviews-carousel-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #f5f7fa, transparent);
}

.reviews-carousel-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #e3eaf3, transparent);
}

#navToggle:hover {
  background: #ecf0f1;
  transform: scale(1.02);
}






header .btn-outline-light:hover {
  background: rgba(255, 224, 130, 0.2);
  border-color: #ffe082;
  color: #ffe082;
}

/* Mobile Navigation Enhanced */
.mobile-nav a {
  transition: all 0.3s ease;
}

.mobile-nav a:hover {
  background: rgba(0, 191, 174, 0.4) !important;
  transform: translateX(5px);
  padding-left: 1.5rem !important;
}

/* Responsive Header Adjustments */
@media (max-width: 991.98px) {
  .header-logo-wrapper {
    padding: 8px 12px !important;
  }
  
  .header-logo-wrapper h1 {
    font-size: 1.2rem !important;
  }
  
  .header-logo-wrapper i {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 767.98px) {
  .top-info-bar .row > div {
    text-align: center !important;
  }
  
  .top-info-bar .d-flex {
    justify-content: center !important;
  }
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-blue);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.5em;
}

nav a {
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  color: #fff;
  background: transparent;
}
nav a:hover, nav a.active {
  color: var(--primary-teal) !important;
  background: #fff2;
  box-shadow: 0 2px 8px rgba(0,191,174,0.10);
  text-decoration: none;
}

/* Responsive Navigation */
@media (max-width: 767.98px) {
  header .container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem;
  }
  
  header h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    text-align: center;
  }
  
  header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }
  
  header nav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
  }
}

/* Header Navigation Link Hover Effects */
header nav a {
  position: relative;
  padding-bottom: 5px;
}

header nav a:hover {
  color: #ffe082 !important;
}

header nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #00bfae;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

header nav a:hover::after {
  width: 80%;
}

/* Mobile Menu Toggle Button */
.navbar-toggler {
  background: transparent;
  border: 2px solid #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-teal);
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Mobile Navigation Menu */
.mobile-nav {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideDown 0.3s ease-out;
}

.mobile-nav a {
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem;
  transition: background 0.2s, padding-left 0.2s;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  padding-left: 1.5rem !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  header nav a {
    font-size: 0.95rem;
    padding: 0.35rem 0.7rem;
  }
}

@media (min-width: 992px) {
  header .container {
    flex-direction: row !important;
    align-items: center !important;
  }
  
  header nav {
    display: flex;
    gap: 0.3rem;
  }
}

main .card, main .bg-light {
  border-radius: 1rem;
  border: 1.5px solid #e3eaf3;
  box-shadow: 0 2px 16px rgba(0,123,255,0.07);
  background: #fff;
  margin-bottom: 2rem;
}

.btn-success {
  background: linear-gradient(90deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,191,174,0.10);
  transition: background 0.2s, box-shadow 0.2s;
  color: #fff;
}
.btn-success:hover {
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
  box-shadow: 0 4px 16px rgba(0,123,255,0.13);
  color: #fff;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(90deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
  color: #fff;
}

.form-label {
  font-weight: 600;
  color: #007bff;
  letter-spacing: 0.01em;
}

.form-control:focus, .form-select:focus {
  border-color: #00bfae;
  box-shadow: 0 0 0 0.2rem rgba(0,191,174,0.18);
}

footer {
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-teal) 100%);
  color: #fff;
}

.list-group-item {
  border: none;
  border-bottom: 1px solid #e3eaf3;
  background: #fafdff;
  font-size: 1.04rem;
  padding: 1rem 1.25rem;
}

.list-group-item:last-child {
  border-bottom: none;
}

.alert-info {
  background: #e6f7fa;
  color: #007bff;
  border: none;
  box-shadow: 0 2px 8px rgba(0,123,255,0.07);
}

.alert-success {
  background: #e6fae6;
  color: #00bfae;
  border: none;
  box-shadow: 0 2px 8px rgba(0,191,174,0.07);
}

.ratio iframe {
  border-radius: 0.5rem;
}

/* Animated Gradient Hero Background */
.hero-section {
  background: linear-gradient(120deg, #007bff 0%, #00bfae 100%);
  background-size: 200% 200%;
  animation: gradientMove 8s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Section Divider */
.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
  border-radius: 2px;
  margin: 2rem auto 2.5rem auto;
  opacity: 0.18;
}

/* SVG Section Divider */
.section-divider-svg {
  width: 100%;
  height: 48px;
  display: block;
  margin: -2rem 0 2rem 0;
}

/* Stepper Timeline */
.booking-stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 2.5rem 0 2rem 0;
  position: relative;
  z-index: 2;
}
.booking-step {
  flex: 1 1 0;
  text-align: center;
  position: relative;
  z-index: 2;
}
.booking-step .step-circle {
  width: 54px;
  height: 54px;
  background: linear-gradient(120deg, #00bfae 0%, #174ea6 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 0.5rem auto;
  box-shadow: 0 4px 16px rgba(23,78,166,0.10);
  border: 3px solid #e0f7fa;
  position: relative;
  z-index: 2;
}
.booking-step .step-label {
  font-size: 1.08rem;
  color: #174ea6;
  font-weight: 600;
  margin-top: 0.2rem;
  background: none;
}
.booking-stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 7%;
  right: 7%;
  height: 6px;
  background: linear-gradient(90deg, #e0f7fa 0%, #00bfae 100%);
  border-radius: 3px;
  z-index: 1;
}

/* Floating Help Button */
.floating-help {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  background: linear-gradient(90deg, #174ea6 0%, #00bfae 100%);
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 6px 32px 0 rgba(23,78,166,0.18);
  z-index: 1050;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  /* Performance optimization */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.floating-help:hover {
  background: linear-gradient(90deg, #00bfae 0%, #174ea6 100%);
  box-shadow: 0 10px 40px 0 rgba(23,78,166,0.28);
  transform: translateY(-2px) scale(1.08) translateZ(0);
}

/* Modern Card & Button Styles */
.card.medical-card {
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px rgba(23,78,166,0.10);
  border: 1.5px solid #e0f7fa;
  background: #fff;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card.medical-card:hover {
  box-shadow: 0 16px 48px rgba(0,191,174,0.18);
  transform: translateY(-4px) scale(1.03);
}
.btn-pill {
  border-radius: 2rem !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

/* Glassmorphism card for hero */
.glass-card {
  background: rgba(255,255,255,0.13);
  border-radius: 2rem;
  box-shadow: 0 8px 32px rgba(23,78,166,0.13);
  backdrop-filter: blur(8px);
  border: 1.5px solid #e0f7fa;
  color: #fff;
}

/* More whitespace for premium look */
section, .container {
  padding-bottom: 2.5rem;
}

/* Animated Button Effects */
.btn-success, .btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-success::after, .btn-primary::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  background: rgba(0,191,174,0.18);
  border-radius: 100%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
  z-index: 0;
}
.btn-success:hover::after, .btn-primary:hover::after {
  width: 220%; height: 500%;
}
.btn-success:focus, .btn-primary:focus {
  outline: 2px solid var(--primary-teal);
  outline-offset: 2px;
}

.btn-success, .btn-primary {
  z-index: 1;
}
.btn-success span, .btn-primary span {
  position: relative;
  z-index: 2;
}

/* Sticky header */
header.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 12px 0 rgba(0, 32, 64, 0.08);
  background: linear-gradient(90deg, #0a2540 80%, #0e7c86 100%);
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  background: linear-gradient(90deg, #0e7c86 60%, #0a2540 100%);
  color: #fff;
  padding: 0.9rem 2.2rem 0.9rem 1.5rem;
  border-radius: 2rem 2rem 2rem 0.5rem;
  box-shadow: 0 6px 32px 0 rgba(14, 124, 134, 0.18);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  z-index: 1040;
  text-decoration: none;
  /* Performance optimization */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.floating-cta:hover {
  background: linear-gradient(90deg, #0a2540 60%, #0e7c86 100%);
  box-shadow: 0 10px 40px 0 rgba(14, 124, 134, 0.28);
  transform: translateY(-2px) scale(1.04) translateZ(0);
  color: #fff;
}

/* Responsive Floating CTA */
@media (max-width: 767.98px) {
  .floating-cta {
    right: 1rem;
    bottom: 1rem;
    padding: 0.7rem 1.5rem 0.7rem 1rem;
    font-size: 1rem;
    gap: 0.5rem;
  }
}

@media (max-width: 479.98px) {
  .floating-cta {
    right: 0.5rem;
    bottom: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .floating-cta i {
    font-size: 1rem;
  }
}

/* Testimonial Carousel */
.testimonial-carousel {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0 1rem 0;
}
.testimonial-carousel .carousel-inner {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-height: 180px;
}
.testimonial-carousel .carousel-item {
  flex: 1 0 100%;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 1;
}
.testimonial-carousel .carousel-item.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  transform: scale(1.01);
}
.testimonial-carousel .carousel-control-prev,
.testimonial-carousel .carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0e7c86;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px 0 rgba(14, 124, 134, 0.12);
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s, box-shadow 0.2s;
}
.testimonial-carousel .carousel-control-prev:hover,
.testimonial-carousel .carousel-control-next:hover {
  background: #0a2540;
}
.testimonial-carousel .carousel-control-prev { left: -3rem; }
.testimonial-carousel .carousel-control-next { right: -3rem; }

.testimonial-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #0e7c86 60%, #0a2540 100%);
  border-radius: 2px;
  margin: 0 auto 1.5rem auto;
}

/* Fade-in animation fallback: visible by default */
.fade-in-section {
  opacity: 1;
  transform: none;
  transition: none;
}

/* When JS is working, add .animated for fade-in effect */
.fade-in-section.animated {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.fade-in-section.animated.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* HERO SECTION: Only set text to white for the hero-section itself, not all children */
.hero-section {
  color: #fff !important;
}

/* Remove over-broad color: #fff from all children of .hero-section and .bg-primary */
.hero-section *:not(.btn):not(.badge):not(.fa) {
  color: inherit !important;
}

/* Light background sections: force dark text for readability */
section[style*="background: #fff"],
section[style*="background: #f6fafd"],
.bg-light, .card, .testimonial-carousel.bg-white, .list-group-item, .section-divider {
  color: #1a2a3a !important;
}

/* Headings in light sections */
section[style*="background: #fff"] h1,
section[style*="background: #fff"] h2,
section[style*="background: #fff"] h3,
section[style*="background: #fff"] h4,
section[style*="background: #fff"] h5,
section[style*="background: #fff"] h6,
section[style*="background: #f6fafd"] h1,
section[style*="background: #f6fafd"] h2,
section[style*="background: #f6fafd"] h3,
section[style*="background: #f6fafd"] h4,
section[style*="background: #f6fafd"] h5,
section[style*="background: #f6fafd"] h6 {
  color: #174ea6 !important;
}

/* Ensure .btn and .badge colors remain as designed */
.btn, .badge {
  color: #fff !important;
}

/* Medical-themed background patterns for sections */
.medical-bg {
  background: linear-gradient(120deg, #e3f0ff 0%, #e0f7fa 100%);
  position: relative;
  overflow: hidden;
}
.medical-bg::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 320px; height: 320px;
  background: url('data:image/svg+xml;utf8,<svg width="320" height="320" xmlns="http://www.w3.org/2000/svg"><g fill="%2300bfae" fill-opacity="0.08"><rect x="0" y="0" width="320" height="320" rx="80"/><circle cx="80" cy="80" r="40"/><rect x="200" y="200" width="80" height="80" rx="20"/></g></svg>') no-repeat;
  z-index: 0;
}
.medical-bg::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 220px; height: 220px;
  background: url('data:image/svg+xml;utf8,<svg width="220" height="220" xmlns="http://www.w3.org/2000/svg"><g fill="%23174ea6" fill-opacity="0.06"><ellipse cx="110" cy="110" rx="100" ry="60"/><rect x="60" y="60" width="100" height="100" rx="30"/></g></svg>') no-repeat;
  z-index: 0;
}

/* Background image sections */
.section-bg-image {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  min-height: 500px;
  padding: 5rem 0;
  /* Performance optimization for smooth scrolling */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
  will-change: auto;
  /* Prevent scrolling issues */
  overflow: visible;
  contain: layout style;
}

.section-bg-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.0) 0%, rgba(23, 78, 166, 0.0) 50%, rgba(0, 191, 174, 0.0) 100%);
  z-index: 1;
  /* Performance optimization */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  pointer-events: none;
  will-change: auto;
  /* TEMPORARY: Overlay completely transparent to test if images show */
}

.section-bg-image .container {
  position: relative;
  z-index: 2;
  /* Prevent container from causing scroll issues */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.section-bg-image h2,
.section-bg-image h3,
.section-bg-image p,
.section-bg-image .lead {
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.section-bg-image .card {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  /* Prevent card from causing scroll stutter */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

.section-bg-image .card:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: translate3d(0, -8px, 0) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.section-bg-image .card h5,
.section-bg-image .card h6,
.section-bg-image .card p,
.section-bg-image .card .card-text {
  color: #174ea6 !important;
  text-shadow: none;
}

.section-bg-image .card i {
  color: #00bfae !important;
}

.section-bg-image .alert {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  border: 2px solid rgba(0, 191, 174, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.section-bg-image .alert strong {
  color: #174ea6 !important;
}

/* Hospital background section */
.hospital-bg-section {
  background-image: url('/Doctor-Appointment-System-PHP-main/website/img/hospital-bg.jpg') !important;
}

/* Blur hospital background section */
.blur-hospital-bg-section {
  background-image: url('/Doctor-Appointment-System-PHP-main/website/img/blur-hospital.jpg');
}

/* Global travel background section */
.travel-bg-section {
  background-image: url('/Doctor-Appointment-System-PHP-main/website/img/global-air-travel-connectivity.jpg') !important;
  background-position: center center !important;
  background-size: cover !important;
}

.travel-bg-section::before {
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.50) 0%, rgba(23, 78, 166, 0.40) 50%, rgba(0, 191, 174, 0.30) 100%) !important;
}

/* Animated background shine effect */
.section-bg-image::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 70%
  );
  animation: shine 8s infinite;
  z-index: 1;
  pointer-events: none;
  /* Performance optimization */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

@keyframes shine {
  0% {
    transform: translate3d(-100%, -100%, 0) rotate(45deg);
  }
  100% {
    transform: translate3d(100%, 100%, 0) rotate(45deg);
  }
}

/* Mobile optimization for background images */
@media (max-width: 767.98px) {
  .section-bg-image {
    min-height: 350px;
    padding: 3rem 0;
    /* Optimize background for mobile performance */
    background-size: cover;
    background-position: center;
  }
  
  .section-bg-image::before {
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.92) 0%, rgba(23, 78, 166, 0.88) 50%, rgba(0, 191, 174, 0.85) 100%);
  }
  
  .section-bg-image h2 {
    font-size: 1.75rem !important;
  }
  
  .section-bg-image .lead {
    font-size: 1rem !important;
  }
}

/* Add a soft overlay for hero medical theme */
.hero-section.medical-hero {
  background: linear-gradient(120deg, #0a2540 0%, #0e7c86 100%);
  position: relative;
  overflow: hidden;
}
.hero-section.medical-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('data:image/svg+xml;utf8,<svg width="1200" height="480" xmlns="http://www.w3.org/2000/svg"><g fill="%2300bfae" fill-opacity="0.10"><ellipse cx="300" cy="240" rx="220" ry="90"/><ellipse cx="900" cy="120" rx="160" ry="60"/></g></svg>') center/cover no-repeat;
  z-index: 1;
  pointer-events: none;
}
.hero-section.medical-hero > * {
  position: relative;
  z-index: 2;
}

/* Hero overlay for full-width image */
.hero-section {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a2540;
  overflow: hidden;
}
.hero-section > .position-absolute {
  z-index: 1;
}
.hero-section > .container {
  z-index: 2;
}

/* Trust cards */
.card.medical-card {
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px rgba(23,78,166,0.10);
  border: 1.5px solid #e0f7fa;
  background: #fff;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card.medical-card:hover {
  box-shadow: 0 16px 48px rgba(0,191,174,0.18);
  transform: translateY(-4px) scale(1.03);
}

/* Booking steps */
.step-circle {
  width: 54px;
  height: 54px;
  background: linear-gradient(120deg, #00bfae 0%, #174ea6 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 0.5rem auto;
  box-shadow: 0 4px 16px rgba(23,78,166,0.10);
  border: 3px solid #e0f7fa;
}

/* Testimonial carousel tweaks */
.testimonial-carousel {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0 1rem 0;
}

/* Hero background images - animated carousel */
.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 0;
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: opacity;
}

.hero-bg-1 {
  background-image: url('img/hero-doctor-1.jpg');
  animation: heroFade1 16s infinite;
  opacity: 1;
}

.hero-bg-2 {
  background-image: url('img/hero-stethoscope-2.jpg');
  animation: heroFade2 16s infinite;
}

.hero-bg-3 {
  background-image: url('img/hero-dentist-3.jpg');
  animation: heroFade3 16s infinite;
}

.hero-bg-4 {
  background-image: url('img/hero-clinic-4.jpg');
  animation: heroFade4 16s infinite;
}

/* Mobile-optimized hero background */
@media (max-width: 767.98px) {
  .hero-bg-img {
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
  }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-bg-img {
    background-size: cover;
    background-position: center center;
  }
}

/* Keyframes for hero background rotation */
@keyframes heroFade1 {
  0% { opacity: 1; }
  25% { opacity: 1; }
  31% { opacity: 0; }
  94% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes heroFade2 {
  0% { opacity: 0; }
  19% { opacity: 0; }
  25% { opacity: 1; }
  50% { opacity: 1; }
  56% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes heroFade3 {
  0% { opacity: 0; }
  44% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 1; }
  81% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes heroFade4 {
  0% { opacity: 0; }
  69% { opacity: 0; }
  75% { opacity: 1; }
  100% { opacity: 1; }
}

/* Hero overlay */
.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10,37,64,0.50) 0%, rgba(23,78,166,0.45) 100%);
  z-index: 1;
}

/* Darker backgrounds for hero and main sections */
.hero-section {
  background: linear-gradient(120deg, #0a2540 0%, #174ea6 100%) !important;
}
.medical-bg {
  background: linear-gradient(120deg, #e3eaf3 0%, #b2d8e6 100%) !important;
}
section[style*="background: #fff"] {
  background: #e3eaf3 !important;
}
section[style*="background: #f6fafd"] {
  background: #d6e6f2 !important;
}
.card.medical-card {
  background: #f7fbfd !important;
  border: 1.5px solid #b2d8e6;
}

/* Darker text for contrast */
.card.medical-card, .medical-bg, section {
  color: #14213d !important;
}

/* Headings in dark sections */
.hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4, .hero-section h5, .hero-section h6 {
  color: #fff !important;
  text-shadow: 0 2px 16px #0a2540;
}

/* Global Responsive Styles */
@media (max-width: 767.98px) {
  body {
    font-size: 1rem;
  }
  
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  .hero-section {
    min-height: 400px !important;
    padding: 2rem 1rem !important;
  }
  
  .hero-section h1 {
    font-size: 1.75rem !important;
  }
  
  .hero-section p.lead {
    font-size: 1rem !important;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .btn-lg {
    font-size: 1rem !important;
    padding: 0.75rem 1.5rem !important;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .booking-stepper {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .booking-stepper::before {
    display: none;
  }
  
  .icon-circle {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.5rem !important;
  }
  
  /* Mobile Text Alignment */
  .text-md-start {
    text-align: center !important;
  }
  
  .text-center-mobile {
    text-align: center !important;
  }
  
  /* Mobile Row Adjustments */
  .row.align-items-center {
    flex-direction: column-reverse;
  }
  
  .row.align-items-center .col-md-4,
  .row.align-items-center .col-md-8,
  .row.align-items-center .col-lg-5,
  .row.align-items-center .col-lg-7 {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  /* Mobile Images */
  img.img-fluid {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
  }
  
  /* Mobile Cards */
  .card {
    margin-bottom: 1rem;
  }
  
  .col-md-4 .card,
  .col-md-6 .card {
    margin-bottom: 1.5rem;
  }
  
  /* Mobile Sections */
  section {
    padding: 2rem 0 !important;
  }
  
  /* Mobile Spacing */
  .mb-4, .my-4 {
    margin-bottom: 1.5rem !important;
  }
  
  .mb-5, .my-5 {
    margin-bottom: 2rem !important;
  }
  
  .g-4 {
    gap: 1rem !important;
  }
  
  .g-5 {
    gap: 1.5rem !important;
  }
}

@media (max-width: 575.98px) {
  h1 {
    font-size: 1.5rem !important;
  }
  
  h2 {
    font-size: 1.3rem !important;
  }
  
  .hero-section {
    min-height: 350px !important;
    padding: 1.5rem 0.75rem !important;
  }
  
  .hero-section h1 {
    font-size: 1.5rem !important;
  }
  
  .hero-section p {
    font-size: 0.95rem !important;
  }
  
  .testimonial-carousel .carousel-control-prev {
    left: -1rem;
  }
  
  .testimonial-carousel .carousel-control-next {
    right: -1rem;
  }
  
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Extra Small Device Adjustments */
  .btn {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
  }
  
  .card-body {
    padding: 0.75rem !important;
  }
  
  header h1 {
    font-size: 1.3rem !important;
  }
  
  header .fa-stethoscope {
    font-size: 1rem !important;
  }
}

/* Responsive Tables and Forms */
@media (max-width: 767.98px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .form-control, .form-select {
    font-size: 0.95rem;
  }
  
  form.row.g-4 {
    padding: 1rem !important;
  }
  
  /* Mobile Form Columns */
  .col-md-6,
  .col-md-4,
  .col-md-3 {
    width: 100%;
  }
  
  /* Stack form elements vertically */
  form .row {
    flex-direction: column;
  }
  
  form .col-md-6,
  form .col-md-4,
  form .col-md-3 {
    margin-bottom: 1rem;
  }
}

/* Responsive Images */
@media (max-width: 767.98px) {
  img {
    max-width: 100%;
    height: auto;
  }
  
  .rounded-4 {
    border-radius: 1rem !important;
  }
  
  /* Adjust image max-heights */
  img[style*="max-height"] {
    max-height: 200px !important;
  }
}

/* Tablet Specific Adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    min-height: 450px;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  /* Tablet Column Adjustments */
  .col-md-4 {
    width: 50%;
  }
  
  .row .col-md-4:last-child:nth-child(odd) {
    width: 100%;
  }
}

/* Large Desktop Adjustments */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .hero-section .container {
    max-width: 900px;
  }
}

/* Extra Large Desktop */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Landscape Mobile Devices */
@media (max-width: 767.98px) and (orientation: landscape) {
  .hero-section {
    min-height: 300px !important;
  }
  
  header {
    padding: 0.5rem 0 !important;
  }
}

/* Print Styles */
@media print {
  .floating-cta,
  .floating-help,
  header nav,
  .navbar-toggler {
    display: none !important;
  }
  
  header {
    position: static !important;
  }
  
  body {
    font-size: 12pt;
  }
}

/* Mobile Utility Classes */
@media (max-width: 767.98px) {
  .mobile-center {
    text-align: center !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
  
  .mobile-no-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .mobile-stack {
    flex-direction: column !important;
  }
}

/* Bootstrap Grid Override for Better Mobile */
@media (max-width: 767.98px) {
  .row {
    margin-left: 0;
    margin-right: 0;
  }
  
  .row > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Ensure columns stack properly */
  [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
}

/* Better Button Alignment */
@media (max-width: 767.98px) {
  .text-center button,
  .text-center .btn,
  button[type="submit"] {
    display: block;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Improve List Group on Mobile */
@media (max-width: 767.98px) {
  .list-group {
    margin-bottom: 1.5rem;
  }
  
  .list-group-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

/* Better Card Spacing on Mobile */
@media (max-width: 767.98px) {
  .card {
    border-radius: 0.75rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .card-title {
    font-size: 1.1rem !important;
  }
  
  .card-text {
    font-size: 0.95rem !important;
  }
}

/* Icon Sizing for Mobile */
@media (max-width: 767.98px) {
  .fa-3x {
    font-size: 2rem !important;
  }
  
  .fa-2x {
    font-size: 1.5rem !important;
  }
}

/* Better Footer on Mobile */
@media (max-width: 767.98px) {
  footer {
    text-align: center !important;
    padding: 1.5rem 1rem !important;
  }
  
  footer .small {
    font-size: 0.85rem !important;
    line-height: 1.6;
  }
  
  footer .trust-badge {
    font-size: 0.9rem !important;
  }
}

/* Improve Map/Iframe Responsiveness */
@media (max-width: 767.98px) {
  .ratio {
    margin-bottom: 1.5rem;
  }
  
  iframe {
    width: 100%;
    border-radius: 0.5rem;
  }
}

/* Better Alert Boxes on Mobile */
@media (max-width: 767.98px) {
  .alert {
    font-size: 0.9rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
}

/* Ensure Lead Text is Readable on Mobile */
@media (max-width: 767.98px) {
  .lead {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
}

/* Better Badge Sizing */
@media (max-width: 767.98px) {
  .badge {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
  }
}

/* Improve Testimonial Cards on Mobile */
@media (max-width: 767.98px) {
  .testimonial-carousel {
    padding: 1rem 2rem;
  }
  
  .testimonial-avatar img {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Better Section Backgrounds on Mobile */
@media (max-width: 767.98px) {
  section[style*="background"] {
    padding: 2rem 1rem !important;
  }
  
  .medical-bg::before,
  .medical-bg::after {
    display: none;
  }
}

/* Optimize Touch Targets for Mobile */
@media (max-width: 767.98px) {
  a, button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
  
  nav a {
    min-height: 40px;
    padding: 0.75rem 1rem;
  }
  
  /* Prevent double-tap zoom on buttons */
  button, .btn, a {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
  }
  
  /* Better spacing between interactive elements */
  .btn-group .btn,
  .d-flex .btn {
    margin: 0.25rem;
  }
}

/* Better Button Rendering Across Browsers */
button,
.btn,
input[type="submit"],
input[type="button"] {
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-block;
  -webkit-appearance: button;
  appearance: button;
  transition: all 0.3s ease;
}

button:active,
.btn:active {
  transform: scale(0.98);
}

/* Improve Form Elements Across Devices */
input,
select,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  width: 100%;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 0.2rem rgba(0, 191, 174, 0.25);
  outline: none;
}

/* Custom Select Dropdown Arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

/* Fix Column Gaps on Mobile */
@media (max-width: 767.98px) {
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-8,
  .col-lg-3,
  .col-lg-4,
  .col-lg-5,
  .col-lg-6,
  .col-lg-7,
  .col-lg-8 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .g-4 > *,
  .g-5 > * {
    padding: 0.75rem !important;
  }
}

/* Better Form Alignment on Mobile */
@media (max-width: 767.98px) {
  form.bg-light {
    padding: 1.5rem 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  form h4 {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .form-check-label {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .form-check {
    padding-left: 2rem;
  }
}

/* Better Header Alignment on All Devices */
header .container > div {
  width: 100%;
}

header h1 {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

/* Ensure Proper Text Wrapping */
@media (max-width: 767.98px) {
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  p, .lead {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Better Shadow Effects on Mobile */
@media (max-width: 767.98px) {
  .shadow,
  .shadow-sm,
  .shadow-lg {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Footer Link Hover Effect */
.hover-link {
  transition: all 0.3s ease;
  display: inline-block;
}

.hover-link:hover {
  color: #fff !important;
  transform: translateX(5px);
}

/* Better Focus States for Accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid var(--primary-teal);
  outline-offset: 2px;
}

/* Prevent Zoom on Input Focus (iOS) */
@media (max-width: 767.98px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* iOS-Specific Fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari */
  body {
    cursor: pointer;
  }
  
  input,
  textarea,
  select {
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
  }
  
  button,
  .btn {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0.5rem;
  }
  
  /* Fix iOS zoom on orientation change */
  @media (orientation: landscape) {
    body {
      -webkit-text-size-adjust: 100%;
    }
  }
}

/* Android-Specific Fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input {
    font-size: 16px;
  }
}

/* Fix for Samsung Internet Browser */
@supports (-webkit-appearance: none) {
  input[type="date"],
  input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
  }
}

/* Better Rounded Corners on Mobile */
@media (max-width: 767.98px) {
  .rounded,
  .rounded-4 {
    border-radius: 0.75rem !important;
  }
  
  .btn {
    border-radius: 0.5rem !important;
  }
}

/* Image Center Alignment on Mobile */
@media (max-width: 767.98px) {
  img.img-fluid {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  
  .text-center img {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Better List Alignment */
@media (max-width: 767.98px) {
  ul, ol {
    padding-left: 1.5rem;
  }
  
  .list-unstyled {
    padding-left: 0;
  }
}

/* Proper Video/Embed Sizing */
@media (max-width: 767.98px) {
  video,
  embed,
  object {
    max-width: 100%;
    height: auto;
  }
}

/* Fix Bootstrap Modal on Mobile */
@media (max-width: 767.98px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-content {
    border-radius: 0.75rem;
  }
}

/* Better Table Responsiveness */
@media (max-width: 767.98px) {
  table {
    font-size: 0.9rem;
  }
  
  thead {
    display: none;
  }
  
  tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 0.5rem;
  }
  
  td {
    display: block;
    text-align: right;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
  }
  
  td:last-child {
    border-bottom: none;
  }
  
  td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
  }
}

/* ============================================
   CROSS-PLATFORM & CROSS-BROWSER ENHANCEMENTS
   ============================================ */

/* Windows-specific fixes */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  /* IE11 fixes */
  img {
    max-width: 100%;
    height: auto;
  }
  
  .d-flex {
    display: -ms-flexbox !important;
    display: flex !important;
  }
}

/* Edge Legacy fixes */
@supports (-ms-ime-align: auto) {
  body {
    overflow-x: hidden;
  }
}

/* Firefox-specific enhancements */
@-moz-document url-prefix() {
  select {
    padding-right: 2rem;
  }
  
  input[type="date"],
  input[type="time"] {
    -moz-appearance: none;
    appearance: none;
  }
}

/* Safari-specific fixes */
@media not all and (min-resolution: 0.001dpcm) {
  @supports (-webkit-appearance: none) {
    .hero-bg-img {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
    
    img {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
  }
}

/* Chrome & Chromium-based browsers optimization */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
  }
  
  input[type="date"]::-webkit-calendar-picker-indicator:hover,
  input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
  }
}

/* High DPI / Retina Display Optimization */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (-o-min-device-pixel-ratio: 2/1),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  body {
    background: #1a1a1a;
    color: #f0f0f0;
  }
  */
}

/* Reduced Motion Support (Accessibility) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-bg-img {
    animation: none !important;
    opacity: 1 !important;
  }
  
  .hero-bg-1 {
    display: block !important;
  }
  
  .hero-bg-2,
  .hero-bg-3,
  .hero-bg-4 {
    display: none !important;
  }
}

/* High Contrast Mode Support (Accessibility) */
@media (prefers-contrast: high) {
  body {
    background: #fff;
    color: #000;
  }
  
  .btn,
  button {
    border: 2px solid currentColor;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Orientation Change Handling */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: 300px !important;
    padding: 1rem 0 !important;
  }
  
  header {
    padding: 0.5rem 0 !important;
  }
}

/* Ultra-wide screen optimization */
@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-section .container {
    max-width: 1000px;
  }
}

/* 4K and above optimization */
@media (min-width: 2560px) {
  body {
    font-size: 1.2rem;
  }
  
  h1 {
    font-size: 3.5rem !important;
  }
  
  h2 {
    font-size: 2.8rem !important;
  }
  
  .container {
    max-width: 1600px;
  }
}

/* Small mobile devices (iPhone SE, Galaxy Fold) */
@media (max-width: 360px) {
  body {
    font-size: 0.9rem;
  }
  
  h1 {
    font-size: 1.3rem !important;
  }
  
  h2 {
    font-size: 1.15rem !important;
  }
  
  .btn {
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
  }
  
  .hero-section {
    min-height: 300px !important;
    padding: 1rem 0.5rem !important;
  }
  
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Prevent text selection on buttons (better UX) */
button,
.btn,
a[role="button"] {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection in text areas and inputs */
input,
textarea,
[contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Fix for broken images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img:before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #f0f0f0;
}

img:after {
  content: '📷 ' attr(alt);
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-size: 0.9rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

/* Performance optimization: GPU acceleration */
.hero-bg-img,
.floating-cta,
.btn,
.card {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

/* Improve scrolling performance */
.hero-section,
section {
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* Clearfix utility */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Ensure footer stays at bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

/* Print optimization */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .floating-cta,
  .floating-help,
  header nav,
  .navbar-toggler,
  button,
  .btn {
    display: none !important;
  }
  
  header {
    position: static !important;
    box-shadow: none !important;
  }
  
  section {
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* Loading state for images */
img[loading="lazy"] {
  min-height: 100px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===================================================================
   COPYRIGHT PROTECTION & SECURITY STYLES
   ================================================================ */

/* Disable text selection (except for form inputs) */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Allow selection for form inputs and textareas */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Prevent image dragging */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: auto;
}

/* Add copyright watermark to images (optional visual layer) */
img::after {
  content: '© GAMCA Cochin';
  position: absolute;
  bottom: 5px;
  right: 5px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* ===================================================================
   PERFORMANCE OPTIMIZATION STYLES
   ================================================================ */

/* Optimize font rendering */
body, html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: always;
}

/* GPU acceleration for smooth animations */
.card, .btn, .floating-cta, .floating-help, img, .hero-bg-img {
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

/* Optimize will-change for frequently animated elements */
.hover-lift:hover, .card:hover, .btn:hover {
  will-change: transform, box-shadow;
}

.hover-lift, .card, .btn {
  will-change: auto;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .section-bg-image::after {
    animation: none !important;
  }
}

/* Optimize scroll performance */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* Contain layout shifts */
section {
  contain: layout style;
}

/* Optimize background images for performance */
.section-bg-image {
  background-attachment: scroll; /* Faster than fixed */
  will-change: auto;
  contain: layout style paint;
}

/* Image optimization */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  max-width: 100%;
  height: auto;
}

/* ===================================================================
   SECURITY VISUAL INDICATORS
   ================================================================ */

/* Add security badge styling */
.security-badge {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(23, 78, 166, 0.95);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none; /* Hidden by default, can be enabled */
}

/* ===================================================================
   CRITICAL CSS - Above the fold optimization
   ================================================================ */

/* Ensure critical content loads first */
header, .hero-section {
  contain: layout style;
  content-visibility: auto;
}

/* Defer non-critical content */
footer, .testimonial-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* ===================================================================
   COPYRIGHT NOTICE
   ================================================================ */
/*
 * GAMCA Cochin Website Styles
 * Copyright © 2005-2025 GAMCA Cochin. All Rights Reserved.
 * 
 * This stylesheet is proprietary and confidential.
 * Unauthorized copying, modification, distribution, or use
 * of this code is strictly prohibited and may result in legal action.
 * 
 * Protected under Indian Copyright Act, 1957 and International Copyright Laws.
 */

/* End of Cross-Platform Enhancements */