/**
 * ApexOrtho & Maxillofacial Dental Surgery Center Stylesheet
 * Prepared for Royal Elementor Theme & Royal Addons Integration
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #334155;
  background-color: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: #1e1b4b;
  margin-top: 0;
  line-height: 1.2;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 85px 0;
  position: relative;
}

.section-bg-light {
  background-color: #ffffff;
}

.section-bg-teal {
  background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 55px auto;
}

.section-subtitle {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0d9488;
  background: #ccfbf1;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-title span {
  color: #0d9488;
}

.section-desc {
  font-size: 16px;
  color: #64748b;
  margin-bottom: 0;
}

/* ==========================================================================
   Hero Section & Symptom Quick-Finder
   ========================================================================== */
.hero-surgical {
  padding: 70px 0 90px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #042f2e 100%);
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.hero-surgical::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, rgba(15, 23, 42, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 50px;
}

.hero-badge-surgical {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #2dd4bf;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero-title {
  font-size: 54px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: #ffffff;
}

.hero-title .text-teal {
  color: #2dd4bf;
}

.hero-desc {
  font-size: 17.5px;
  color: #cbd5e1;
  margin-bottom: 34px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.btn-teal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0d9488;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
  transition: all 0.3s ease;
}

.btn-teal:hover {
  background: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(13, 148, 136, 0.45);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

/* Interactive Symptom Card in Hero */
.symptom-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.symptom-card h3 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.symptom-card p {
  color: #cbd5e1;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.symptom-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.symptom-chip {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.symptom-chip:hover,
.symptom-chip.active {
  background: #0d9488;
  border-color: #2dd4bf;
  color: #ffffff;
}

.symptom-match-box {
  background: rgba(13, 148, 136, 0.2);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 12px;
  padding: 16px;
  font-size: 13.5px;
  color: #f0fdfa;
}

/* ==========================================================================
   Advanced Technology Grid (Royal Addons: royalfeatures)
   ========================================================================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tech-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-6px);
  border-color: #99f6e4;
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.12);
}

.tech-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f0fdfa;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.tech-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tech-card p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   Specialized Surgical & Ortho Services (Royal Addons: royalservices)
   ========================================================================== */
.surgical-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.surgical-service-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 30px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.surgical-service-card:hover {
  transform: translateY(-8px);
  border-color: #99f6e4;
  box-shadow: 0 20px 40px rgba(13, 148, 136, 0.12);
}

.s-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #f0fdfa;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 22px;
  transition: all 0.3s ease;
}

.surgical-service-card:hover .s-icon-box {
  background: #0d9488;
  color: #ffffff;
}

.surgical-service-card h3 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 10px;
}

.surgical-service-card p {
  font-size: 14.5px;
  color: #64748b;
  margin-bottom: 20px;
  flex-grow: 1;
}

.surgical-service-card .spec-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #0d9488;
  background: #ccfbf1;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
  width: fit-content;
}

/* ==========================================================================
   Severe Bite / Orthodontic Before & After Slider (Royal Addons: royalimagecompare)
   ========================================================================== */
.ortho-compare-box {
  max-width: 880px;
  margin: 0 auto;
  background: #ffffff;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.compare-wrapper {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  border-radius: 16px;
  user-select: none;
}

.compare-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.compare-before { z-index: 1; }

.compare-after {
  z-index: 2;
  width: 50%;
  overflow: hidden;
  border-right: 3px solid #0d9488;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

.compare-after .compare-img-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 832px;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #0d9488;
  color: #ffffff;
  border: 3px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: ew-resize;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Multi-Branch Clinic Locator (Royal Addons: royalbrancheslocator)
   ========================================================================== */
.branches-nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 35px;
}

.branch-tab-btn {
  padding: 12px 24px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.25s ease;
}

.branch-tab-btn.active,
.branch-tab-btn:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

.branch-content-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.branch-info h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.branch-details-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.branch-details-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.branch-details-list li i {
  color: #0d9488;
  font-size: 18px;
}

/* ==========================================================================
   Surgeons & Orthodontists Team (Royal Addons: royalteam)
   ========================================================================== */
.surgeons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.surgeon-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.surgeon-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.12);
}

.surgeon-img-box {
  height: 300px;
  overflow: hidden;
  background: #e2e8f0;
}

.surgeon-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.surgeon-card:hover .surgeon-img-box img {
  transform: scale(1.05);
}

.surgeon-body {
  padding: 24px;
  text-align: center;
}

.surgeon-body h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.surgeon-creds {
  font-size: 13px;
  color: #0d9488;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.surgeon-body p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   Surgical Consultation & Triage Form (Royal Addons: royalform)
   ========================================================================== */
.triage-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
}

.triage-form-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.t-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.t-span-2 {
  grid-column: span 2;
}

.t-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 6px;
}

.t-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 14px;
  outline: none;
  transition: all 0.25s ease;
}

.t-input:focus {
  border-color: #0d9488;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.emergency-info-panel {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.emergency-guide-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 30px 0;
}

.emergency-guide-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.emergency-guide-list li i {
  color: #f87171;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   Clinical FAQ Accordion (Royal Addons: royalaccordion)
   ========================================================================== */
.c-faq-container {
  max-width: 820px;
  margin: 0 auto;
}

.c-faq-item {
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.c-faq-q {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16.5px;
  font-weight: 700;
  color: #1e1b4b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.c-faq-q i {
  color: #0d9488;
  transition: transform 0.3s ease;
}

.c-faq-item.active .c-faq-q i {
  transform: rotate(180deg);
}

.c-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
}

.c-faq-item.active .c-faq-a {
  max-height: 250px;
  padding-bottom: 20px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.apex-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 70px 0 0 0;
  font-size: 14.5px;
}

.a-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.a-footer-col h4 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
}

.a-footer-col h4::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 28px;
  height: 2px;
  background: #0d9488;
}

.a-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.a-footer-links li {
  margin-bottom: 12px;
}

.a-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
}

.a-footer-links a:hover {
  color: #2dd4bf;
  padding-left: 4px;
}

.a-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  text-align: center;
  font-size: 13.5px;
  color: #64748b;
}

.a-footer-bottom a {
  color: #2dd4bf;
  text-decoration: none;
}

/* Modal */
.modal-wrapper {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-wrapper.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal-wrapper.active .modal-content-box {
  transform: scale(1);
}

@media (max-width: 1024px) {
  .hero-grid,
  .branch-content-card,
  .triage-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .surgical-services-grid,
  .surgeons-grid,
  .a-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 36px;
  }
  .tech-grid,
  .surgical-services-grid,
  .surgeons-grid,
  .t-form-grid,
  .a-footer-grid {
    grid-template-columns: 1fr;
  }
  .t-span-2 {
    grid-column: span 1;
  }
  .compare-wrapper {
    height: 300px;
  }
}
