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

:root {
  --bg-app: #f4f7f9;
  --bg-sidebar: #ffffff;
  --primary: #4cc9f0;
  --primary-dark: #3a0ca3;
  --accent: #f72585;
  --text-main: #2b2d42;
  --text-secondary: #8d99ae;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: 10px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 25px rgba(58, 12, 163, 0.15);
  --font-body: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-app);
  color: var(--text-main);
  /* Scroll normally now */
  min-height: 100vh;
  overflow-y: auto;
  line-height: 1.6;
}

/* --- Header --- */
.main-header {
  background: white;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.main-header .header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-header .header-left .logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(45deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.lang-option {
  cursor: pointer;
  transition: color 0.2s;
}

.lang-option:hover,
.lang-option.active {
  color: var(--primary-dark);
}

.lang-switch .separator {
  opacity: 0.5;
  font-weight: 300;
}

/* Sidebar Search */
.sidebar-search {
  margin-bottom: 20px;
  position: relative;
}

.sidebar-search input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  background: #f8f9fa;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
}

.sidebar-search input:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.15);
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  align-items: center;
}

.top-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.top-nav a:hover {
  color: var(--primary-dark);
}

.btn-contact {
  padding: 8px 20px;
  background: var(--primary-dark);
  color: white !important;
  border-radius: 20px;
  transition: transform 0.2s;
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(58, 12, 163, 0.3);
}

/* --- Hero Carousel --- */
.hero-carousel {
  width: 100%;
  height: 450px;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: inset 0 -20px 40px rgba(0, 0, 0, 0.1);
  background: #333;
  /* Fallback */
}

.carousel-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 20px;
  background-size: cover !important;
  background-position: center !important;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  font-weight: 800;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.8s ease-out;
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.8s ease-out 0.2s backwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.7);
}

.indicator.active {
  background: white;
  transform: scale(1.2);
}

/* Responsive adjustment */
@media (max-width: 900px) {
  .hero-carousel {
    height: 300px;
  }
}

/* --- Content Wrapper (Sidebar + Main) --- */
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: 0 20px 60px 20px;
}

/* --- Sidebar --- */
.sidebar {
  width: 280px;
  min-width: 280px;
  /* Sticky behavior */
  position: sticky;
  top: 90px;
  /* Header height + spacing */
  height: calc(100vh - 120px);
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 25px;
  overflow-y: auto;
}

.sidebar-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover {
  background: #f1f3f5;
  color: var(--primary-dark);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: white;
  box-shadow: 0 5px 15px rgba(58, 12, 163, 0.2);
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  min-width: 0;
  /* Fix flex overflow issues */
}

/* Content Sections */
.content-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: 30px;
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  border-left: 5px solid var(--accent);
}

.section-title {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 5px;
}

.section-subtitle {
  color: var(--text-secondary);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

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

.card-img-container {
  height: 180px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.card:hover img {
  transform: scale(1.1);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-top: auto;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Limit to 3 lines for consistency */
}

/* Fat Footer */
.fat-footer {
  background: #1a1b26;
  color: #a9b1d6;
  margin-top: auto;
  font-family: var(--font-body);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-column h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-column p {
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: #a9b1d6;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
}

.footer-bottom {
  background: #15161e;
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Footer & Header Search */
@media (max-width: 900px) {
  .main-header {
    height: auto;
    flex-wrap: wrap;
    padding: 15px 20px;
    gap: 15px;
  }

  .hero-carousel {
    height: 300px;
  }

  .content-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    margin-bottom: 30px;
  }

  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 15px;
  }

  .nav-item {
    white-space: nowrap;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer-column {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
  }

  .footer-column:last-child {
    border-bottom: none;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* --- Single Column Layout (for About/Contact) --- */
.single-column-wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  min-height: calc(100vh - 400px);
  /* Fill space between header/footer roughly */
}

.page-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
  animation: fadeIn 0.4s ease forwards;
}

.page-title {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-weight: 800;
  position: relative;
  padding-bottom: 15px;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.page-content {
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.8;
}

.page-content p {
  margin-bottom: 20px;
}

/* Quote Style */
.sabato-quote {
  background: #f8f9fa;
  border-left: 4px solid var(--primary);
  padding: 30px 40px;
  margin: 30px 0;
  font-style: italic;
  color: #555;
  border-radius: 0 10px 10px 0;
  position: relative;
}

.sabato-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: serif;
}

/* Contact Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 30px;
}

@media(min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    /* align-items: stretch; default */
  }
}



.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.contact-item:hover {
  background: white;
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  transform: translateX(5px);
}

.contact-icon {
  width: 45px;
  height: 45px;
  background: var(--primary-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text h4 {
  color: var(--text-main);
  margin-bottom: 2px;
  font-size: 0.95rem;
  font-weight: 700;
}

.contact-text a,
.contact-text span {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}

.contact-text a:hover {
  color: var(--primary);
}