/* Palm Harbor Smiles brand overrides */
:root {
  --phs-blue: #2f51a8;
  /* Pantone 7685 C from PDF metadata */
  --phs-gray: #777878;
  /* Cool Gray 9 */
  --primary: #2f51a8;
  --primary-50: #f0f3fb;
  --primary-100: #e0e7f6;
  --primary-200: #c1cfed;
  --primary-300: #92aade;
  --primary-400: #5c7fcc;
  --primary-600: #2f51a8;
  --primary-700: #274490;
  --primary-800: #233a78;
  --primary-900: #223464;
  --primary-950: #17213e;

  /* Accent & Neutrals */
  /* --accent: #3da9a5; */
  /* --accent-dark: #2d8784; */
  --accent: #3da9a5;
  --accent-dark: #1f2937;
  --gray: #777878;
  --dark: #1f2937;
}

body {
  background-color: #ffffff;
}

/* Buttons - Apply only to .btn class, not all buttons */
.btn {
  background: var(--phs-blue);
  color: #fff;
}

/* Reset button styling for non-.btn buttons */
button:not(.btn) {
  background: transparent;
  color: inherit;
  border: none;
}

/* FAQ Button Overrides - White background for FAQ sections */
button.faq-toggle,
button[class*="faq-"],
button[x-on\:click],
button[@click] {
  background: white !important;
  color: inherit !important;
}

/* ================================
   PALM HARBOR SMILES - RAW CSS
   Typography, Buttons, Forms
================================ */



/* Layout Container */
.layout {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* 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;}
}


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background-color: var(--primary-400) !important;
  border-color: var(--primary) !important;
  color: white !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(47, 81, 168, 0.35) !important;
}

.btn-outline {
  background-color: transparent !important;
  color: white !important;
  border: 2px solid white !important;
}

.btn-outline:hover {
  background-color: var(--primary) !important;
  color: white !important;
  border-color: white !important;
  transform: translateY(-1px) !important;
}

.btn-accent {
  background-color: var(--accent) !important;
  color: var(--dark) !important;
  border-color: var(--accent) !important;
}

.btn-accent:hover {
  background-color: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ========================== Navbar ======================= */

/* Navigation Link Styles */
.nav-link {
  color: #374151;
  font-weight: 500;
  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%;
}

/* Active page highlighting */
.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 scroll behavior - REMOVED to keep top bar always visible */
/* .top-bar-hidden {
  transform: translateY(-100%);
} */

/* Remove compact class - we don't want extra padding changes on scroll */
.header-compact {
  /* Explicitly prevent any padding changes */
  padding-top: inherit !important;
  padding-bottom: inherit !important;
}

/* 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 {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 81, 168, 0.1);
}

/* ===== MOBILE RESPONSIVENESS FIXES ===== */
/* Reduce excessive padding, gaps, and margins on small screens */

@media (max-width: 768px) {
  /* Global adjustments */
  .layout { width: 94%; }
  
  /* Reduce section padding on mobile */
  section[class*="py-"] { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  
  /* Navbar mobile adjustments */
  #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 spacing */
  .grid { gap: 1rem !important; }
  
  /* Buttons */
  .btn { padding: 0.675rem 1.25rem; font-size: 0.9rem; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
  
  /* Content padding */
  h1 { font-size: 2rem !important; margin-bottom: 1rem; }
  h2 { font-size: 1.75rem !important; margin-bottom: 0.875rem; }
  h3 { font-size: 1.375rem !important; }
  
  /* Card spacing */
  .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; }
  
  /* Remove large bottom 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; }
}
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: border-color 0.2s, box-shadow 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;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Focus states - Remove default browser outline boxes */
a:focus,
button:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Keep focus visible for accessibility via subtle color change */
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;
}

/* Alpine.js cloak */
[x-cloak] {
  display: none !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;
}

.media-grid picture,
.media-grid img {
  width: 100%;
  height: 180px;
  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);
}

@media (min-width: 768px) {
  .media-grid img { height: 200px; }
}

@media (max-width: 480px) {
  .media-grid { gap: 0.5rem; }
  .media-grid picture, .media-grid img { height: 140px; }
}