/* =========================================================
   STUDYMATE — DESIGN CINEMATOGRÁFICO 2025
   ---------------------------------------------------------
   Paleta: Azul-claro (#60a5fa), Verde-água (#6ee7b7),
            Acento violeta (#a78bfa), Fundo #0b1220
========================================================= */

/* === VARIÁVEIS === */
:root {
  --bg-dark: #0b1220;
  --bg-card: #111a2e;
  --glass: rgba(255, 255, 255, 0.06);
  --text-light: #e8ecf5;
  --text-muted: #9da8be;
  --primary: #60a5fa;
  --secondary: #6ee7b7;
  --accent: #a78bfa;
  --radius: 18px;
  --transition: all 0.4s cubic-bezier(.4,.02,.2,1);
}

/* === RESET === */
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: var(--bg-dark);
  font-family: "Inter", sans-serif;
  color: var(--text-light);
  overflow-x: hidden;
}

/* === LOADER === */
.loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  z-index: 9999;
  transition: opacity .6s ease, visibility .6s ease;
}
.loader.hide { opacity: 0; visibility: hidden; }
.spinner {
  width: 70px;
  height: 70px;
  border: 5px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-text {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === HEADER === */
.glass-header {
  background: rgba(11, 18, 32, 0.65);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background .3s ease, box-shadow .3s ease;
}
.glass-header.scrolled {
  background: rgba(11,18,32,0.95);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.navbar-brand .brand-text {
  background: linear-gradient(135deg,var(--secondary),var(--primary),var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}
.nav-link::after {
  content:"";
  position:absolute;
  bottom:-4px;
  left:0;
  width:0;
  height:2px;
  background: linear-gradient(90deg,var(--secondary),var(--primary),var(--accent));
  transition: width .4s ease;
}
.nav-link:hover::after, .nav-link.active::after {
  width:100%;
}
.btn-primary {
  background-image: linear-gradient(135deg,var(--secondary),var(--primary),var(--accent));
  border: none;
  color: #fff;
  transition: transform .25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(96,165,250,0.35);
}

/* === HERO === */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
}
.gradient-text {
  background: linear-gradient(135deg,var(--secondary),var(--primary),var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-mascot {
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.4));
  animation: floatY 4.5s ease-in-out infinite;
}
@keyframes floatY {
  0%,100%{ transform: translateY(0);}
  50%{ transform: translateY(-12px);}
}

/* === FEATURES / CARDS === */
.glass {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.glass:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.09);
}

/* === CTA === */
.cta {
  background: radial-gradient(circle at 20% 30%, rgba(96,165,250,0.2), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(110,231,183,0.25), transparent 60%);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  color: var(--text-light);
  transition: background .4s ease;
}
.cta:hover {
  background: radial-gradient(circle at 50% 50%, rgba(110,231,183,0.15), rgba(96,165,250,0.15));
}

/* === FOOTER === */
.footer {
  background: rgba(12,18,30,0.85);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .25s ease;
}
.footer-link:hover { color: var(--primary); }
.social-link {
  color: var(--text-muted);
  font-size: 1.3rem;
  transition: transform .3s ease, color .3s ease;
}
.social-link:hover {
  color: var(--secondary);
  transform: translateY(-3px) scale(1.1);
}
.footer-logo { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); }

/* === FORMS === */
.form-control {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(96,165,250,0.25);
}
.invalid-feedback { color: #f87171; }

/* === REVEAL ANIMATIONS === */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s forwards;
}
.fade-in-up.delay-1 { animation-delay: .2s; }
.fade-in-up.delay-2 { animation-delay: .4s; }
.fade-in-up.delay-3 { animation-delay: .6s; }

@keyframes fadeUp {
  to { opacity:1; transform:translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* === FLOAT PARALLAX (MASCOT) === */
.float-parallax {
  transform: translateY(0);
  transition: transform 0.4s ease-out;
}

/* === MEDIA === */
@media (max-width: 992px) {
  .navbar-collapse {
    background: rgba(11,18,32,0.95);
    padding: 1rem;
    border-radius: 12px;
  }
  .hero {
    text-align: center;
  }
}

/* Store badges */
.store-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.store-badge img {
  height: 44px;
  width: auto;
  display: block;
  transition: transform 0.15s ease, filter 0.15s ease;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.45));
}
.store-badge:hover img {
  transform: translateY(-2px) scale(1.02);
}
@media (max-width: 480px) {
  .store-badge img { height: 40px; }
}

/* === ACCESSIBILITY & THEME TWEAKS === */
:root {
  --text-muted: #b7c3d9; /* contraste melhorado */
}
html { scroll-behavior: smooth; }
body {
  background: linear-gradient(180deg, #0b1220 0%, #0e1730 70%, #0b1220 100%);
}
.text-muted-boost { color: var(--text-muted); }

/* Headings responsive */
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.15; }

/* Mascot float animation */
@keyframes floatY { 0%{ transform: translateY(0) } 50%{ transform: translateY(-8px) } 100%{ transform: translateY(0) } }
.float-anim { animation: floatY 6s ease-in-out infinite; }

/* Parallax helper */
.float-parallax { will-change: transform; }

/* Hover states consistentes */
a, .btn, .hover-elevate {
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease, background-color .2s ease, color .2s ease;
}
a:hover { opacity: .9; }
.hover-elevate:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }

/* Back to Top */
#toTop {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  border: none; border-radius: 999px; width: 44px; height: 44px;
  background: var(--bg-card); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.4);
  display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none;
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop:hover { transform: translateY(-2px); }

/* === TESTIMONIALS SLIDER === */
.testimonials-wrapper {
  position: relative;
  overflow: hidden;
}

.testimonials-slider {
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.testimonials-track {
  transition: transform 0.6s ease;
  will-change: transform;
}

.testimonial {
  scroll-snap-align: center;
  flex: 0 0 320px;
  min-width: 320px;
  max-width: 320px;
  transition: transform 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-4px);
}

.arrow-btn {
  z-index: 5;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arrow-btn:hover {
  background: rgba(255,255,255,0.15);
}

.arrow-btn.left {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.arrow-btn.right {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .testimonial { min-width: 260px; max-width: 260px; }
}

/* === FAQ — animações e ícones === */
.accordion-item {
  border: none;
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accordion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.accordion-button {
  background: rgba(11, 18, 32, 0.6);
  color: var(--text-light);
  font-weight: 500;
  border: none;
  border-radius: 12px !important;
  padding: 1rem 1.25rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-button::after {
  content: "\f282"; /* Bootstrap icon chevron-down */
  font-family: "bootstrap-icons";
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.35s ease, color 0.35s ease;
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
  color: var(--secondary);
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg,
  rgba(110, 231, 183, 0.3),
  rgba(96, 165, 250, 0.35),
  rgba(167, 139, 250, 0.25)
);
  color: #fff;
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.accordion-body {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.2rem 1.5rem;
  transition: all 0.3s ease;
}

.accordion-button:focus {
  box-shadow: none;
}

/* === FAQ — Contacto final === */
#faq p.text-muted.mt-4.small {
  color: #ffffff !important;
  opacity: 0.85;
}

#faq p.text-muted.mt-4.small a {
  color: var(--primary) !important;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

#faq p.text-muted.mt-4.small a:hover {
  color: var(--secondary) !important;
  text-decoration: underline;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar a.active, .btn-primary:hover {
  background: linear-gradient(135deg,
    rgba(96,165,250,0.35),
    rgba(110,231,183,0.35)
  );
}