/* static/css/style.css - VERSIUNE REFACTORIZATĂ */

/* --- RESET & STILURI GLOBALE --- */
/* NOU: Asigură că html și body au 100% înălțime pentru fixed positioning corect */
html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    line-height: 1.6; 
    background-color: #f8f9fa; 
    color: #212529; 
}
.container { max-width: 1200px; margin: 2rem auto; padding: 1rem 2rem; }
h1, h2, h3, h4 { color: #0056b3; font-weight: 600; }
a { color: #007bff; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0056b3; }

/* --- HEADER & FOOTER --- */
header { background: #0056b3; color: #fff; padding: 1rem 0; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
header .home-link h1 { margin: 0; font-weight: 400; font-size: 1.8rem; }
footer { text-align: center; padding: 1rem; background: #343a40; color: #fff; margin-top: 2rem; }

/* ======================================================= */
/* === STILURI NOI ȘI MODIFICATE PENTRU ASISTENTUL AIda === */
/* ======================================================= */

/* Containerul modal overlay - doar pentru fundal opac */
.chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none; /* Controlăm vizibilitatea cu display */
    justify-content: center; /* Centrare inițială pentru desktop */
    align-items: center;   /* Centrare inițială pentru desktop */
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.chat-modal-overlay.active {
    display: flex; /* Afișează overlay-ul când este activ */
    opacity: 1;
}

/* Containerul principal al chatului - fix și centrat pe desktop, fullscreen pe mobil */
#chat-container {
    background: #ffffff; /* Fundal alb */
    border: 1px solid #ddd; /* Bordură simplă */
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);

    display: flex;
    flex-direction: column; /* Asigură că elementele copil se aranjează vertical */
    overflow: hidden; /* Important: ascunde orice conținut care depășește containerul, dar permite scroll intern în #chat-log */

    /* Stiluri pentru desktop: centrat și dimensiuni fixe */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90vw;
    max-width: 600px;
    height: 80vh;
    max-height: 700px;
    
    transition: transform 0.3s ease;
    z-index: 1001;
}

.chat-modal-overlay.active #chat-container {
    transform: translate(-50%, -50%) scale(1);
}

/* Antetul chatului - rămâne fix în partea de sus a #chat-container */
#chat-header {
    position: relative;
    background: #007bff; /* Fundal antet albastru standard */
    color: white; /* Culoare text antet alb */
    padding: 12px 15px;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 1px solid #0056b3; /* Bordură albastră închis */
    flex-shrink: 0; /* Împiedică micșorarea la apariția tastaturii pe mobil */
}

#close-chat-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white; /* Culoare buton închidere alb */
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#close-chat-btn:hover { opacity: 1; }



/* Stil pentru casuța de trivia din chat */
.trivia-box {
    margin-top: 15px;
    padding: 10px;
    background-color: #f0f8ff; /* Fundal albastru foarte deschis */
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.5;
    border-left: 3px solid #4CAF50; /* Bordură verde pentru accent */
    color: #555; /* Text gri închis */
}

.trivia-box strong {
    color: #333; /* Text mai închis pentru bold */
}

/* Log-ul chatului - ESTE SINGURUL care ar trebui să se scrolleze */
#chat-log {
    flex-grow: 1; /* Permite-i să ocupe tot spațiul rămas */
    padding: 15px;
    overflow-y: auto; /* Aici se întâmplă scroll-ul mesajelor */
    background-color: #f9fafb; /* Fundal chat log alb-deschis */
    color: #212529; /* Text chat log închis la culoare */
    display: flex; /* Rămâne flex pentru a gestiona mesajele interne */
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.45;
    word-wrap: break-word;
}
.user-message {
    background-color: #007bff; /* Culoare utilizator albastru standard */
    color: white; /* Text utilizator alb */
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.ai-message {
    background-color: #e9ecef; /* Culoare AI gri deschis standard */
    color: #212529; /* Text AI închis la culoare */
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    line-height: 1.7;
}
.ai-message .cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: #333; /* Culoare cursor gri închis */
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes blink { from, to { background-color: transparent; } 50% { background-color: #333; } }

/* Formularul de input - rămâne fix în partea de jos a #chat-container */
#chat-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e0e0e0; /* Bordură simplă */
    background-color: #ffffff; /* Fundal formular alb */
    align-items: center;
    flex-shrink: 0; /* Împiedică micșorarea la apariția tastaturii */
}

#user-input {
    flex-grow: 1;
    border: 1px solid #ccc; /* Bordură input gri */
    padding: 10px 15px;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background-color: #ffffff; /* Fundal input alb */
    color: #212529; /* Text input închis la culoare */
}
#user-input:focus {
    outline: none;
    border-color: #007bff; /* Bordură focus albastru */
}
#user-input::placeholder {
    color: #6c757d; /* Placeholder gri */
}

#chat-form button {
    background: #007bff; /* Butoane albastru standard */
    color: white; /* Text butoane alb */
    border: none; /* Fără bordură */
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
#chat-form button:hover {
    background-color: #0056b3; /* Albastru mai închis la hover */
}
#chat-form button:disabled {
    background-color: #555; /* Buton dezactivat gri */
    color: #bbb; /* Text buton dezactivat gri deschis */
    cursor: not-allowed;
    opacity: 0.7;
}

/* Stiluri pentru indicatorul de "typing..." */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #9ca3af; /* Culoare puncte typing gri */
    border-radius: 50%;
    margin: 0 2px;
    animation: pulse 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Stil pentru link-ul Cod SIIIR */
.siiir-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #007bff; /* Culoare link albastru standard */
}

.siiir-link svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    opacity: 0.7;
}

/* Stil pentru butonul "mai mult" */
.read-more-btn {
    display: block;
    margin-top: 5px;
    font-weight: bold;
    color: #007bff; /* Culoare buton albastru standard */
    cursor: pointer;
    text-align: left;
}
.read-more-btn:hover {
    color: #0056b3; /* Albastru mai închis la hover */
}

/* Stiluri pentru butonul de voce */
#voice-input-btn {
    width: 40px; /* Lățime buton microfon */
    height: 40px; /* Înălțime buton microfon */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    border-radius: 50%; /* Face butonul rotund */
    padding: 0; /* Elimină padding-ul intern pentru a face SVG să ocupe spațiu */
    flex-shrink: 0; /* Împiedică butonul să se micșoreze */
    background-color: #6c757d; /* Culoare microfon gri */
    color: white; /* Culoare iconiță albă */
    border: none; /* Fără bordură explicită, lăsăm implicit */
}

#voice-input-btn svg {
    width: 20px; /* Dimensiune iconiță microfon */
    height: 20px;
    fill: currentColor; /* Moștenește culoarea de la părinte */
}

#voice-input-btn.recording {
    background-color: #e74c3c; /* Culoare roșie când înregistrează */
    animation: pulse 1.5s infinite; /* Adaugă o animație de pulsare */
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Media query pentru ecrane mici (mobile) */
@media (max-width: 768px), (max-height: 700px) {
    #chat-container {
        /* NOU: Ancorăm la toate marginile cu 0 */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        
        /* Eliminăm proprietățile de dimensiune care pot intra în conflict */
        width: auto !important;
        height: auto !important;
        max-width: unset !important;
        max-height: unset !important;
        
        /* Eliminăm transformarea de centrare */
        transform: none !important;
        
        /* Asigurăm că nu există margini sau padding extern */
        margin: 0 !important;
        
        /* Fără colțuri rotunde pentru o experiență full-screen */
        border-radius: 0 !important;
    }

    /* Asigură că overlay-ul își păstrează proprietățile de flex pentru a afișa #chat-container */
    .chat-modal-overlay {
        /* Nu mai centrăm elementele în overlay, #chat-container ocupă acum tot spațiul */
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
}


/* ================================================= */
/* === STILURI PENTRU PAGINA PRINCIPALĂ (index.html) === */
/* ================================================= */
.hero-section { background: #e7f1ff; border-radius: 12px; padding: 2.5rem; text-align: center; margin-bottom: 2rem; }
.hero-section h2 { margin-top: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 500; }
.hero-section h2 strong { color: #004085; font-weight: 700; }
.hero-section p { font-size: 1.1rem; color: #495057; max-width: 700px; margin: 1rem auto 0; }
.ai-interaction-box { background: #fff; border-radius: 8px; padding: 1.5rem; margin-top: 2rem; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
.ai-interaction-box h3 { margin-top: 0; }
.ai-form { display: flex; gap: 0.5rem; align-items: center; max-width: 600px; margin: 1rem auto 0; }
.ai-form input[type="text"] { flex-grow: 1; padding: 0.8rem; border: 1px solid #ced4da; border-radius: 6px; font-size: 1rem; }
.ai-form button { padding: 0.8rem; border: none; border-radius: 6px; cursor: pointer; transition: background-color 0.2s; display: flex; align-items: center; justify-content: center; }
.ai-form .submit-button { background-color: #007bff; color: white; }
.ai-form .submit-button:hover { background-color: #0056b3; }
.ai-form .mic-button { background-color: #6c757d; color: white; min-width: 45px; height: 45px; }
.ai-form .mic-button svg { width: 18px; height: 18px; fill: currentColor; }
.ai-form .mic-button:hover { background-color: #5a6268; }
.section-divider { border: 0; height: 1px; background: #dee2e6; margin: 2.5rem 0; }

/* --- Sistem de Tab-uri Modern (for index.html) --- */
.tabs-container { margin-bottom: 1.5rem; }
.tabs-nav { display: flex; flex-wrap: wrap; list-style-type: none; padding: 0; margin: 0; border-bottom: 2px solid #dee2e6; }
.tabs-nav li { margin-right: 0.5rem; margin-bottom: -2px; }
.tabs-nav a { display: block; padding: 0.8rem 1.2rem; color: #495057; border-radius: 6px 6px 0 0; border: 2px solid transparent; font-weight: 500; }
.tabs-nav li.is-active a { color: #0056b3; background-color: #fff; border-color: #dee2e6 #dee2e6 #fff #dee2e6; }
.module-container.is-hidden { display: none; }
.module-container { padding: 1.5rem; border: 1px solid #dee2e6; border-top: none; border-radius: 0 0 8px 8px; background-color: #fff; }
.module-header { background-color: #f8f9fa; padding: 1rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #e9ecef; }
.module-totals { margin: 0; font-size: 1.1rem; color: #495057; }
.module-totals strong { color: #004085; }

/* --- Carduri Județe (pe prima pagină) --- */
.judete-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.judet-card { display: block; background-color: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 1.5rem; text-decoration: none; color: #212529; box-shadow: 0 2px 4px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s; }
.judet-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
.judet-card h4 { margin-top: 0; margin-bottom: 0.75rem; font-size: 1.2rem; color: #0056b3; }
.judet-card .stat-main { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.25rem 0; }
.judet-card .stat-secondary { font-size: 0.9rem; color: #6c757d; margin: 0 0 1rem 0; }
.public-private-split { display: flex; justify-content: space-between; font-size: 0.8rem; border-top: 1px solid #e9ecef; padding-top: 0.75rem; }
.public-private-split span { display: flex; align-items: center; gap: 0.4rem; }
.public-private-split .public { color: #198754; }
.public-private-split .private { color: #fd7e14; }

/* =================================================== */
/* === STILURI PENTRU PAGINA DE JUDEȚ (lista_uat.html) === */
/* =================================================== */
.header-categorie { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #e9ecef; margin-bottom: 2rem; padding-bottom: 1rem; }
.back-link { font-weight: 500; }
#map { height: 450px; width: 100%; margin-bottom: 2.5rem; border-radius: 8px; border: 1px solid #dee2e6; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.accordion-container { width: 100%; border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; }
.accordion-item { border-bottom: 1px solid #dee2e6; }
.accordion-item:last-child { border-bottom: none; }
.accordion-header { background-color: #fff; cursor: pointer; padding: 1rem 1.5rem; width: 100%; border: none; text-align: left; outline: none; font-size: 1.1rem; transition: background-color 0.3s; display: flex; justify-content: space-between; align-items: center; }
.accordion-header:hover, .accordion-header.active { background-color: #e7f1ff; }
.accordion-header .uat-name { font-weight: 600; }
.accordion-header .school-count { font-size: 0.9rem; color: #495057; background-color: #e9ecef; padding: 4px 10px; border-radius: 12px; }
.accordion-header::after { content: '+'; font-size: 1.5rem; color: #6c757d; font-weight: 300; transition: transform 0.3s; }
.accordion-header.active::after { content: '−'; transform: rotate(180deg); }
.accordion-content { padding: 0 1.5rem; background-color: #fdfdff; max-height: 0; overflow: hidden; transition: max-height 0.35s ease-in-out; }
.accordion-content .lista-scoli { padding: 1rem 0; }
.scoala-item { border: 1px solid #e9ecef; border-left: 4px solid #007bff; border-radius: 4px; padding: 1rem 1.5rem; margin-bottom: 1rem; }
.scoala-item:last-child { margin-bottom: 0; }
.scoala-item h4 { margin: 0 0 0.5rem 0; font-size: 1rem; color: #343a40; }
.scoala-item p { margin: 0; font-size: 0.9rem; color: #6c757d; }
.scoala-item p strong { color: #495057; }

/* ======================================================= */
/* === STILURI PENTRU PAGINA DE PROFIL (profil_scoala.html) === */
/* ======================================================= */
.profil-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #dee2e6; }
.profil-header h1 { margin-top: 1rem; margin-bottom: 0.25rem; font-size: 2.2rem; }
.profil-header .subordonare { margin: 0; color: #6c757d; font-style: italic; }
.profil-container { display: flex; flex-wrap: wrap; gap: 2rem; }
.profil-main { flex: 1; min-width: 300px; }
.profil-sidebar { width: 240px; flex-shrink: 0; }
.profil-section { margin-bottom: 2.5rem; }
.profil-section h3 { border-bottom: 2px solid #e9ecef; padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
#map-scoala { height: 300px; width: 100%; border-radius: 8px; }
#map-nearby-schools { width: 100%; height: 500px; margin-bottom: 20px; }
.lista-detalii { list-style-type: none; padding: 0; margin: 0; }
.lista-detalii li { padding: 0.5rem 0; border-bottom: 1px solid #f1f3f5; font-size: 0.9rem; }
.lista-detalii li:last-child { border-bottom: none; }
.lista-detalii strong { color: #495057; }
.tabel-oferta { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 1.5rem; }
.tabel-oferta th, .tabel-oferta td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #dee2e6; }
.tabel-oferta thead th { background-color: #f8f9fa; }
.tabel-oferta tbody tr:hover { background-color: #f1f3f5; }
.tabel-oferta small { display: block; color: #6c757d; font-size: 0.8rem; }
.performanta-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.card-performanta { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 1.5rem; }
.card-performanta h4 { margin-top: 0; border-bottom: 1px solid #dee2e6; padding-bottom: 0.5rem; }
.card-performanta p { margin: 0.5rem 0; display: flex; justify-content: space-between; }
.card-performanta span { color: #6c757d; }
.special-needs-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.special-needs-card { background-color: #fff8e1; border: 1px solid #ffecb3; border-left: 4px solid #ffc107; border-radius: 8px; padding: 1.5rem; }
.special-needs-card h4 { margin-top: 0; color: #b77c00; }
.special-compact-container { display: flex; flex-direction: column; gap: 1rem; }
.special-compact-item { background-color: #fff9e6; border: 1px solid #ffecb3; border-left: 5px solid #ffc107; border-radius: 8px; padding: 1rem 1.5rem; }
.special-compact-item h4 { margin-top: 0; margin-bottom: 0.5rem; color: #b77c00; font-size: 1.1rem; }
.special-compact-item p { margin: 0; line-height: 1.7; color: #555; }
.special-compact-item p strong { color: #333; font-weight: 600; }
.tag-tip { padding: 3px 8px; border-radius: 12px; font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.tag-tip.masă { background-color: #e2e3e5; color: #495057; }
.tag-tip.special { background-color: #fff0c2; color: #856404; }
.ciclu-divider { background-color: #f1f3f5; padding: 0.5rem 1rem; border-radius: 6px; color: #495057; margin-top: 2rem; margin-bottom: 1rem; font-size: 1.2rem; }
.ciclu-divider:first-of-type { margin-top: 0; }
.tooltip-trigger { position: relative; display: inline-block; cursor: help; color: #007bff; font-weight: bold; margin-left: 4px; }
.tooltip-trigger .tooltip-text { visibility: hidden; width: 220px; background-color: #343a40; color: #fff; text-align: center; border-radius: 6px; padding: 8px; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -110px; opacity: 0; transition: opacity 0.3s; font-size: 0.8rem; font-weight: normal; }
.tooltip-trigger .tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #343a40 transparent transparent transparent; }
.tooltip-trigger:hover .tooltip-text { visibility: visible; opacity: 1; }
.header-summary { margin-top: 1.5rem; padding: 1rem; background-color: #f8f9fa; border-radius: 8px; border: 1px solid #dee2e6; }
.summary-total { display: inline-block; margin-right: 2rem; font-size: 1.2rem; }
.summary-total .total-label { color: #6c757d; }
.summary-total .total-value { font-weight: 600; color: #212529; }
.summary-breakdown { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dee2e6; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.breakdown-item { font-size: 0.9rem; color: #495057; background-color: #e9ecef; padding: 4px 10px; border-radius: 4px; }
.breakdown-item strong { color: #212529; }
.limbi-moderne-lista { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #dee2e6; font-size: 0.85rem; color: #495057; }
.limbi-moderne-lista strong { display: block; margin-bottom: 0.25rem; }
.bac-summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 2rem; padding: 1.5rem; background-color: #f8f9fa; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.bac-summary-card { text-align: center; }
.bac-summary-card .value { font-size: 2rem; font-weight: 700; color: #0056b3; }
.bac-summary-card .label { font-size: 0.8rem; color: #6c757d; margin-top: 0.25rem; }
.bac-summary-card.success .value { color: #198754; }
.bac-summary-card.failure .value { color: #dc3545; }
.bac-details-link-wrapper { text-align: center; margin-top: 2rem; margin-bottom: 2.5rem; }
.button-link { display: inline-block; padding: 0.8rem 1.5rem; background-color: #007bff; color: white; border-radius: 6px; text-decoration: none; font-weight: 500; transition: background-color 0.2s; }
.button-link:hover { background-color: #0056b3; }
.indent-value { display: inline-block; margin-left: 10px; }
.map-legend { margin-top: 15px; }
.legend-list { list-style: none; padding: 0; margin: 10px 0; }
.legend-list li { display: flex; align-items: center; margin-bottom: 5px; }
.legend-color-box { width: 20px; height: 20px; border: 1px solid #ccc; margin-right: 10px; display: inline-block; }
.legend-color-box.blue { background-color: #2a6fdb; }
.legend-color-box.green { background-color: #58b442; }
.legend-color-box.red { background-color: #d83c2c; }

/* ================================================= */
/* === STILURI UNIFICATE PRIN GRUPARE            === */
/* ================================================= */

/* --- Container Grafic Unificat --- */
/* Unifică .grafic-container, .grafic-container-profil, .grafic-wrapper */
.grafic-container,
.grafic-container-profil,
.grafic-wrapper,
.grafic-container-bac {
    position: relative;
    height: 400px;
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}
.grafic-container h4,
.grafic-container-profil h4,
.grafic-wrapper h4,
.grafic-container-bac h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: #495057;
}
canvas { max-width: 100%; height: 100% !important; /* Important pt umplerea wrapper-ului */ }

/* --- Stiluri unificate pentru cardurile de Probe și Competențe --- */
.probe-container,
.competente-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.proba-card,
.competenta-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
}
.proba-card h5,
.competenta-card h5 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #343a40;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

/* --- Stiluri unificate pentru tab-uri (stilul mai vechi) --- */
.tabs-nav-bac,
.tabs-nav-en,
.tabs-nav-nearby {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #ccc;
}
.tabs-nav-bac li,
.tabs-nav-en li,
.tabs-nav-nearby li {
    margin-right: 1px;
}
.tabs-nav-bac a,
.tabs-nav-en a,
.tabs-nav-nearby a {
    display: block;
    padding: 10px 15px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border: 1px solid #ccc;
    border-bottom: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.tabs-nav-bac a:hover,
.tabs-nav-en a:hover,
.tabs-nav-nearby a:hover {
    background-color: #e0e0e0;
}
.tabs-nav-bac li.is-active a,
.tabs-nav-en li.is-active a,
.tabs-nav-nearby li.is-active a {
    background-color: #fff;
    border-color: #ccc;
    border-bottom-color: #fff;
    color: #007bff;
    font-weight: bold;
}
.tab-panel-bac.is-hidden,
.tab-panel-en.is-hidden,
.tab-panel-nearby.is-hidden {
    display: none;
}

/* --- Stiluri unificate pentru tab-uri (stilul modern, de pe pagina de detalii) --- */
.tabs-nav-detaliate { display: flex; flex-wrap: wrap; list-style-type: none; padding: 0; margin: 0 0 -1px 0; border-bottom: 2px solid #dee2e6; }
.tabs-nav-detaliate li { margin-right: 0.5rem; margin-bottom: -2px; }
.tabs-nav-detaliate a { display: block; padding: 0.8rem 1.2rem; color: #495057; border-radius: 6px 6px 0 0; border: 2px solid transparent; font-weight: 500; transition: all 0.2s ease-in-out; }
.tabs-nav-detaliate li.is-active a { color: #0056b3; background-color: #fff; border-color: #dee2e6 #dee2e6 #fff #dee2e6; }
.tabs-nav-detaliate a:hover:not(.is-active) { background-color: #f1f3f5; color: #007bff; }
.tab-content-detaliate { padding: 1.5rem; border: 1px solid #dee2e6; border-top: none; border-radius: 0 0 8px 8px; background-color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }
.tab-panel-detaliate.is-hidden { display: none; }

/* --- Tabel de competențe (o singură definiție) --- */
.tabel-competente { width: 100%; font-size: 0.9rem; }
.tabel-competente td { padding: 0.5rem 0; border-bottom: 1px solid #e9ecef; }
.tabel-competente tr:last-child td { border-bottom: none; }
.tabel-competente td:last-child { text-align: right; font-weight: 600; color: #0056b3; }

/* --- Marcatori Hartă Leaflet (Definiție Finală) --- */
.custom-div-icon { background: transparent; border: none; }
.marker-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; /* Formă de picătură */ transform: rotate(-45deg); border: 1px solid #FFFFFF; box-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.marker-pin.blue { background-color: #2a6fdb; }
.marker-pin.green { background-color: #58b442; }
.marker-pin.red { background-color: #d83c2c; }

/* ============================================= */
/* == Stiluri pentru secțiunea de distincții == */
/* ============================================= */
.distinctions-highlights { background-color: #f7f9fc; border: 1px solid #e0e6ed; border-radius: 8px; padding: 15px; margin-top: 20px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.distinction-item { display: flex; align-items: center; gap: 10px; font-size: 0.95em; }
.distinction-item .distinction-badge { font-size: 1.5em; line-height: 1; }
.distinction-item strong { color: #0056b3; }
.view-more-distinctions { font-size: 0.9em; color: #007bff; text-decoration: underline; cursor: pointer; margin-left: 5px; }
.view-more-distinctions:hover { color: #0056b3; }
.distinction-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1050; justify-content: center; align-items: center; }
.distinction-modal-content { background: white; padding: 25px 30px; border-radius: 8px; max-width: 600px; width: 90%; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.3); max-height: 80vh; overflow-y: auto; }
.distinction-modal-content h3 { margin-top: 0; color: #333; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.distinction-modal-content ul { list-style: none; padding: 0; }
.distinction-modal-content li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.distinction-modal-content li:last-child { border-bottom: none; }
.distinction-modal-content li strong { color: #0056b3; display: block; margin-bottom: 3px; }
.close-modal-btn { position: absolute; top: 10px; right: 15px; font-size: 2em; color: #888; cursor: pointer; line-height: 1; border: none; background: transparent; }
.close-modal-btn:hover { color: #333; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .header-categorie {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* =================================================== */
/* STILURI PENTRU REDESIGN-UL SECȚIUNII HERO           */
/* =================================================== */

/* Containerul principal pentru secțiunea Hero */
.hero-section-redesigned {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 2rem;
    align-items: stretch;
}

/* Coloana din stânga - Asistentul AI */
.ai-assistant-box {
    flex: 1;
    background: linear-gradient(135deg, #0056b3, #003d80);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 86, 179, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-assistant-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 86, 179, 0.3);
}

.ai-assistant-box h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: white; /* Asigurăm culoarea textului */
}

.ai-assistant-box p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.ai-button {
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid white;
    /* Facem butonul oval */
    border-radius: 50% / 40%; 
    width: 120px;  /* Lățime mai mare */
    height: 150px; /* Înălțime mai mare */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.ai-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05); /* Scalare mai subtilă pentru oval */
}

.ai-button svg {
    /* Dimensiunea este acum controlată direct în HTML, dar păstrăm culoarea */
    fill: white;
    transition: transform 0.3s ease;
}

.ai-button:hover svg {
    transform: scale(1.05); /* Scalăm și iconița la hover */
}

/* Coloana din dreapta - Căutare Școală */
.school-search-box {
    flex: 3;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.search-stats {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.search-subtext {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.search-form-wrapper {
    position: relative;
}

.search-form {
    display: flex;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ccc;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.search-form:focus-within {
     box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
     border-color: #007bff;
}

.search-input {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: none;
    outline: none;
    background: transparent;
}

.search-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.search-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.search-button:hover {
    background-color: #0056b3;
}

/* Ascundem secțiunea veche (cea originală) */
.hero-section {
    display: none !important;
}

/* Stiluri pentru rezultatele de autocomplete */
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none; /* Ascuns implicit */
}

.autocomplete-items div {
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
}

.autocomplete-items div:hover {
    background-color: #f1f3f5;
}

/* Responsive Design pentru secțiunea Hero */
@media (max-width: 992px) {
    .hero-section-redesigned {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hero-section-redesigned,
    .ai-assistant-box,
    .school-search-box {
        padding: 1.5rem;
    }

    .search-stats {
        font-size: 1.1rem;
    }
    .search-input {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
    .search-button {
        padding: 0 1.5rem;
    }
}