/*
Theme Name: Twenty Twenty-Three
Theme URI: https://wordpress.org/themes/twentytwentythree
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Three is designed to take advantage of the new design tools introduced in WordPress 6.1. With a clean, blank base as a starting point, this default theme includes ten diverse style variations created by members of the WordPress community. Whether you want to build a complex or incredibly simple website, you can do it quickly and intuitively through the bundled styles or dive into creation and full customization yourself.
Requires at least: 6.1
Tested up to: 6.7
Requires PHP: 5.6
Version: 1.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: twentytwentythree
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/
/* --- Media Gallery Template Styles --- */

.media-gallery-template {
    max-width: 1000px; /* Keeps the layout clean and readable */
    margin: 0 auto;
    padding: 20px;
}

/* 1. Responsive Video Wrapper (Forces a 16:9 Aspect Ratio) */
.media-video-container {
    margin-bottom: 40px;
    margin-top: 20px;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 2. Responsive 15-Photo Grid */
.media-thumbnail-grid {
    display: grid;
    /* Automatically creates columns that are at least 180px wide */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 50px;
    margin-top: 30px;
}
.gallery-item img {
    width: 100%;
    height: 180px; /* Forces uniform height */
    object-fit: cover; /* Crops images beautifully without stretching them */
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    cursor: pointer;
}

/* 3. Styled Links Box */
.media-links-section {
    background: #f4f6f8;
    padding: 25px 35px;
    border-radius: 10px;
    border-left: 6px solid #0073aa; /* WordPress default blue, change to your brand color */
}
.media-links-section h3 {
    margin-top: 0;
    font-size: 1.5rem;
}
.custom-links-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.custom-links-list li {
    margin-bottom: 12px;
}
.custom-links-list a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: color 0.2s ease;
}
.custom-links-list a::before {
    content: "→ ";
    color: #0073aa;
}
.custom-links-list a:hover {
    color: #0073aa;
}

/* --- Lightbox Styles --- */

.custom-lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999; /* Sit on top of everything including WordPress admin bar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark semi-transparent background */
    align-items: center;
    justify-content: center;
}

/* Flexbox utility to show the lightbox */
.custom-lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}
.lightbox-close:hover {
    color: #bbb;
}

/* Navigation Arrows */
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 4px;
    user-select: none;
    transition: background 0.3s ease;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0,0,0,0.8);
}
.lightbox-prev {
    left: 20px;
}
.lightbox-next {
    right: 20px;
}