/*
Theme Name: Hello Elementor Child
Description: Custom styles for the VDO.AI Blog
Version: 1.0.0
*/

/* 
TABLE OF CONTENTS
-----------------
1. Post Content Styles
   - Images
   - Typography (Headings, Paragraphs, Strong, Em)
   - Lists (UL, OL, LI)
   - Drop Cap
2. Background Styles
3. Elementor Pagination
4. Elementor Author Box
5. Blockquote Styles
6. Post Title Styles
7. Loop Carousel Hijack Styles
*/

/* ------------------------------------------------------------------------- *
 * 1. Post Content Styles
 * ------------------------------------------------------------------------- */

/* Images */
.post-content img {
    width: 100% !important;
    height: auto !important;
}

.post-content figure {
    margin-bottom: 1.5rem;
}

.post-content figcaption {
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    font-style: normal;
}

/* Typography */
.post-content p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600 !important;
}

.post-content strong {
    font-weight: 600 !important;
}

.post-content em {
    font-style: italic !important;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    font-size: 1.15rem;
    line-height: 1.6;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content li:last-child {
    margin-bottom: 0;
}

.post-content ul ul,
.post-content ol ul,
.post-content ul ol,
.post-content ol ol {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

/* Reduce paragraph margin if followed by a list */
.post-content p:has(+ ul),
.post-content p:has(+ ol) {
    margin-bottom: 0.75rem;
}

/* Drop Cap */
.post-content>p:first-of-type::first-letter {
    font-size: 3rem;
    line-height: 0.8;
    font-weight: 600;
    color: #CC0000;
}

/* ------------------------------------------------------------------------- *
 * 2. Background Styles
 * ------------------------------------------------------------------------- */
.has-background {
    padding: 2rem;
}

/* ------------------------------------------------------------------------- *
 * 3. Elementor Pagination
 * ------------------------------------------------------------------------- */
.elementor-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0 !important;
    gap: 0.5rem;
}

.elementor-pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

@media screen and (max-width: 600px) {
    .elementor-pagination {
        gap: 0.25rem;
    }

    .elementor-pagination .page-numbers {
        width: 2rem;
        height: 2rem;
        display: none;
    }

    .elementor-pagination .page-numbers.prev,
    .elementor-pagination .page-numbers.next,
    .elementor-pagination .page-numbers.current,
    .elementor-pagination .page-numbers.dots {
        display: flex;
    }

    /* Show page immediately after dots */
    .elementor-pagination .page-numbers.dots:last-of-type + .page-numbers {
        display: flex;
    }

    /* Show page immediately before dots */
    .elementor-pagination .page-numbers:has(+ .page-numbers.dots:first-of-type) {
        display: flex;
    }
}

.elementor-pagination .page-numbers:hover {
    background-color: transparent;
    border-color: #CC0000;
    color: #CC0000;
}

.elementor-pagination .page-numbers.current {
    background-color: #CC0000;
    border-color: #CC0000;
    color: #fff;
    font-weight: bold;
}

.elementor-pagination .page-numbers.prev,
.elementor-pagination .page-numbers.next {
    width: auto;
    padding: 0 1rem;
}

/* Disabled Prev/Next Buttons */
.elementor-pagination span.page-numbers.prev,
.elementor-pagination span.page-numbers.next {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
    border-color: #ddd;
    color: #999;
}

/* ------------------------------------------------------------------------- *
 * 4. Elementor Author Box
 * ------------------------------------------------------------------------- */
.single .elementor-author-box {
    background-color: #fff;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.elementor-author-box__avatar {
    margin-right: 0 !important;
}

@media screen and (max-width: 768px) {
    .single .elementor-author-box {
        flex-wrap: wrap;
    }
}

.single .elementor-author-box__name {
    margin-top: unset;
}

.single .elementor-author-box__bio {
    margin-bottom: unset;
}

/* ------------------------------------------------------------------------- *
 * 5. Blockquote Styles
 * ------------------------------------------------------------------------- */
.wp-block-quote.is-large:where(:not(.is-style-plain)),
.wp-block-quote.is-style-large:where(:not(.is-style-plain)),
.wp-block-quote.is-style-medium:where(:not(.is-style-plain)),
.wp-block-quote {
    border: 1px solid #eee;
    padding: 2rem;
    margin: 4rem 0 2rem;
    font-style: italic;
    color: #333;
    position: relative;
    border-radius: 8px 0 8px 0;
}

.wp-block-quote.is-large:where(:not(.is-style-plain)) p,
.wp-block-quote.is-style-large:where(:not(.is-style-plain)) p,
.wp-block-quote.is-style-medium:where(:not(.is-style-plain)) p,
.wp-block-quote p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #333;
    font-style: normal;
}

.wp-block-quote.is-large:where(:not(.is-style-plain)) cite,
.wp-block-quote.is-style-large:where(:not(.is-style-plain)) cite,
.wp-block-quote.is-style-medium:where(:not(.is-style-plain)) cite,
.wp-block-quote cite {
    display: block;
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    color: #CC0000;
}

.wp-block-quote::before {
    content: "\201C";
    font-family: serif;
    font-size: 10rem;
    color: #CC0000;
    position: absolute;
    top: -50px;
    left: -10px;
    line-height: 1;
    pointer-events: none;
}

/* ------------------------------------------------------------------------- *
 * 6. Post Title Styles
 * ------------------------------------------------------------------------- */
.single .elementor-post__title,
.archive .elementor-post__title,
.single .elementor-post__title a,
.archive .elementor-post__title a {
    line-clamp: 2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------------------- *
 * 7. Loop Carousel Hijack Styles
 * ------------------------------------------------------------------------- */
.ctg-hijack-carousel .elementor-widget-container,
.ctg-hijack-carousel .swiper-container,
.ctg-hijack-carousel .swiper {
    overflow: visible !important;
}
