/* ==========================================================================
   CONFIGURARE CULORI ȘI STILURI (Modifică valorile de mai jos pentru teme)
   ========================================================================== */
:root {
    /* Culori Generale */
    --bg-body: #f4f6f9;
    --text-main: #333333;
    --text-muted: #666666;
    --accent-color: #3498db;

    /* Meniu Principal (Stare Inactivă) */
    --menu-bg: #2c3e50;
    --menu-text: #ffffff;

    /* Meniu Principal (Hover & Active) */
    --menu-hover-bg: #34495e;
    --menu-hover-text: #1abc9c;
    --menu-active-bg: #1abc9c;
    --menu-active-text: #ffffff;

    /* Submeniuri (Dropdown) */
    --submenu-bg: #34495e;
    --submenu-text: #ffffff;
    --submenu-hover-bg: #2c3e50;
    --submenu-hover-text: #1abc9c;

    /* Butoane Speciale (ex: Login/Logout/Register) */
    --btn-accent-bg: #e74c3c;
    --btn-accent-text: #ffffff;
    --btn-accent-hover: #c0392b;
}

/* Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   HEADER & NAVIGARE
   ========================================================================== */
header {
    width: 100%; /* Forțăm headerul la 100% lățime */
    background-color: var(--menu-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    width: 100%;       /* Ocupă tot spațiul disponibil */
    max-width: 1200px; /* Nu depăși 1200px pe ecrane mari */
    margin: 0 auto;    /* Centrează meniul */
    padding: 0 20px;
    display: flex;     /* Important pentru structura meniu-stânga / meniu-dreapta */
}

.logo a {
    color: var(--menu-text);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

/* Structura Meniului */
.main-menu {
    display: flex;
    list-style: none;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
}

/* Alinierea dinamică a blocului de autentificare/documente la dreapta */
.menu-left {
    display: flex;
    list-style: none;
}

.menu-right {
    display: flex;
    list-style: none;
    margin-left: auto; /* Împinge elementele în dreapta */
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 20px 15px;
    color: var(--menu-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Stări Meniu: Hover și Active */
.nav-link:hover {
    background-color: var(--menu-hover-bg);
    color: var(--menu-hover-text);
}

.nav-item.active > .nav-link {
    background-color: var(--menu-active-bg);
    color: var(--menu-active-text);
}

/* Butoane cu stil de tip CTA (ex: Register/Activare) */
.nav-btn .nav-link {
    background-color: var(--btn-accent-bg);
    color: var(--btn-accent-text);
    padding: 8px 15px;
    border-radius: 4px;
    margin: 0 5px;
}

.nav-btn .nav-link:hover {
    background-color: var(--btn-accent-hover);
    color: var(--btn-accent-text);
}

/* SUBMENIURI (Dropdown) */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--submenu-bg);
    min-width: 180px;
    list-style: none;
    display: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.submenu .nav-link {
    padding: 12px 15px;
    color: var(--submenu-text);
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.submenu .nav-link:hover {
    background-color: var(--submenu-hover-bg);
    color: var(--submenu-hover-text);
}

/* Afișare Submeniu la Hover */
.nav-item:hover .submenu {
    display: block;
}

/* ==========================================================================
   LANDING PAGE CONTENT
   ========================================================================== */
main {
    flex: 1;
    width: 90%;          /* Să ocupe tot spațiul disponibil */
    margin: 40px auto;    /* Centrat */
    padding: 20px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

main form {
	width: 100%;
    max-width: none; /* Formularul va avea maxim 600px */
    margin: 0 auto;   /* Centrat în interiorul main-ului lat */
}

.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #eef2f7 100%);
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.hero-section h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: var(--menu-bg);
}

.hero-section p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Secțiuni Funcționalități (Alternative Stânga/Dreapta) */
.feature-row {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-col-text {
    flex: 1;
}

.feature-col-text h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--menu-bg);
}

.feature-col-img {
    flex: 1;
}

/* Placeholder pentru Imagini */
.image-placeholder {
    background-color: #dddddd;
    width: 100%;
    height: 300px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777777;
    font-weight: bold;
    border: 2px dashed #bbbbbb;
}

/* Responsivitate pentru ecrane mici */
@media (max-width: 768px) {
    .nav-container, .main-menu, .menu-left, .menu-right, .feature-row, .feature-row.reverse {
        flex-direction: column;
        align-items: stretch;
    }
    .menu-right {
        margin-left: 0;
    }
    .submenu {
        position: static;
        width: 100%;
        padding-left: 20px;
    }
    .nav-item:hover .submenu {
        display: block;
    }
}

/* ==========================================================================
   LOGICĂ SUBMENIU MULTI-LEVEL (FLYOUT) PENTRU NOMENCLATOR
   ========================================================================== */

/* Pregătim părintele pentru poziționare absolută */
.submenu .nested-dropdown {
    position: relative;
}

/* Ascundem submeniul secundar și îl poziționăm în dreapta (left: 100%) */
.submenu .nested-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background-color: #34495e; /* Ajustează culoarea în funcție de tema ta (ex: #2c3e50 dacă e închis la culoare) */
    min-width: 180px;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
    border-radius: 0 4px 4px 0;
    z-index: 1000;
}

/* Afișăm submeniul secundar DOAR când se face hover pe elementul părinte direct */
.submenu .nested-dropdown:hover .nested-submenu {
    display: block;
}

/* Săgeata indicatoare (▸) aliniată frumos la dreapta textului din primul nivel */
.submenu .nested-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: var(--menu-bg);
    color: var(--menu-text);
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 14px;
}