/* ==========================================================
   Ferras Theme — Components CSS
========================================================== */

/* ----------------------------------------------------------
   Header
---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--fb-gray-200);
  transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.site-header__logo-text {
  font-family: var(--fb-font-serif);
  font-size: 1.6rem;
  color: var(--fb-black);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.site-header__logo-dot { color: var(--fb-accent); }

.site-header__brand .custom-logo-link img {
  height: 40px;
  width: auto;
}

/* Menu */
.site-header__nav { display: flex; }

.site-header__menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.site-header__menu a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fb-gray-600);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.site-header__menu a:hover,
.site-header__menu .current-menu-item > a { color: var(--fb-black); }

/* Sub-menus */
.site-header__menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--fb-white);
  border: 1px solid var(--fb-gray-200);
  border-radius: var(--fb-radius-md);
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 300;
}
.site-header__menu li { position: relative; }
.site-header__menu li:hover > .sub-menu { display: block; }
.site-header__menu .sub-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* CTA + Hamburger */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.site-header__cta {
  background: var(--fb-black);
  color: var(--fb-white) !important;
  padding: 0.55rem 1.4rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
  white-space: nowrap;
}
.site-header__cta:hover { background: var(--fb-accent); }

/* Hamburger */
.site-header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.site-header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fb-black);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.site-header__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.site-header__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------
   Footer
---------------------------------------------------------- */
.site-footer {
  background: var(--fb-black);
  color: var(--fb-white);
  font-family: var(--fb-font-sans);
}

.site-footer__top { padding: 5rem 0 4rem; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.site-footer__logo {
  font-family: var(--fb-font-serif);
  font-size: 1.5rem;
  color: var(--fb-white) !important;
  text-decoration: none !important;
  display: inline-block;
  margin-bottom: 1rem;
}
.site-footer__logo span { color: var(--fb-accent); }

.site-footer__tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 280px;
}

.site-footer__col-title {
  font-family: var(--fb-font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.25rem;
}

.site-footer__links { list-style: none; }
.site-footer__links li { margin-bottom: 0.6rem; }
.site-footer__links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer__links a:hover { color: var(--fb-white); }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.5rem 0;
}

.site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}
.site-footer__copy a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.site-footer__nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.site-footer__nav a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer__nav a:hover { color: var(--fb-white); }

/* ----------------------------------------------------------
   Blog — Posts Grid & Cards
---------------------------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--fb-white);
  border: 1px solid var(--fb-gray-200);
  border-radius: var(--fb-radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.post-card__thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-card__body { padding: 1.5rem; }

.post-card__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--fb-gray-400);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.post-card__meta a { color: var(--fb-accent); text-decoration: none; }

.post-card__title {
  font-family: var(--fb-font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.post-card__title a { text-decoration: none; color: var(--fb-black); }
.post-card__title a:hover { color: var(--fb-accent); }

.post-card__excerpt {
  font-size: 0.88rem;
  color: var(--fb-gray-600);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.post-card__more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fb-accent);
  text-decoration: none;
  transition: color 0.2s;
}
.post-card__more:hover { color: var(--fb-accent-dark); }

/* Pagination */
.nav-links { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.nav-links a, .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--fb-gray-200);
  border-radius: var(--fb-radius-sm);
  font-size: 0.85rem;
  color: var(--fb-black);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.nav-links a:hover { background: var(--fb-cream); }
.nav-links .current { background: var(--fb-black); color: var(--fb-white); border-color: var(--fb-black); }

/* ----------------------------------------------------------
   Responsivo
---------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .site-header__hamburger { display: flex; }

  .site-header__nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--fb-white);
    border-bottom: 1px solid var(--fb-gray-200);
    padding: 1.5rem 2rem;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.25s ease;
    z-index: 190;
  }
  .site-header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .site-header__menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer__top  { padding: 3rem 0 2.5rem; }

  .posts-grid { grid-template-columns: 1fr; }
}
