/* ==========================================================================
   Empathyca - Dott.ssa Flavia Sica (Psicologa & Psicoterapeuta)
   Palette di colori: Rosa Antico / Cipria, Sabbia, Ecrù, Terracotta Soft
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Nuance Principali - Toni Soffici e Pastello */
  --color-ecru: #FAF6F0;
  --color-ecru-dark: #F3ECE2;
  --color-sand: #EFE7DC;
  --color-sand-dark: #DED3C4;
  
  --color-rose-light: #FBF0ED;
  --color-rose-soft: #F4DED8;
  --color-rose-dusty: #D99B8B;
  --color-rose-deep: #B76E60;

  --color-terracotta: #9E5346;
  --color-terracotta-dark: #7A3B30;

  --color-sage-soft: #EBF1EA;
  --color-sage-accent: #8E9F85;

  --color-text-main: #332B29;
  --color-text-muted: #6B5E59;
  --color-text-light: #948681;

  --color-white: #FFFFFF;
  --color-card-bg: rgba(255, 255, 255, 0.88);
  
  /* Font Families */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Ombre morbide */
  --shadow-subtle: 0 4px 20px -2px rgba(158, 83, 70, 0.06);
  --shadow-medium: 0 10px 30px -4px rgba(158, 83, 70, 0.1);
  --shadow-hover: 0 20px 40px -6px rgba(158, 83, 70, 0.16);

  /* Raggi bordi */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-ecru);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  line-height: 1.7;
  overflow-x: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(244, 222, 216, 0.4) 0%, transparent 40%),
              radial-gradient(circle at 90% 60%, rgba(235, 241, 234, 0.5) 0%, transparent 40%),
              var(--color-ecru);
  min-height: 100vh;
}

/* Typography Helpers */
.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-main);
  line-height: 1.25;
  font-weight: 600;
}

/* Container */
.container-custom {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Glassmorphism Header & Cards */
.glass-header {
  background: rgba(250, 246, 240, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 155, 139, 0.15);
}

.card-glass {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 155, 139, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(217, 155, 139, 0.45);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-rose-deep), var(--color-terracotta));
  color: var(--color-white) !important;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(183, 110, 96, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-terracotta), var(--color-terracotta-dark));
  box-shadow: 0 6px 22px rgba(183, 110, 96, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-text-main) !important;
  border: 1px solid var(--color-sand-dark);
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--color-white);
  border-color: var(--color-rose-dusty);
  color: var(--color-terracotta) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

/* Badges & Tags */
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background-color: var(--color-rose-light);
  color: var(--color-terracotta);
  border: 1px solid rgba(217, 155, 139, 0.3);
}

.badge-sage {
  background-color: var(--color-sage-soft);
  color: var(--color-sage-accent);
  border: 1px solid rgba(142, 159, 133, 0.3);
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
  color: white;
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pulse-ring 2s infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Floating Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: white;
  color: var(--color-text-main);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-medium);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid rgba(217, 155, 139, 0.2);
  transition: all 0.3s ease;
}

.faq-header {
  width: 100%;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.15rem;
  color: var(--color-text-main);
  font-family: var(--font-serif);
  font-weight: 600;
}

.faq-header:hover {
  color: var(--color-terracotta);
}

.faq-icon {
  transition: transform 0.3s ease;
  color: var(--color-rose-dusty);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--color-terracotta);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-body {
  max-height: 600px;
  padding-bottom: 1.25rem;
  transition: max-height 0.4s ease-in-out;
}

/* Article Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(51, 43, 41, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

/* Blog Typography inside Modal / Single view */
.article-prose {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-main);
}

.article-prose h3 {
  font-size: 1.45rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--color-terracotta);
}

.article-prose p {
  margin-bottom: 1.2rem;
}

.article-prose ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-prose li {
  margin-bottom: 0.6rem;
}

.article-prose blockquote {
  border-left: 3px solid var(--color-rose-dusty);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-terracotta);
  background: var(--color-rose-light);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 52px;
    height: 52px;
  }
}

