/* Base Styles - Leverage Bootstrap + Theme */

:root {
  --bs-border-color: rgba(0, 0, 0, 0.1);
  --animation-speed: 0.7;
  --base-duration: calc(0.4s * var(--animation-speed));
  --slow-duration: calc(0.6s * var(--animation-speed));
  --fast-duration: calc(0.2s * var(--animation-speed));
  --ease-elegant: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-professional: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-subtle: cubic-bezier(0.25, 0.1, 0.25, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background: var(--background) !important;
  color: var(--text) !important;
  transition: background-color var(--base-duration) var(--ease-professional),
    color var(--base-duration) var(--ease-professional);
}

/* Modern Animation Classes - Shared across all templates */
.animate-in {
  opacity: 0;
  transform: translateY(8px);
  animation: slideInUp var(--base-duration) var(--ease-elegant) forwards;
}

.animate-in-delay-1 {
  animation-delay: calc(0.1s * var(--animation-speed));
}

.animate-in-delay-2 {
  animation-delay: calc(0.2s * var(--animation-speed));
}

.animate-in-delay-3 {
  animation-delay: calc(0.3s * var(--animation-speed));
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn var(--slow-duration) var(--ease-subtle) forwards;
}

.animate-scale-in {
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn var(--base-duration) var(--ease-professional) forwards;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Common UI Components - Theme Support */
.card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.card .text-muted {
  color: var(--text-muted) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.procedure-badge {
  background: var(--background) !important;
  color: var(--text) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.template-icon {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* Settings Panel Components */
.setting-section {
  margin-bottom: 3rem;
}

.setting-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setting-title i {
  font-size: 1rem;
  color: var(--primary, #2563eb);
}

/* Specialty Management Controls */
.specialty-controls {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.specialty-card:hover .specialty-controls {
  opacity: 1;
}

.add-procedure {
  margin-left: 0.5rem;
  font-size: 0.7rem;
  padding: 2px 8px;
}

.add-specialty-card:hover {
  border-color: var(--secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.specialty-management {
  text-align: center;
}

/* Shared Keyframe Animations for all templates */
@keyframes magicalFloat {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  25% {
    transform: scale(1.05) rotate(1deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(0.95) rotate(-0.5deg);
    opacity: 0.9;
  }
  75% {
    transform: scale(1.02) rotate(0.8deg);
    opacity: 0.7;
  }
}

@keyframes magicalRotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes magicalDrift1 {
  0%,
  100% {
    transform: translateX(0px) translateY(0px) scale(1);
    opacity: 0.6;
  }
  33% {
    transform: translateX(-30px) translateY(-20px) scale(1.1);
    opacity: 0.4;
  }
  66% {
    transform: translateX(20px) translateY(15px) scale(0.9);
    opacity: 0.8;
  }
}

@keyframes magicalDrift2 {
  0%,
  100% {
    transform: translateX(0px) translateY(0px) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(25px) translateY(-30px) scale(1.2);
    opacity: 0.3;
  }
}

@keyframes magicalDrift3 {
  0%,
  100% {
    transform: translateX(0px) translateY(0px) scale(1) rotate(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translateX(-15px) translateY(20px) scale(0.8) rotate(90deg);
    opacity: 0.4;
  }
  75% {
    transform: translateX(10px) translateY(-15px) scale(1.1) rotate(270deg);
    opacity: 0.6;
  }
}

@keyframes magicalParticles {
  0% {
    background-position: 0 0, 60px 60px, 120px 30px, 180px 90px;
    opacity: 0.5;
  }
  25% {
    background-position: 180px 90px, 240px 150px, 300px 120px, 360px 180px;
    opacity: 0.7;
  }
  50% {
    background-position: 360px 180px, 420px 240px, 480px 210px, 540px 270px;
    opacity: 0.6;
  }
  75% {
    background-position: 540px 270px, 600px 330px, 660px 300px, 720px 360px;
    opacity: 0.8;
  }
  100% {
    background-position: 720px 360px, 780px 420px, 840px 390px, 900px 450px;
    opacity: 0.5;
  }
}

.spacer-content {
  height: 40px;
}

/* Base responsive container controls */
.container,
.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Fixed layout above 1080px to prevent shifting */
@media (min-width: 1080px) {
  .container,
  .container-fluid {
    max-width: 1200px;
  }
  
  .hero-section .col-lg-10 {
    max-width: 900px;
    flex: 0 0 auto;
  }
}

/* Responsive specialty card widths */
@media (min-width: 1080px) {
  .specialty-item-wrapper {
    max-width: 350px;
    flex: 0 0 auto;
    margin-bottom: 3rem;
  }
}

@media (min-width: 768px) and (max-width: 1079px) {
  .specialty-item-wrapper {
    max-width: 380px;
    flex: 0 0 auto;
    margin-bottom: 3rem;
  }
}

@media (max-width: 767px) {
  .specialty-item-wrapper {
    max-width: 400px;
    margin: 0 auto 3rem auto;
  }

  .specialty-controls {
    opacity: 1; /* Always visible on mobile */
  }
}

/* Hide procedures label unless procedures exist (except in edit mode) */
body:not([data-mode="edit"]) .specialty-procedures .procedures-label {
  display: none;
}

body:not([data-mode="edit"]) .specialty-procedures:has(.procedure-tag) .procedures-label,
body:not([data-mode="edit"]) .specialty-procedures.has-procedures .procedures-label {
  display: block;
}

.procedures-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.procedure-tag {
  max-width: 75%;
}

/* Modern Template - Sophisticated Contemporary Design */


/* Hero Section - Dynamic and Engaging */
.hero-section {
  background: var(--surface);
  color: var(--text);
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--secondary);
  opacity: 0.1;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.practice-name {
  font-size: 4.2rem;
  font-weight: 100;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1;
  position: relative;
}

.practice-name::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--secondary);
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  opacity: 0.95;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-weight: 300;
}

.hero-actions {
  margin-top: 3rem;
}

/* Enhanced CTA Button */
.btn-primary-cta {
  background: var(--primary);
  color: white;
  padding: 20px 50px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px var(--shadow-color);
  position: relative;
  overflow: hidden;
}

.btn-primary-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transition: left 0.4s ease;
  z-index: 1;
}

.btn-primary-cta .btn-text,
.btn-primary-cta .btn-icon {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.btn-primary-cta .btn-icon {
  transform: translateX(0);
  transition: all 0.3s ease;
}

.btn-primary-cta:hover::before {
  left: 0;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary-cta:hover .btn-text,
.btn-primary-cta:hover .btn-icon {
  color: var(--text);
}

.btn-primary-cta:hover .btn-icon {
  transform: translateX(4px);
}

.btn-primary-cta:disabled {
  background: var(--primary);
  color: white;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  opacity: 0.6;
}

.btn-primary-cta:disabled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(107, 114, 128, 0.4);
  border-radius: inherit;
  z-index: 1;
}

.btn-primary-cta:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary-cta:disabled .btn-text,
.btn-primary-cta:disabled .btn-icon {
  position: relative;
  z-index: 2;
  color: white;
}

.btn-primary-cta:disabled .btn-icon {
  transform: translateX(0);
}

/* Specialties Section - Card Grid Layout */
.specialties-section {
  padding: 100px 0;
  background: var(--background);
}

.section-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.2;
}

.section-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 4rem;
  text-align: center;
  line-height: 1.6;
}

/* Enhanced Specialty Cards */
.specialties-grid {
  max-width: 1200px;
  margin: 0 auto;
}

.specialty-item-wrapper {
  margin-bottom: 2.5rem;
  display: flex;
}

.specialty-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 3rem;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid var(--accent);
  border-top: 4px solid var(--primary) !important;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.specialty-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--shadow-color);
  border-color: var(--secondary);
}

.specialty-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.4rem;
}

.specialty-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

.procedures-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


.procedure-tag {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--accent);
}

/* Contact Section - Enhanced Layout */
.contact-section {
  padding: 100px 0;
  background: var(--surface);
}

.contact-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0;
}

.contact-content {
  background: var(--background);
  border-radius: 25px;
  padding: 3rem;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.contact-details {
  margin-bottom: 3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--accent);
  gap: 1.5rem;
}

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

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--primary);
}

.contact-content-item {
  flex: 1;
}

.contact-label {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
}

.office-hours {
  border-top: 2px solid var(--accent);
  padding-top: 2.5rem;
}

.hours-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hours-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
}

.hours-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.hours-list {
  text-align: center;
}

.hour-item {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding: 0.8rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.hour-item:hover {
  background: var(--accent);
  color: var(--text);
}

.spacer-section {
  padding: 80px 0;
  background: var(--background);
}

/* Responsive Container Management */
.hero-section .container-fluid,
.specialties-section .container,
.contact-section .container {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

/* Desktop and large screens - maintain fixed layout above 1080px */
@media (min-width: 1080px) {
  .hero-section .container-fluid,
  .specialties-section .container,
  .contact-section .container {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .hero-content {
    max-width: 900px;
    margin: 0 auto;
  }
  
  .specialties-grid {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .contact-wrapper {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* Tablet responsive adjustments - 768px to 1079px */
@media (min-width: 768px) and (max-width: 1079px) {
  .practice-name {
    font-size: 3.8rem;
    margin-bottom: 1.3rem;
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 1.4rem;
  }

  .hero-description {
    font-size: 1.1rem;
    max-width: 85%;
    margin-bottom: 2.8rem;
  }

  .btn-primary-cta {
    padding: 18px 45px;
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .section-description {
    font-size: 1.15rem;
    margin-bottom: 3.5rem;
  }

  .specialty-card {
    padding: 2.5rem;
    border-radius: 15px;
  }

  .specialty-name {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
  }

  .specialty-description {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .procedures-label {
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
  }

  .procedure-tag {
    font-size: 0.88rem;
    padding: 7px 15px;
  }

  .contact-content {
    padding: 2.5rem;
    border-radius: 20px;
  }

  .contact-title {
    font-size: 2.2rem;
  }

  .contact-item {
    padding: 1.3rem 0;
    gap: 1.3rem;
  }

  .contact-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .contact-label {
    font-size: 0.88rem;
  }

  .contact-value {
    font-size: 1.05rem;
  }

  .hours-icon {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .hours-title {
    font-size: 1.3rem;
  }

  .hour-item {
    font-size: 0.98rem;
    margin-bottom: 0.55rem;
    padding: 0.7rem;
  }
}

/* Mobile responsive adjustments - below 768px */
@media (max-width: 767px) {
  .practice-name {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 1.4rem;
    margin-bottom: 1.3rem;
  }

  .hero-description {
    font-size: 1.1rem;
    max-width: 100%;
    margin-bottom: 2.5rem;
  }

  .btn-primary-cta {
    padding: 16px 32px;
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
  }

  .specialty-card {
    padding: 2rem;
    border-radius: 14px;
  }

  .specialty-name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .specialty-description {
    font-size: 1rem;
    margin-bottom: 1.8rem;
  }

  .procedures-label {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .procedure-tag {
    font-size: 0.85rem;
    padding: 6px 14px;
  }

  .contact-content {
    padding: 2rem;
    border-radius: 18px;
  }

  .contact-title {
    font-size: 2rem;
  }

  .contact-details {
    margin-bottom: 2.5rem;
  }

  .contact-item {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 0.8rem;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin: 0 auto;
  }

  .contact-label {
    font-size: 0.85rem;
    text-align: center;
  }

  .contact-value {
    font-size: 1rem;
    text-align: center;
  }

  .hours-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hours-icon {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    margin: 0 auto;
  }

  .hours-title {
    font-size: 1.2rem;
    text-align: center;
  }

  .hour-item {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem;
    text-align: center;
  }

  /* Disable complex animations on mobile for better performance */
  .hero-section::before,
  .hero-section::after,
  .practice-name::after,
  .magical-orb-1,
  .magical-orb-2,
  .magical-orb-3,
  .magical-particles {
    display: none;
  }

  .specialty-card:hover {
    transform: translateY(-2px);
  }

  .contact-info {
    backdrop-filter: none;
  }
}

