/**
 * Theme Name: Koji Child
 * Text Domain: koji
 * Template: koji
 * Version: 1.2
 * Author: Fernando Arroyo
 * Author URI: https://pinano.org
 */

/* ==========================================================================
   1. Custom Fonts
   ========================================================================== */

/*
 * Webfont: CoreCircus by S-Core
 * URL: http://www.myfonts.com/fonts/s-core/core-circus/regular/
 * Copyright: Copyright (c) 2013 by S-Core Co., Ltd.. All rights reserved.
 * Licensed pageviews: 10,000
 */
@font-face {
    font-family: 'CoreCircus';
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/209981/333BF4_8_0.eot');
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/209981/333BF4_8_0.eot?#iefix') format('embedded-opentype'),
        url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/209981/333BF4_8_0.woff2') format('woff2'),
        url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/209981/333BF4_8_0.woff') format('woff'),
        url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/209981/333BF4_8_0.ttf') format('truetype');
}


/* ==========================================================================
   2. General Layout & Typography
   ========================================================================== */

/* Fix layout margins and header width on larger screens */
@media (min-width: 1000px) {
    #site-header {
        padding: 6rem 3.5rem 0 3.5rem;
        width: 26%;
    }

    #site-wrapper {
        padding-left: 26%;
        position: relative;
    }

    #site-content {
        padding: 6rem 6rem 0 6rem;
    }

    .site-title {
        width: 100%;
    }
}

@media (min-width: 1440px) {
    #site-header {
        width: 36rem;
    }

    #site-wrapper {
        padding-left: 36rem;
    }
}


/* ==========================================================================
   3. Site Header & Logo
   ========================================================================== */

/* Design tokens for the site logo */
:root {
    --logo-main: #f98ca4;
    /* Primary Pink */
    --logo-accent: #65f283;
    /* 3D Green Depth */
    --logo-outline: #6e1f58;
    /* Dark Purple Outline */
}

/* Hide the site description under the logo */
p.site-description {
    display: none;
}

/* Add drop shadow to the site header on mobile devices */
@media (max-width: 1000px) {
    header#site-header {
        box-shadow: 0 0.3rem 1.2rem 0 rgb(5 10 15 / 25%);
    }
}

/* Custom styling and optimized 3D text effect for the site title (logo) */
.site-title {
    text-align: left;
}

.site-title a {
    font-family: 'CoreCircus', sans-serif;
    text-transform: uppercase;
    font-size: 1.3em;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--logo-main);
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow:
        /* Precise dark outline */
        -1px -1px 0 var(--logo-outline),
        1px -1px 0 var(--logo-outline),
        -1px 1px 0 var(--logo-outline),
        1px 1px 0 var(--logo-outline),

        /* 3D Depth effect (Green layers) */
        1px 1px 0 var(--logo-accent),
        2px 2px 0 var(--logo-accent),
        3px 3px 0 var(--logo-accent),
        4px 4px 0 var(--logo-accent),

        /* Complex base shadow for solid look */
        1px 0px 0 var(--logo-accent), 0px 1px 0 var(--logo-accent),
        2px 1px 0 var(--logo-accent), 1px 2px 0 var(--logo-accent),
        3px 2px 0 var(--logo-accent), 2px 3px 0 var(--logo-accent),
        4px 3px 0 var(--logo-accent), 3px 4px 0 var(--logo-accent),
        5px 4px 0 var(--logo-accent),
        3px 5px 0 var(--logo-outline), 6px 5px 0 var(--logo-outline),
        -1px 2px 0 black, 0 3px 0 var(--logo-outline), 1px 4px 0 var(--logo-outline), 2px 5px 0 var(--logo-outline),
        2px -1px 0 var(--logo-outline), 3px 0 0 var(--logo-outline), 4px 1px 0 var(--logo-outline), 5px 2px 0 var(--logo-outline), 6px 3px 0 var(--logo-outline), 7px 4px 0 var(--logo-outline);
}

.site-title a:hover {
    transform: scale(1.05) rotate(-1deg);
    color: var(--logo-accent);
    text-shadow:
        -1px -1px 0 var(--logo-outline),
        1px -1px 0 var(--logo-outline),
        -1px 1px 0 var(--logo-outline),
        1px 1px 0 var(--logo-outline),
        1px 1px 0 var(--logo-main),
        2px 2px 0 var(--logo-main),
        3px 3px 0 var(--logo-main),
        4px 4px 0 var(--logo-main),
        5px 5px 0 var(--logo-outline);
}

.site-title a:active {
    transform: scale(0.95);
    transition: transform 0.1s;
    color: var(--logo-accent);
}


/* ==========================================================================
   4. Index / Archive Previews
   ========================================================================== */

/* Styling for the individual post preview cards on the index page */
.preview-wrapper {
    background: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 0.3rem 1.2rem 0 rgb(5 10 15 / 25%);
}

/* Margins for the post excerpt inside preview cards */
div.post-excerpt {
    margin: 0px 0px 20px 0px;
}

div.post-excerpt p {
    font-size: 13px;
}

/* Margins and spacing for post meta information (date, category, etc.) in preview cards */
.post-meta li:not(:first-child) {
    margin-left: 0.8rem;
}

.post-meta .meta-icon {
    margin-right: 0.3rem;
}


/* ==========================================================================
   5. Post Content & Media (Audio, Video, Galleries)
   ========================================================================== */

/* --- 5.1 Gallery Slider Styles --- */
.gallery-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    background-color: #000;
}

.gallery-slider {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
}

.gallery-slider::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

.gallery-slider-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.gallery-slider-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 4px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slider-prev,
.gallery-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.2s ease;
    text-decoration: none !important;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.9));
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    font-family: sans-serif;
}

.gallery-slider-container:hover .gallery-slider-prev,
.gallery-slider-container:hover .gallery-slider-next {
    opacity: 1;
}

.gallery-slider-prev:hover,
.gallery-slider-next:hover {
    background: transparent;
    text-decoration: none !important;
    transform: translateY(-50%) scale(1.15);
    color: white;
    opacity: 1;
}

.gallery-slider-prev {
    left: 0px;
}

.gallery-slider-next {
    right: 0px;
}

.gallery-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
    pointer-events: none;
}

.gallery-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-slider-dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.3);
}

@media (hover: none) and (pointer: coarse) {

    .gallery-slider-prev,
    .gallery-slider-next {
        opacity: 1;
        filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.9));
    }
}

/* --- 5.2 Audio Preview Styles --- */
.audio-preview-wrapper {
    display: block !important;
    margin: 10px 0 10px 10px !important;
    padding: 0 !important;
    width: fit-content;
    text-decoration: none !important;
}

.audio-preview-icon {
    color: #888;
    width: 42px;
    height: 42px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
}

.audio-preview-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}


/* --- 5.4 Single Post Audio Icon --- */
.audio-featured-icon {
    display: block;
    margin: 20px 0 20px 0;
    width: 60px !important;
    height: 60px !important;
    color: #888;
}

.audio-featured-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- 5.3 Audio Player Styles --- */
/* Audio player sizing inside index preview cards */
div.preview-wrapper audio {
    margin: 10px;
    width: calc(100% - 20px);
}

/* Global audio player width (e.g., inside single posts) */
audio {
    width: 100%;
}

/* --- 5.3 Video Player Styles --- */
/* Make the WordPress [video] shortcode responsive */
/* Reference: https://cfxdesign.com/how-to-make-the-wordpress-video-shortcode-responsive/ */
.wp-video,
video.wp-video-shortcode,
.mejs-container,
.mejs-overlay.load {
    width: 100% !important;
    height: 100% !important;
}


/* ==========================================================================
   6. Widgets & Sidebar
   ========================================================================== */

/* Fix missing top margin for the categories widget */
.margin-top-none {
    margin-top: 0px;
}

div.widget_categories {
    margin-top: 10px;
}

div.widget_categories label,
.wp-block-categories__label {
    display: none !important;
}

/* Adjust the H2 heading size in the sidebar to match the archive labels */
@media (min-width: 600px) {
    div.widget-content h2 {
        font-size: 1.6rem !important;
    }
}


/* ==========================================================================
   7. Forms & Comments
   ========================================================================== */

/* Hide the "Website" URL field in the comment form to reduce spam/clutter */
p.comment-form-url label[for="url"],
p.comment-form-url #url {
    display: none;
}

/* Add missing chevron dropdown icon for <select> elements, omitted by parent theme */
select {
    background: #fff url('./assets/svg/chevron-down.svg') no-repeat;
    background-size: 25px;
    background-position: calc(100% - 1.4rem) center;
}