/* Patient Resources page styles (loaded only on patient-resources.html)
   This file contains styles scoped to the Patient Resources page so they
   won't affect site-wide appearance.
*/

/* CSS Variables */
:root{
  --bg: #fbf8ff;
  --panel: #ffffff;
  --muted: #6b6573;
  --accent-1: #4b208f; /* deep purple */
  --accent-2: #5a2ea6; /* lighter purple */
  --accent-glow: rgba(90,46,166,0.12);
  --card-shadow: 0 10px 30px rgba(41,29,79,0.06);
  --glass: rgba(255,255,255,0.6);
  --radius: 12px;
  --max-width: 1100px;
  --container-pad: 28px 16px;
  --transition: 240ms cubic-bezier(.2,.8,.2,1);
}

/* Global tweaks for patient resources page */
*{box-sizing:border-box}
html { scroll-behavior: smooth; }
body { font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; color:#2b2540; }
main.container { font-size: 16px; }

/* Container used on this page */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--container-pad);
}

/* Page hero */
.page-hero {
  background: linear-gradient(180deg, rgba(75,32,143,0.04) 0%, rgba(90,46,166,0.03) 100%);
  padding: 36px 20px;
  border-radius: var(--radius);
  margin: 20px 16px;
  box-shadow: 0 12px 36px rgba(45,30,90,0.06);
  display: grid;
  grid-template-columns: 1fr 340px; /* narrower right column so the card sits closer to the content */
  gap: 20px;
  align-items: start;
}

.page-hero .hero-left { max-width: 760px; }

/* Hero side card: used for address/contact (replaces previous map iframe area) */
.hero-side-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(90,46,166,0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* Center the hero side card vertically and align it to the right column visually */
.page-hero { align-items: center; }
.hero-side-card { align-self: center; margin-top: 0; justify-self: start; }
.page-hero .container { position: relative; z-index: 2; }

@media (max-width:980px) {
  /* stacked layout should stay top-aligned for content flow */
  .page-hero { align-items: start; }
  .hero-side-card { justify-self: stretch; }
}

/* Address card inside the hero side card */
.address-card {
  width: 100%;
  background: linear-gradient(180deg,#fff 0%, #fbfbff 100%);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(10,10,12,0.03);
  box-shadow: 0 8px 24px rgba(41,29,79,0.04);
  color: #3c3250;
  font-size: 0.98rem;
}
.address-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #2c0a4d;
  line-height: 1.2;
}
.address-card .address-line { font-weight:700; color:#2c0a4d; margin-bottom:6px }
.address-card a { color: var(--accent-2); text-decoration: none; font-weight:700 }

/* Make sure hero side card stretches to match layout on wide screens */
@media (min-width:1200px) {
  .page-hero { grid-template-columns: 1fr 380px; }
  .address-card { padding: 16px; }
}

@media (min-width:1300px) {
  .page-hero { grid-template-columns: 1fr 420px; }
}

@media(min-width:1000px){
  /* keep the larger right column at wide sizes */
  .page-hero { grid-template-columns: 1fr 380px; }
  .whoami-card-compact { padding: 16px }
  .map-container iframe{ height:420px }
}

/* On narrower viewports stack the hero content and hide any leftover map helpers */
@media (max-width:980px) {
  .page-hero { grid-template-columns: 1fr; padding: 28px 16px; }
  .hero-side-card { width: 100%; }
  /* remove legacy map helpers if present */
  .hero-map-right, .map-container iframe { display: none !important; }
}

/* Remove legacy absolute positioning, padding-reserve, and variable hacks used for iframe experiments.
   Keep the helper hidden so any leftover markup won't display. */
.hero-map-right { display: none; }

/* Fallback min-height to prevent overlap on unusual viewports */
.page-hero { min-height: 0; }
@media (min-width:1000px) { .page-hero { min-height: 420px; } }

/* Container used on this page */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--container-pad);
}

/* Page hero */
.page-hero {
  background: linear-gradient(180deg, rgba(75,32,143,0.04) 0%, rgba(90,46,166,0.03) 100%);
  padding: 48px 20px;
  border-radius: var(--radius);
  margin: 20px 16px;
  box-shadow: 0 12px 36px rgba(45,30,90,0.06);
  display: grid;
  /* increased right column to match the large map area (red box) */
  grid-template-columns: 1fr 520px;
  gap: 20px;
  align-items: start;
}
.page-hero .container { gap: 8px; }
.page-hero h1 { font-size: 1.8rem; color: #23163a; margin: 0 0 6px; letter-spacing: -0.02em; line-height: 1.12; }
.page-hero .subhead { color: #57456f; font-size: 1.05rem; line-height: 1.45; margin-bottom: 12px; }
.page-hero .hero-left { max-width: 760px; }

/* Hero right card */
.whoami-card-compact { background: var(--panel); border-radius: 12px; padding: 14px; display:flex; gap:12px; align-items:center; box-shadow: var(--card-shadow); border:1px solid rgba(90,46,166,0.04); }
.whoami-card-compact img{ width:64px; height:64px; object-fit:cover; border-radius:10px; }
.whoami-card-compact h3{ margin:0;font-size:1rem;color:#2c0a4d }
.whoami-card-compact p{margin:0;font-size:0.9rem;color:var(--muted)}

/* Map and contact styles in hero aside */
.whoami-card-compact { flex-direction:column; align-items:stretch }
.whoami-card-compact .contact-wrap { display:flex; gap:12px; align-items:center }
.whoami-card-compact .contact-wrap img{ width:64px; height:64px; border-radius:10px }
.map-container{ margin-top:12px; border-radius:10px; overflow:hidden; box-shadow: 0 8px 30px rgba(41,29,79,0.06); border:1px solid rgba(10,10,12,0.03) }
.map-container iframe{ display:block; width:100%; height:220px; border:0 }

/* larger map on very wide screens to fill the hero right column */
@media (min-width:1300px) {
  .page-hero { grid-template-columns: 1fr 560px; }
  .map-container iframe { height:520px; }
}

@media(min-width:1000px){
  /* keep the larger right column at wide sizes */
  .page-hero { grid-template-columns: 1fr 520px; }
  .whoami-card-compact { padding: 16px }
  .map-container iframe{ height:420px }
}

/* Tighten spacing so hero side card sits closer to the main content */
.page-hero { grid-template-columns: 1fr 300px !important; gap: 16px !important; }
.hero-side-card { justify-self: start; transform: translateX(-10px); }

/* Slightly larger right column on wide screens but still close to content */
@media (min-width:1200px) {
  .page-hero { grid-template-columns: 1fr 340px !important; }
  .hero-side-card { transform: translateX(-12px); }
}
@media (min-width:1300px) {
  .page-hero { grid-template-columns: 1fr 360px !important; }
  .hero-side-card { transform: translateX(-14px); }
}

@media (max-width:980px) {
  .page-hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-side-card { transform: translateX(0); }
}

/* Small overlap: nudge the side card left and raise above the hero for a subtle overlap effect */
.hero-side-card { position: relative; z-index: 5; box-shadow: 0 18px 40px rgba(41,29,79,0.10); }

/* stronger overlap on wider viewports */
@media (min-width:1000px) {
  .hero-side-card { transform: translateX(-18px); }
}
@media (min-width:1300px) {
  .hero-side-card { transform: translateX(-26px); }
}

/* keep stacked/narrow layouts normal */
@media (max-width:980px) {
  .hero-side-card { transform: none; position: static; z-index: 2; box-shadow: var(--card-shadow); }
}

/* Page-specific buttons */
.btn-primary,
.page-hero .btn-primary,
.resources-grid .btn-primary{
  background: linear-gradient(180deg,var(--accent-1) 0%, var(--accent-2) 100%);
  box-shadow: 0 8px 28px var(--accent-glow);
  padding: 10px 18px;
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-weight:700;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.btn-primary:hover, .page-hero .btn-primary:hover, .resources-grid .btn-primary:hover { box-shadow: 0 16px 48px rgba(90,46,166,0.18); transform: translateY(-3px); }
.btn-primary:active{ transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(90,46,166,0.12);
  color: var(--accent-1);
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration:none;
  font-weight:600;
  transition: background var(--transition), transform var(--transition);
}
.btn-secondary:hover{ background: rgba(90,46,166,0.04); transform: translateY(-2px); }

/* Quick links grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 20px 16px;
}
.resource-card {
  display: block;
  text-decoration: none;
  background: linear-gradient(180deg,var(--panel) 0%, #fbfbff 100%);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(41,29,79,0.06);
  transition: transform .32s cubic-bezier(.2,.8,.2,1), box-shadow .32s ease, border-color .32s ease;
  color: inherit;
  border: 1px solid rgba(10,10,12,0.03);
  min-height: 140px;
  display:flex;flex-direction:column;justify-content:space-between;
}
.resource-card h3 { color: #2c0a4d; font-size: 1.08rem; margin-bottom: 8px; }
.resource-card p { color: #5a5a6a; font-size: 0.98rem; line-height: 1.5; margin:0 0 12px 0; }
.resource-card .meta { display:flex; gap:8px; align-items:center; color:var(--muted); font-size:0.9rem; margin-top:8px; }
.resource-card:hover { transform: translateY(-8px); box-shadow: 0 26px 60px rgba(41,29,79,0.10); border-color: rgba(90,46,166,0.06); }
.resource-card:focus-within { outline: 3px solid rgba(90,46,166,0.12); outline-offset: 4px; }

/* Card icon */
.resource-card .icon {
  width:56px;height:56px;border-radius:10px;background:linear-gradient(180deg, rgba(90,46,166,0.08), rgba(75,32,143,0.03));display:flex;align-items:center;justify-content:center;font-size:1.25rem;color:var(--accent-2);
  flex-shrink:0;
}

/* Forms list */
.forms-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.forms-list li a {
  display: block;
  padding: 12px 14px;
  background: linear-gradient(180deg,#ffffff 0%,#fbfbff 100%);
  border-radius: 10px;
  border: 1px solid rgba(90,46,166,0.06);
  color: #3d2b68;
  text-decoration: none;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}
.forms-list li a:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(41,29,79,0.06); }

/* FAQ details styling */
details { background: #fff; border-radius: 10px; padding: 14px 16px; margin: 10px 0; box-shadow: 0 10px 28px rgba(61,61,139,0.05); }
summary { cursor: pointer; font-weight: 700; color: #362458; font-size:1.02rem; }
summary::-webkit-details-marker { display:none; }
details[open] { background: linear-gradient(180deg,#fff 0%,#fbfaff 100%); }
details p { margin-top:10px; color:#555166; line-height:1.6; }

/* FAQ accordion: toggle + collapsible panel */
.faq-wrapper { max-width: var(--max-width); margin: 0 auto 12px; }
.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(75,32,143,0.06), rgba(90,46,166,0.04));
  border-radius: 12px;
  border: 1px solid rgba(90,46,166,0.08);
  cursor: pointer;
  font-weight: 700;
  color: #2a133b;
  box-shadow: 0 8px 28px rgba(41,29,79,0.04);
}
.faq-toggle:focus { outline: 3px solid rgba(90,46,166,0.12); outline-offset: 2px; }
.faq-toggle .chev { transition: transform .28s ease; font-size:1.1rem; color:var(--accent-2); }

.faq-panel {
  overflow: hidden;
  transition: max-height .36s cubic-bezier(.2,.8,.2,1), padding .2s ease;
  border-radius: 12px;
  margin-top: 12px;
}
.faq-panel.collapsed { max-height: 0; padding: 0 0; }
.faq-panel:not(.collapsed) { padding: 12px 14px; max-height: 2000px; }

/* Improve details appearance inside FAQ panel */
.faq-panel details { background: var(--panel); border-radius: 10px; padding: 12px 14px; margin: 8px 0; box-shadow: 0 8px 24px rgba(41,29,79,0.04); }
.faq-panel summary { cursor: pointer; list-style: none; font-weight:700; color:#31204a; }
.faq-panel summary::-webkit-details-marker { display:none; }
.faq-panel details[open] { background: linear-gradient(180deg,#fff 0%,#fbfaff 100%); }
.faq-panel p { color:#444; line-height:1.6; margin-top:8px }

/* Contact section */
.contact-section { background: #fff; padding: 18px; border-radius: 10px; margin-top: 18px; box-shadow: 0 10px 30px rgba(61,61,139,0.04); }
@media (min-width:880px) { .contact-section { display:flex; gap:20px; align-items:flex-start; } .contact-section > p:first-child { flex:1 1 60%; } }

/* Section headings and content containers */
main.container { padding-top: 28px; padding-bottom: 40px; }
main.container section { margin-bottom: 28px; padding: 18px; border-radius: 12px; background: transparent; }
main.container section h2 {
  font-size: 1.35rem;
  margin: 0 0 8px 0;
  color: #2a133b;
  letter-spacing: -0.01em;
}
main.container section p.lead { margin-bottom: 12px; }

/* Info container: clear, card-like area that summarizes each section */
.info-container {
  background: linear-gradient(180deg, rgba(91,46,166,0.04), rgba(255,255,255,0.6));
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0 14px 0;
  border-left: 4px solid rgba(90,46,166,0.14);
  box-shadow: 0 8px 24px rgba(41,29,79,0.04);
  display:block;
}
.info-container ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; padding-left:8px; }
.info-container li { display:flex; gap:8px; align-items:flex-start; color: #3c3250; font-size: 0.98rem; }
.info-container li strong { color: #2c0a4d; min-width: 110px; display:inline-block; font-weight:700; }
.info-container li::before { content: '•'; color: var(--accent-2); margin-right: 6px; opacity:0; } /* we use strong as label */

/* Subtle divider between sections (visual rhythm) */
main.container section + section { border-top: 1px dashed rgba(60,50,90,0.03); padding-top: 20px; }

/* Meta & footer tweaks */
footer { border-top: 1px solid rgba(60,50,90,0.03); }
.footer-main .column h4 { color: #362458; }
footer .footer-bottom{ padding:18px 16px; text-align:center }

/* Accessibility focus */
a:focus, button:focus { outline: 3px solid rgba(90,46,166,0.12); outline-offset: 2px; }

/* Responsive adjustments */
@media (max-width:960px){
  .page-hero{ grid-template-columns: 1fr; padding:28px 16px }
  .whoami-card-compact{ display:flex }
}
@media (max-width:640px){
  .resources-grid{ padding:10px 12px }
  .resource-card{ padding:14px }
  .page-hero{ padding:18px }
  .faq-toggle { padding: 12px 14px; }
  .faq-panel:not(.collapsed) { padding: 10px 12px; }
}

/* Section panels and modern headers (match Incontinence page aesthetics) */
.section--light {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,246,255,0.8) 100%);
  border-radius: 20px;
  padding: 26px 20px;
  box-shadow: 0 10px 36px rgba(41,29,79,0.04);
  margin: 18px 0;
}

.section--dark {
  background: linear-gradient(180deg, rgba(245,240,255,0.98) 0%, rgba(238,229,255,0.9) 100%);
  border-radius: 20px;
  padding: 26px 20px;
  box-shadow: 0 12px 44px rgba(41,29,79,0.06);
  margin: 18px 0;
}

.section-header.modern {
  display:flex;
  align-items:flex-end;
  gap:14px;
  margin-bottom: 12px;
}
.section-header.modern .section-line{
  width:56px; height:6px; border-radius:6px;
  background: linear-gradient(90deg,var(--accent-1),var(--accent-2));
  box-shadow: 0 8px 24px rgba(90,46,166,0.08);
}
.section-header.modern h2{ margin:0; font-size:1.45rem; color:#2a133b; }
.section-header.modern .subhead{ margin:4px 0 0 0; color:#5a4c6b; font-size:1rem; }

/* Two-column utilities used in Incontinence layout */
.two-col, .intro-split {
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  align-items:start;
}

/* layout helper selectors kept for clarity (no-op) — intentionally left out empty rules to avoid lint errors */

/* Video / media row */
.video-row{ display:grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.video-container .ratio{ position:relative; padding-top:56.25%; background:#000; border-radius:12px; overflow:hidden; }
.video-container iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Stat grid */
.stat-grid{ display:grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-top:12px; }
.stat-card{ background:var(--panel); border-radius:12px; padding:12px; display:flex; gap:10px; align-items:center; box-shadow: 0 8px 24px rgba(41,29,79,0.04); }
.stat-ico{ font-weight:700; color:var(--accent-2); }

/* Expectation / works grid */
.works-grid{ display:grid; grid-template-columns: 1fr 420px; gap:18px; align-items:start; }
.card{ background:var(--panel); border-radius:12px; padding:14px; box-shadow: 0 10px 28px rgba(41,29,79,0.05); }
.device-card img{ width:100%; height:auto; border-radius:10px; }

/* Responsive adjustments to mirror Incontinence layout */
@media (max-width:980px){
  .two-col, .works-grid, .intro-split { grid-template-columns: 1fr; }
  .page-hero { grid-template-columns: 1fr; }
  .section--light, .section--dark { padding:18px; }
}

/* Small tweaks */
.section-line{ display:inline-block }

/* End of additional Incontinence-like styles */

/* End of patient resources styles */

/* Accordion targeting and highlighting styles */
.accordion-item {
  scroll-margin-top: 20px; /* Account for fixed headers or spacing */
  transition: all 0.3s ease;
}

.accordion-item:target {
  box-shadow: 0 0 0 3px rgba(108, 78, 217, 0.3);
  border-radius: 12px;
}

.accordion-item.highlighted {
  background: linear-gradient(135deg, rgba(108, 78, 217, 0.05), rgba(139, 95, 246, 0.03));
  box-shadow: 0 4px 20px rgba(108, 78, 217, 0.15);
  border-radius: 12px;
  transform: translateY(-2px);
}

/* Smooth transitions for accordion content */
.accordion-content {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content.active {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Resource card hover enhancement */
.resource-card {
  transition: all 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(108, 78, 217, 0.15);
}

/* Mobile responsive adjustments for accordion targeting */
@media (max-width: 768px) {
  .accordion-item {
    scroll-margin-top: 15px;
  }
  
  .accordion-item.highlighted {
    transform: none; /* Disable transform on mobile for better performance */
  }
}
