/*
Theme Name: Extendable Child - Kahena BK
Theme URI: https://kahenabk.com
Author: Kahena BK
Author URI: https://kahenabk.com
Description: Child theme for Kahena BK - Blog and Gallery enhancements
Template: extendable
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: extendable-child
*/

/* Gallery lightbox overlay */
.kahena-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.kahena-lightbox.active {
    opacity: 1;
}
.kahena-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}
.kahena-lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
}
.kahena-lightbox-prev,
.kahena-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 20px;
    z-index: 100000;
    user-select: none;
}
.kahena-lightbox-prev { left: 20px; }
.kahena-lightbox-next { right: 20px; }

/* Gallery grid */
.kahena-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.kahena-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.kahena-gallery-item:hover {
    transform: scale(1.02);
}
.kahena-gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
.kahena-gallery-item .kahena-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 2rem 0.75rem 0.75rem;
    font-size: 0.875rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.kahena-gallery-item:hover .kahena-gallery-caption {
    transform: translateY(0);
}

/* Blog enhancements */
.wp-block-post-featured-image {
    margin-bottom: 1.5rem;
}
.wp-block-post-featured-image img {
    border-radius: 8px;
    width: 100%;
    height: auto;
}
.kahena-blog-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.kahena-blog-meta span {
    margin-right: 1rem;
}
.kahena-blog-meta a {
    text-decoration: none;
}

/* Gallery archive */
.kahena-gallery-archive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.kahena-gallery-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--wp--preset--color--background, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}
.kahena-gallery-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.kahena-gallery-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.kahena-gallery-card .entry-header {
    padding: 1rem 1rem 0.5rem;
}
.kahena-gallery-card .entry-title {
    margin: 0;
    font-size: 1.125rem;
}
.kahena-gallery-card .entry-content {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
}
