/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
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: astra-child
Template: astra
*/

/* -----------------------------
    Global Styling
----------------------------- */
h2 {
    margin-top: 52px !important;
}

a[href^="http"] {
    &:not([href*="visualdatalabs.com"]) {
        color: #1976d2;
        font-weight: 500;
    }
}

.indent-list {
    margin-left: 2rem !important;
}

.entry-title {
    font-weight: 600;
}

a.external {
    color: #1976d2;
    font-weight: 500;
}

ul,
ol {
    list-style-position: inside;
}

.ast-container {
    padding: 0 5px !important;
}

.ast-separate-container #primary {
    padding: 2rem 0 !important;
}

.ast-breadcrumbs {
    span {
        font-size: 0.9rem;
    }

    .trail-items li::after {
        padding: 0 0.3em;
        content: ">" !important;
    }
}

@media (min-width: 922px) {
    .wp-block-uagb-image {
        padding: 0 20px 0 20px;
    }
}

/* -----------------------------
    Hero Section Styling
----------------------------- */
:root {
    --theme-color: #002c5f;
    --primary-color: #222222;
    --side-padding: 20px;
}

.card-gallery {
    padding: 0 var(--side-padding) 20px var(--side-padding);
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;

    .section-title {
        font-size: 2rem;
        color: var(--primary-color);
        font-weight: 300;
        margin-bottom: 10px;
        text-align: left;
    }

    p {
        color: var(--primary-color);
        text-align: left;
    }
}

.card-gallery:last-child {
    margin-bottom: 40px;
}

.hero-section {
    color: #fff;
    text-align: center;
    padding: 120px var(--side-padding);
    position: relative;
    overflow: hidden;

    .hero-inner {
        max-width: 900px;
        margin: 0 auto;

        .hero-title {
            font-size: 2.4rem;
            font-weight: 700;
            letter-spacing: 0.05rem;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 20px;
        }

        .hero-subtitle {
            font-size: 1.2rem;
            line-height: 1.7;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 40px;
        }

        .hero-buttons {
            display: flex;
            justify-content: center;
            gap: 16px;
            flex-wrap: wrap;

            .hero-btn {
                display: inline-block;
                padding: 14px 28px;
                border-radius: 50px;
                font-weight: 600;
                font-size: 1rem;
                transition: all 0.3s ease;
                text-decoration: none;
                cursor: pointer;

                &.primary {
                    background: #fff;
                    color: var(--theme-color);

                    &:hover {
                        background: #e8f9fb;
                    }
                }

                &.secondary {
                    border: 2px solid #fff;
                    color: #fff;

                    &:hover {
                        background: rgba(255, 255, 255, 0.1);
                    }
                }
            }
        }
    }
}

/* -----------------------------
    ギャラリー共通スタイル
----------------------------- */
.grid-container p {
    color: var(--primary-color);
}

.gallery-desc {
    font-size: 1.1rem;
    /* color: #555; */
    color: var(--primary-color);
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
    gap: 16px;

    /* -----------------------------
        カードデザイン
    ----------------------------- */
    .category-card {
        border-radius: 10px;
        transition: transform 0.3s ease;
        opacity: 1;
        transform: scale(1);
        transition: all 0.4s ease;

        &:hover {
            transform: scale3d(1.01, 1.01, 1.01);

            img,
            h3 {
                transform: scale(1.05);
            }
        }

        a {
            position: relative;
        }

        .img-container {
            border-radius: 10px;
            position: relative;
            width: 100%;
            height: 180px;
            overflow: hidden;
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: brightness(0.5);
            transition: transform 0.3s ease;
        }

        .cat-info {
            position: absolute;
            display: flex;
            justify-content: center;
            flex-direction: column;
            left: 50%;
            top: 50%;
            width: 100%;
            height: 180px;
            transform: translate(-50%, -50%);
            text-align: center;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            /* Safari用 */

            h3 {
                font-size: 1.7rem;
                font-weight: bold;
                color: #fff;
                text-shadow: 2px 2px 4px #000;
                /* 読みやすさのために影をつける */
                transition: transform 0.3s ease;
            }
        }
    }

    .viz-card {
        background: #ffffff;
        /* background: linear-gradient(0deg, #004c7f 0%, #00a6a6 100%);; */
        /* #f9fafb; */
        /* border: solid 2px var(--bg-color); */
        border-radius: 20px;
        overflow: hidden;
        transition: transform 0.3s ease;
        opacity: 1;
        transform: scale(1);
        transition: all 0.4s ease;
        box-shadow: 0 0 10px 0 #0001;

        >a {
            display: flex;
            flex-direction: column;
            height: 100%;
            position: relative;
        }

        .viz-card-type {
            position: absolute;
            top: 8px;
            left: 8px;
            padding: 4px 8px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.05rem;
            border-radius: 4px;
            color: #fff;

            &.dataviz {
                background: rgba(37, 99, 235, 0.9);
            }

            &.article {
                background: rgba(75, 85, 99, 0.9);
            }
        }

        .viz-card-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            z-index: 2;

            padding: 4px 8px;
            font-size: 0.65rem;
            font-weight: 600;
            letter-spacing: 0.08rem;

            color: #fff;
            background: linear-gradient(135deg, #cc0f0f 0%, #dc0f0f 100%);
            border-radius: 9999px;

            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }

        &.invalid {
            background: #fff;
        }

        &:hover {
            transform: scale3d(1.05, 1.05, 1.05);
        }

        img {
            width: 100%;
            height: 240px;
            object-fit: cover;
            object-position: top left;
        }

        .viz-info {
            padding: 10px 10px;
            text-align: left;
            flex-grow: 1;
            display: flex;
            flex-direction: column;

            h3 {
                font-size: 1.1rem;
                font-weight: bold;
                color: var(--theme-color);
                margin: 0 0 6px 0;
            }

            .viz-card-meta {
                margin-top: auto;
                font-size: 0.75rem;
                color: #6B7280;
            }

            .published-date,
            .modified-date {
                color: var(--theme-color);
                font-size: 0.8rem;
                line-height: 1.6;
                margin-bottom: 0px;
                text-align: right;
            }
        }
    }
}

.more-link {
    display: flex;
    align-items: center;
    height: 48px;
    width: fit-content;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    padding: 0 28px;
    margin: 16px auto;
    color: var(--theme-color);
    background: var(--primary-color);

    &:after {
        content: " →";
    }

    &:hover {
        opacity: .6;

        &:after {
            transform: translateX(6px);
            transition: all 0.4s ease;
        }
    }
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;

    .related-card {
        display: flex;
        background: #fff;
        border: 1px solid #e6e9ee;
        padding: 10px;
        border-radius: 8px;
        text-decoration: none;
        color: inherit;

        .info {
            display: flex;
            gap: 10px;
            align-items: center;

            img {
                width: 56px;
                aspect-ratio: 1;
                object-fit: cover;
                border-radius: 6px;
            }

            .meta {
                .title {
                    font-weight: 700;
                }

                .time {
                    font-size: .8rem;
                }
            }
        }
    }
}

/* -----------------------------
        フィルターボタン
    ----------------------------- */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;

    .filter-btn {
        background: #f0f6f8;
        color: #004c7f;
        /* border: 1px solid #00a6a6; */
        border-radius: 30px;
        padding: 8px 18px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;

        &:hover {
            background: #002222;
            color: #fff;
        }

        &.active {
            background: #002222;
            color: #fff;
        }
    }
}


@media (max-width: 921px) {

    .card-gallery {
        margin: 0;
        padding: 0 0 20px 0;

        .section-title {
            font-size: 1.8rem;
            margin-left: var(--side-padding);
        }
    }

    .hero-section {
        padding: 40px var(--side-padding);

        .hero-inner {
            .hero-title {
                font-size: 2rem;
            }

            .hero-subtitle {
                font-size: 1rem;
            }

            .hero-buttons {
                .hero-btn {
                    padding: 10px 20px;
                }
            }
        }
    }

    .category-section {
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            overflow-x: auto;
            -ms-overflow-style: none;
            scrollbar-width: none;
            padding: 10px var(--side-padding);
            width: 100%;

            .viz-card {
                flex: none;
            }
        }
    }

    .all-items-section {
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            overflow-x: auto;
            -ms-overflow-style: none;
            scrollbar-width: none;
            padding: 10px var(--side-padding);
            width: 100%;

            .viz-card {
                flex: none;

                img {
                    height: 180px;
                }
            }
        }
    }

    .gallery-grid {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
        padding: 10px var(--side-padding);
        width: 100%;

        .viz-card {
            flex: 0 0 40%;

            .viz-card-type {
                font-size: 0.55rem;
                padding: 1px 6px;
            }

            .viz-card-badge {
                font-size: 0.55rem;
                padding: 1px 6px;
            }

            img {
                height: 240px;
            }

            .viz-info {
                padding: 8px 10px;

                h3 {
                    font-size: 1rem;
                }

                p {
                    font-size: .85rem;
                }
            }
        }
    }
}

@media (max-width: 767px) {
    .gallery-grid {
        .viz-card {
            flex: 0 0 70%;
        }
    }
}

.filter-buttons .filter-btn {
    font-size: .9rem;
}