/* ====== Custom Styles for Angeles Medical Clinic ====== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Scroll reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.floating-card {
  animation: float 4s ease-in-out infinite;
}

/* Header shadow on scroll */
.header-scrolled {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95) !important;
}

/* Service card hover effects */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

.service-card:hover .service-icon {
  background-color: rgba(10, 171, 147, 0.12);
}

.service-card:hover .service-icon svg {
  color: #0aab93;
}

/* FAQ accordion */
.faq-item {
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #e2e8f0;
}

.faq-item.active {
  border-color: #0aab93;
  box-shadow: 0 4px 6px -1px rgba(10, 171, 147, 0.1);
}

.faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  background: white;
  transition: background 0.2s;
}

.faq-header:hover {
  background: #f8fafc;
}

.faq-header h3 {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  padding-right: 1rem;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: #0aab93;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-content {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

.faq-content p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.7;
}

/* Testimonial cards */
.testimonial-card {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

/* Pulse animation for live indicators */
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Counter animation */
.counter-animated {
  transition: all 0.3s ease;
}

/* Chat widget animations */
#chat-window {
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-window.chat-open {
  display: block !important;
  animation: chatOpen 0.3s ease forwards;
}

@keyframes chatOpen {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Custom scrollbar for chat */
#chat-messages::-webkit-scrollbar {
  width: 4px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

/* Select styling */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Page hero section for sub-pages */
.page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(10, 171, 147, 0.15) 0%, transparent 60%);
}

/* Service detail cards on services page */
.service-detail-card {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #0aab93, #22c9ad);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.service-detail-card:hover::before {
  transform: scaleX(1);
}

.service-detail-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Team member cards */
.team-card {
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 30px -10px rgba(0,0,0,0.1);
}

/* Contact form inputs */
.contact-input:focus {
  border-color: #0970e8;
  box-shadow: 0 0 0 3px rgba(9, 112, 232, 0.15);
}

/* Map container */
.map-container {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .floating-card {
    display: none;
  }
}

/* Print styles */
@media print {
  header, footer, #chat-widget, .floating-card {
    display: none !important;
  }
}
