/* ===================================================================
   UTILITIES/TEXT.CSS
   Text Decoration and Link Styles
   =================================================================== */
/* ===== 111. TEXT DECORATION UTILITIES ===== */

/* ----- 111.1 Text Decoration Types ----- */
.text-decoration-none {
    text-decoration: none !important;
}

.text-decoration-underline {
    text-decoration: underline !important;
}

/* ===== 124. LINK STYLES ===== */

/* ----- 124.1 Base Links ----- */
a,
a:hover,
a:focus {
    color: #0088cc;
}

/* ===== SEARCH INPUT STYLING ===== */
#search-input {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 15px;
    font-size: 16px;
    color: #ffffff;
    background-color: rgba(42, 47, 52, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: block;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.5);
    border-color: var(--primary-color);
}

#search-input::placeholder {
    color: var(--muted-text);
    opacity: 0.7;
}

/* =========== End framework.ui.css =========== */


/* ===== LIGHTBOX MODAL ===== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 16px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    top: 20px;
    right: 35px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Make images clickable */
.media-container.image {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.media-container.image:hover {
    transform: scale(1.02);
    opacity: 0.9;
}


/* ===== MEDIA GALLERY GRID ===== */
/* Specific class for image galleries - always use grid layout when visible */
.toggle > .toggle > .toggle-content.media-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 15px !important;
    padding: 15px 0 !important;
}

/* Only hide when fully collapsed (jQuery will handle the animation) */
.toggle:not(.active) > .toggle > .toggle-content.media-gallery[style*="display: none"] {
    display: none !important;
}

.media-gallery .media-container.image {
    display: block;
    width: 100%;
    margin: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.media-gallery .media-container.image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-gallery .media-container.image:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.5);
}

/* Overlay effect on hover */
.media-gallery .media-container.image::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.media-gallery .media-container.image:hover::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .toggle-content {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .toggle-content {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .toggle-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
    
    .media-container.image img {
        height: 150px;
    }
}

/* ===== TOGGLE FIX - Ensure closed toggles are hidden ===== */
.toggle:not(.active) > .toggle-content,
.toggle:not(.active) > section > .toggle-content {
    display: none !important;
}

.toggle.active > .toggle-content,
.toggle.active > section > .toggle-content {
    display: block !important;
}

/* Override for media-gallery when active */
.toggle.active > section > .toggle-content.media-gallery,
.toggle.active > .toggle-content.media-gallery {
    display: grid !important;
}



/* ===================================================================
   CHANGELOG MARKDOWN STYLING
   =================================================================== */

#changelog-content h2 {
    color: #0088cc;
    border-bottom: 2px solid #0088cc;
    padding-bottom: 0.5rem;
    padding-left: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#changelog-content h3 {
    color: #1abc9c;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

#changelog-content ul {
    list-style: none;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#changelog-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#changelog-content ul li::before {
    content: "•";
    color: #0088cc;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

#changelog-content code {
    background: rgba(0, 136, 204, 0.2);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #00b4d8;
}

#changelog-content a {
    color: #00b4d8;
    text-decoration: none;
}

#changelog-content a:hover {
    text-decoration: underline;
}

#changelog-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

#changelog-content strong {
    color: #fff;
    font-weight: 600;
}

#changelog-content em {
    font-style: italic;
    color: #e9ecef;
}

#changelog-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}




/* ===== BOOTSTRAP TEXT REPLACEMENTS ===== */

/* Text Alignment */
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }

/* Text Colors */
.text-primary { color: #0d6efd !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #198754 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #0dcaf0 !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #212529 !important; }
.text-muted { color: #6c757d !important; }
.text-white { color: #fff !important; }

/* Font Weight */
.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-extra-bold { font-weight: 800 !important; }

/* Font Size */
.text-7 { font-size: 2.5rem !important; }

/* Small Text */
.small { font-size: 0.875em !important; }
