/* ==========================================================================
   Excelência Tour — Editorial Design System (Apple HIG & JAH Standards)
   Projeto: Roteiro Itália entre amigas 2027
   Rota canônica: /p/italia-amigas-2027-k7m2
   ========================================================================== */

:root {
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Paleta Canônica do Roteiro */
  --color-primary: #123F72;       /* Azul Excelência Tour */
  --color-primary-dark: #0A2544;
  --color-primary-light: #1D5496;
  --color-mediterranean: #5FA8C9; /* Azul Mediterrâneo (Amalfi & Capri) */
  --color-tuscany: #C9825B;       /* Terracota Toscana */
  --color-sand: #F5EFE6;          /* Areia editorial */
  --color-sand-soft: #FAF7F2;
  --color-white: #FFFFFF;
  --color-text-main: #1A202C;
  --color-text-muted: #4E5661;    /* Cinza texto secundário */
  --color-border: rgba(18, 63, 114, 0.12);
  --color-border-subtle: rgba(0, 0, 0, 0.06);

  /* Sombras refinadas Apple HIG */
  --shadow-sm: 0 1px 2px rgba(18, 63, 114, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(18, 63, 114, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 12px 28px -4px rgba(18, 63, 114, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 20px 40px -8px rgba(18, 63, 114, 0.18), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Base Reset & Smoothness */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  background-color: var(--color-sand);
  color: var(--color-text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Tipografia */
h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Apple HIG Ergonomics: Touch Targets mínimos de 44px */
.touch-target-44 {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 9999px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(18, 63, 114, 0.25);
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(18, 63, 114, 0.32);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #FFFFFF;
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* Glassmorphism Refinado */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-floating {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Cards & Elevação em Camadas */
.card-surface {
  background-color: var(--color-white);
  border-radius: 20px;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card-surface:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Badges Editoriais */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-blue {
  background-color: #E8F1FA;
  color: var(--color-primary);
  border: 1px solid rgba(18, 63, 114, 0.2);
}

.badge-mediterranean {
  background-color: #EBF5F9;
  color: #2B7293;
  border: 1px solid rgba(95, 168, 201, 0.3);
}

.badge-tuscany {
  background-color: #FAF0E9;
  color: #9C5229;
  border: 1px solid rgba(201, 130, 91, 0.3);
}

.badge-green {
  background-color: #EAF8EE;
  color: #1F7A3E;
  border: 1px solid rgba(31, 122, 62, 0.25);
}

.badge-amber {
  background-color: #FEF7EA;
  color: #9B6204;
  border: 1px solid rgba(217, 139, 9, 0.3);
}

/* Caixa Dica da Curadoria */
.curator-box {
  background: linear-gradient(135deg, #FAF7F2 0%, #FFFFFF 100%);
  border-left: 4px solid var(--color-primary);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
}

/* Alertas Editoriais */
.editorial-alert {
  background-color: #FFF9F2;
  border-left: 4px solid #C9825B;
  border-radius: 12px;
  padding: 14px 16px;
}

/* Accordion FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background-color 0.2s ease;
}

.faq-header {
  width: 100%;
  padding: 18px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-primary);
  min-height: 48px;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  padding: 0 8px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.active .faq-content {
  max-height: 400px;
  opacity: 1;
  padding-bottom: 18px;
}

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

/* Timeline Interativa */
.timeline-track {
  position: relative;
}

.timeline-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-mediterranean) 50%, var(--color-tuscany) 80%, var(--color-primary) 100%);
}

@media (min-width: 768px) {
  .timeline-track-horizontal {
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: thin;
  }
}

/* Toast Notificação */
#toast-notification {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(18, 63, 114, 0.95);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}

#toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   ESTILOS DE IMPRESSÃO (A4, Alta Legibilidade, Sem Botões, Marca D'água)
   ========================================================================== */
@media print {
  @page {
    size: A4;
    margin: 1.5cm;
  }

  body {
    background: #FFFFFF !important;
    color: #111827 !important;
    font-size: 12pt;
    line-height: 1.4;
  }

  /* Ocultar elementos desnecessários na impressão */
  .no-print,
  .floating-bar,
  #toast-notification,
  button,
  .btn-primary,
  .btn-secondary {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .card-surface {
    box-shadow: none !important;
    border: 1px solid #D1D5DB !important;
    border-radius: 8px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 16px !important;
  }

  img {
    max-height: 250px !important;
    object-fit: cover !important;
  }

  /* Manter URLs legíveis nos links */
  a[href^="http"]:not(.no-print-link)::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #4B5563;
    font-weight: normal;
  }

  .editorial-header-print {
    border-bottom: 2px solid #123F72;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
