/* ==========================================
   Guides & Tips - Frontend Styles
   ========================================== */

.gt-widget {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ECEEF4;
    padding: 24px;
    box-sizing: border-box;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.gt-widget.gt-no-hover .gt-item:hover {
    background: transparent !important;
    transform: none !important;
}

.gt-widget.gt-no-hover .gt-item:hover .gt-thumb {
    transform: none !important;
}

/* ----- Header ----- */
.gt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.gt-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gt-heading-icon {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    color: #F59E0B;
    line-height: 1;
    flex-shrink: 0;
}

.gt-heading-icon svg {
    width: 18px;
    height: 18px;
    fill: #F59E0B;
    display: block;
}

.gt-heading {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.gt-viewall {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #7C3AED;
    text-decoration: none;
    transition: color 0.3s ease, gap 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.gt-viewall svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.gt-viewall:hover {
    color: #6D28D9;
    gap: 8px;
}

.gt-viewall:hover svg {
    transform: translateX(3px);
}

.gt-viewall:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ----- List ----- */
.gt-list {
    display: flex;
    flex-direction: column;
}

/* ----- Item ----- */
.gt-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.gt-item:not(:last-child) {
    margin-bottom: 18px;
}

.gt-item:hover {
    background: #F8FAFC;
}

.gt-item:focus-within {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
    border-radius: 12px;
}

/* ----- Thumbnail ----- */
.gt-thumb-wrap {
    flex-shrink: 0;
    line-height: 0;
}

.gt-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gt-item:hover .gt-thumb {
    transform: scale(1.05);
}

/* ----- Content ----- */
.gt-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gt-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gt-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gt-title a:hover {
    color: #7C3AED;
}

.gt-excerpt {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #6B7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gt-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #9CA3AF;
    margin-top: 2px;
}

.gt-meta-date,
.gt-meta-read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gt-meta-date svg,
.gt-meta-read svg {
    width: 13px;
    height: 13px;
    stroke: #9CA3AF;
    flex-shrink: 0;
}

.gt-meta-sep {
    display: inline-block;
    color: #D1D5DB;
    font-size: 10px;
    line-height: 1;
}

/* ----- Divider ----- */
.gt-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border: none;
    border-top: 1px solid #F1F5F9;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.gt-item:last-child .gt-divider {
    display: none;
}

/* ----- Focus Styles ----- */
.gt-item a:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ----- Responsive Tablet ----- */
@media (max-width: 1024px) {
    .gt-widget {
        padding: 20px;
    }

    .gt-heading {
        font-size: 17px;
    }

    .gt-heading-icon {
        font-size: 17px;
    }

    .gt-heading-icon svg {
        width: 17px;
        height: 17px;
    }

    .gt-item {
        gap: 14px;
        padding: 10px 0;
    }

    .gt-thumb {
        width: 54px;
        min-width: 54px;
        height: 54px;
    }

    .gt-title {
        font-size: 15px;
    }
}

/* ----- Responsive Mobile ----- */
@media (max-width: 640px) {
    .gt-widget {
        padding: 16px;
        border-radius: 12px;
    }

    .gt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .gt-header-left {
        gap: 8px;
    }

    .gt-heading {
        font-size: 16px;
    }

    .gt-heading-icon {
        font-size: 16px;
    }

    .gt-heading-icon svg {
        width: 16px;
        height: 16px;
    }

    .gt-item {
        gap: 12px;
        padding: 10px 0;
    }

    .gt-thumb {
        width: 48px;
        min-width: 48px;
        height: 48px;
        border-radius: 6px;
    }

    .gt-title {
        font-size: 14px;
    }

    .gt-excerpt {
        font-size: 13px;
    }

    .gt-meta {
        font-size: 12px;
    }

    .gt-meta-date svg,
    .gt-meta-read svg {
        width: 12px;
        height: 12px;
    }
}

/* ----- RTL ----- */
.rtl .gt-header-left {
    flex-direction: row;
}

.rtl .gt-viewall svg {
    transform: scaleX(-1);
}

.rtl .gt-viewall:hover svg {
    transform: scaleX(-1) translateX(-3px);
}

/* ----- Dark Mode ----- */
@media (prefers-color-scheme: dark) {
    .gt-widget {
        background: #1F2937;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .gt-heading {
        color: #F3F4F6;
    }

    .gt-viewall {
        color: #A78BFA;
    }

    .gt-viewall:hover {
        color: #C4B5FD;
    }

    .gt-item:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .gt-title {
        color: #F3F4F6;
    }

    .gt-title a:hover {
        color: #A78BFA;
    }

    .gt-excerpt {
        color: #9CA3AF;
    }

    .gt-meta {
        color: #6B7280;
    }

    .gt-meta-date svg,
    .gt-meta-read svg {
        stroke: #6B7280;
    }

    .gt-divider {
        border-color: rgba(255, 255, 255, 0.06);
    }
}
