/* Blog page (php/template-blog.php) + the cards and button shared with the post page (php/single.php).
   Side padding uses --gutter (header.css), so everything lines up with the header. */

.blogPage {
    font-variant-numeric: lining-nums; /* Baskervville's default digits hang below the line ("en 5 pasos") */
    margin: 0;
    padding: 0;
    max-width: none;
    width: 100%;
}

/* Gold button with the site's arrow (blog "coming soon", post page) */
.blogButton {
    display: inline-flex;
    align-items: center;
    font-family: 'Calibri';
    font-weight: 700;
    color: white;
    background-color: #caab77;
    font-size: 1.15em;
    letter-spacing: 0.5px;
    text-decoration: none;
    padding: 10px 20px;
    transition: background-color 0.25s ease-in-out;
}

.blogButton:hover {
    background-color: black;
}

.blogButton svg {
    width: 30px;
    height: auto;
    margin-left: 11px;
}


/* ---------- No posts yet ---------- */

.blogEmpty {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px var(--gutter);
    box-sizing: border-box;
    text-align: center;
}

.blogEmpty h3,
.blogPostsTitle h3,
.blogLatest h3 {
    font-family: 'Calibri';
    font-weight: 200;
    color: #caab77;
    letter-spacing: 4px;
    font-size: 1em;
    margin: 0;
}

.blogEmpty h1 {
    font-family: 'Baskervville';
    font-weight: 600;
    font-size: 2.6em;
    margin: 18px 0 20px;
}

.blogEmpty p {
    font-family: 'Baskervville';
    color: #333333;
    font-size: 1.2em;
    line-height: 1.4;
    max-width: 640px;
    margin: 0 0 35px;
}


/* ---------- Featured: slider + list ---------- */

.blogHero {
    display: flex;
    height: calc(100vh - 10vh); /* header + this block = one screen */
    min-height: 560px;
    background-color: black;
}

.blogHeroSlider {
    width: 60%;
    height: 100%;
    margin: 0;
}

.blogSlide {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.blogSlideImg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
}

.blogSlideText {
    position: absolute;
    left: 10%;
    bottom: 12%;
    width: 72%;
    background-color: rgba(0, 0, 0, 0.5);
    border-left: 3px solid #caab77;
    padding: 1.4em 1.8em;
    box-sizing: border-box;
    opacity: 0;
}

/* The text pops in each time its post appears */
.swiper-slide-active .blogSlideText,
.blogHeroSlider:not(.swiper-initialized) .swiper-slide:first-child .blogSlideText {
    animation: blogPopIn 0.7s cubic-bezier(.38, .85, .33, .97) 0.15s both;
}

@keyframes blogPopIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.blogSlideText p {
    font-family: 'Calibri';
    color: #caab77;
    letter-spacing: 2px;
    font-size: 0.9em;
    margin: 0 0 8px;
}

.blogSlideText h2 {
    font-family: 'Baskervville';
    font-weight: 600;
    color: white;
    font-size: 2em;
    line-height: 1.2;
    margin: 0 0 18px;
}

.blogSlideText a {
    display: inline-flex;
    align-items: center;
    font-family: 'Calibri';
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    text-decoration: none;
}

.blogSlideText a svg {
    width: 30px;
    height: auto;
    margin-left: 11px;
}

/* Progress bar: fills while the post is shown. 5s = the slider's autoplay delay (template-blog.php) */
.blogSlideProgress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 4px;
    background-color: #caab77;
}

.swiper-slide-active .blogSlideProgress {
    animation: blogProgress 5s linear forwards;
}

@keyframes blogProgress {
    from { width: 0; }
    to   { width: 100%; }
}

/* Paused (hover): the bar resets... */
.blogPaused .swiper-slide-active .blogSlideProgress {
    animation: none;
    width: 0;
}

/* ...and, when hovering the photo, a pause icon fades in from a blur */
.blogSlidePause {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='34' fill='%23caab77'/%3E%3Crect x='38' y='35' width='8' height='30' rx='2' fill='%23fff'/%3E%3Crect x='54' y='35' width='8' height='30' rx='2' fill='%23fff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 130px 130px;
    box-shadow: inset 0 0 10em rgba(0, 0, 0, 0.75);
    filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out, filter 0.25s ease-in-out;
}

.blogPausedIcon .swiper-slide-active .blogSlidePause {
    filter: none;
    opacity: 1;
}

/* List of the same posts: the one in the slider is gold */
.blogLatest {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 30px var(--gutter) 30px 3%;
    box-sizing: border-box;
}

.blogLatest h1 {
    font-family: 'Baskervville';
    font-weight: 600;
    color: white;
    font-size: 2.2em;
    margin: 6px 0 0;
}

.blogLatestItem {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 12px;
    transition: background-color 0.25s ease-in-out;
}

.blogLatestItem img {
    flex: none;
    width: 170px;
    height: 115px;
    object-fit: cover;
    display: block;
}

.blogLatestText {
    padding-left: 18px;
    min-width: 0;
}

.blogLatestTitle {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Baskervville';
    font-weight: 600;
    color: white;
    font-size: 1.15em;
    line-height: 1.25;
}

.blogLatestDate {
    display: block;
    font-family: 'Calibri';
    color: #caab77;
    letter-spacing: 1.5px;
    font-size: 0.85em;
    margin-top: 8px;
    transition: color 0.25s ease-in-out;
}

.blogLatestActive {
    background-color: #caab77;
}

.blogLatestActive .blogLatestDate {
    color: white;
}


/* ---------- Grid ---------- */

.blogPosts {
    padding: 80px var(--gutter) 110px;
}

.blogPostsTitle {
    text-align: center;
    margin-bottom: 45px;
}

.blogPostsTitle h2 {
    font-family: 'Baskervville';
    font-weight: 600;
    color: black;
    font-size: 2.6em;
    margin: 10px 0 0;
}

.blogGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 2%;
    row-gap: 30px;
}

.blogGrid3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Card: photo with the date + title over it; on hover the panel slides up, turns gold and shows the excerpt */
.blogCard {
    position: relative;
    display: block;
    height: 430px;
    overflow: hidden;
    border-radius: 14px;
    background-color: #2b2b2b;
    text-decoration: none;
}

.blogCard img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease-in-out;
}

.blogCard:hover img {
    transform: scale(1.04);
}

.blogCardText {
    position: absolute;
    left: 0;
    right: 0;
    top: 62%;
    height: 100%;
    padding: 18px 22px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.6);
    transition: top 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.blogCard:hover .blogCardText {
    top: 28%;
    background-color: rgba(202, 171, 119, 0.95);
}

.blogCardDate {
    display: block;
    font-family: 'Calibri';
    color: #caab77;
    letter-spacing: 1.5px;
    font-size: 0.85em;
    margin-bottom: 8px;
    transition: color 0.3s ease-in-out;
}

.blogCard:hover .blogCardDate {
    color: white;
}

.blogCardTitle {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Baskervville';
    font-weight: 600;
    color: white;
    font-size: 1.25em;
    line-height: 1.25;
}

.blogCardHidden {
    display: block;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.blogCard:hover .blogCardHidden {
    opacity: 1;
    transition-delay: 0.1s;
}

.blogCardExcerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Baskervville';
    color: white;
    font-size: 1em;
    line-height: 1.4;
    margin: 14px 0 16px;
}

.blogCardMore {
    display: inline-flex;
    align-items: center;
    font-family: 'Calibri';
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.blogCardMore svg {
    width: 30px;
    height: auto;
    margin-left: 11px;
    transition: margin-left 0.25s ease-in-out;
}

.blogCard:hover .blogCardMore svg {
    margin-left: 20px;
}

/* Pagination (WordPress' paginate_links) */
.blogPagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 50px;
}

.blogPagination .page-numbers {
    font-family: 'Calibri';
    font-weight: 700;
    color: #caab77;
    border: 2px solid #caab77;
    text-decoration: none;
    min-width: 42px;
    padding: 8px 12px;
    margin: 4px;
    box-sizing: border-box;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.blogPagination .page-numbers.current,
.blogPagination a.page-numbers:hover {
    background-color: #caab77;
    color: white;
}

.blogPagination .dots {
    border-color: transparent;
}


@media (max-width:1600px){

.blogSlideText h2 {
    font-size: 1.6em;
}

.blogLatest h1 {
    font-size: 1.7em;
}

.blogLatestItem img {
    width: 140px;
    height: 95px;
}

.blogLatestTitle {
    font-size: 1em;
}

.blogPostsTitle h2,
.blogEmpty h1 {
    font-size: 2.2em;
}

.blogCard {
    height: 370px;
}

.blogCardTitle {
    font-size: 1.1em;
}

.blogCardExcerpt {
    font-size: 0.95em;
}

}


@media (max-width:1150px){

/* Slider on top, the list below as rows */
.blogHero {
    flex-direction: column;
    height: auto;
    min-height: 0;
}

.blogHeroSlider {
    width: 100%;
    height: 60vh;
    min-height: 380px;
}

.blogLatest {
    width: 100%;
    padding: 35px var(--gutter);
}

.blogLatest h1 {
    margin-bottom: 15px;
}

.blogGrid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3%;
}

.blogPosts {
    padding: 60px var(--gutter) 80px;
}

}


@media (max-width:600px){

.blogEmpty h1,
.blogPostsTitle h2 {
    font-size: 1.6em;
}

.blogEmpty h3,
.blogPostsTitle h3,
.blogLatest h3 {
    font-size: 0.75em;
    letter-spacing: 2px;
}

.blogEmpty p {
    font-size: 1em;
}

.blogButton {
    font-size: 1em;
}

.blogHeroSlider {
    height: 420px;
    min-height: 0;
}

.blogSlideText {
    left: 5%;
    width: 90%;
    bottom: 8%;
    padding: 1em 1.2em;
}

.blogSlideText h2 {
    font-size: 1.2em;
    margin-bottom: 12px;
}

.blogSlideText p {
    font-size: 0.75em;
}

.blogLatest {
    padding: 28px var(--gutter);
}

.blogLatest h1 {
    font-size: 1.4em;
}

.blogLatestItem {
    padding: 8px;
}

.blogLatestItem img {
    width: 105px;
    height: 72px;
}

.blogLatestText {
    padding-left: 12px;
}

.blogLatestTitle {
    font-size: 0.9em;
}

.blogLatestDate {
    font-size: 0.7em;
}

.blogPosts {
    padding: 45px var(--gutter) 60px;
}

.blogPostsTitle {
    margin-bottom: 30px;
}

.blogGrid,
.blogGrid3 {
    grid-template-columns: 1fr;
    row-gap: 20px;
}

.blogCard {
    height: 340px;
}

}
