/* ============================================
   DIÁRIO FLOR&SER — Home Page Styles
   ============================================ */

/* ── HERO / AUTHOR PROFILE ── */
.hero-section {
  background: var(--gradient-hero);
  padding: var(--sp-4xl) 0 var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(242,211,153,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(60,146,166,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-3xl);
}

.hero-avatar {
  flex-shrink: 0;
}

.hero-avatar-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid rgba(242,211,153,0.5);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2), 0 0 0 8px rgba(255,255,255,0.1);
  transition: transform var(--duration-slow) var(--ease-out);
}

.hero-avatar-img:hover {
  transform: scale(1.05);
}

.hero-info {
  color: var(--white);
}

.hero-name {
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  color: var(--white);
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.85);
  font-weight: var(--fw-light);
  margin-bottom: var(--sp-md);
  max-width: 600px;
  line-height: var(--lh-relaxed);
}

.hero-bio {
  font-size: var(--fs-base);
  color: rgba(255,255,255,0.7);
  max-width: 550px;
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-lg);
}

.hero-social {
  display: flex;
  gap: var(--sp-md);
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  transition: all var(--duration-normal) var(--ease-out);
  backdrop-filter: blur(10px);
}

.hero-social a:hover {
  background: var(--accent);
  color: var(--dark);
  transform: translateY(-3px);
}

.hero-social a svg {
  width: 18px;
  height: 18px;
}

/* Decorative elements */
.hero-decoration {
  position: absolute;
  opacity: 0.06;
  pointer-events: none;
}

.hero-decoration-1 {
  top: 20%;
  right: 5%;
  font-size: 200px;
  color: white;
}

.hero-decoration-2 {
  bottom: 10%;
  left: 3%;
  font-size: 120px;
  color: white;
}

/* ── MAIN CONTENT ── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--sp-3xl);
  padding: var(--sp-3xl) 0;
}

/* ── POST TABS ── */
.posts-section {
  min-width: 0;
}

.tabs-header {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 0;
}

.tab-btn {
  position: relative;
  padding: var(--sp-md) var(--sp-lg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  transform: scaleX(0);
  transition: transform var(--duration-normal) var(--ease-out);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-content {
  display: none;
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

.tab-content.active {
  display: block;
}

/* ── POST GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xl);
}

/* Featured Post (first post) */
.post-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid rgba(var(--primary-rgb), 0.05);
}

.post-card-featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.post-card-featured .card-img-wrapper {
  height: 100%;
}

.post-card-featured .card-img {
  height: 100%;
  min-height: 320px;
}

.post-card-featured .card-body {
  padding: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card-featured .card-tag {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--dark);
}

.post-card-featured .card-title {
  font-size: var(--fs-2xl);
  -webkit-line-clamp: 3;
}

.post-card-featured .card-excerpt {
  -webkit-line-clamp: 4;
  font-size: var(--fs-base);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--dark);
  background: var(--accent);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-sm);
}

.featured-badge svg {
  width: 12px;
  height: 12px;
}

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--sp-xl));
  height: fit-content;
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-xl);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(var(--primary-rgb), 0.05);
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--accent);
}

/* Search Widget */
.search-widget {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  background: var(--off-white);
  transition: all var(--duration-normal) var(--ease-out);
  outline: none;
}

.search-input:focus {
  border-color: var(--secondary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(var(--secondary-rgb), 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mid-gray);
  width: 16px;
  height: 16px;
}

/* Newsletter Widget */
.newsletter-widget {
  background: var(--gradient-primary);
  color: var(--white);
}

.newsletter-widget .sidebar-title {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.3);
}

.newsletter-widget p {
  color: rgba(255,255,255,0.8);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-md);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.newsletter-input {
  padding: 12px 16px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: var(--fs-sm);
  outline: none;
  backdrop-filter: blur(10px);
  transition: all var(--duration-normal) var(--ease-out);
}

.newsletter-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.newsletter-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.25);
}

.newsletter-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: var(--dark);
  font-weight: var(--fw-semibold);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.newsletter-btn:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Popular Posts Widget */
.popular-post-item {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--light-gray);
}

.popular-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-post-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.popular-post-info h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-dark);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.popular-post-info h4 a {
  color: inherit;
}

.popular-post-info h4 a:hover {
  color: var(--secondary);
}

.popular-post-info span {
  font-size: var(--fs-xs);
  color: var(--mid-gray);
}

/* ── SECTION HEADINGS ── */
.section-heading {
  text-align: center;
  margin-bottom: var(--sp-3xl);
}

.section-heading h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-sm);
}

.section-heading p {
  font-size: var(--fs-md);
  color: var(--text-gray);
  max-width: 560px;
  margin: 0 auto;
}

.section-heading-line {
  width: 60px;
  height: 3px;
  background: var(--gradient-warm);
  border-radius: var(--radius-full);
  margin: var(--sp-md) auto 0;
}

/* ── RESPONSIVE HOME ── */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-xl);
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: var(--sp-2xl) 0;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-xl);
  }

  .hero-avatar-img {
    width: 150px;
    height: 150px;
  }

  .hero-title,
  .hero-bio {
    max-width: 100%;
  }

  .hero-social {
    justify-content: center;
  }

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

  .post-card-featured {
    grid-template-columns: 1fr;
  }

  .post-card-featured .card-img {
    min-height: 200px;
    height: 200px;
  }

  .post-card-featured .card-body {
    padding: var(--sp-lg);
  }

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

  .tabs-header {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Loading Spinner ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
