/* 2. THEMED HEADER - STICKY & SHRINKING */
header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 2000;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition:
    padding 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

header.shrunk {
  padding: 0.2rem 2rem;
  background-color: rgba(26, 74, 122, 0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.site-logo {
  height: 70px;
  width: auto;
  transition: all 0.3s ease;
}

.site-logo:hover {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
  transform: scale(1.05);
}

header.shrunk .site-logo {
  height: 50px;
}

/* 3. NAVIGATION & MENU */
#nav-toggle {
  display: block;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 1000;
}

#nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--primary-color);
  width: 100%;
  padding: 1.5rem 0;
  z-index: 999;
  box-sizing: border-box;
}

#nav-menu.nav-menu-active {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--accent-color);
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-menu li {
  margin-bottom: 1.5rem;
  text-align: center;
  width: 100%;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-block;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.nav-menu a.active {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
}

/* 4. MAIN CONTENT AREA */
main {
  padding: 2rem 1rem;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

main:has(.hero-online) {
  padding: 0;
}

main > section:not(.hero-online) {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Layout-ul în două coloane */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.about-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  z-index: 2;
  object-fit: cover;
}

.image-accent {
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 100px;
  height: 100px;
  background-color: var(--accent-color);
  border-radius: 15px;
  z-index: 1;
  opacity: 0.3;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #2d2d2d;
  color: #d1d1d1;
  flex-shrink: 0;
  font-size: 0.9rem;
}

footer a:hover {
  color: var(--accent-color) !important;
}

.footer-terms-link {
  color: #d1d1d1;
  font-size: 0.8rem;
  text-decoration: underline;
}

/* Contact layout */
.contact-grid {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

#info-contact {
  flex: 1;
  margin-bottom: 0;
}
#map-section {
  flex: 1;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-top: 5px solid var(--accent-color);
  margin: 0;
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  height: 400px; /* Am mărit puțin înălțimea pentru echilibru */
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.valori-sectiune {
  background-color: var(--bg-color);
  padding: 60px 20px;
  margin: 40px 0;
  border-left: 10px solid var(--accent-color);
  border-radius: 0 20px 20px 0;
}

.container-valori {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
}
.valori-icon {
  font-size: 4rem;
  background: var(--primary-color);
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.valori-text h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}
.highlight-p {
  font-weight: 600;
  color: var(--primary-color) !important;
  border-top: 2px solid var(--accent-color);
  padding-top: 15px;
  display: inline-block;
}

/* --- SECTION HERO ONLINE --- */
.hero-online {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  background-image: url("../assets/images/laptop-hero.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-top: none !important;
  margin: 0;
  padding: 0;
  margin-bottom: 50px !important;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-online::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.hero-online::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(
    to bottom,
    rgba(252, 250, 242, 0),
    rgba(252, 250, 242, 0.85)
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  color: var(--white);
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 35px;
  line-height: 1.4;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1000px) {
  main > section:not(.hero-online) {
    width: calc(100% - 2rem);
    margin: 0 auto 2rem auto;
  }

  main:has(.hero-online) > section:not(.hero-online) {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  main {
    padding: 1rem 0.5rem;
  }

  main > section:not(.hero-online) {
    width: 100%;
    padding: 1.5rem 1rem;
  }

  main:has(.hero-online) > section:not(.hero-online) {
    width: calc(100% - 1rem);
    margin-left: auto;
    margin-right: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .about-image-wrapper {
    order: -1;
  }
  .stats-mini {
    justify-content: flex-start;
  }

  .contact-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .map-container {
    height: 300px;
  }
  #map-section {
    border-top-color: var(--secondary-color);
    padding: 1rem;
  }

  .container-valori {
    flex-direction: column;
    text-align: center;
  }
  .valori-sectiune {
    border-left: none;
    border-top: 10px solid var(--accent-color);
    border-radius: 20px;
  }

  .hero-online {
    height: 75vh;
    min-height: 450px;
    background-attachment: scroll !important;
    background-position: center center !important;
    width: 100% !important;
    margin: 0 !important;
    margin-bottom: 30px !important;
    border-radius: 0 0 30px 30px !important;
  }
  .hero-content h1 {
    font-size: 1.8rem !important;
  }
  .hero-content p {
    font-size: 1.1rem !important;
  }
}

@media (min-width: 769px) {
  #nav-toggle {
    display: none;
  }
  #nav-menu {
    display: block;
    position: static;
    width: auto;
    background-color: transparent;
    padding: 0;
  }
  #nav-menu.nav-menu-active {
    border-top: none;
  }
  .nav-menu {
    flex-direction: row;
    align-items: center;
  }
  .nav-menu li {
    display: inline-block;
    margin: 0 1rem;
    width: auto;
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .profesor-top {
    flex-direction: column;
    text-align: center;
  }
  .profesor-footer {
    flex-direction: column;
    gap: 15px;
    align-items: start;
  }
}
