/* Custom styles for TM Aula d'estudi */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F7F3EF;
}
::-webkit-scrollbar-thumb {
  background: #1a1a1a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #E8655B;
}

/* Selection color */
::selection {
  background: #E8655B;
  color: white;
}

/* Base styles */
body {
  font-family: 'Inter', sans-serif;
  background: #F7F3EF;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

.serif-italic {
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

/* Editorial line accent */
.editorial-line {
  width: 80px;
  height: 3px;
  background: #E8655B;
  display: block;
}

/* Hero asymmetric layout */
.hero-asymmetric {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.hero-text {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 6rem 5rem;
  justify-content: center;
}

.hero-image-side {
  position: relative;
  overflow: hidden;
}

.hero-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.85), transparent);
}

/* Navigation */
.nav-scrolled {
  background: rgba(247, 243, 239, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* Service cards */
.service-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(26, 26, 26, 0.12);
}

.service-icon {
  transition: all 0.3s ease;
}

/* Stats */
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: #E8655B;
}

/* Testimonial cards */
.testimonial-card {
  position: relative;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.testimonial-card::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  color: #E8655B;
  opacity: 0.15;
  position: absolute;
  top: -10px;
  left: 20px;
  line-height: 1;
}

/* CTA section */
.cta-section {
  background: #1a1a1a;
  color: white;
}

.cta-section h2 {
  color: white;
}

.cta-section .serif-italic {
  color: #f08078;
}

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

/* Form inputs */
.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1.5px solid #D4C5B5;
  background: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
  outline: none;
  border-radius: 0;
  color: #1a1a1a;
}

.form-input:focus {
  border-color: #E8655B;
}

.form-input::placeholder {
  color: #aaa;
}

/* Buttons */
.btn-primary {
  background: #E8655B;
  color: white;
  padding: 1rem 2.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  border: 2px solid #E8655B;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover {
  background: transparent;
  color: #E8655B;
}

.btn-outline {
  background: transparent;
  color: #1a1a1a;
  padding: 1rem 2.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  border: 2px solid #1a1a1a;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  display: inline-block;
  text-decoration: none;
}

.btn-outline:hover {
  background: #1a1a1a;
  color: white;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hamburger */
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Map embed */
.map-embed {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
  filter: grayscale(0.3);
}

/* Divider accent */
.divider-accent {
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #E8655B, #f08078, #E8655B);
}

/* Mobile link */
.mobile-link {
  font-size: 1.5rem;
  text-decoration: none;
  color: #1a1a1a;
}

/* Responsive */
@media (max-width: 1023px) {
  .hero-asymmetric {
    grid-template-columns: 1fr;
  }

  .hero-text {
    padding: 4rem 2rem;
    min-height: auto;
  }

  .hero-image-side {
    height: 50vh;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 639px) {
  .hero-text {
    padding: 3rem 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* Print styles */
@media print {
  .mobile-menu,
  .hamburger {
    display: none;
  }
}
