/* ============================================
   Largo Dental One Brand Styles
   ============================================ */

/* CSS Variables - Brand Colors */
:root {
  --primary: #0c4da2; /* LDO Dark Blue - Primary */
  --secondary: #27cbf0; /* LDO Cyan - Secondary */
  --primary-50: #f0f4fb;
  --primary-100: #e0e8f7;
  --primary-200: #c0d1ef;
  --primary-300: #92afe3;
  --primary-400: #5d87d3;
  --primary-500: #0c4da2;
  --primary-600: #0a3d82;
  --primary-700: #093169;
  --primary-800: #082657;
  --primary-900: #071e47;
  --primary-950: #04132d;

  /* Secondary/Accent & Neutrals */
  --accent: #27cbf0; /* Secondary cyan */
  --accent-dark: #1da8cd;
  --gray: #777878;
  --dark: #1f2937;
  
  /* Button Text Colors */
  --btn-text-light: #ffffff; /* White for dark backgrounds like primary blue */
}

/* Base Styles */
body {
  background-color: #ffffff;
}

html {
  scroll-behavior: smooth;
}

/* Layout Container */
.layout {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Alpine.js cloak */
[x-cloak] {
  display: none !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.75rem; }
}

/* NEW BUTTON STYLES - Pill-shaped with modern hover effects */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem; /* Mobile: smaller */
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9999px; /* Fully rounded pill shape */
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--btn-text-light);
}

/* Reset button styling for non-.btn buttons */
button:not(.btn) {
  background: transparent;
  color: inherit;
  border: none;
}

/* Primary Button - Solid background with scale effect */
.btn-primary {
  background-color: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background-color: var(--primary-700) !important;
  color: white !important;
  transform: scale(1.05) !important;
  box-shadow: 0 10px 25px rgba(12, 77, 162, 0.35) !important;
}

/* Secondary Button - Accent color with scale effect */
.btn-secondary {
  background-color: var(--accent) !important;
  color: var(--dark) !important;
  border-color: var(--accent) !important;
}

.btn-secondary:hover {
  background-color: var(--accent-dark) !important;
  color: var(--dark) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 10px 25px rgba(39, 203, 240, 0.35) !important;
}

/* Outline Button - Transparent with border */
.btn-outline {
  /* background-color: transparent !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important; */
  background-color: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  font-weight: 600 !important;
}

.btn-outline:hover {
  /* background-color: var(--primary) !important;
  color: white !important;
  transform: scale(1.05) !important; */
  background-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.05) !important;
}

/* White Button - For use on dark backgrounds */
.btn-white {
  background-color: white !important;
  color: var(--primary) !important;
  border-color: white !important;
  font-weight: 700 !important;
}

.btn-white:hover {
  background-color: #f9fafb !important;
  transform: scale(1.05) !important;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.25) !important;
}

/* Glass Button - For dark backgrounds with backdrop blur */
.btn-glass {
  background-color: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  font-weight: 600 !important;
}

.btn-glass:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.05) !important;
}

/* Accent Button (alternative) */
.btn-accent {
  background-color: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

.btn-accent:hover {
  background-color: var(--accent-dark) !important;
  transform: scale(1.05) !important;
  box-shadow: 0 10px 25px rgba(12, 77, 162, 0.35) !important;
}


/* Responsive padding for desktop */
@media (min-width: 640px) {
  .btn {
    padding: 0.75rem 2rem; /* Desktop: larger */
    font-size: 1rem;
  }
}

/* Form Inputs */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: var(--dark);
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 81, 168, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}

/* Focus States */
a:focus,
button:focus {
  outline: none !important;
  box-shadow: none !important;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-200) !important;
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
}

/* Navigation Links */
.nav-link {
  color: #374151;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s;
  outline: none !important;
}

.nav-link:focus {
  outline: none !important;
  box-shadow: none !important;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.2s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

.dropdown-link {
  display: block;
  padding: 0.625rem 1.25rem;
  color: #374151;
  font-size: 0.9375rem;
  transition: background-color 0.15s, color 0.15s;
  outline: none !important;
}

.dropdown-link:focus {
  outline: none !important;
  box-shadow: none !important;
}

.dropdown-link:hover {
  background-color: #f3f4f6;
  color: var(--primary);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0;
  color: #374151;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

.header-compact {
  padding-top: inherit !important;
  padding-bottom: inherit !important;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.media-grid a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
}

.media-grid picture {
  display: block;
  width: 100%;
  height: 100%;
}

.media-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: block;
  transition: transform 0.3s ease;
}

.media-grid a:hover img {
  transform: scale(1.03);
}


/* Membership Page - Table Styles */
.service-table,
.family-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.family-table {
  border-radius: 0.75rem;
  overflow: hidden;
  table-layout: fixed;
}

.service-table thead th,
.family-table thead th {
  background: linear-gradient(135deg, #2f51a8 0%, #274490 100%);
  color: white;
  font-weight: 600;
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}

.service-table tbody td,
.family-table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.6;
}

.service-table tbody td {
  vertical-align: top;
}

.service-table tbody td:first-child {
  width: 62%;
  padding-right: 1.1rem;
}

.service-table tbody td:nth-child(2) {
  width: 16%;
  white-space: nowrap;
}

.service-table tbody td:nth-child(3) {
  width: 22%;
  white-space: nowrap;
}

.family-table tbody td {
  padding: 1rem;
}

.service-table tbody tr:last-child td,
.family-table tbody tr:last-child td {
  border-bottom: none;
}

.service-table tbody tr:nth-child(even),
.family-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.service-table tbody tr:hover,
.family-table tbody tr:hover {
  background: #f0f3fb;
  transition: background 0.2s ease;
}

.family-table tbody tr:last-child {
  background: #f0f3fb;
  border-top: 2px solid #2f51a8;
}

.family-table tbody tr:last-child td {
  font-weight: 700;
  font-size: 1rem;
  padding: 1.1rem 1rem;
}

.table-card-title {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.savings-table tbody td {
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.savings-table tbody tr {
  transition: background 0.2s ease;
}

.savings-table tbody tr:hover {
  background: #f0f3fb !important;
}

.savings-table tbody tr:last-child td {
  border-bottom: none;
}

/* Membership Page - Interactive Elements */
.credit-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.credit-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 81, 168, 0.15);
}

.plan-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(47, 81, 168, 0.2);
}

.plan-card-header {
  min-height: 21rem;
  display: flex;
  flex-direction: column;
}

.terms-item {
  transition: background 0.2s ease;
}

.terms-item:hover {
  background: #f0f3fb;
}

.sticky-nav {
  transition: box-shadow 0.3s ease;
}

.sticky-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Service Tabs */
.service-tab-btn {
  border: 2px solid #9fb3ea;
  background: #ffffff;
  color: #2f51a8;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.15rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.service-tab-btn:hover {
  border-color: #2f51a8;
  transform: translateY(-1px);
}

.service-tab-btn.active {
  background: linear-gradient(135deg, #2f51a8 0%, #274490 100%);
  color: #ffffff;
  border: 2px solid #2f51a8;
  box-shadow: 0 8px 20px rgba(47, 81, 168, 0.2);
}

.service-tab-panel {
  animation: fadeInUp 0.3s ease;
  display: block !important;
  opacity: 1;
  visibility: visible;
}

.service-tab-panel.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

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

/* Responsive Styles */
@media (min-width: 1280px) {
  .plan-card-header {
    min-height: 25rem;
  }
}

@media (max-width: 1024px) {
  .service-table,
  .family-table {
    min-width: 620px;
  }
}

@media (max-width: 768px) {
  /* Layout adjustments */
  .layout { width: 94%; }
  
  /* Section padding */
  section[class*="py-"] { 
    padding-top: 2.5rem !important; 
    padding-bottom: 2.5rem !important; 
  }
  
  /* Navigation */
  #main-header nav { 
    padding-top: 0.5rem !important; 
    padding-bottom: 0.5rem !important; 
  }
  
  /* Hero section */
  .hero-section { 
    min-height: 70vh; 
    padding-top: 3rem; 
    padding-bottom: 3rem; 
  }
  .hero-section h1 { font-size: 2rem !important; }
  .hero-section p { font-size: 1.125rem !important; }
  
  /* Grid and spacing */
  .grid { gap: 1rem !important; }
  .space-y-4 > * + * { margin-top: 0.75rem !important; }
  .space-y-6 > * + * { margin-top: 1rem !important; }
  .gap-4 { gap: 0.75rem !important; }
  .gap-8 { gap: 1.25rem !important; }
  .gap-12 { gap: 1.5rem !important; }
  
  /* Buttons */
  .btn { padding: 0.675rem 1.25rem; font-size: 0.9rem; }
  
  /* Typography */
  h1 { font-size: 2rem !important; margin-bottom: 1rem; }
  h2 { font-size: 1.75rem !important; margin-bottom: 0.875rem; }
  h3 { font-size: 1.375rem !important; }
  
  /* Margins */
  .mb-14 { margin-bottom: 2rem !important; }
  .mb-10 { margin-bottom: 1.5rem !important; }
  .mb-8 { margin-bottom: 1.25rem !important; }
  .mb-6 { margin-bottom: 1rem !important; }
  
  /* Tables */
  .table-card-title {
    padding: 0.85rem 1rem;
  }

  .service-tab-btn {
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
  }

  .savings-table tbody td {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .service-table,
  .family-table {
    min-width: 560px;
  }
}

@media (max-width: 480px) {
  .media-grid { gap: 0.5rem; }
}

/* Page-Specific Utilities */

/* Hero video background */
.hero-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 5;
  line-height: 0;
  pointer-events: none;
}

/* Doctor bio expansion */
.doctor-bio-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doctor-bio-text.line-clamp-3 {
  -webkit-line-clamp: 3;
}

/* About page styles */
.about-page .section-difference {
  background: linear-gradient(135deg, var(--color-primary-950) 0%, var(--color-primary-900) 100%);
}

@media (min-width: 1024px) {
  .about-page aside {
    align-self: flex-start;
  }
}

.about-page blockquote {
  position: relative;
}

.about-page blockquote::before {
  content: '"';
  position: absolute;\n  font-size: 4rem;
  line-height: 1;
  color: var(--color-primary-200);
  opacity: 0.3;
  top: -1rem;
  left: -0.5rem;
  font-family: Georgia, serif;
}

.about-page #video-container:hover .aspect-video {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}