/* ========================================
   Guide List Embed Plugin - Front-end CSS
   ======================================== */

/* ---------- Grid Layout ---------- */
.gle-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 960px) {
    .gle-guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gle-guide-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ---------- Card ---------- */
.gle-guide-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gle-guide-card:hover,
.gle-guide-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    outline: none;
}

.gle-card-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.gle-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.35s ease;
}

.gle-card-langs {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    max-width: 70%;
}

.gle-lang-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.3;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
}

.gle-guide-card:hover .gle-card-photo img {
    transform: scale(1.05);
}

.gle-card-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
}

.gle-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gle-card-name {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.gle-card-city {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #888;
    text-transform: capitalize;
}

.gle-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.gle-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #eef6ff;
    color: #2a7ae2;
    font-size: 0.78rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.gle-card-intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gle-card-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: center;
    width: 100%;
}

.gle-card-btn:hover {
    background: #4b5563;
}

/* ---------- Lightbox ---------- */
.gle-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.gle-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
}

.gle-lightbox.gle-active .gle-lightbox-overlay {
    opacity: 1;
}

.gle-lightbox-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.gle-lightbox.gle-active .gle-lightbox-container {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.gle-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.2s ease;
    line-height: 1;
}

.gle-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #222;
}

/* ---------- Lightbox Content ---------- */
.gle-lightbox-content {
    display: flex;
    gap: 0;
}

.gle-lb-photo {
    flex: 0 0 340px;
    min-height: 400px;
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 16px 0 0 16px;
}

.gle-lb-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.gle-lb-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.gle-lb-info h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
}

.gle-lb-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
}

.gle-lb-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gle-lb-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gle-lb-meta-item span:last-child {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.gle-lb-intro {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #444;
    flex: 1;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.gle-lb-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gle-btn-line {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    background: #06c755;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.gle-btn-line:hover {
    background: #05a848;
    color: #fff !important;
}

.gle-btn-line svg {
    flex-shrink: 0;
}

.gle-btn-profile {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.4rem;
    background: #fff;
    color: #2a7ae2 !important;
    border: 2px solid #2a7ae2;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.gle-btn-profile:hover {
    background: #2a7ae2;
    color: #fff !important;
}

/* ---------- Responsive Lightbox ---------- */
@media (max-width: 700px) {
    .gle-lightbox-container {
        width: 95%;
        max-height: 92vh;
        border-radius: 12px;
    }

    .gle-lightbox-content {
        flex-direction: column;
    }

    .gle-lb-photo {
        flex: 0 0 auto;
        min-height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 12px 12px 0 0;
    }

    .gle-lb-info {
        padding: 1.25rem;
    }

    .gle-lb-info h2 {
        font-size: 1.3rem;
    }

    .gle-lb-meta {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
    }

    .gle-lb-actions {
        flex-direction: column;
    }

    .gle-btn-line,
    .gle-btn-profile {
        text-align: center;
        justify-content: center;
    }
}

/* ---------- Closing animation ---------- */
.gle-lightbox.gle-closing .gle-lightbox-overlay {
    opacity: 0;
}

.gle-lightbox.gle-closing .gle-lightbox-container {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
}
