/*
Theme Name: csWPKurutziagaIkastola
Theme URI: https://them.es/starter-fse
Author: Nagore Ruiz de Escudero
Author URI: https://codesyntax.com
Description: New Theme for Kurutziaga Ikastola
Version: 1.2.7
Requires at least: 5.9
Tested up to: 6.9
Requires PHP: 7.2
License: GPL version 2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0
Text Domain: cs-wp-kurutziaga-ikastola
Tags: full-site-editing, one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

/* Don't overwrite this file. Compile "/assets/main.scss" to "/build/main.css" */

/*GENERAL*/
:where(.wp-site-blocks)>* {
    margin-block-start: 0;
}
/*GENERAL*/

/*Header bg-image*/
.wp-site-blocks{
    padding-top:0;
    padding-bottom: 0;
}

.home ul.wp-block-post-template li {
    margin-bottom: auto!important;
}

/*Header bg-image*/

/* --- Carrusel noticias (Query Loop) --- */
.wp-block-query.wp-news-carousel {
    position: relative;
}

/* :root :where(.is-layout-flow)> :first-child {
    margin-block-start: 1.5rem;
} */

/* UL como fila horizontal */
.wp-block-query.wp-news-carousel .wp-block-post-template {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    margin: 0;
    padding: 20px 100px 0 130px;;
    /* hueco para botones */
    list-style: none;
}

/* Cada LI como tarjeta */
.wp-block-query.wp-news-carousel .wp-block-post-template>li.wp-block-post {
    flex: 0 0 400px;
    /* ajusta ancho de ficha */
    max-width: 400px;
    scroll-snap-align: start;

    /* border: 1px solid rgba(0, 0, 0, .12); */
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.wp-block-query.wp-news-carousel .wp-block-post-featured-image img {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

/* Oculta paginación del Query Loop (porque navegamos con carrusel) */
.wp-block-query.wp-news-carousel .wp-block-query-pagination {
    display: none;
}

/* Botones */
.wp-news-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .2);
    background: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
}

.wp-news-carousel__btn[disabled] {
    opacity: .4;
    cursor: default;
}

.wp-news-carousel__btn--prev {
    left: -4rem;
}

.wp-news-carousel__btn--next {
    right: -4rem;
}