/* ============================================
   EDITORA BARBÁRIE - Design System
   Premium Publishing House Website
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
  /* Colors */
  --color-primary: #8b1538;
  --color-primary-dark: #6b0f2a;
  --color-primary-light: #a91d45;
  --color-secondary: #1a1a2e;
  --color-accent: #d4af37;
  --color-accent-light: #e8c547;

  /* Neutrals */
  --color-bg-dark: #0d0d0d;
  --color-bg-light: #f5f5f5;
  --color-text-light: #ffffff;
  --color-text-dark: #1a1a1a;
  --color-text-muted: #888888;

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  --gradient-gold: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    #b8941e 100%
  );
  --gradient-dark: linear-gradient(
    180deg,
    var(--color-bg-dark) 0%,
    var(--color-secondary) 100%
  );

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;
  --font-accent: "Cormorant Garamond", serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-xxl: 10rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 40px rgba(212, 175, 55, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-light);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) 0;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  transition: all var(--transition-normal);
}

.header.scrolled {
  padding: var(--space-xs) 0;
  background: rgba(13, 13, 13, 0.98);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  width: 220px;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-bg-dark);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text-light);
}

.logo-text span {
  color: var(--color-accent);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav-menu a {
  color: var(--color-text-light);
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--gradient-gold);
  color: var(--color-bg-dark) !important;
  padding: var(--space-xs) var(--space-md) !important;
  border-radius: var(--radius-md);
  font-weight: 600 !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--color-text-light);
  transition: var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.9) 0%,
    rgba(139, 21, 56, 0.4) 50%,
    rgba(13, 13, 13, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease;
}

.hero-title {
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-title span {
  color: var(--color-accent);
  position: relative;
}

.hero-title span::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-accent);
  opacity: 0.3;
  border-radius: 2px;
}

.hero-description {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-bg-dark);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  color: var(--color-bg-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-light);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.8s ease 0.8s backwards;
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-xxl) 0;
}

.section-dark {
  background: var(--color-bg-dark);
}

.section-gradient {
  background: var(--gradient-dark);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.section-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.service-icon i {
  font-size: 1.5rem;
  color: var(--color-bg-dark);
}

.service-title {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.service-description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.service-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-accent);
}

.service-price span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.service-time {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Featured Service */
.service-card.featured {
  border-color: var(--color-accent);
  background: rgba(212, 175, 55, 0.05);
}

.service-card.featured::before {
  transform: scaleX(1);
}

.featured-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--color-accent);
  color: var(--color-bg-dark);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   ABOUT / EDITOR SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-image::before {
  content: "";
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  right: calc(var(--space-md) * -1);
  bottom: calc(var(--space-md) * -1);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.about-content h2 {
  margin-bottom: var(--space-md);
}

.about-content h2 span {
  color: var(--color-accent);
}

.about-text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.about-list {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.about-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  color: rgba(255, 255, 255, 0.8);
}

.about-list li i {
  color: var(--color-accent);
}

.about-credentials {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.credential {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.credential i {
  color: var(--color-accent);
}

.credential span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================
   PORTFOLIO / BOOKS SECTION
   ============================================ */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.book-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.book-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.book-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.book-card:hover .book-cover img {
  transform: scale(1.05);
}

.book-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.book-card:hover .book-overlay {
  transform: translateY(0);
}

.book-overlay a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-accent);
  font-weight: 500;
}

.book-info {
  padding: var(--space-md);
}

.book-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.book-author {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.book-price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-accent);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/services-bg.png") center/cover;
  opacity: 0.1;
}

.cta-content {
  position: relative;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  margin-bottom: var(--space-md);
}

.cta-text {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-secondary);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-brand p {
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-accent);
  color: var(--color-bg-dark);
}

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom a {
  color: var(--color-accent);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    transform: translateY(-150%);
    opacity: 0;
    transition: all var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;
  }

  .hero-content {
    padding: var(--space-md);
  }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  text-decoration: none;
}

.whatsapp-float-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #25D366;
  color: white;
  padding: 14px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
}

.whatsapp-float-btn:hover {
  background: #20BA5A;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
  color: white;
}

.whatsapp-float-btn i {
  font-size: 1.5rem;
}

.whatsapp-float-btn .whatsapp-text {
  display: inline;
}

/* Pulse animation */
.whatsapp-float::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: #25D366;
  border-radius: 50px;
  animation: whatsapp-pulse 2s infinite;
  z-index: -1;
}

@keyframes whatsapp-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.2;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

/* Mobile: show only icon */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-float-btn {
    padding: 16px;
    border-radius: 50%;
  }
  
  .whatsapp-float-btn .whatsapp-text {
    display: none;
  }
  
  .whatsapp-float-btn i {
    font-size: 1.8rem;
  }
}
