/* ==========================================================================
   Ligo Video Section - Frontend Styles
   Ligonature.it - PetsZone Theme Compatible
   ========================================================================== */

:root {
    --ligo-green: #4a7c59;
    --ligo-green-light: #5d9a6f;
    --ligo-green-dark: #3a6347;
    --ligo-bg-warm: #faf8f5;
    --ligo-bg-alt: #f4f1ec;
    --ligo-text: #333333;
    --ligo-text-light: #666666;
    --ligo-border: #e5e0d8;
    --ligo-radius: 12px;
    --ligo-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --ligo-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ---------- Single Video Section ---------- */
.ligo-video-section {
    padding: 60px 0;
    margin: 0 auto;
    max-width: 1200px;
}

.ligo-video-section + .ligo-video-section {
    border-top: 1px solid var(--ligo-border);
}

.ligo-video-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 0 20px;
}

.ligo-video-reversed .ligo-video-inner {
    direction: rtl;
}

.ligo-video-reversed .ligo-video-inner > * {
    direction: ltr;
}

/* ---------- Text Column ---------- */
.ligo-video-text {
    padding: 10px 0;
}

.ligo-video-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ligo-green-dark);
    margin: 0 0 20px 0;
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

.ligo-video-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--ligo-green);
    border-radius: 2px;
}

.ligo-video-reversed .ligo-video-title::after {
    left: auto;
    right: 0;
}

.ligo-video-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ligo-text);
}

.ligo-video-description p {
    margin-bottom: 15px;
}

.ligo-video-description p:last-child {
    margin-bottom: 0;
}

.ligo-video-description strong {
    color: var(--ligo-green-dark);
}

.ligo-video-description ul,
.ligo-video-description ol {
    margin: 15px 0;
    padding-left: 20px;
}

.ligo-video-description li {
    margin-bottom: 8px;
}

/* ---------- Video Player Column ---------- */
.ligo-video-player {
    border-radius: var(--ligo-radius);
    overflow: hidden;
    box-shadow: var(--ligo-shadow);
    background: #000;
}

/* YouTube responsive embed */
.ligo-video-youtube {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.ligo-video-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* MP4 video */
.ligo-video-mp4 video {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Archive Grid ---------- */
.ligo-videos-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.ligo-videos-grid {
    display: grid;
    gap: 30px;
}

.ligo-videos-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ligo-videos-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ---------- Video Card (Grid Layout) ---------- */
.ligo-video-card {
    background: #fff;
    border-radius: var(--ligo-radius);
    overflow: hidden;
    box-shadow: var(--ligo-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ligo-video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ligo-shadow-hover);
}

.ligo-video-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ligo-video-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ligo-bg-alt);
}

.ligo-video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ligo-video-card:hover .ligo-video-card-thumb img {
    transform: scale(1.05);
}

.ligo-video-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--ligo-bg-alt);
}

.ligo-video-card-placeholder .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: var(--ligo-green);
    opacity: 0.5;
}

.ligo-video-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ligo-green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ligo-video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(74, 124, 89, 0.85);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ligo-video-card-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
}

.ligo-video-card:hover .ligo-video-card-play {
    opacity: 1;
}

.ligo-video-card-body {
    padding: 20px;
}

.ligo-video-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ligo-green-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.ligo-video-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ligo-text-light);
    margin: 0;
}

/* ---------- Empty State ---------- */
.ligo-video-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ligo-text-light);
    font-size: 16px;
}

/* ---------- Single Page Template ---------- */
.ligo-video-single-page {
    background: var(--ligo-bg-warm);
    min-height: 60vh;
}

.ligo-video-single-page .ligo-video-section {
    padding: 40px 0 60px;
}

.ligo-video-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    font-size: 14px;
    color: var(--ligo-green);
    text-decoration: none;
    font-weight: 500;
}

.ligo-video-back-link:hover {
    color: var(--ligo-green-dark);
    text-decoration: underline;
}

/* ---------- Archive Page Template ---------- */
.ligo-video-archive-page {
    background: var(--ligo-bg-warm);
    min-height: 60vh;
    padding-top: 0;
}

/* ---------- Featured Video (shortcode) ---------- */
.ligo-video-featured-wrap {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}
.ligo-video-featured-player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--ligo-radius);
    box-shadow: var(--ligo-shadow);
    cursor: pointer;
    background: #000;
}
.ligo-video-featured-player img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.ligo-video-featured-player:hover img {
    transform: scale(1.02);
}
.ligo-video-featured-player .ligo-video-card-play {
    width: 80px;
    height: 80px;
    opacity: 1;
}
.ligo-video-featured-player .ligo-video-card-play::after {
    border-width: 14px 0 14px 24px;
}
.ligo-video-featured-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.ligo-video-featured-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--ligo-green-dark);
    margin: 15px 0 0;
}

/* ---------- Featured video (old hardcoded): same width as grid ---------- */
.ligo-videos-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}
.ligo-video-featured {
    max-width: 100%;
    margin: 0 0 30px 0;
    background: #fff;
    border-radius: var(--ligo-radius);
    overflow: hidden;
    box-shadow: var(--ligo-shadow);
}
.ligo-video-featured .ligo-video-thumb-wrap {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.ligo-video-featured .ligo-video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ligo-video-featured .ligo-video-info {
    padding: 20px;
}

.ligo-video-archive-page .ligo-videos-archive {
    padding-top: 0;
}

/* ---------- Download Button ---------- */
.ligo-video-card-download {
    padding: 0 20px 20px;
}

.ligo-video-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    color: #99c21e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #99c21e;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ligo-video-download-btn:hover {
    background: #99c21e;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.ligo-video-download-btn:active {
    transform: translateY(0);
}

.ligo-download-icon {
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .ligo-video-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ligo-video-reversed .ligo-video-inner {
        direction: ltr;
    }

    .ligo-video-title {
        font-size: 24px;
    }

    .ligo-video-section {
        padding: 40px 0;
    }

    .ligo-videos-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ligo-video-inner {
        gap: 20px;
        padding: 0 15px;
    }

    .ligo-video-title {
        font-size: 22px;
    }

    .ligo-video-description {
        font-size: 15px;
    }

    .ligo-video-section {
        padding: 30px 0;
    }

    .ligo-videos-cols-2,
    .ligo-videos-cols-3 {
        grid-template-columns: 1fr;
    }

    .ligo-video-card-body {
        padding: 15px;
    }
}
