/*
Theme Name: Nexx Tutoriais
Theme URI: https://nexxtutoriais.com
Author: Nexx Tutoriais
Author URI: https://nexxtutoriais.com
Description: Tema moderno de blog para tutoriais e dicas de aplicativos
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexx-tutoriais
Tags: blog, one-column, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, translation-ready

Nexx Tutoriais Theme, Copyright 2025
*/

/* ===== CSS VARIABLES ===== */
/* These are default values - they get overridden by Customizer settings via inline CSS */
:root {
  /* Colors from Customizer (with defaults) */
  --primary-color: #00d26a;
  --secondary-color: #00b35a;
  --accent-color: #00ff7f;
  --header-bg: #0a0a0a;
  --header-text: #ffffff;
  --body-bg: #0f0f0f;
  --body-text: #e0e0e0;
  --muted-text: #888888;
  --card-bg: #1a1a1a;
  --card-border: #2a2a2a;
  --footer-bg: #050505;
  --footer-text: #888888;
  
  /* Typography from Customizer */
  --body-font: 'DM Sans', sans-serif;
  --heading-font: 'DM Sans', sans-serif;
  --heading-weight: 700;
  --body-font-size: 16px;
  
  /* Layout from Customizer */
  --container-width: 1200px;
  --header-height: 70px;
  --sidebar-width: 300px;
  --logo-size: 1.5rem;
  
  /* Computed values */
  --background: var(--body-bg);
  --foreground: var(--body-text);
  --card: var(--card-bg);
  --card-foreground: var(--body-text);
  --primary: var(--primary-color);
  --primary-foreground: #ffffff;
  --secondary: var(--secondary-color);
  --muted-foreground: var(--muted-text);
  --header-foreground: var(--header-text);
  --border: var(--card-border);
  --radius: 0.5rem;
  --shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 40px -10px rgba(0, 210, 106, 0.3);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--body-font-size);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: var(--heading-weight);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo styling from Customizer */
.site-title {
  display: flex;
  align-items: center;
  font-size: var(--logo-size);
  font-weight: 700;
  text-decoration: none;
}

.site-title .logo-part-1 {
  color: var(--primary-color);
}

.site-title .logo-part-2 {
  color: var(--header-text);
}

/* Sticky header states */
.site-header.is-sticky {
  position: sticky;
  top: 0;
}

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

.site-logo img {
  height: 32px;
  width: auto;
}

.main-navigation {
  display: none;
}

@media (min-width: 1024px) {
  .main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.main-navigation a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  padding-bottom: 4px;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.main-navigation a:hover {
  color: #ffffff;
}

.main-navigation a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-toggle,
.menu-toggle {
  padding: 0.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-toggle:hover,
.menu-toggle:hover {
  color: var(--primary);
}

.menu-toggle {
  display: block;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

/* ===== HERO SECTION ===== */
.hero-section {
  padding: 2rem 0;
}

/* Layout Principal - Mobile: coluna | Desktop: lado a lado */
.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .hero-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
  }
}

/* Post Principal do Hero */
.hero-main-post {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  height: 400px;
}

@media (min-width: 1024px) {
  .hero-main-post {
    height: 500px;
  }
}

.hero-main-post img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-main-post .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  z-index: 1;
}

.hero-main-post .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
}

@media (min-width: 1024px) {
  .hero-main-post .content {
    padding: 2rem;
  }
}

.hero-main-post h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

@media (min-width: 1024px) {
  .hero-main-post h2 {
    font-size: 1.875rem;
  }
}

.hero-main-post .meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Posts Laterais - Mobile: grid 2x2 | Desktop: coluna */
.hero-sidebar-posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .hero-sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

/* Post Individual do Sidebar */
.hero-sidebar-post {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

@media (min-width: 1024px) {
  .hero-sidebar-post {
    aspect-ratio: auto;
    flex: 1;
    min-height: 0;
  }
}

.hero-sidebar-post img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-sidebar-post .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  z-index: 1;
}

.hero-sidebar-post .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  z-index: 2;
}

@media (min-width: 1024px) {
  .hero-sidebar-post .content {
    padding: 1rem;
  }
}

.hero-sidebar-post .category-badge {
  font-size: 0.5rem;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.35rem;
}

@media (min-width: 1024px) {
  .hero-sidebar-post .category-badge {
    font-size: 0.625rem;
    margin-bottom: 0.5rem;
  }
}

.hero-sidebar-post h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

@media (min-width: 1024px) {
  .hero-sidebar-post h3 {
    font-size: 0.875rem;
    line-height: 1.4;
  }
}

/* ===== CATEGORY BADGE ===== */
.category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.sidebar-post .category-badge {
  font-size: 0.625rem;
  margin-bottom: 0.5rem;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title .bar {
  width: 3rem;
  height: 4px;
  background-color: var(--primary);
  border-radius: 9999px;
}

.section-header .view-more {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.section-header .view-more:hover {
  color: var(--primary);
}

/* ===== HOMEPAGE LAYOUT WITH SIDEBAR ===== */
.homepage-content {
  padding: 2rem 0;
}

.homepage-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .homepage-layout {
    grid-template-columns: 1fr 320px;
    gap: 3rem;
  }
}

.main-content {
  min-width: 0;
}

/* Homepage Sidebar */
.homepage-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .homepage-sidebar {
    display: block;
  }
}

/* Sidebar Widget */
.sidebar-widget {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.sidebar-widget .widget-header {
  margin-bottom: 1rem;
}

.sidebar-widget .widget-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-widget .widget-header .bar {
  width: 40px;
  height: 3px;
  background-color: var(--primary);
  margin-top: 0.5rem;
}

/* Popular Posts Widget */
.popular-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-posts-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.popular-posts-list li:first-child {
  padding-top: 0;
}

.popular-posts-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-posts-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--foreground);
  line-height: 1.5;
  transition: color 0.2s ease;
  display: block;
}

.popular-posts-list a:hover {
  color: var(--primary);
}

/* ===== ARTICLES GRID ===== */
.articles-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.articles-section:last-child {
  border-bottom: none;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 639px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== FULLWIDTH SECTIONS ===== */
.fullwidth-sections {
  padding: 0 0 2rem;
}

.fullwidth-sections .articles-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.fullwidth-sections .articles-section:last-child {
  border-bottom: none;
}

.articles-grid-fullwidth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .articles-grid-fullwidth {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .articles-grid-fullwidth {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== ARTICLE CARD ===== */
.article-card {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-card .thumbnail {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.article-card .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .thumbnail img {
  transform: scale(1.05);
}

.article-card .card-content {
  padding: 1.25rem;
}

.article-card .category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.article-card h3 {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--card-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.article-card:hover h3 {
  color: var(--primary);
}

.article-card .excerpt {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== FOOTER MINIMALISTA ===== */
.site-footer {
  background-color: #1a1a1a;
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

/* Footer Brand */
.footer-brand {
  max-width: 400px;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo .site-title {
  font-size: 1.5rem;
}

.footer-logo .logo-part-1 {
  color: var(--primary);
  font-weight: 800;
}

.footer-logo .logo-part-2 {
  color: #fff;
  font-weight: 600;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
}

/* Footer Navigation */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0;
}

.footer-nav a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  user-select: none;
}

/* Footer Bottom */
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
}

.site-footer .footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* Responsivo */
@media (max-width: 640px) {
  .footer-nav {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .footer-divider {
    display: none;
  }
  
  .footer-nav a {
    padding: 0.5rem;
  }
}

/* ===== SINGLE POST - CLEAN LAYOUT ===== */
.single-post-clean {
  padding-top: 2rem;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
}

.single-post-header-clean {
  margin: 0 0 2rem;
  padding: 0;
  text-align: left;
}

.single-post-header-clean h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .single-post-header-clean h1 {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .single-post-header-clean h1 {
    font-size: 2.75rem;
  }
}

.post-meta-clean {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.post-meta-clean .category-badge {
  margin-bottom: 0;
  margin-right: 0.5rem;
}

.post-meta-clean .separator {
  color: var(--border);
}

.post-meta-clean .author {
  font-weight: 500;
}

/* Legacy single post header with image (optional) */
.single-post-header {
  position: relative;
  min-height: 400px;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.single-post-header img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post-header .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
}

.single-post-header .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
}

.single-post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .single-post-header h1 {
    font-size: 2.5rem;
  }
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Post Content */
.post-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.post-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--foreground);
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--foreground);
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  list-style: disc;
  line-height: 1.8;
}

.post-content ol li {
  list-style: decimal;
}

.post-content img {
  border-radius: var(--radius);
  margin: 2rem 0;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--muted-foreground);
}

.post-content a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
}

.post-content a:hover {
  color: #00b85d;
}

/* Post Tags */
.post-tags {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: var(--secondary);
  border-radius: var(--radius);
}

.post-tags a {
  color: var(--primary);
}

.post-tags a:hover {
  text-decoration: underline;
}

/* Author Box */
.author-box {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: var(--card);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  box-shadow: var(--shadow);
}

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

.author-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.author-bio {
  color: var(--muted-foreground);
  line-height: 1.7;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Related Posts Section */
.related-posts-section {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 2rem 1rem;
}

.related-posts-section .section-header {
  margin-bottom: 1.5rem;
}

.related-posts-section .section-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.related-posts-section .articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .related-posts-section .articles-grid {
    grid-template-columns: 1fr;
  }
}

.related-posts-section .article-card {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-posts-section .article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.related-posts-section .article-card .thumbnail {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.related-posts-section .article-card .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-posts-section .article-card:hover .thumbnail img {
  transform: scale(1.05);
}

.related-posts-section .article-card .card-content {
  padding: 1rem;
}

.related-posts-section .article-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.4;
  margin-top: 0.5rem;
}

.related-posts-section .article-card .excerpt {
  display: none;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a {
  background-color: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow);
}

.pagination a:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.pagination .current {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* ===== SEARCH FORM ===== */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: var(--header-foreground);
  font-size: 0.875rem;
}

.search-form input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
}

.search-form button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-form button:hover {
  background-color: #00b85d;
}

/* ===== WIDGETS ===== */
.widget {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.widget ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget a {
  color: var(--foreground);
  transition: color 0.2s ease;
}

.widget a:hover {
  color: var(--primary);
}

/* ===== COMMENTS - STYLED ===== */
.comments-area {
  max-width: 800px;
  margin: 3rem auto 0;
  padding: 2rem;
  background-color: var(--card);
  border-radius: var(--radius);
}

.comments-title,
.comment-reply-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

/* Comment Form */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-form .logged-in-as {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.comment-form .logged-in-as a {
  color: var(--primary);
}

.comment-form .logged-in-as a:hover {
  text-decoration: underline;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 210, 106, 0.15);
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form .form-submit {
  margin-top: 0.5rem;
}

.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-form .submit:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
}

/* Comment List */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  padding: 1.5rem;
  background-color: var(--body-bg);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.comment .children {
  margin-top: 1rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--primary);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.comment-author .fn {
  font-weight: 600;
  color: var(--foreground);
}

.comment-metadata {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.comment-metadata a {
  color: var(--muted-foreground);
}

.comment-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--foreground);
}

.comment-content p {
  margin: 0;
}

.reply a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  transition: opacity 0.2s ease;
}

.reply a:hover {
  opacity: 0.8;
}

/* No comments message */
.no-comments {
  text-align: center;
  color: var(--muted-foreground);
  font-style: italic;
}

/* ===== UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

/* ===== CUSTOM WIDGET STYLES ===== */

/* Recent Posts Widget */
.nexx-recent-posts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.recent-post-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: calc(var(--radius) * 0.5);
  overflow: hidden;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recent-post-item:hover .recent-post-thumb img {
  transform: scale(1.05);
}

.recent-post-content {
  flex: 1;
  min-width: 0;
}

.recent-post-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.4;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-item:hover .recent-post-title {
  color: var(--primary-color);
}

.recent-post-date {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-text);
  margin-top: 0.25rem;
}

/* Categories Widget */
.nexx-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.category-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--card-border);
  transition: all 0.2s ease;
}

.category-item:last-child a {
  border-bottom: none;
}

.category-item a:hover {
  padding-left: 0.5rem;
}

.category-item a:hover .category-name {
  color: var(--primary-color);
}

.category-name {
  font-size: 0.875rem;
  color: var(--foreground);
  transition: color 0.2s ease;
}

.category-count {
  font-size: 0.75rem;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

/* About Widget */
.nexx-about-widget {
  text-align: center;
}

.about-image {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text {
  font-size: 0.875rem;
  color: var(--muted-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.about-button {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.about-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* Newsletter Widget */
.nexx-newsletter-widget {
  text-align: center;
}

.newsletter-text {
  font-size: 0.875rem;
  color: var(--muted-text);
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.newsletter-form input[type="email"] {
  padding: 0.75rem 1rem;
  background-color: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary-color);
}

.newsletter-form button {
  padding: 0.75rem 1rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.newsletter-form button:hover {
  background-color: var(--secondary-color);
}

/* Social Widget */
.nexx-social-widget {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--body-bg);
  border-radius: 50%;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

.social-icon svg,
.social-icon i {
  width: 18px;
  height: 18px;
}

/* Footer Social Links */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.social-links svg,
.social-links i {
  width: 16px;
  height: 16px;
}

/* Mobile Menu */
.main-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  padding: 1rem;
  border-top: 1px solid var(--card-border);
}

.mobile-menu-btn.is-active .menu-icon {
  transform: rotate(90deg);
}

/* Search Form Overlay - Discrete */
.header-search-overlay {
  position: absolute;
  right: 0;
  top: 100%;
  width: 320px;
  max-width: 90vw;
  padding: 1rem;
  background-color: var(--header-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.header-search-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(8px);
}

.header-search-overlay .search-form {
  display: flex;
  gap: 0.5rem;
}

.header-search-overlay .search-form input[type="search"] {
  flex: 1;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: var(--header-foreground);
  font-size: 0.875rem;
}

.header-search-overlay .search-form input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search-overlay .search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
}

.header-search-overlay .search-form button {
  padding: 0.75rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.header-search-overlay .search-form button:hover {
  background-color: #00b85d;
}

/* Hide old search form styling */
.header-search-form {
  display: none !important;
}

/* Header Actions - Relative for overlay positioning */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

/* Sidebar Layout */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .content-with-sidebar.sidebar-right {
    grid-template-columns: 1fr var(--sidebar-width);
  }

  .content-with-sidebar.sidebar-left {
    grid-template-columns: var(--sidebar-width) 1fr;
  }
  
  .content-with-sidebar.sidebar-left .sidebar {
    order: -1;
  }
}

/* Widget Areas */
.before-content-widget,
.after-content-widget {
  margin: 2rem 0;
}

/* Footer Widgets Grid */
.footer-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-widgets.columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-widgets.columns-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-widgets.columns-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-widget {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.footer-widget .widget-title {
  color: var(--primary-color);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-widget a {
  color: var(--footer-text);
}

.footer-widget a:hover {
  color: var(--primary-color);
}
