/* ============================================================
   EnergiaBarata.eu — Custom Styles
   NOTE: Brand tokens, core gradients, .card-hover, .btn-hover,
         .feature-icon, .fade-in, .faq-icon base styles, and
         .sr-only are already defined in styles.css.
         This file contains ONLY styles not present there.
   ============================================================ */

/* === Hero Gradient (3-stop, not in styles.css) === */
.hero-gradient { background: linear-gradient(135deg, #004D2C 0%, #00A651 50%, #008C42 100%); }

/* === Homepage Components (not in styles.css) === */
.silo-card { transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid #e5e7eb; }
.silo-card:hover { transform: translateY(-6px); box-shadow: 0 16px 30px -5px rgba(0, 166, 81, 0.15); border-color: #00A651; }

.trust-badge { transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); }
.trust-badge:hover { transform: translateY(-4px); }

.post-card { transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1); }

.category-badge { font-size: 0.7rem; letter-spacing: 0.05em; }
.tool-card-border { border-left: 4px solid #00A651; }

/* === Energia Hub === */
.silo-badge { display: inline-block; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* === FAQ — JS adds .open to .faq-answer / .faq-icon (different from styles.css .faq-item.active) === */
.faq-answer.open { max-height: 500px; }
.faq-icon.open   { transform: rotate(180deg); }

/* === Blog utilities === */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.filter-btn { transition: all 200ms ease; }
.filter-btn:hover { transform: translateY(-2px); }
.filter-btn.active { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Skip Navigation Link */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #004D2C;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 14px;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-nav:focus {
  top: 0;
  outline: 3px solid #fdc814;
  outline-offset: 2px;
}

/* Visible Focus Indicators (overrides focus:outline-none) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f59e0b !important;
  outline-offset: 2px !important;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   MOBILE UX — Touch Targets & Spacing
   ======================================== */
@media (max-width: 768px) {
  /* Minimum 48px touch targets on mobile */
  .mobile-menu a,
  nav a,
  button,
  .faq-question,
  .faq-toggle,
  .filter-btn,
  .btn-hover {
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
  }

  /* Breadcrumb touch-friendly spacing */
  nav[aria-label="Breadcrumb"] a {
    padding: 8px 4px;
  }

  /* Better tap spacing for mobile menu links */
  .mobile-menu a {
    padding: 12px 16px;
  }

  /* Ensure FAQ questions are easy to tap */
  .faq-question,
  .faq-toggle {
    padding: 16px;
    cursor: pointer;
  }
}

/* ========================================
   TEXT CONTRAST IMPROVEMENTS
   ======================================== */
/* Ensure gray text meets WCAG AA 4.5:1 ratio on white bg */
.text-gray-400 { color: #6b7280; }  /* Upgraded from #9ca3af */
.text-gray-500 { color: #4b5563; }  /* Upgraded from #6b7280 */

/* Active nav link style (less-specific fallback; nav a.nav-active in styles.css is canonical) */
.nav-active {
  color: #00A651 !important;
  font-weight: 700;
}
