@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #FFCC00;
  --primary-hover: #E6B800;
  --dark: #1C1C1E;
  --dark-light: #2C2C2E;
  --light: #F8F9FA;
  --white: #FFFFFF;
  --whatsapp: #25D366;
  --whatsapp-hover: #1EBE5A;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  --transition: all 0.3s ease;
}

:root[data-theme="dark"] {
  --light: #121212;
  --white: #1C1C1E;
  --dark: #F9FAFB;
  --dark-light: #E5E7EB;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--light);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 1.75rem; font-weight: 600; }

p { margin-bottom: 1.5rem; }

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.highlight { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: none;
  font-family: inherit;
  font-size: 1rem;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: all 0.6s ease;
  z-index: -1;
}

.btn:hover::after {
  left: 150%;
}

.btn i {
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(4px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--dark);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--dark);
  border: 2px solid var(--dark);
}

.btn-outline:hover {
  background-color: var(--dark);
  color: var(--white);
}

/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link:hover, .nav-link.active {
  color: var(--dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section - Split Layout */
.hero {
  padding: 5rem 0 3rem 0;
  background-color: var(--white);
  color: var(--dark);
  position: relative;
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: var(--dark);
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 2rem 2rem 2rem 8rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
  transition: border-color 0.3s ease;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/4;
}

/* Sections */
.section {
  padding: 5rem 0;
}

/* Marquee */
.marquee-container {
  width: 100%;
  overflow: hidden;
  background-color: var(--primary);
  padding: 1rem 0;
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--dark);
  will-change: transform;
}

.marquee-content span {
  margin: 0 2rem;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Steps */
.step-card {
  position: relative;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  text-align: center;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.step-number {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  color: var(--dark);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

/* Cards & Grids */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: none;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Tutor Card & Filters */
.filter-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary);
  background-color: transparent;
  color: var(--dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.95rem;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary);
  color: var(--dark);
}

.tutor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.livello-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.badge-medie { background-color: #E0F2FE; color: #0284C7; }
.badge-superiori { background-color: #FFEDD5; color: #EA580C; }
.badge-entrambi { background-color: #DCFCE7; color: #16A34A; }

.tutor-img-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--dark));
  margin-bottom: 1.5rem;
}

.tutor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--white);
}

.subject-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

.tag {
  background-color: rgba(255, 204, 0, 0.2);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Pricing Section */
.pricing-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-card.popular {
  border: 2px solid var(--primary);
  transform: scale(1.05);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-5px);
}

.popular-badge {
  position: absolute;
  top: 1rem;
  right: -2rem;
  background-color: var(--primary);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 3rem;
  transform: rotate(45deg);
}

.price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--dark);
  margin: 1rem 0;
}

.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  margin: 2rem 0;
  text-align: left;
}

.pricing-features li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features i {
  color: var(--primary);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--white);
  color: var(--text-main);
}

.form-control::placeholder {
  color: #9CA3AF;
  opacity: 1;
}

[data-theme="dark"] .form-control {
  border-color: #4B5563;
}

[data-theme="dark"] .form-control::placeholder {
  color: #6B7280;
}

.whatsapp-box {
  background-color: #E8F5E9;
}

[data-theme="dark"] .whatsapp-box {
  background-color: #0b2e13 !important;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-text {
  color: #9CA3AF;
  margin-bottom: 1.5rem;
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links ul li a {
  color: #9CA3AF;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  padding: 1.5rem;
  z-index: 1000;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
  margin-bottom: 0;
}

/* Utilities */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-5 { margin-top: 2rem; }

/* Animations & Reveal */
@keyframes fadeUpIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUpIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Grid Fixes for Mobile */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem !important;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 2rem; }
  
  .section { padding: 3rem 0; }
  .card, .step-card { padding: 1.5rem; }
  
  .hero { padding: 4rem 0; }
  .hero h1 { font-size: 2.5rem; }

  /* Mobile Hero: App Immersive Style */
  .home-hero { 
    padding: 6rem 1rem 3rem 1rem !important;
    background: linear-gradient(to bottom, rgba(15,15,18,0.7) 0%, rgba(15,15,18,0.99) 100%), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
  }
  
  .home-hero .hero-layout { grid-template-columns: 1fr; text-align: left; margin: 0; padding: 0; }
  
  .home-hero h1 { 
    color: #ffffff !important;
    line-height: 1.1;
    margin-bottom: 1rem;
  }
  
  .home-hero h1 .highlight { color: var(--primary) !important; }
  
  .home-hero .hero-desc {
    color: #ffffff !important;
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }
  
  .home-hero .hero-desc-strong { color: #ffffff !important; font-weight: 700; }
  
  .desktop-only { display: none !important; }
  
  .home-hero .hero-content { margin: 0; width: 100%; }
  
  .home-hero .hero-image-wrapper { display: none; }
  
  .home-hero .d-flex { 
    flex-direction: row !important; 
    flex-wrap: nowrap !important;
    width: 100%; 
    gap: 0.5rem !important;
  }
  
  .home-hero .d-flex .btn {
    width: 50%;
    padding: 0.8rem 0.5rem;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .home-hero .d-flex .btn-outline {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    color: #ffffff !important;
  }

  /* General mobile utility */
  .d-flex:not(.hero .d-flex) { 
    flex-direction: column !important; 
    width: 100%; 
  }
  .d-flex:not(.hero .d-flex) .btn {
    width: 100%;
  }
  
  .pricing-card.popular {
    transform: none;
  }
  
  .pricing-card.popular:hover {
    transform: translateY(-5px);
  }
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}
[data-theme="dark"] .faq-item { border-color: rgba(255,255,255,0.1); }

.faq-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-btn i {
  transition: transform 0.3s ease;
  color: var(--primary);
}

.faq-btn.active i {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-content p {
  padding-bottom: 1.5rem;
  color: var(--text-muted);
  margin: 0;
}

/* Reviews */
.review-card {
  padding: 2.5rem;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  text-align: left;
}
.stars { color: var(--primary); margin-bottom: 1rem; }
.review-text { font-style: italic; margin-bottom: 1.5rem; color: var(--text-muted); }
.review-author { font-weight: 700; color: var(--dark); }

/* Dark Mode Hero Fixes */
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero h2,
[data-theme="dark"] .hero h3,
[data-theme="dark"] .hero h4,
[data-theme="dark"] .hero p,
[data-theme="dark"] .hero .hero-desc,
[data-theme="dark"] .home-hero h1,
[data-theme="dark"] .home-hero p {
  color: #ffffff !important;
}

[data-theme="dark"] .hero strong,
[data-theme="dark"] .hero .hero-desc-strong {
  color: #ffffff !important;
}

[data-theme="dark"] .hero .btn-outline,
[data-theme="dark"] .home-hero .btn-outline {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}
