/* ==========================================================================
   UB's Goutham Dental Care - Redesigned Sections (UX/UI Refinements)
   ========================================================================== */

:root {
  --ub-blue: #0f5baa;
  --ub-blue-dark: #0b3d91;
  --ub-blue-soft: #eaf6ff;
  --ub-ink: #10243f;
  --ub-muted: #526071;
  --ub-line: rgba(15, 91, 170, 0.14);
  --ub-shadow-sm: 0 12px 30px rgba(11, 61, 145, 0.08);
  --ub-shadow-md: 0 22px 58px rgba(11, 61, 145, 0.13);
  --ub-radius: 24px;
}

/* ==========================================================================
   1. STICKY NAVBAR FIX (Smooth, Glassmorphic & Always Visible on Scroll)
   ========================================================================== */
.sticky-wrapper {
  transition: all 0.4s ease-in-out;
  width: 100%;
  overflow: visible !important;
  height: auto !important;
}

.sticky-wrapper.sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  z-index: 99999 !important;
  overflow: visible !important;
  height: auto !important;
  animation: slideDownHeader 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sticky-wrapper.sticky .menu-area {
  margin: 0 !important;
  border-radius: 0 0 24px 24px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 12px 40px rgba(11, 61, 145, 0.16) !important;
  border-bottom: 1px solid rgba(15, 91, 170, 0.12) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 12px 24px !important;
}

@keyframes slideDownHeader {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Make sure header background is clear when not sticky and looks beautiful */
.header-glass {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(15, 91, 170, 0.12) !important;
}

@media (max-width: 991px) {
  .sticky-wrapper.sticky .menu-area {
    padding: 8px 16px !important;
  }
  .navbar-brand-text {
    font-size: 13px !important;
  }
}


/* ==========================================================================
   2. PATIENT EDUCATION SECTION (Sleek Reels style, 9:16 Aspect Ratio)
   ========================================================================== */
.patient-education-section {
  background: #ffffff;
  padding: 100px 0;
}

.patient-education-section .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 40px;
  justify-content: center;
  margin-top: 50px;
}

@media (max-width: 767px) {
  .patient-education-section .video-grid {
    grid-template-columns: minmax(0, 310px);
    gap: 30px;
  }
}

.education-video-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

.education-video-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(11, 61, 145, 0.3);
}

.education-video-card .video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.education-video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.education-video-card .play-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  z-index: 2;
  transition: background 0.3s ease;
  border: none;
  width: 100%;
  text-align: left;
}

.education-video-card:hover .play-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.9) 100%);
}

.education-video-card .play-icon-center {
  align-self: center;
  margin-top: auto;
  margin-bottom: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.education-video-card:hover .play-icon-center {
  background: #ffffff;
  border-color: #ffffff;
  transform: scale(1.1);
}

.education-video-card .play-icon-center i {
  color: #ffffff;
  font-size: 24px;
  margin-left: 4px;
  transition: color 0.3s ease;
}

.education-video-card:hover .play-icon-center i {
  color: var(--ub-blue);
}

.education-video-card .video-meta {
  margin-top: auto;
  width: 100%;
}

.education-video-card .duration-badge {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  gap: 6px;
}

.education-video-card .video-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.35;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.education-video-card .video-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ==========================================================================
   3. TESTIMONIALS SECTION REDESIGN (Premium & Highly Visible Cards)
   ========================================================================== */
#testi-sec {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 110px 0;
}

.testi-card {
  background: #ffffff !important;
  border-radius: 24px !important;
  padding: 44px 38px !important;
  border: 1px solid rgba(15, 91, 170, 0.08) !important;
  border-top: 4px solid var(--ub-blue) !important;
  box-shadow: 0 16px 48px rgba(11, 61, 145, 0.06) !important;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1 !important;
  visibility: visible !important;
}

.testi-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 24px 60px rgba(11, 61, 145, 0.12) !important;
  border-color: rgba(15, 91, 170, 0.16) !important;
}

.testi-card .box-quote {
  position: absolute;
  top: 30px;
  right: 35px;
  opacity: 0.12;
  width: 50px;
  height: auto;
  transition: opacity 0.3s ease;
}

.testi-card:hover .box-quote {
  opacity: 0.22;
}

.testi-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.testi-stars i {
  color: #ffb800;
  font-size: 15px;
}

.testi-card .box-text {
  font-size: 16px !important;
  line-height: 1.8 !important;
  color: var(--ub-muted) !important;
  margin-bottom: 28px !important;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.testi-card .box-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testi-card .box-author {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--ub-blue-soft);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.testi-card .box-author img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testi-card .box-info {
  display: flex;
  flex-direction: column;
}

.testi-card .box-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--ub-ink) !important;
  margin: 0 !important;
}

.testi-card .patient-meta {
  font-size: 12.5px;
  color: var(--ub-blue);
  font-weight: 600;
  margin-top: 2px;
}

/* Fix Swiper Slide spacing & shadows */
.testiSlide1 {
  padding: 15px 15px 40px !important;
  margin: -15px -15px -40px !important;
  overflow: visible !important;
}

.testiSlide1 .swiper-slide {
  height: auto !important;
}

/* Premium horizontal statistics bar */
.testi-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 91, 170, 0.12);
  border-radius: 24px;
  padding: 30px 40px;
  box-shadow: 0 16px 40px rgba(11, 61, 145, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-top: 20px;
}

.testi-stats-bar .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.testi-stats-bar .stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--ub-blue-dark);
  line-height: 1.1;
  margin-bottom: 6px;
}

.testi-stats-bar .stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ub-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.testi-stats-bar .stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(15, 91, 170, 0.15);
}

@media (max-width: 767px) {
  .testi-stats-bar {
    flex-direction: column;
    gap: 25px;
    padding: 35px 20px;
  }
  .testi-stats-bar .stat-divider {
    width: 60px;
    height: 1px;
    background: rgba(15, 91, 170, 0.12);
  }
}

/* ==========================================================================
   4. PATIENT VIDEOS SECTION (Watch Real Patient Success Stories)
   ========================================================================== */
#video-testi-sec {
  background: #f4f8fc;
  padding: 100px 0;
}

.testimonial-grid {
  margin-top: 40px;
}

.premium-reel-card {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.16);
  background: #000000;
  border: 1px solid rgba(15, 91, 170, 0.1);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  cursor: pointer;
  position: relative;
}

.premium-reel-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 65px rgba(11, 61, 145, 0.28);
}

.premium-reel-card .video-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.premium-reel-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-reel-card .video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  z-index: 2;
  transition: background 0.3s ease;
}

.premium-reel-card:hover .video-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.92) 100%);
}

.premium-reel-card .verified-badge-row {
  display: flex;
  justify-content: flex-start;
}

.premium-reel-card .verified-badge {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.premium-reel-card .verified-badge i {
  color: #2ec5ff;
}

.premium-reel-card .play-icon-center {
  align-self: center;
  margin-top: auto;
  margin-bottom: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.premium-reel-card:hover .play-icon-center {
  background: #ffffff;
  border-color: #ffffff;
  transform: scale(1.1);
}

.premium-reel-card .play-icon-center i {
  color: #ffffff;
  font-size: 24px;
  margin-left: 4px;
  transition: color 0.3s ease;
}

.premium-reel-card:hover .play-icon-center i {
  color: var(--ub-blue);
}

.premium-reel-card .video-meta {
  margin-top: auto;
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.premium-reel-card .patient-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.premium-reel-card .treatment-tag {
  font-size: 11px;
  font-weight: 700;
  background: rgba(46, 197, 255, 0.22);
  color: #2ec5ff;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(46, 197, 255, 0.15);
}

.premium-reel-card .patient-quote {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.5;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive fixes for videos aspect ratio & viewports */
@media (max-width: 991px) {
  .testimonial-grid {
    gap: 24px;
  }
  .premium-reel-card {
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .premium-reel-card {
    max-width: 100%;
    aspect-ratio: 9 / 16;
  }
}

/* ==========================================================================
   5. UX/UI IMPROVEMENTS (Spacing, Clean Layouts, Responsiveness)
   ========================================================================== */
/* Bento Gallery premium refinement */
.ub-bento-gallery {
  padding: 100px 0;
  background: #ffffff;
}

.bento-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-auto-rows: 220px !important;
  grid-auto-flow: dense !important;
  gap: 20px !important;
  margin-top: 45px !important;
}

.bento-gallery-item {
  position: relative !important;
  grid-column: span 1 !important;
  grid-row: span 1 !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  border: 1px solid rgba(15, 91, 170, 0.08) !important;
  box-shadow: 0 10px 30px rgba(11, 61, 145, 0.04) !important;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  display: block !important;
  background: #f8fafc !important; /* Premium soft backdrop frame */
  padding: 10px !important; /* Premium frame border padding */
}

.bento-gallery-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* 100% visible, no cropping on tooth details! */
  border-radius: 12px !important;
  background: #ffffff !important; /* Elegant white backing */
  border: 1px solid rgba(11, 61, 145, 0.05) !important;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  display: block !important;
}

/* Hide center layout overlay to completely remove the duplicate center eye button */
.bento-overlay {
  display: none !important;
}

.bento-eye-btn {
  display: none !important;
}

/* Styled Premium Single Bottom-Right Eye Button (Stays beautifully aligned on the inner frame) */
.bento-gallery-item::after {
  content: "\f06e" !important;
  position: absolute !important;
  right: 20px !important;
  bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: var(--ub-blue) !important;
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", sans-serif !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  opacity: 0.95 !important;
  transform: scale(1) translateY(0) !important;
  box-shadow: 0 8px 24px rgba(11, 61, 145, 0.2) !important;
  z-index: 10 !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.bento-gallery-item:hover {
  transform: scale(1.02) translateY(-4px) !important;
  box-shadow: 0 20px 45px rgba(11, 61, 145, 0.15) !important;
  border-color: rgba(15, 91, 170, 0.15) !important;
}

.bento-gallery-item:hover img {
  transform: scale(1.06) !important;
}

.bento-gallery-item:hover::after {
  opacity: 1 !important;
  transform: scale(1.1) !important;
  background: var(--ub-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(11, 61, 145, 0.4) !important;
}

/* Premium Bento Sizing Rules (Overrides Legacy Layout constraints) */
.bento-large {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
}

.bento-tall {
  grid-row: span 2 !important;
}

.bento-wide {
  grid-column: span 2 !important;
}

@media (max-width: 991px) {
  .bento-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: 16px;
  }
}

@media (max-width: 575px) {
  .bento-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .bento-large, .bento-tall, .bento-wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Section Header Typography */
.sub-title {
  color: var(--ub-blue) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.sec-title {
  color: var(--ub-ink) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  margin-top: 10px !important;
}

.sec-text {
  color: var(--ub-muted) !important;
  line-height: 1.8 !important;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Swiper navigation custom hover states */
.slider-arrow {
  transition: all 0.3s ease !important;
}

.slider-arrow:hover {
  background: var(--ub-blue) !important;
  color: #ffffff !important;
  border-color: var(--ub-blue) !important;
}

/* ==========================================================================
   6. MOBILE VIEW IMPROVEMENTS (Brand Text & WhatsApp Action)
   ========================================================================== */
/* Display brand text beside the logo in the top mobile navbar */
@media (max-width: 767px) {
  .brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
  }
  .header-logo {
    max-width: none !important;
    width: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  .navbar-brand-text {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--ub-blue-dark) !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
  }
}

@media (max-width: 480px) {
  .navbar-brand-text {
    font-size: 12px !important;
  }
}

@media (max-width: 380px) {
  .navbar-brand-text {
    font-size: 11px !important;
  }
}

/* Display brand text inside mobile slide drawer menu next to drawer logo */
.mobile-logo .mobile-brand-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--ub-blue-dark) !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  display: inline-block !important;
  margin-left: 5px !important;
}

/* Floating WhatsApp Chat Button for Mobile View */
.floating-whatsapp {
  position: fixed !important;
  bottom: 80px !important;
  right: 20px !important;
  width: 56px !important;
  height: 56px !important;
  background: #25d366 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 28px !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4) !important;
  z-index: 99999 !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.floating-whatsapp:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6) !important;
  background: #20ba5a !important;
}

.floating-whatsapp::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25d366;
  opacity: 0.4;
  z-index: -1;
  animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@media (min-width: 992px) {
  .floating-whatsapp {
    display: none !important;
  }
}
