:root {
  --accent: #d97706;
  --accent-soft: #f59e0b;
  --ink: #f5f2ea;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Figtree', sans-serif !important;
  overflow-x: hidden;
  background-color: #1a1a1a;
  color: #f1f1f1;
}

h1, h2, h3 {
  font-family: 'Figtree', sans-serif;
  letter-spacing: 0.01em;
}

button, a, input, select, textarea {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection {
  background: var(--accent);
  color: #000;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.sidebar-open {
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.sidebar.open {
  transform: translateX(0);
}
#sidebar-overlay {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
#sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}
.sidebar-nav-link {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: #fff;
  padding: 1rem 2rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  transition: color 0.3s ease;
}
.sidebar-nav-link:hover,
.sidebar-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-10px);
}
.sidebar-nav-link:hover {
  color: #ccc;
}
.sidebar-nav-link.active {
  color: #ffffff;
}
.sidebar-nav-link i {
  margin-right: 12px;
  font-size: 1.8rem;
  width: 24px;
  text-align: center;
}

/* Selección de idioma */
.language-selector {
  border-radius: 20px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
}
.language-btn {
  padding: 6px 12px;
  border-radius: 16px;
  font-weight: 600;
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.language-btn.active {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.language-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Botones */
.icon-btn,
.portfolio-filter-btn {
  transition: all 0.3s ease;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}
.btn-glow {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}
.btn-glow:hover {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}
.portfolio-filter-btn {
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
}
.portfolio-filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.portfolio-filter-btn.active,
.portfolio-filter-btn:hover {
  background: #fff !important;
  color: #000 !important;
}
.portfolio-filter-btn.active::after,
.portfolio-filter-btn:hover::after {
  transform: translateX(0);
}
.open-modal {
  transition: all 0.3s ease;
  color: #fff !important;
}
.open-modal:hover {
  background-color: #fff !important;
  color: #000 !important;
}

/* Botón WhatsApp */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease;
}
.whatsapp-button:hover {
  transform: scale(1.1);
}
.whatsapp-button img {
  width: 30px;
  height: 30px;
  filter: brightness(0) invert(1);
}

/* Videos */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tarjetas de proyectos */
.project-card {
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
  border: 1px solid #333;
  background-color: #111;
}
.project-card.hidden {
  display: none;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}
.project-image {
  transition: transform 0.5s ease;
}
.project-card:hover .project-image {
  transform: scale(1.05);
}

/* Fondo */
.peru-bg {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/perumachupichu.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-content {
  width: 80%;
  max-width: 900px;
  position: relative;
}
.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
}

/* Efectos extra */
.shuffle-animation {
  animation: shuffleEffect 0.8s ease;
}
@keyframes shuffleEffect {
  0% { opacity: 0; transform: translateY(20px) rotate(5deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}
.light-effect {
  position: relative;
}
.light-effect::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.light-effect:hover::before {
  opacity: 1;
}

/* Mejoras de diseño */
.hero-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 24px;
}
.subpage-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.86));
}
.accent-title {
  position: relative;
  padding-bottom: 18px;
}
.accent-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}
.accent-title.left::after {
  left: 0;
  transform: none;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.btn-gold {
  background: var(--accent) !important;
  color: #000 !important;
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.18);
  transition: all 0.3s ease;
}
.btn-gold:hover {
  background: var(--accent-soft) !important;
  color: #000 !important;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.28);
  transform: translateY(-3px);
}
.logos-grayscale img {
  transition: all 0.3s ease;
}
.video-loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.video-loading-spinner::after {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.video-loading-spinner.hidden {
  display: none;
}
.project-card {
  cursor: pointer;
}