/* === BUTOANE SPECIALE === */

.menu-toggle,
.search-toggle {
    margin-right: 5px;
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
    color: #545454;
}

/* === CARDURI GENERALE === */

.card-row {
    display: flex;
    gap: 24px;
    padding-bottom: 12px;
}

.card {
    flex: 1 1 210px;
    max-width: 260px;
    background-color: #ffffff;
    border: 2px solid #0097b2;
    border-radius: 16px;
    padding: 24px;
    width: 210px;
    color: #545454;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.card .click-icon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 28px;
    /* ajustăm după preferință */
    height: auto;
    opacity: 0.8;
    pointer-events: none;
    /* nu blochează click-ul pe card */
    transition: transform 0.3s ease;
}

/* Dacă vrei și iconița să se miște puțin la hover */
.card:hover .click-icon {
    transform: translateY(-4px);
}

.card:hover {
    transform: translateY(-4px);
}

.icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.card h3 {
    color: #0097b2;
    margin: 0 0 8px;
    font-size: 18px;
}

.card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive carduri */
@media (max-width: 768px) {
    .card-row {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        max-width: 500px;
        flex: none;
    }
}

/* === CĂUTARE GLOBALĂ === */

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 300px;
    margin-left: auto;
    margin-right: 30px;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0097b2;
    border-color: #0097b2;
}

#search-btn {
    position: absolute;
    right: 10px;
    top: 32%;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 18px;
    transition: color 0.3s ease, transform 0.2s ease;
}

#search-btn.active {
    color: #0097b2;
    transform: scale(1.1);
}

/* Modal căutare */

#search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

#search-modal.open {
    display: flex;
}

.search-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 20px 30px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.search-modal-content h2 {
    margin-bottom: 20px;
    color: #0097b2;
}

.search-results li {
    list-style: none;
    margin-bottom: 15px;
    text-align: left;
}

.search-results a {
    color: #0097b2;
    text-decoration: none;
    font-weight: 700;
}

.search-results a:hover {
    text-decoration: underline;
}

.search-results p {
    color: #545454;
    font-size: 14px;
    line-height: 1.5;
}

/* Căutare mobil */

.mobile-search-form {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    padding: 10px 20px;
    background-color: white;
    z-index: 999;
    border-top: 1px solid #dddddd;
}

.mobile-search-form input[type="search"] {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    width: 100%;
}

/* === Buton lupă în câmpul de căutare mobil === */
.mobile-search-form.mobile-search-enhanced {
    position: absolute;
    /* rămâne ca la tine */
}

.mobile-search-form.mobile-search-enhanced input[type="search"] {
    padding-right: 44px;
    /* spațiu pentru buton */
}

.mobile-search-btn {
    position: absolute;
    right: 26px;
    /* se aliniază cu padding-ul containerului (20px) */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    /* gri când e inactiv */
    opacity: 0.6;
    pointer-events: none;
    /* NU e clickabil până nu e activ */
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.mobile-search-btn.active {
    color: #0097b2;
    /* albastru ca #search-btn.active */
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1.08);
}


/* === MODAL REUTILIZABIL (Educație / Fraude) === */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1100;
}

.modal.open {
    display: block;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal__panel {
    position: absolute;
    inset: 0;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    background: #fff;
    max-width: 900px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px 16px 40px;
    border-radius: 0;
}

@media (min-width: 920px) {
    .modal__panel {
        top: 5%;
        height: 90%;
        border-radius: 16px;
    }
}

.modal__close {
    position: sticky;
    top: 0;
    float: right;
    background: transparent;
    border: 0;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.modal__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 12px;
}

.modal__content {
    line-height: 1.8;
    font-weight: 400;
    text-align: justify;
}

body.no-scroll {
    overflow: hidden;
}

/* === COMPONENTE BLOG CARD === */

.blog-card {
    background: #fff;
    border: 2px solid #0097b2;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 340px;
    text-align: left;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-image {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #eee;
}

.blog-text {
    padding: 16px 20px;
}

.blog-text h3 {
    color: #0097b2;
    margin-bottom: 8px;
}

.blog-date {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

.blog-text p {
    font-size: 15px;
    line-height: 1.6;
    color: #545454;

    display: -webkit-box;
    display: box;
    /* fallback pentru browsere vechi (opțional) */

    -webkit-box-orient: vertical;
    box-orient: vertical;

    -webkit-line-clamp: 4;
    /* pentru Chrome / Safari / Edge */
    line-clamp: 4;
    /* proprietatea standard pentru viitor */

    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.6em * 4);
}

.blog-btn-wrap {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.btn-secondary {
    background-color: transparent;
    color: #0097b2;
    border: none;
    padding: 8px 14px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    text-decoration: underline;
    color: #0097b2;
}




/* === RESPONSIVE COMPONENTE === */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .search-toggle {
        display: block;
    }

    .search-form {
        display: none;
    }
}

.modal__back {
    position: sticky;
    top: 0;
    float: left;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
    display: none;
}

.modal__back svg {
    display: block;
}

#modal-title {
    margin-bottom: 0.75em;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 16px;
    border-radius: 14px;

    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    backdrop-filter: blur(6px);
}

.cookie-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-text a {
    color: inherit;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cookie-text {
        text-align: center;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}


.cookie-btn.secondary {
    background: transparent;
    color: #ddd;
    border: 1px solid #555;
}

/* ===========================
   Newsletter (global)
   =========================== */

/* Cutia întunecată (overlay) folosită pe index/blog/article */
.text-background {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 30px;
    border-radius: 15px;
    display: inline-block;
}

/* Stilul „cutiei” de newsletter, cu umbră */
.newsletter-box {
    display: block;
    width: 100%;
    margin: 40px auto 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    color: white;
    text-align: center;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.newsletter-box h3,
.newsletter-box p {
    color: #fff;
}

.newsletter-box input[type="email"] {
    background-color: rgba(255, 255, 255, 0.9);
    color: #545454;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    margin: 10px 0;
}

.newsletter-box label,
.newsletter-box a {
    color: #fff;
}

.newsletter-box .btn {
    background-color: #0cc0df;
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-box .btn:hover {
    color: #545454;
}

/* Evidențiere checkbox termeni când este eroare (Newsletter / Contact) */
.terms-checkbox.field-error input[type="checkbox"] {
    outline: 2px solid #d93025;
    outline-offset: 2px;
    border-radius: 3px;
}