/* --- HOME PAGE HERO FIX --- */
/* Identificăm pagina Home prin prezența secțiunii #profesori-preview */
body:has(#profesori-preview) section:first-of-type {
  background-color: transparent;
  box-shadow: none;
  border: none;
  min-height: calc(100vh - 85px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  body:has(#profesori-preview) section:first-of-type,
  .hero-online {
    min-height: 100dvh;
  }
}

/* Index Page Specifics */
#despre {
  scroll-margin-top: 85px;
}

/* --- COURSES PAGE REDESIGN --- */
.courses-top-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
  background-color: var(--white);
  padding: 2rem;
  border-radius: 24px;
  border: 2px solid rgba(26, 74, 122, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.courses-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), #2c5c8c);
  color: var(--white);
  border-radius: 12px;
  margin-bottom: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  border: none !important; /* Override base section border */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.courses-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at top right,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  pointer-events: none;
}

.courses-hero h2 {
  color: var(--accent-color);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.courses-hero p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  max-width: 850px;
  margin: 0 auto;
}

.courses-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.course-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.course-image-wrapper {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.course-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-image-wrapper img {
  transform: scale(1.08);
}

.course-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-content h3 {
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
}

.course-content p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

@media (max-width: 1100px) {
  .courses-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .courses-hero {
    padding: 2.5rem 1.5rem;
  }
  .courses-hero h2 {
    font-size: 1.8rem;
  }
  .courses-top-section {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    text-align: center;
    justify-items: center;
    margin-left: auto;
    margin-right: auto;
  }
  .courses-grid-container {
    grid-template-columns: 1fr;
  }
  .courses-cta-banner {
    margin-left: auto;
    margin-right: auto;
  }
}

.course-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.95rem;
}

.course-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.course-card:hover .course-arrow {
  transform: translateX(5px);
}

.courses-cta-banner {
  background-color: rgba(26, 74, 122, 0.05);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border-left: 6px solid var(--accent-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.courses-cta-banner h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.courses-cta-banner p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* --- MISSING COURSE CTA --- */
.missing-course-cta {
  background-color: var(--white);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem auto;
  box-shadow: 0 8px 20px rgba(26, 74, 122, 0.1);
  border-top: 6px solid var(--accent-color);
  max-width: 900px;
}

.missing-course-cta h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.missing-course-cta p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .missing-course-cta {
    padding: 2rem 1rem;
    margin: 2rem 1.5rem;
  }
  .missing-course-cta h3 {
    font-size: 1.5rem;
  }
}

/* --- 7. SLIDESHOW PROFESORI --- */
#profesori-preview {
  text-align: center;
  box-sizing: border-box;
}

.slideshow-container-profesori {
  position: relative;
  margin: auto;
  overflow: hidden;
  min-height: 280px;
}

.slides-wrapper-profesori {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profesor-slide {
  flex: 0 0 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  text-align: center;
}

.profesor-slide.active {
  display: flex;
  animation: fadeEffect 0.5s ease-in-out;
}

.profesor-slide img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  padding: 5px;
  background-color: var(--white);
  margin: 0 auto 1rem auto;
  display: block;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.profesor-slide:hover img {
  transform: scale(1.1);
  border-color: var(--secondary-color);
  cursor: pointer;
}

@media (min-width: 769px) {
  .profesor-slide {
    flex: 0 0 33.333%;
    display: flex;
  }
}

#profesori {
  background-color: rgba(255, 255, 255, 0.9);
  max-width: 1800px;
}

article.profesor {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

article.profesor figure {
  margin: 0 0 1rem 0;
  display: inline-block;
}

article.profesor img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  padding: 5px;
  background: var(--white);
  transition: transform 0.3s ease;
}

article.profesor img:hover {
  transform: scale(1.05);
}

article.profesor h3 {
  color: var(--text-color);
  margin-top: 0.5rem;
}

#booking-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #fff;
}

/* --- PRICING PAGE STYLES --- */
.pricing-header-section {
  text-align: center;
  padding: 4rem 1rem 2rem;
  background: linear-gradient(to bottom, #ffffff, var(--bg-color));
}

.pricing-header-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.pricing-header-section p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

.pricing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Demo Banner */
.demo-offer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5298 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 4rem;
  box-shadow: 0 15px 35px rgba(26, 74, 122, 0.2);
  position: relative;
  overflow: hidden;
}

.demo-offer::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 60%
  );
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.demo-offer-content {
  position: relative;
  z-index: 1;
}

.demo-offer h2 {
  color: var(--accent-color);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.demo-price-tag {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 1rem 0;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  color: var(--white);
}

.demo-note {
  font-style: italic;
  opacity: 0.9;
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Pricing Grids */
.subject-group {
  margin-bottom: 5rem;
}

.subject-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.subject-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.package-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  position: relative;
}

.package-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.package-card.featured {
  border: 2px solid var(--accent-color);
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  background: linear-gradient(to bottom, #ffffff, #fffdf7);
}

.package-card.featured:hover {
  transform: scale(1.05) translateY(-10px);
}

.popular-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: var(--primary-color);
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pkg-name {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.pkg-price {
  color: var(--primary-color);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.pkg-price span {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-light);
}

.pkg-per-session {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2rem;
  display: block;
  background: rgba(176, 58, 46, 0.05);
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
}

.pkg-details {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem 0;
  flex-grow: 1;
}

.pkg-details li {
  padding: 0.8rem 0;
  border-bottom: 1px solid #f5f5f5;
  color: #555;
  font-size: 1.05rem;
}

.pkg-details li:last-child {
  border-bottom: none;
}

.pkg-details strong {
  color: var(--primary-color);
}

.pkg-btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  background-color: #f0f4f8;
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.package-card:hover .pkg-btn,
.package-card.featured .pkg-btn {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(26, 74, 122, 0.3);
}

.pkg-btn:hover {
  background-color: var(--secondary-color) !important;
  color: white !important;
  box-shadow: 0 5px 15px rgba(176, 58, 46, 0.4) !important;
}

/* Info Group Special Card */
.info-group-card {
  background: linear-gradient(135deg, #2c3e50, #4ca1af);
  color: white;
  max-width: 700px;
  margin: 0 auto;
  border: none;
}

.info-group-card .pkg-name,
.info-group-card .pkg-details li,
.info-group-card .pkg-price span {
  color: rgba(255, 255, 255, 0.9);
}

.info-group-card .pkg-price {
  color: white;
}

.info-group-card .pkg-per-session {
  color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
}

.info-group-card .pkg-details li {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.info-group-card .pkg-details strong {
  color: var(--accent-color);
}

.info-group-card .pkg-btn {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.info-group-card .pkg-btn:hover {
  background-color: white !important;
  color: var(--primary-color) !important;
}

@media (max-width: 768px) {
  .pricing-header-section h1 {
    font-size: 2rem;
  }
  .demo-price-tag {
    font-size: 2.5rem;
  }
  .package-card.featured {
    transform: none;
  }
  .package-card.featured:hover {
    transform: translateY(-10px);
  }
}

/* --- REDESIGN INDEX PAGE STYLES --- */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--white);
  padding: 14px 33px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Stats Bar */
.stats-bar-section {
  background-color: var(--white);
  margin-top: 0;
  position: relative;
  z-index: 10;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 2rem !important;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  border-top: none !important;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.stat-box {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
}

.stat-label {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Features Grid */
.features-section {
  text-align: center;
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  border-bottom: 4px solid transparent;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-bottom-color: var(--accent-color);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Benefits List */
.benefits-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.benefits-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.benefits-list li::before {
  content: "✓";
  color: var(--success-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* CTA Final */
.cta-final {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), #2c3e50);
  color: white;
  padding: 4rem 2rem !important;
  border-radius: 12px;
}

.cta-final h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.cta-final p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .stats-bar-section {
    margin-top: 0;
    margin-bottom: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons a {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}

/* --- PROFESORI PAGE REDESIGN --- */
.profesori-hero-section {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), #2c5c8c);
  color: var(--white);
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  border: none !important;
}

.profesori-hero-section h1 {
  color: var(--accent-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.profesori-hero-section p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto;
}

.profesori-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 600px) {
  .profesori-grid-modern {
    grid-template-columns: 1fr;
  }
}

.profesor-card-modern {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
  position: relative;
}

.profesor-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.profesor-image-wrapper {
  height: 400px;
  overflow: hidden;
  position: relative;
  background-color: #f0f4f8;
}

.profesor-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

/* Make photos more visible on mobile as requested */
@media (max-width: 768px) {
  .profesor-image-wrapper {
    height: 500px;
  }
}

.profesor-card-modern:hover .profesor-image-wrapper img {
  transform: scale(1.05);
}

.profesor-subject-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.profesor-content-modern {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.profesor-content-modern h3 {
  color: var(--primary-color);
  font-size: 1.4rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.profesor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.profesor-tag {
  background: #f0f4f8;
  color: var(--text-light);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.profesor-description {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.profesor-description p {
  margin-bottom: 1rem;
}
.profesor-description p:last-child {
  margin-bottom: 0;
}

.btn-profesor-action {
  display: block;
  width: 100%;
  padding: 14px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2c5c8c 100%);
  border: none;
  color: var(--white);
  border-radius: 30px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-top: auto;
  box-shadow: 0 4px 12px rgba(26, 74, 122, 0.2);
}

.btn-profesor-action:hover {
  background: var(--gradient-red);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(176, 58, 46, 0.3);
}
