/* =========================================================
   AI GURU BLOCK
   ========================================================= */

.ai-guru-block {
    width: 100%;
    margin: 40px 0;
    padding: 28px;
    box-sizing: border-box;

    border: 1px solid #e7e1d7;
    border-radius: 18px;

    background: #fffdf9;
}


/* =========================================================
   HEADER
   ========================================================= */

.ai-guru-header {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-bottom: 25px;
}


.ai-guru-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f4ead7;

    color: #6c4d22;

    font-size: 26px;
    line-height: 1;
}


.ai-guru-header h2 {
    margin: 0 0 5px;

    color: #222;

    font-size: 25px;
    line-height: 1.2;
}


.ai-guru-header p {
    margin: 0;

    color: #777;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.ai-guru-actions {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.ai-guru-btn {
    appearance: none;

    width: 100%;
    min-height: 58px;

    padding: 12px 14px;

    display: flex;
    align-items: center;

    gap: 10px;

    box-sizing: border-box;

    border: 1px solid #e6dfd2;
    border-radius: 12px;

    background: #ffffff;

    color: #333;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease,
        background .2s ease;
}


.ai-guru-btn:hover {
    transform: translateY(-2px);

    border-color: #cda96b;

    background: #fffaf0;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .07);
        color:#000;
}


.ai-guru-btn:focus {
    outline: none;

    border-color: #cda96b;

    box-shadow:
        0 0 0 3px rgba(205, 169, 107, .15);
}


.ai-guru-btn:disabled {
    opacity: .55;

    cursor: wait;

    transform: none;
}


.ai-guru-btn.ai-guru-loading {
    cursor: wait;
}


.ai-guru-btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #f7efe2;

    color: #6c4d22;

    font-size: 17px;
    line-height: 1;
}


/* =========================================================
   RESULT BOX
   ========================================================= */

.ai-guru-result {
    width: 100%;

    margin-top: 25px;

    overflow: hidden;

    border: 1px solid #e5ded3;
    border-radius: 15px;

    background: #ffffff;
}


.ai-guru-result[hidden] {
    display: none !important;
}


/* =========================================================
   RESULT HEADER
   ========================================================= */

.ai-guru-result-header {
    min-height: 54px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    border-bottom: 1px solid #eee7dd;

    background: #faf7f1;
}


.ai-guru-result-title {
    color: #222;

    font-size: 16px;
    font-weight: 700;
}


.ai-guru-close {
    width: 32px;
    height: 32px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: transparent;

    color: #555;

    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}


.ai-guru-close:hover {
    background: #eee6d9;

    color: #222;
}


/* =========================================================
   LOADER
   ========================================================= */

.ai-guru-loader {
    min-height: 120px;

    padding: 25px;

    display: flex;
    align-items: center;

    gap: 5px;

    box-sizing: border-box;
}


.ai-guru-loader[hidden] {
    display: none !important;
}


.ai-guru-loader span {
    width: 7px;
    height: 7px;

    display: block;

    border-radius: 50%;

    background: #777;

    animation:
        aiGuruBounce 1.2s
        infinite ease-in-out;
}


.ai-guru-loader span:nth-child(2) {
    animation-delay: .15s;
}


.ai-guru-loader span:nth-child(3) {
    animation-delay: .30s;
}


.ai-guru-loader em {
    margin-left: 8px;

    color: #777;

    font-size: 13px;
    font-style: normal;
}


@keyframes aiGuruBounce {

    0%,
    80%,
    100% {
        transform: scale(.7);
        opacity: .5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }

}


/* =========================================================
   CONTENT
   ========================================================= */

.ai-guru-content {
    padding: 22px;

    box-sizing: border-box;

    color: #333;

    font-size: 15px;
    line-height: 1.75;
}


.ai-guru-content p {
    margin: 0 0 14px;
}


.ai-guru-content p:last-child {
    margin-bottom: 0;
}


.ai-guru-content h1,
.ai-guru-content h2,
.ai-guru-content h3,
.ai-guru-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;

    color: #222;
}


.ai-guru-content ul,
.ai-guru-content ol {
    margin-top: 10px;
    margin-bottom: 16px;

    padding-left: 22px;
}


/* =========================================================
   ASK GURU
   ========================================================= */

.ai-guru-question-box {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


.ai-guru-question-box label {
    color: #333;

    font-size: 15px;
    font-weight: 600;
}


.ai-guru-question {
    width: 100%;
    min-height: 120px;

    padding: 14px;

    resize: vertical;

    box-sizing: border-box;

    border: 1px solid #ddd4c8;
    border-radius: 10px;

    background: #fff;

    color: #333;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;

    outline: none;
}


.ai-guru-question::placeholder {
    color: #999;
}


.ai-guru-question:focus {
    border-color: #c8a66a;

    box-shadow:
        0 0 0 3px rgba(
            200,
            166,
            106,
            .12
        );
}


.ai-guru-question-footer {
    display: flex;
    align-items: center;
}


.ai-guru-submit {
    padding: 11px 20px;

    border: 0;
    border-radius: 8px;

    background: #222;

    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}


.ai-guru-submit:hover {
    background: #444;

    transform: translateY(-1px);
}


.ai-guru-submit:focus {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(
            34,
            34,
            34,
            .15
        );
}


/* =========================================================
   ERROR
   ========================================================= */

.ai-guru-error {
    padding: 16px;

    border-radius: 10px;

    background: #fff2f2;

    color: #a33;

    font-size: 14px;

    line-height: 1.6;
}


.ai-guru-error-title {
    margin-bottom: 5px;

    font-weight: 700;
}


.ai-guru-error-message {
    word-break: break-word;
}


/* =========================================================
   EMPTY
   ========================================================= */

.ai-guru-empty {
    color: #777;

    font-size: 14px;
}


/* =========================================================
   ARTICLES
   ========================================================= */

.ai-guru-articles {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}


.ai-guru-card {
    min-width: 0;

    overflow: hidden;

    border: 1px solid #e8e1d7;
    border-radius: 12px;

    background: #fff;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.ai-guru-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .07);
}


.ai-guru-card-image {
    display: block;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #f5f5f5;
}


.ai-guru-card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .3s ease;
}


.ai-guru-card:hover
.ai-guru-card-image img {
    transform: scale(1.04);
}


.ai-guru-card-body {
    padding: 14px;
}


.ai-guru-card-body h3 {
    margin: 0 0 8px;

    color: #222;

    font-size: 16px;
    line-height: 1.35;
}


.ai-guru-card-body h3 a {
    color: inherit;

    text-decoration: none;
}


.ai-guru-card-body h3 a:hover {
    text-decoration: underline;
}


.ai-guru-card-body p {
    margin: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .ai-guru-actions {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 900px) {

    .ai-guru-actions {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .ai-guru-articles {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .ai-guru-block {
        margin: 25px 0;

        padding: 18px;

        border-radius: 14px;
    }


    .ai-guru-header {
        align-items: flex-start;

        gap: 12px;
    }


    .ai-guru-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;

        font-size: 21px;
    }


    .ai-guru-header h2 {
        font-size: 21px;
    }


    .ai-guru-header p {
        font-size: 13px;
    }


    .ai-guru-actions {
        grid-template-columns: 1fr;

        gap: 9px;
    }


    .ai-guru-btn {
        min-height: 54px;
    }


    .ai-guru-result {
        margin-top: 18px;

        border-radius: 12px;
    }


    .ai-guru-result-header {
        min-height: 50px;

        padding: 0 14px;
    }


    .ai-guru-content {
        padding: 17px;

        font-size: 14px;
    }


    .ai-guru-question {
        min-height: 110px;
    }


    .ai-guru-articles {
        grid-template-columns: 1fr;

        gap: 12px;
    }

}