/* ============================================================
    TARDISTUDY V2 - ESTILOS PRINCIPAIS
    Design moderno, responsivo e acessível
============================================================ */

/* --- VARIÁVEIS CSS --- */
:root {
  --primary: #2e7d32;
  --primary-light: #66bb6a;
  --primary-dark: #1b5e20;
  --accent: #81c784;
  --mint: #a5d6a7;

  --bg-primary: rgba(255, 255, 255, 0.95);
  --bg-secondary: rgba(248, 255, 248, 0.9);
  --bg-card: rgba(255, 255, 255, 0.85);

  --text-primary: #2e3440;
  --text-secondary: #5e6c7e;
  --text-muted: #8faab5;
  --text-white: #ffffff;

  --radius: 16px;
  --radius-small: 8px;
  --shadow-soft: 0 4px 20px rgba(46, 125, 50, 0.1);
  --shadow-medium: 0 8px 30px rgba(46, 125, 50, 0.15);
  --shadow-strong: 0 12px 40px rgba(46, 125, 50, 0.2);
}

/* --- RESET E BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* --- ACESSIBILIDADE (FOCO + SKIP LINK) --- */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-medium);
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  min-height: 100vh;
}

/* --- REDUZIR MOVIMENTO --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================================
    NAVBAR
============================================================ */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(129, 199, 132, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-soft);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-img {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.desktop-nav {
  display: flex;
  gap: 8px;
}

.desktop-nav .nav-item {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.desktop-nav .nav-item:hover {
  background: rgba(129, 199, 132, 0.15);
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.desktop-nav .nav-item.active {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  color: white;
  box-shadow: var(--shadow-soft);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu Mobile */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-content {
  padding: 24px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-dark);
  cursor: pointer;
  padding: 8px;
  margin-bottom: 32px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mobile-nav-item:hover {
  background: rgba(129, 199, 132, 0.15);
  transform: translateX(5px);
}

.mobile-nav-item i {
  font-size: 1.2rem;
  color: var(--primary);
  width: 24px;
}

/* ============================================================
    HERO SECTION
============================================================ */
.hero-section {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=2000&q=80")
    center/cover;
  opacity: 0.15;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 16px;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

/* ============================================================
    MENU GRID (CARDS)
============================================================ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.menu-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: var(--text-primary);
  border: 2px solid rgba(129, 199, 132, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(129, 199, 132, 0.1) 0%,
    rgba(165, 214, 167, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.menu-card:hover::before {
  opacity: 1;
}

.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: var(--primary);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 0.4s ease;
}

.menu-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card-icon i {
  font-size: 2rem;
  color: white;
}

.menu-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.menu-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--primary);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.menu-card:hover .card-arrow {
  transform: translateX(5px);
}

/* ============================================================
    ESTATÍSTICAS
============================================================ */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  border: 2px solid rgba(129, 199, 132, 0.2);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ============================================================
    FEATURES SECTION
============================================================ */
.features-section {
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.5);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.feature-box {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.feature-box h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-box p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
    FOOTER
============================================================ */
footer {
  background: rgba(46, 125, 50, 0.95);
  color: white;
  padding: 32px 20px;
  text-align: center;
}

.footer-content p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.footer-credit {
  opacity: 0.9;
  font-size: 0.9rem;
}

/* ============================================================
    BOTÃO SCROLL TO TOP
============================================================ */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

/* ============================================================
    RESPONSIVIDADE
============================================================ */

/* Tablets e iPads em modo paisagem */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar {
    padding: 16px 30px;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 3rem;
  }
}

/* Tablets em modo retrato */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .navbar {
    padding: 16px 20px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 50px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Smartphones */
@media (max-width: 480px) {
  .hero-section {
    padding: 40px 16px;
  }

  .navbar {
    padding: 12px 16px;
  }

  .logo {
    font-size: 1.2rem;
  }

  .menu-card {
    padding: 24px;
  }

  .stats-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-item {
    padding: 20px;
  }

  .mobile-nav {
    width: 100%;
  }
}

/* Dispositivos muito pequenos */
@media (max-width: 360px) {
  .navbar {
    padding: 10px 12px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo-img {
    width: 35px;
    height: 35px;
  }

  .hero-section {
    padding: 30px 12px;
  }

  .menu-card {
    padding: 20px;
  }
}

/* Telas grandes */
@media (min-width: 1440px) {
  .navbar {
    padding: 20px 60px;
  }

  .container {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Orientação paisagem em smartphones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    padding: 30px 20px;
  }

  .navbar {
    padding: 12px 20px;
  }
}
