/* clinica-v2.css - styles for the redesigned clinica pages (variant v2)
   Focus: psicologia judicial (.clinica-judicial.v2 and .cj-*)
   Mobile-first, accessible, readable typography and card layout.
*/
:root{
  --cj-bg:#FAF7F1;
  --cj-card:#FFFFFF;
  --cj-accent:#AA8B5A;
  --cj-accent-2:#6DA68F;
  --cj-text:#222;
  --cj-muted:#666;
  --cj-radius:12px;
  --cj-gap:16px;
}

/* Container */
.clinica-judicial.v2{
  background:var(--cj-bg);
  padding:22px 18px;
}
.cj-inner{ max-width:1100px; margin:0 auto; }

/* Headings */
.cj-title{ font-family:'Libre Baskerville', serif; font-size:1.35rem; margin:0 0 8px; color:var(--cj-text); line-height:1.05; }
.cj-subtitle{ font-weight:600; color:var(--cj-accent); margin-bottom:10px; font-size:1rem; }
.cj-intro p{ color:var(--cj-muted); margin:8px 0 0 0; font-size:0.96rem; }

/* Cards grid (stacked on mobile, 2-cols on desktop) */
.cj-cards{ display:grid; grid-template-columns:1fr; gap:14px; margin-top:14px; }
.cj-card{ background:var(--cj-card); border-radius:calc(var(--cj-radius) + 2px); box-shadow:0 8px 20px rgba(20,20,20,.045); padding:16px; overflow:hidden; transition:transform .22s ease, box-shadow .22s ease; border:1px solid rgba(0,0,0,0.04); }
.cj-card:hover{ transform:translateY(-4px); box-shadow:0 14px 30px rgba(20,20,20,.06); }
.cj-card-head{ display:flex; gap:12px; align-items:flex-start; margin-bottom:10px; }
.cj-icon{ font-size:1.4rem; display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--cj-accent),var(--cj-accent-2)); color:#fff; border-radius:10px; box-shadow:0 6px 14px rgba(0,0,0,.05); }
.cj-card h3{ margin:0; font-size:1.02rem; color:var(--cj-text); font-weight:700; line-height:1.14; }
.cj-card-body p{ margin:8px 0; color:var(--cj-muted); font-size:0.95rem; line-height:1.6; }

/* Summary and details toggles */
.cj-summary{ font-weight:600; color:var(--cj-text); }
.cj-details{ margin-top:10px; color:var(--cj-text); font-size:0.95rem; line-height:1.55; }
.cj-toggle{ background:transparent; border:0; color:var(--cj-accent); font-weight:700; padding:8px 0; cursor:pointer; display:inline-block; }
.cj-toggle[aria-expanded="true"]{ color:var(--cj-accent-2); }

/* Method / CTA area */
.cj-method-cta{ margin-top:18px; padding:14px; background:transparent; }
.cj-method-title{ font-family:'Libre Baskerville', serif; font-size:1.05rem; margin-bottom:10px; }
.cj-method-list{ list-style:disc; margin:0 0 12px 18px; color:var(--cj-muted); }
.cj-objectiu{ font-weight:600; color:var(--cj-text); margin:12px 0; }
.cj-quote{ margin:10px 0 14px; padding-left:12px; border-left:4px solid var(--cj-accent); color:var(--cj-muted); font-style:italic; }
.cj-cta-row{ display:flex; flex-direction:column; gap:10px; }
.cj-cta-main{ background:var(--cj-accent); color:#fff; padding:12px 14px; border-radius:10px; text-align:center; text-decoration:none; font-weight:700; display:block; }
.cj-cta-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.btn-secondary{ background:#fff; border:1px solid #ddd; padding:10px 12px; border-radius:8px; color:var(--cj-text); text-decoration:none; font-weight:600; }

/* Sticky CTA (small on mobile) */
.cj-sticky-cta{ position:fixed; left:50%; transform:translate(-50%,0); bottom:18px; z-index:9999; width:calc(100% - 40px); max-width:560px; border-radius:999px; box-shadow:0 12px 30px rgba(0,0,0,.12); display:flex; align-items:center; justify-content:center; padding:10px 14px; background:var(--cj-accent); color:#fff; font-weight:700; text-decoration:none; }

/* Accessibility helpers */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Responsive */
@media(min-width:860px){
  .cj-cards{ grid-template-columns:repeat(2, 1fr); gap:18px; }
  .cj-card{ padding:18px; }
  .cj-title{ font-size:1.6rem; }
}

/* Parella i Família (pf-) styles */
.pf-section{ background:linear-gradient(180deg, #fff, #fbfbfb); padding:20px 16px; }
.pf-inner{ max-width:1100px; margin:0 auto; }
.pf-section h1{ font-family:'Libre Baskerville', serif; font-size:1.25rem; margin:0 0 6px; color:var(--cj-text, #222); }
.pf-intro-title{ font-weight:600; color:var(--cj-accent, #AA8B5A); margin:6px 0 10px; font-size:1rem; }
.pf-intro{ color:var(--cj-muted, #666); margin:6px 0 12px; font-size:0.98rem; line-height:1.6; }
.pf-services{ display:grid; gap:12px; }
.pf-service{ background:#fff; border-radius:12px; padding:12px; border:1px solid rgba(0,0,0,0.04); box-shadow:0 8px 20px rgba(0,0,0,0.035); }
.pf-service h3{ margin:0 0 6px; font-size:1rem; color:var(--cj-text, #222); font-weight:700; }
.pf-service p{ margin:6px 0; color:var(--cj-muted, #666); font-size:0.95rem; line-height:1.5; }
.pf-method{ margin-top:14px; padding:12px; background:transparent; }
.pf-method-list{ margin:6px 0 12px 18px; color:var(--cj-muted, #666); }
.pf-method-goal{ font-weight:700; color:var(--cj-text, #222); margin-top:10px; }
.pf-cta-row{ display:flex; gap:10px; margin-top:12px; flex-direction:column; }
.pf-cta-main{ background:var(--cj-accent, #AA8B5A); color:#fff; padding:12px 14px; border-radius:10px; text-align:center; text-decoration:none; font-weight:700; display:inline-block; }

@media(min-width:860px){
  .pf-services{ grid-template-columns:repeat(2, 1fr); gap:18px; }
  .pf-cta-row{ flex-direction:row; }
  .pf-section h1{ font-size:1.6rem; }
}

/* Variant C: Hero + 4 tiles */
.pf-hero{ padding:14px 8px 6px; background:linear-gradient(180deg,#fff,#f8faf8); border-radius:12px; margin-bottom:12px; }
.pf-hero-title{ font-family:'Libre Baskerville', serif; font-size:1.15rem; margin:0 0 8px; color:var(--cj-text,#222); line-height:1.08; }
.pf-hero-lead{ color:var(--cj-muted,#666); margin:0 0 12px; font-size:0.98rem; }
.pf-hero-ctas{ display:flex; gap:10px; flex-wrap:wrap; }

.pf-tiles{ display:grid; grid-template-columns:1fr; gap:12px; margin-top:8px; }
.pf-tile{ display:flex; flex-direction:column; gap:8px; padding:12px; background:#fff; border-radius:12px; border:1px solid rgba(0,0,0,0.04); box-shadow:0 10px 24px rgba(14,14,14,0.04); }
.pf-tile-head{ display:flex; gap:12px; align-items:center; }
.pf-icon{ display:inline-flex; width:46px; height:46px; align-items:center; justify-content:center; border-radius:10px; background:linear-gradient(135deg,var(--cj-accent,#AA8B5A),var(--cj-accent-2,#6DA68F)); color:#fff; font-size:1.15rem; }
.pf-tile-lead{ margin:0; color:var(--cj-text,#222); font-weight:700; font-size:0.98rem; }
.pf-toggle{ margin-top:6px; background:transparent; border:0; color:var(--cj-accent,#AA8B5A); font-weight:700; cursor:pointer; padding:6px 0; }
.pf-detail{ margin-top:8px; color:var(--cj-muted,#666); font-size:0.95rem; line-height:1.6; }

@media(min-width:860px){
  .pf-tiles{ grid-template-columns:repeat(2, 1fr); gap:18px; }
  .pf-hero{ padding:18px; display:flex; flex-direction:column; }
  .pf-hero-ctas{ justify-content:flex-start; }
}

/* small polish for print/low-width */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}

/* Polished final CTA: elegant, minimal, mobile-first */
.clinica-cta-final{ padding:28px 16px; background:transparent; }
.clinica-cta-content{ max-width:1100px; margin:0 auto; display:grid; grid-template-columns: 1fr minmax(180px,320px); gap:20px; align-items:center; padding:22px; border-radius:18px; background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(250,247,241,0.02)); border:1px solid rgba(170,139,90,0.06); box-shadow:0 18px 48px rgba(11,22,55,0.06); position:relative; overflow:visible; }
.clinica-cta-content.spectacular{ overflow:hidden; }
.clinica-cta-copy{ padding-right:6px; }
.clinica-cta-title{ font-family:'Libre Baskerville', serif; font-size:1.5rem; margin:0 0 6px 0; color:var(--cj-text); line-height:1.04; font-weight:700; }
.clinica-cta-text{ margin:0; color:var(--cj-muted); font-size:1rem; max-width:60ch; opacity:0.95; }
.clinica-cta-actions{ display:flex; flex-direction:column; gap:10px; align-items:flex-end; justify-content:center; padding-left:6px; }
.clinica-cta-button{ display:inline-flex; align-items:center; justify-content:center; gap:0.6rem; background:linear-gradient(90deg, var(--cj-accent), color-mix(in srgb, var(--cj-accent) 70%, #000 30%)); color:#fff; padding:12px 18px; border-radius:12px; text-decoration:none; font-weight:800; box-shadow:0 18px 44px rgba(11,22,55,0.10); transition:transform .20s ease, box-shadow .20s ease, filter .12s ease; border:1px solid rgba(0,0,0,0.06); font-size:1rem; white-space:nowrap; min-width:140px; }
.clinica-cta-button:focus{ outline:3px solid rgba(170,139,90,0.15); outline-offset:3px; }
.clinica-cta-button:hover{ transform:translateY(-4px); box-shadow:0 28px 66px rgba(11,22,55,0.14); }
.clinica-cta-button .chev{ display:inline-block; margin-left:6px; transition:transform .18s ease; font-size:1.2rem; }
.clinica-cta-button:hover .chev{ transform:translateX(6px); }
.btn-secondary{ display:inline-flex; align-items:center; justify-content:center; padding:10px 12px; border-radius:10px; background:transparent; border:1px solid rgba(0,0,0,0.06); color:var(--cj-text); text-decoration:none; font-weight:700; }

/* Spectacular radial & glow */
.clinica-cta-content.spectacular::before{ content:''; position:absolute; left:-8%; top:-30%; width:60%; height:220%; background:radial-gradient(closest-side, rgba(255,220,185,0.12), rgba(255,220,185,0.02)); transform:rotate(14deg); filter:blur(20px); pointer-events:none; }
.clinica-cta-content.spectacular::after{ content:''; position:absolute; right:-6%; bottom:-18%; width:40%; height:120%; background:radial-gradient(closest-side, rgba(109,166,143,0.06), rgba(109,166,143,0)); transform:rotate(-12deg); pointer-events:none; }

@media(max-width:720px){
  .clinica-cta-content{ grid-template-columns:1fr; gap:14px; text-align:center; padding:18px; }
  .clinica-cta-copy{ padding:0; }
  .clinica-cta-actions{ flex-direction:row; justify-content:center; gap:12px; align-items:center; }
  .clinica-cta-button, .btn-secondary{ width:auto; min-width:120px; }
}

@media(max-width:480px){
  .clinica-cta-title{ font-size:1.25rem; }
  .clinica-cta-button{ padding:12px 16px; font-size:0.98rem; }
}

@media (prefers-reduced-motion: reduce){
  .clinica-cta-button, .clinica-cta-button .chev{ transition:none !important; transform:none !important; }
}
