/* ==========================================================================
   Apanhei do Excel - v2 (UI Components)
   Componentes de Interface: Cards de Apps, Código VBA, Vídeos, Depoimentos, Contato e Modais
   ========================================================================== */

/* 1. CARDS DE APLICATIVOS (GRID DE PROGRAMAS) */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(16, 185, 129, 0.15);
}

.app-card-featured {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.app-badge-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app-card-media {
  position: relative;
  background: #0d131f;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.app-card:hover .app-card-media img {
  transform: scale(1.05);
}

.app-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.app-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.app-title-group h3 {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.app-category {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
}

.app-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.app-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.app-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.app-feature-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-green-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge-playstore-link img {
  height: 38px;
  width: auto;
}

/* 2. CURSO VBA & TREINAMENTOS */
.course-card-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%), var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.course-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  transition: border-color var(--transition-fast);
}

.module-card:hover {
  border-color: var(--accent-green);
}

.module-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.module-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.module-info p {
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .course-card-hero {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

/* 3. GUIA RÁPIDO DE CÓDIGOS VBA (SNIPPETS COM CÓPIA 1-CLIQUE) */
.vba-guide-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 2.5rem;
}

.vba-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: space-between;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.vba-search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  min-width: 250px;
  transition: border-color var(--transition-fast);
}

.vba-search-input:focus {
  border-color: var(--accent-green);
}

.vba-snippets-grid,
.git-snippets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.vba-snippet-card,
.git-snippet-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-fast);
}

.vba-snippet-card:hover,
.git-snippet-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.snippet-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.snippet-tag {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.snippet-code-box {
  background: #070a10;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #a7f3d0;
  overflow-x: auto;
  position: relative;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.snippet-code-box code {
  font-family: inherit;
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
}

.snippet-copy-btn {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.snippet-copy-btn:hover {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}

/* 4. VÍDEOS & PLAYLISTS DO YOUTUBE */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.video-thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #080d1a;
  overflow: hidden;
  cursor: pointer;
}

.video-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.video-card:hover .video-thumb-img {
  transform: scale(1.05);
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: rgba(239, 68, 68, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.video-thumb-wrapper:hover .video-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: #dc2626;
}

.video-play-icon svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}

.video-body {
  padding: 1.25rem;
}

.video-body h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.video-body p {
  font-size: 0.9rem;
}

/* 5. DEPOIMENTOS */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  color: var(--accent-amber);
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.author-meta h5 {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.author-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 6. CARDS DE CONTATO DIRETO */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
  box-shadow: var(--shadow-lg), 0 0 20px var(--accent-green-glow);
}

.contact-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #fff;
  font-size: 1.5rem;
}

.icon-wa { background: #25D366; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35); }
.icon-mail { background: #ea4335; box-shadow: 0 4px 15px rgba(234, 67, 53, 0.35); }
.icon-play { background: #0284c7; box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35); }
.icon-phone { background: #10b981; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35); }

.contact-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--accent-green-light);
  font-weight: 500;
}

/* 7. MODAL DE GALERIA E VÍDEO */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: #ef4444;
}

.modal-video-container {
  position: relative;
  padding-top: 56.25%;
  height: 0;
}

.modal-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-subtle);
  gap: 1rem;
}

.modal-footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .modal-footer-bar {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* 8. TOAST NOTIFICATION */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent-green);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* 9. BOTÃO VOLTAR AO TOPO */
.btn-back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
}

.btn-back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: var(--accent-green);
  color: #fff;
  border-color: var(--accent-green);
}

