/* ==========================================================================
   Ginásio Perto — Design System (Pixel-Exact openalternative.co Replica)
   Website: https://ginasioperto.com/
   Design: OpenAlternative (Pure Dark Mode Exclusively)
   Língua: Português de Portugal (PT-PT) / English (ENG)
   ========================================================================== */

:root {
  --background: #09090b;
  --foreground: #ededed;
  --card: #121215;
  --card-foreground: #ededed;
  --card-hover-border: #3f3f46;
  --muted: #18181b;
  --muted-foreground: #a1a1aa;
  --secondary: #18181b;
  --secondary-foreground: #d4d4d8;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --border: #27272a;
  --border-hover: #52525b;
  --ring: #fafafa;
  --header-bg: rgba(9, 9, 11, 0.90);
  --hero-bg: #09090b;
  --hero-grid: rgba(255, 255, 255, 0.04);
  --radius: 0.75rem; /* 12px exact OpenAlternative card radius */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: #09090b !important;
  color: #ededed !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #09090b !important;
  color: #ededed !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}

p, span.text-neutral-500, p.text-neutral-500 {
  color: #a1a1aa;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #18181b;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* OpenAlternative Header (Pure Dark) */
.openalt-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #27272a;
}

/* Hero Subtle Grid (OpenAlternative Signature Dark Grid) */
.openalt-hero-pattern {
  background-color: #09090b !important;
  border-bottom: 1px solid #27272a !important;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* OpenAlternative Search Input Container */
.openalt-search-container {
  display: flex;
  align-items: center;
  background: #121215;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease-out;
}

.openalt-search-container:hover {
  border-color: #3f3f46;
}

.openalt-search-container:focus-within {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #ffffff;
}

.openalt-search-container input {
  color: #ffffff;
}

/* OpenAlternative Filter Pills */
.openalt-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid #27272a;
  background-color: #121215;
  color: #a1a1aa;
  transition: all 0.1s ease-out;
  cursor: pointer;
  white-space: nowrap;
}

.openalt-filter-pill:hover {
  border-color: #3f3f46;
  color: #ffffff;
}

.openalt-filter-pill.active {
  background-color: #ffffff !important;
  color: #09090b !important;
  border-color: #ffffff !important;
  font-weight: 600;
}

/* OpenAlternative Directory Card (Exact Firecrawl / Postiz / Novu style) */
.openalt-card {
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  background-color: #121215 !important;
  border: 1px solid #27272a !important;
  border-radius: 0.75rem !important; /* 12px */
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  text-decoration: none !important;
  cursor: pointer;
}

.openalt-card:hover {
  border-color: #3f3f46 !important;
  background-color: #151518 !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

/* Warm Orange Subscribe Button (OpenAlternative Signature) */
.openalt-btn-subscribe {
  background-color: #fba85c !important;
  color: #09090b !important;
  font-weight: 600;
  transition: all 0.15s ease;
}
.openalt-btn-subscribe:hover {
  background-color: #fa963f !important;
}

/* Primary Button (White) */
.openalt-btn-primary {
  background-color: #ffffff !important;
  color: #09090b !important;
  transition: all 0.15s ease;
}
.openalt-btn-primary:hover {
  background-color: #e4e4e7 !important;
}

/* Secondary Button / Dropdown */
.openalt-btn-secondary {
  background-color: #121215 !important;
  border: 1px solid #27272a !important;
  color: #d4d4d8 !important;
  transition: all 0.15s ease;
}
.openalt-btn-secondary:hover {
  border-color: #3f3f46 !important;
  color: #ffffff !important;
  background-color: #18181b !important;
}

/* Metrics Table inside Detail Page */
.openalt-metrics-list {
  width: 100%;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.openalt-metric-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a1a1aa;
}

.openalt-metric-divider {
  flex: 1;
  min-width: 0.5rem;
  border: 0;
  border-top: 1px dashed #27272a;
}

.openalt-metric-value {
  color: #ededed;
  font-weight: 500;
  white-space: nowrap;
}

/* Notification Toast for Language */
#toastNotification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background-color: #121215;
  color: #ffffff;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(0.75rem);
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#toastNotification.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* OpenAlternative Article Typography */
.openalt-prose {
  color: #d4d4d8;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.openalt-prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #27272a;
}

.openalt-prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #f4f4f5;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.openalt-prose p {
  margin-bottom: 1.25rem;
}

.openalt-prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  space-y: 0.5rem;
}

.openalt-prose li {
  margin-bottom: 0.5rem;
}

.openalt-prose strong {
  color: #ffffff;
  font-weight: 600;
}

/* Mobile Sticky Bar on Detail Pages */
.openalt-mobile-bar {
  display: none;
}

@media (max-width: 640px) {
  .openalt-mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background-color: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid #27272a;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
}
