/**
 * Section Specific Styles
 * 
 * @package DigiHub
 */

/* Hero Section */
.hero-section {
  min-height: 100vh;
  padding-top: 100px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-primary);
  background-image: var(--gradient-hero);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--glass-border);
}

.section-subtitle {
  color: var(--primary);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  display: block;
}

/* Page & Archive Headers */
.page-header,
.archive-header {
  padding-bottom: var(--space-4xl);
  margin-bottom: var(--space-4xl);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}

.page-header .heading-1,
.archive-header .heading-1 {
  margin-bottom: var(--space-md);
  font-family: var(--font-secondary);
}

.archive-description {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 700px;
  margin: 0 auto;
}

.archive-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.archive-author .avatar {
  border: 4px solid var(--bg-primary);
  box-shadow: var(--shadow-lg);
}

.hero-title {
  margin-bottom: var(--space-lg);
}

.hero-title span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  margin-bottom: var(--space-xl);
  max-width: 540px;
}

.hero-mockup {
  position: relative;
  z-index: 1;
}

.hero-mockup__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.hero-mockup__item {
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  animation: float 6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.hero-mockup__icon {
  width: 64px;
  height: 64px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.hero-mockup__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
}

/* Stats Section */
.stats-grid {
  text-align: center;
}

.stat-item {
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  transition: all var(--dur-normal) var(--ease-smooth);
  border: 1px solid transparent;
}

.stat-item:hover {
  background: var(--bg-primary);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--glass-border);
  transform: translateY(-5px);
}

.stat-item__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-normal);
}

.stat-item:hover .stat-item__icon {
  background: var(--gradient-primary);
  color: #fff;
  transform: scale(1.1) rotate(5deg);
}

.stat-item__number {
  font-size: var(--text-3xl);
  font-weight: 800;
  font-family: var(--font-secondary);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: flex;
  justify-content: center;
  align-items: baseline;
}

.stat-suffix {
  font-size: 0.6em;
  color: var(--primary);
  margin-left: 2px;
}

.stat-item__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Apps Section */
.apps-grid {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.app-card {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--dur-normal) var(--ease-smooth);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-light);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--dur-normal);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card__icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 2.5rem;
  transition: transform var(--dur-normal);
}

.app-card:hover .app-card__icon {
  transform: scale(1.1) rotate(5deg);
}

.app-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.app-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: var(--space-md);
  align-self: flex-start;
}

.app-card__name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-secondary);
}

.app-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
  flex-grow: 1;
}

.app-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.app-card__meta svg {
  color: var(--primary);
}

.app-card__cta {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--bg-alt);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  transition: all var(--dur-normal);
}

.app-card:hover .app-card__cta {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.app-card__cta svg {
  transition: transform var(--dur-normal);
}

.app-card__cta:hover svg {
  transform: scale(1.2);
}

/* CTA Section */
.cta-card {
  background: var(--gradient-primary);
  color: #fff;
  padding: var(--space-4xl);
  border-radius: var(--radius-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.cta-card .heading-2 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.cta-card .text-body-lg {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2xl);
}

/* Newsletter Section */
.newsletter-section {
  padding: var(--space-section) 0;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.newsletter-card {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-4xl) var(--space-2xl);
  border-radius: var(--radius-3xl);
  background: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

[data-theme="dark"] .newsletter-card {
  background: var(--bg-dark);
}

.newsletter-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: var(--gradient-primary);
  filter: blur(100px);
  opacity: 0.1;
  pointer-events: none;
}

.newsletter-title {
  margin-bottom: var(--space-md);
  font-family: var(--font-secondary);
}

.newsletter-description {
  margin-bottom: var(--space-2xl);
  color: var(--text-secondary);
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form__group {
  display: flex;
  gap: var(--space-sm);
  background: var(--bg-alt);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  transition: all var(--dur-normal);
}

.newsletter-form__group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: var(--bg-primary);
}

.newsletter-form__input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
}

.newsletter-form__submit {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  white-space: nowrap;
}

.newsletter-form__privacy {
  margin-top: var(--space-md);
  color: var(--text-muted);
}

.newsletter-form__privacy a {
  color: var(--primary);
  text-decoration: underline;
}

/* Response message */
.newsletter-form__response {
  margin-top: var(--space-md);
}

.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 640px) {
  .newsletter-form__group {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: var(--space-md);
  }
  
  .newsletter-form__input {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
  }
}

/* ── ABOUT SECTION ────────────────────────────────── */
.about-section {
  position: relative;
  overflow: hidden;
  padding: var(--space-section) 0;
}

.about-visual {
  position: relative;
  z-index: 1;
}

.about-visual__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: var(--gradient-primary);
  opacity: 0.15;
  filter: blur(80px);
  z-index: -1;
  border-radius: 100%;
}

.about-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  display: block;
}

.about-badge {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.about-badge__icon {
  font-size: 1.5rem;
}

.about-badge__text {
  font-weight: 700;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.about-title {
  margin-bottom: var(--space-lg);
  font-family: var(--font-secondary);
}

.about-text {
  margin-bottom: var(--space-2xl);
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-features-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-feature-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  transition: all var(--dur-normal) var(--ease-smooth);
}

.about-feature-card:hover {
  transform: translateX(10px);
  background: var(--bg-primary);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.about-feature-card__icon {
  width: 56px;
  height: 56px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.about-feature-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.about-feature-card__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .about-badge {
    bottom: var(--space-md);
    right: var(--space-md);
    padding: 0.75rem 1rem;
  }
  
  .about-feature-card:hover {
    transform: translateY(-5px);
  }
}

/* ── TEMPLATES SECTION ───────────────────────────── */
.templates-cta {
  margin-top: var(--space-4xl);
  display: flex;
  justify-content: center;
}

/* ── BLOG SECTION ────────────────────────────────── */
.blog-cta {
  margin-top: var(--space-4xl);
  display: flex;
  justify-content: center;
}

/* Global Section CTA spacing */
.templates-cta,
.blog-cta,
.services-cta {
  margin-top: var(--space-6xl); /* Increased to 10rem to ensure plenty of "air" */
}

/* ── ERROR 404 PAGE ─────────────────────────────── */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-4xl) 0;
}

.error-page::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: var(--gradient-primary);
  filter: blur(150px);
  opacity: 0.1;
  z-index: -1;
  border-radius: 100%;
}

.error-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--space-xl);
  font-family: var(--font-secondary);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: -0.05em;
}

.error-code span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.error-code__zero {
  position: relative;
  animation: glitch-404 3s infinite;
}

@keyframes glitch-404 {
  0% { transform: translate(0); text-shadow: none; }
  2% { transform: translate(-2px, 2px); text-shadow: 2px 0 var(--primary), -2px 0 var(--accent); }
  4% { transform: translate(2px, -2px); text-shadow: -2px 0 var(--primary), 2px 0 var(--accent); }
  6% { transform: translate(0); text-shadow: none; }
  100% { transform: translate(0); text-shadow: none; }
}

.error-title {
  margin-bottom: var(--space-lg);
}

.error-description {
  margin-bottom: var(--space-2xl);
  color: var(--text-secondary);
}

.error-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-4xl);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-4xl);
}

.error-search {
  max-width: 500px;
  margin: 0 auto var(--space-4xl);
}

.error-search .search-form__wrapper {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-alt);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.error-search .search-form__input {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  width: 100%;
  color: var(--text-primary);
  font-size: var(--text-base);
}

.error-search .search-form__input:focus {
  outline: none;
}

.error-search .search-form__submit {
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.5rem;
  min-width: 60px;
}

.error-suggestions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.error-suggestion {
  background: var(--bg-alt);
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  text-decoration: none;
  border: 1px solid var(--glass-border);
  transition: all var(--dur-normal);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.error-suggestion:hover {
  transform: translateY(-5px);
  background: var(--bg-primary);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.error-suggestion__icon {
  font-size: 2rem;
}

.error-suggestion__text {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* ── GENERIC PAGE ────────────────────────────────── */
.page-content {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.page-header {
  margin-bottom: var(--space-4xl);
  text-align: center;
}

.page-title {
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
  font-family: var(--font-secondary);
  font-weight: 800;
}

.page-excerpt {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.page-thumbnail {
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
}

.page-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  color: var(--text-primary);
  line-height: 1.8;
  font-size: var(--text-lg);
}

.entry-content p {
  margin-bottom: var(--space-lg);
}

.entry-content h2, 
.entry-content h3 {
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
  font-family: var(--font-secondary);
}

.entry-content ul, 
.entry-content ol {
  margin-bottom: var(--space-lg);
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content blockquote {
  margin: var(--space-2xl) 0;
  padding: var(--space-xl);
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .error-actions {
    flex-direction: column;
  }
}

/* ── BREADCRUMBS ────────────────────────────────── */
.breadcrumbs {
  margin-bottom: var(--space-xl);
}

.breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumbs__item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast);
}

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

.breadcrumbs__sep {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  opacity: 0.5;
}

.breadcrumbs__item--current {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* ── RECURSOS (CPT) STYLES ───────────────────────── */
.resource-card-modern {
  transition: all var(--dur-normal) var(--ease-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.resource-card-modern:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
  border-color: var(--purple-500);
}

.resource-card__preview img {
  transform: scale(1);
  transition: transform 0.8s var(--ease-smooth);
}

.resource-card-modern:hover .resource-card__preview img {
  transform: scale(1.1);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
}

.orb-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.orb-2 { width: 300px; height: 300px; background: var(--accent); bottom: 100px; right: -50px; }
.orb-3 { width: 500px; height: 500px; background: #8b5cf6; top: 20%; right: 10%; }

.prose-invert h2, .prose-invert h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.post-hero {
  background: var(--bg-primary);
  padding-top: calc(var(--header-height, 80px) + 3rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--white-05);
}

.post-hero__badges {
  margin-bottom: 1.5rem;
}

.resource-hero-image,
.app-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 1;
  width: 100%;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--glass-border);
  margin-bottom: 2.5rem;
}

.resource-hero-image img,
.app-hero-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
}

.app-icon {
  position: relative;
  transition: all var(--dur-medium) var(--ease-smooth);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5), 0 18px 36px -18px rgba(0, 0, 0, 0.5);
}

.app-icon:hover {
  transform: translateY(-8px) scale(1.02);
}

.post-hero.bg-dark {
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.content-wrapper {
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .post-hero {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 3rem;
  }
}

.screenshot-item {
  transition: all var(--dur-medium) var(--ease-smooth);
}

.store-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  color: white;
  text-decoration: none;
  transition: all var(--dur-medium) var(--ease-smooth);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.store-google:hover {
  border-color: #4285f4;
  box-shadow: 0 0 20px rgba(66, 133, 244, 0.3);
  transform: translateY(-3px) scale(1.02);
}

.store-huawei:hover {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-3px) scale(1.02);
}

.store-button svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.store-button .store-text-small {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  display: block;
  margin-bottom: 2px;
}

.store-button .store-text-main {
  font-size: 14px;
  font-weight: 700;
  display: block;
  line-height: 1;
}

