/* ==========================================================================
   1. VARIABILE DE CULOARE ȘI IDENTITATE VIZUALĂ ERASMUS+
   ========================================================================== */
:root {
  /* Culori oficiale Uniunea Europeană */
  --eu-blue: #003399;          /* Reflex Blue UE */
  --eu-blue-dark: #001f5c;     /* Ton închis pentru adâncime și hover */
  --eu-yellow: #ffcc00;        /* Galben oficial UE */
  --eu-yellow-hover: #e6b800;  /* Nuanță caldă pentru focus */

  /* Paletă neutră & suprafețe */
  --bg-page: #f1f5f9;          /* Fundal exterior (gri-albăstrui deschis) */
  --bg-card: #ffffff;          /* Alb pur pentru containere */
  --text-main: #1e293b;        /* Text principal (ardezie închisă, lizibilitate maximă) */
  --text-muted: #64748b;       /* Text secundar / detalii */
  --border-color: #e2e8f0;     /* Separatori și borduri discrete */

  /* Umbre și efecte de profunzime */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 51, 153, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.07);
}

/* ==========================================================================
   2. RESET ȘI BAZĂ GENERALĂ
   ========================================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Containerul principal al site-ului */
#pagina {
  max-width: 1200px;
  margin: 24px auto;
  background-color: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 51, 153, 0.08);
}

/* ==========================================================================
   3. HEADER & IDENTITATE GRAFICĂ (Steag UE + Titlu + Siglă Liceu)
   ========================================================================== */
header {
  background: linear-gradient(135deg, var(--eu-blue) 0%, var(--eu-blue-dark) 100%);
  color: #ffffff;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 5px solid var(--eu-yellow);
}

/* Containerele pentru logo-uri (stânga / dreapta) */
#imagineLogo,
#headerImagine2 {
  flex: 0 0 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagini logo (steagul UE și sigla școlii) */
#imagineLogo {
  flex: 0 0 260px; /* mărit de la 150px la 260px pentru a acomoda sigla mărită */
  display: flex;
  align-items: center;
  justify-content: center;
}

#headerImagine2 {
  flex: 0 0 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#imagineLogo img {
  max-width: 100%;
  max-height: 170px; /* dublat de la 85px */
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

#headerImagine2 img,
.logo-header {
  max-width: 100%;
  max-height: 85px;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}


#imagineLogo img:hover,
#headerImagine2 img:hover {
  transform: scale(1.03);
}

/* Zona centrală de text din header */
#divTitlu {
  flex: 1 1 auto;
  text-align: center;
}

#titluSite {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
  color: #ffffff;
  text-transform: uppercase;
}

header h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 8px 0;
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 14px;
  border-radius: 20px;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

header p {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--eu-yellow);
  margin: 0;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}


/* ==========================================================================
   4. BARA DE NAVIGAȚIE (MENIU)
   ========================================================================== */
nav {
  background-color: #0b1a33;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
}

nav a {
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Stare de hover pe butoanele meniului */
nav a:hover {
  background-color: rgba(255, 204, 0, 0.15);
  color: var(--eu-yellow);
}

/* Butonul activ setat dinamic din scriptul PHP */
nav a.active {
  background-color: var(--eu-yellow);
  color: var(--eu-blue-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

/* ==========================================================================
   5. CONȚINUTUL PRINCIPAL (MAIN & MODULE PHP INCLUSE)
   ========================================================================== */
main {
  padding: 36px 40px;
  min-height: 520px;
  background-color: var(--bg-card);
}

/* Tipografie titluri în module */
main h1 {
  color: var(--eu-blue);
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

main h2 {
  color: var(--eu-blue-dark);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  border-left: 4px solid var(--eu-yellow);
  padding-left: 12px;
}

main h3 {
  color: var(--eu-blue);
  font-size: 1.15rem;
  margin-top: 20px;
  margin-bottom: 10px;
}

main p {
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Linkuri generice în text */
main a {
  color: var(--eu-blue);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

main a:hover {
  color: var(--eu-blue-dark);
  text-decoration: underline;
}

/* Listele de jurnale de proiect și mobilități */
main ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

main ul li {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--eu-blue);
  border-radius: 6px;
  padding: 12px 18px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

main ul li:hover {
  transform: translateX(4px);
  background-color: #ffffff;
  border-left-color: var(--eu-yellow);
  box-shadow: var(--shadow-sm);
}

/* Carduri / Containere foto în galerie */
.card,
.item-galerie {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.item-galerie:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--eu-blue);
}

/* Butoane primare (ex: formulare încărcare fișiere) */
button,
.btn-submit {
  background-color: var(--eu-blue);
  color: #ffffff;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover,
.btn-submit:hover {
  background-color: var(--eu-blue-dark);
}

/* ==========================================================================
   6. FOOTER ȘI DISCLAIMER OBLIGATORIU UE
   ========================================================================== */
/* ==========================================================================
   6. FOOTER: SIGLĂ ERASMUS+ (STÂNGA) & TEXT / DISCLAIMER (DREAPTA)
   ========================================================================== */
footer {
  background-color: #071120;
  color: #94a3b8;
  padding: 30px 40px;
  border-top: 3px solid var(--eu-blue);
}

.footer-continut {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;       /* Aliniere verticală pe centru între siglă și text */
  justify-content: flex-start; /* Poziționează tot conținutul pornind din stânga */
  gap: 36px;                 /* Spațiul de respirație dintre siglă și blocul de text */
}

/* Zona fixă din stânga alocată siglei */
.footer-sigla-stanga {
  flex: 0 0 170px;           /* Lățime stabilă pentru siglă */
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-footer {
  max-width: 100%;
  max-height: 70px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Zona de text din dreapta */
.footer-text-dreapta {
  flex: 1 1 auto;
  text-align: left;          /* Text aliniat la stânga pentru claritate */
}

#titluFooter {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  letter-spacing: 0.3px;
}

#disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0;
  color: #94a3b8;
}

/* ==========================================================================
   ADAPTARE PENTRU MOBIL (ecrane sub 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .footer-continut {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer-sigla-stanga {
    flex: none;
    justify-content: center;
  }

  .footer-text-dreapta {
    text-align: center;
  }

  .logo-footer {
    max-height: 55px;
  }
}

/* ==========================================================================
   7. ADAPTARE RESPONSIVE (TABLETE ȘI TELEFOANE)
   ========================================================================== */
@media (max-width: 860px) {
  #pagina {
    margin: 0;
    border-radius: 0;
    border: none;
  }

  header {
    flex-direction: column;
    padding: 22px 16px;
    gap: 16px;
  }

  #imagineLogo {
    flex: none;
    width: 100%;
  }

  #imagineLogo img {
    max-height: 120px; /* proporție optimă pe telefoane */
  }

  #titluSite {
    font-size: 1.45rem;
  }

  header h2 {
    font-size: 0.88rem;
  }

  nav {
    flex-direction: column;
    padding: 8px;
    gap: 4px;
  }

  nav a {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 10px;
  }

  main {
    padding: 24px 16px;
  }

  footer {
    padding: 24px 16px;
  }
}
/* ==========================================================================
   STILIZARE FORMULAR ÎNCĂRCARE MATERIALE
   ========================================================================== */
.formular-container {
  max-width: 780px;
  margin: 0 auto;
}

.descriere-formular {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-incarcare {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 28px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.camp-formular {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.rand-formular {
  display: flex;
  gap: 16px;
}

.col-jumatate {
  flex: 1;
}

.camp-formular label {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.camp-formular .obligatoriu {
  color: #dc2626;
}

.camp-formular input[type="text"],
.camp-formular select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.camp-formular input[type="text"]:focus,
.camp-formular select:focus {
  outline: none;
  border-color: var(--eu-blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.15);
}

.zona-upload {
  background-color: #ffffff;
  padding: 14px;
  border: 2px dashed #cbd5e1;
  border-radius: 6px;
}

.instructiuni-fisier {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.btn-trimite {
  background-color: var(--eu-blue);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  width: 100%;
}

.btn-trimite:hover {
  background-color: var(--eu-blue-dark);
}

.btn-trimite:active {
  transform: scale(0.99);
}

/* Notificări succes / eroare */
.alerta {
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 0.95rem;
}

.alerta.succes {
  background-color: #dcfce7;
  color: #166534;
  border-left: 4px solid #22c55e;
}

.alerta.eroare {
  background-color: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

@media (max-width: 600px) {
  .rand-formular {
    flex-direction: column;
    gap: 0;
  }
}