* { box-sizing: border-box; }

body {
    margin: 0;
    background: #173d67 url('../images/background.png') repeat;
    color: white;
    font-family: Arial, sans-serif;
}

.site {
    max-width: 1400px;
    margin: auto;
    padding: 10px 20px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 110px;
}

.header img {
    max-width: 135px;
    max-height: 100px;
    object-fit: contain;
}

.header-title {
    text-align: center;
    font-size: clamp(18px, 2.1vw, 30px);
    line-height: 1.35;
}

.navigation {
    margin-top: 15px;
    position: relative;
    z-index: 10;
}

.menu-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #245783;
}

.menu-list li { position: relative; }

.menu-list a {
    display: block;
    padding: 13px 15px;
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.menu-list a:hover,
.menu-list a:focus {
    background: #3977a8;
}

.menu-list ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #245783;
    box-shadow: 0 5px 12px #0004;
}

.menu-list li:hover > ul,
.menu-list li:focus-within > ul {
    display: block;
}

.content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 45px;
    margin-top: 90px;
    font-family: "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.5;
}

.content-text { text-align: justify; }

.carousel img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel img:not(:first-child) { display: none; }

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 65px;
    padding-bottom: 25px;
}

.footer img { max-width: 254px; }
.footer a { color: white; }

@media (max-width: 800px) {
    .header { gap: 8px; }
    .header img { max-width: 65px; }
    .header-title { font-size: 16px; }
    .menu-list { flex-direction: column; }
    .menu-list ul {
        display: block;
        position: static;
        box-shadow: none;
        padding-left: 18px;
    }
    .content {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }
}

/* Ajustări pentru pagina principală INCE */
.content {
    margin-top: 55px;
    gap: 35px;
}
.content-text {
    line-height: 1.55;
}
.content-text p {
    margin-top: 0;
}
.carousel {
    align-self: start;
}
.footer {
    margin-top: 45px;
}

/* Apropierea aspectului de site-ul original INCE */

.header-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 30px;
}

.navigation {
    background: transparent;
}

.menu-list {
    background: transparent;
    justify-content: space-between;
}

.menu-list > li > a {
    text-align: center;
    padding: 13px 12px;
    border-bottom: 4px solid transparent;
}



.menu-list > li > a:hover,
.menu-list > li > a:focus {
    background: transparent;
    border-bottom-color: #a32727;
}

.menu-list ul {
    background: #10284c;
}

.content {
    margin-top: 95px;
}

.footer a {
    display: inline-block;
    background: #983535;
    color: white;
    min-width: 320px;
    padding: 9px 15px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

@media (max-width: 800px) {
    .header-title { font-size: 17px; }
    .content { margin-top: 30px; }
    .footer a { min-width: 0; }
}

/* Corectarea liniilor din submeniuri */

.menu-list ul {
    border: none;
}

.menu-list ul li,
.menu-list ul li a {
    border: none !important;
}

.menu-list ul li a:hover,
.menu-list ul li a:focus {
    background: #3977a8;
}

.menu-list > li > a {
    border-bottom: 4px solid transparent;
}

.menu-list > li:hover > a,
.menu-list > li:focus-within > a {
    border-bottom-color: #a32727;
}

/* Pagina Despre noi – adaptarea tabelelor Corel */

.despre-noi {
    display: block;
    min-width: 0;
}

.despre-noi .content-text {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.despre-noi table {
    max-width: 100%;
    border-collapse: collapse;
}

.despre-noi td,
.despre-noi th {
    height: auto !important;
    overflow: visible;
    vertical-align: top;
    overflow-wrap: break-word;
}

.despre-noi .ince-section {
    max-width: 100%;
}

/* Adaptarea tabelelor vechi Corel */

.despre-noi table {
    width: 100% !important;
    max-width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

.despre-noi td,
.despre-noi th {
    width: auto !important;
    height: auto !important;
    min-width: 0;
    vertical-align: top;
    overflow-wrap: anywhere;
    white-space: normal;
}

.despre-noi .ince-section {
    width: 100%;
    max-width: 100%;
}

body:has(.despre-noi) {
    background-image: none;
    background-color: #173d67;
}

/* Corectarea paragrafelor generate de Corel */

.despre-noi table p {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    width: auto !important;
    max-width: 100% !important;
}

/* Pagina Despre noi - organizare apropiata de original */

body:has(.despre-noi-layout) {
    background: #fff;
}

.despre-noi-layout {
    background: #fff;
    color: #111;
    padding: 45px 35px;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.despre-noi-columns {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 35px;
    align-items: start;
}

.despre-noi-layout h2 {
    background: #e72c32;
    color: white;
    font-family: "Times New Roman", serif;
    font-size: 20px;
    margin: 0 0 25px;
    padding: 2px 10px;
}

.despre-noi-left,
.despre-noi-right {
    min-width: 0;
}

.despre-noi-layout table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
}

.despre-noi-layout td,
.despre-noi-layout th {
    width: auto !important;
    height: auto !important;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.despre-noi-layout table p {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    width: auto !important;
}

.despre-noi-layout a {
    color: #c00;
}

.despre-noi-regulamente {
    background: #050744;
    color: white;
    padding: 20px 25px;
    margin: 20px auto 0;
    max-width: 415px;
    text-align: center;
}

.despre-noi-regulamente a {
    color: white;
    font-weight: bold;
    font-style: italic;
}

.despre-noi-consiliu {
    margin-top: 35px;
    text-align: center;
}

.despre-noi-consiliu table {
    text-align: left;
}

@media (max-width: 850px) {
    .despre-noi-columns {
        grid-template-columns: 1fr;
    }

    .despre-noi-layout {
        padding: 20px 12px;
    }
}

/* Despre noi: pastram fundalul inchis al antetului si meniului */

body:has(.despre-noi-layout) .header,
body:has(.despre-noi-layout) .navigation {
    background-color: #05083d;
}

body:has(.despre-noi-layout) .header-title,
body:has(.despre-noi-layout) .menu-list > li > a {
    color: #fff;
}

/* Corecție afișare tabel Rețeaua INCE */
.despre-noi-left td {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

.despre-noi-left td p {
    overflow: visible !important;
    max-height: none !important;
    width: auto !important;
}

/* Evidențierea paginii active în meniul principal */
.navigation > .menu-list > li.active > a {
    border-bottom: 4px solid #a32727;
}

/* Pagina Activitati */
.activitati-layout {
    max-width: 1250px;
    margin: 25px auto 50px;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.activitati-layout h1 {
    margin: 0 0 15px 65px;
    font-family: Georgia, serif;
    font-size: 24px;
    color: #222;
}

.activitati-columns {
    display: grid;
    grid-template-columns: 190px 360px minmax(0, 1fr);
    gap: 25px;
    align-items: start;
}

.activitati-years-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: center;
}

.activitati-years h3 {
    min-height: 40px;
    margin: 0 0 12px;
    color: #e00000;
    font-size: 13px;
    line-height: 18px;
}

.activitati-year {
    height: 36px;
    line-height: 36px;
}

.activitati-layout a {
    color: #d00000;
    text-decoration: underline;
}

.activitati-strategic {
    margin: 0 0 14px;
    font-weight: bold;
    white-space: nowrap;
}

.activitati-carousel {
    position: relative;
    width: 356px;
    height: 253px;
    overflow: hidden;
}

.activitati-carousel img {
    position: absolute;
    inset: 0;
    display: none;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.activitati-carousel img:first-child {
    display: block;
}

.activitati-links {
    padding-top: 50px;
    font-weight: bold;
}

.activitati-links p {
    margin: 0 0 20px;
}

@media (max-width: 900px) {
    .activitati-columns {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .activitati-links {
        grid-column: 1 / -1;
        padding-top: 0;
    }
}

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

    .activitati-years {
        max-width: 240px;
    }

    .activitati-carousel {
        max-width: 100%;
    }

    .activitati-links {
        grid-column: auto;
    }
}

/* Fundal alb pentru pagina Activitati */
body:has(.activitati-layout) {
    background: #fff !important;
}

body:has(.activitati-layout) .activitati-layout h1 {
    color: #222 !important;
}

/* Activitati: fundal alb, antet si meniu bleumarin */
body:has(.activitati-layout) {
    background: #fff !important;
}

body:has(.activitati-layout) .header,
body:has(.activitati-layout) .navigation {
    background: #05083d !important;
}

body:has(.activitati-layout) .header-title,
body:has(.activitati-layout) .menu-list > li > a {
    color: #fff !important;
}

/* Pagina ESPERA */
body:has(.espera-page) {
    background: #fff !important;
}

body:has(.espera-page) .header,
body:has(.espera-page) .navigation {
    background: #05083d !important;
}

body:has(.espera-page) .header-title,
body:has(.espera-page) .menu-list > li > a {
    color: #fff !important;
}

.espera-page {
    max-width: 1100px;
    margin: 25px auto 60px;
    padding: 0 20px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #222;
}

.espera-banner {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 25px;
}

.espera-content {
    overflow-wrap: break-word;
}

.espera-content p {
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-bottom: 14px;
}

.espera-content a {
    color: #c00000;
    text-decoration: underline;
}


/* Centenar 1918–2018 */
body:has(.centenar-page) {
    background: #fff !important;
}

body:has(.centenar-page) .header,
body:has(.centenar-page) .navigation {
    background: #05083d !important;
}

body:has(.centenar-page) .header-title,
body:has(.centenar-page) .menu-list > li > a {
    color: #fff !important;
}

.centenar-page {
    max-width: 1000px;
    margin: 30px auto 60px;
    padding: 0 25px;
    font-family: Arial, sans-serif;
    color: #222;
}

.centenar-page h1 {
    font-family: Georgia, serif;
    font-size: 24px;
    margin-bottom: 30px;
}

.centenar-volume {
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr);
    gap: 45px;
    align-items: start;
    margin-bottom: 35px;
}

.centenar-volume img {
    width: 254px;
    height: 357px;
    object-fit: contain;
}

.centenar-volume p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.centenar-volume a {
    color: #c00000;
    text-decoration: underline;
}

@media (max-width: 650px) {
    .centenar-volume {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Publicații */
body:has(.publicatii-page) {
    background: #fff !important;
}

body:has(.publicatii-page) .header,
body:has(.publicatii-page) .navigation {
    background: #05083d !important;
}

body:has(.publicatii-page) .header-title,
body:has(.publicatii-page) .menu-list > li > a {
    color: #fff !important;
}

.publicatii-page {
    max-width: 1300px;
    margin: 28px auto 60px;
    padding: 0 20px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #222;
}

.publicatii-top {
    display: grid;
    grid-template-columns: 200px 150px 150px 150px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 35px;
}

.publicatii-title {
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: bold;
}

.publicatii-page a {
    color: #b00000;
    text-decoration: underline;
}

.publicatii-main {
    display: grid;
    grid-template-columns: 450px minmax(0, 1fr);
    gap: 35px;
    align-items: start;
}

.publicatii-tezaur {
    display: flex;
    align-items: center;
    gap: 10px;
}

.publicatii-tezaur img {
    width: 306px;
    height: 280px;
    object-fit: contain;
}

.publicatii-reviste {
    line-height: 1.6;
}

.publicatii-page p {
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

@media (max-width: 850px) {
    .publicatii-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .publicatii-main {
        grid-template-columns: 1fr;
    }
}

/* Ajustare titlu Publicații după pagina originală */
.publicatii-top {
    align-items: start;
}

.publicatii-title {
    font-family: Georgia, serif;
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.publicatii-title * {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Editura Expert */
body:has(.editura-expert-page) {
    background: #fff !important;
}

body:has(.editura-expert-page) .header,
body:has(.editura-expert-page) .navigation {
    background: #05083d !important;
}

body:has(.editura-expert-page) .header-title,
body:has(.editura-expert-page) .menu-list > li > a {
    color: #fff !important;
}

.editura-expert-page {
    max-width: 1250px;
    margin: 30px auto 60px;
    padding: 0 20px;
    color: #222;
}

.editura-expert-page h1 {
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-style: italic;
    margin: 0 0 25px;
}

.editura-expert-frames {
    display: grid;
    grid-template-columns: minmax(0, 575px) minmax(0, 602px);
    gap: 20px;
}

.editura-expert-frames iframe {
    display: block;
    width: 100%;
    height: 325px;
    border: 1px solid #777;
    background: white;
}

@media (max-width: 850px) {
    .editura-expert-frames {
        grid-template-columns: 1fr;
    }
}

/* Editura Expert - alinierea titlului */
.editura-expert-page h1 {
    text-align: center;
    margin-bottom: 28px;
}

/* Pagina Evenimente */

.evenimente-page {
    background: #fff;
    padding: 24px 20px 45px;
}

.evenimente-content {
    max-width: 1000px;
    margin: 0 auto;
}

.evenimente-content > h1 {
    color: #17365d;
    font-size: 26px;
    margin: 0 0 24px;
}

.evenimente-arhiva .eveniment-arhiva {
    margin-bottom: 30px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.evenimente-arhiva img,
.evenimente-arhiva iframe {
    max-width: 100%;
}


/* Evenimente publicate din baza de date */

.eveniment-pdf {
    margin: 0 0 45px;
    padding-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.eveniment-pdf h2 {
    font-size: 21px;
    color: #17365d;
    margin-bottom: 16px;
}

.eveniment-pdf iframe {
    display: block;
    width: 100%;
    height: 650px;
    border: 1px solid #ccc;
    background: #fff;
}

.eveniment-pdf p {
    margin-top: 10px;
}


/* Fundal uniform pentru pagina Evenimente */
body:has(.evenimente-page) {
    background: #050744 !important;
}
/* Submeniul de nivelul al treilea */
@media (width > 800px) {
    .navigation > .menu-list > li > ul > li > ul {
        top: 0;
        left: auto;
        right: 100%;
    }
}

body:has(main.informatii-publice) {
    background-repeat: no-repeat;
    background-color: #05083d;
}

/* Link Facebook fără fundalul roșu */
.footer a:has(img) {
    background: transparent;
    padding: 0;
    min-width: 0;
    display: inline-block;
}

.footer a:has(img) img {
    display: block;
}
