/*
Global
*/
:root {
    --min-max-width: 960px;
    --color-background-secondary: #f1f1f1;
    --color-white: #ffffff;
}

.single-column-section {
    max-width: var(--min-max-width);
    margin: var(--space-64) auto;
}

/*
Header
*/

header.c-header {
    .c-header__top {
        .c-header__top-left {
            .c-header__button--search {
                svg {
                    width: var(--space-24);
                    height: var(--space-24);
                }
            }
        }
    }


}


/*
@loop
Post section by tag
Single Section
*/

.single-column-posts {
    gap: var(--space-32);

    .post {
        display: flex;

        .c-teaser__headline {
            a.c-teaser__link {
                font-size: var(--font-size-scale-5);
                line-height: var(--line-height-scale-5);
            }
        }

        .c-teaser__media {
            width: var(--space-160);
            height: var(--space-96);

            .c-teaser__image {
                
            }
        }
    }

    @media screen and (max-width: 768px) {
        .post {
            .c-teaser__headline a.c-teaser__link{
                font-size: var(--font-size-scale-2);
                line-height: var(--line-height-scale-2);
                font-weight: var(--font-weight-semibold);
            }
            
        }
    }
}



/*
Section
Cta Newsletter
*/
.cta-newsletter-section {
    margin-top: 100px;
    margin-bottom: 100px;

    .cta-newsletter-inner {
        display: flex;
        flex-direction: column;
        gap: var(--space-32);
        border: 2px solid #e3e3e3;
        padding: var(--space-32);
        border-radius: 10px;
    
        h2 {
            font-family: var(--gh-font-heading,var(--font-family-serif));
            font-size: var(--font-size-scale-7);
            line-height: var(--line-height-scale-8);
            margin-bottom: 10px;
        }

        p {
            font-size: var(--font-size-scale-3);
            color: var(--color-text-secondary);
        }

        ul {
            margin-top: var(--space-20);
            display: flex;
            gap: var(--space-48);
            font-weight: 500;
        }

        .c-subscribe-form {
            .c-form-group__input {
                background: #fff;
                border-radius: 5px;
            }
        }
    }
}

@media screen and (max-width: 768px) {
    .cta-newsletter-section {
        .cta-newsletter-inner {
            padding: 20px;
            ul {
                gap: 30px;
                /* flex-wrap: wrap; */
            }

            .c-form-group {
                flex-direction: column;
                
                button {
                    width: 100%;
                }
            }
        }
    }
}

/*
Trending Topics
*/
.treading-topics {
    .single-column-tags {
        gap: var(--space-32);
        grid-template-columns: repeat(2, 1fr);
        justify-content: space-between;

        a {
            

            h2 {
                font-size: var(--font-size-scale-4);
                margin-bottom: 15px;

                display: flex;
                gap: 6px;
                align-items: center;


                svg {
                    width: 20px;
                    height: 20px;
                }
            }

            div {
                background: #f1f1f1;
                padding: var(--space-16);
                border-radius: 5px;

                p {
                    font-size: var(--font-size-scale-0);
                }
            }

            
        }
    }

    @media screen and (max-width: 768px) {
        .single-column-tags {
            grid-template-columns: 1fr;
            
            a {
                div {
                    padding: 8px;
                }
            }
        }
    }
}


/*
Member Only Section
Page: Home
*/
.section-member-only {
    .section-member-only-wrap {
        border: 2px solid #e3e3e3;
        padding: var(--space-32);
        border-radius: 10px;

        display: flex;
        width: 100%;
        flex-wrap: wrap;
    }

    .section-intro {
        flex: 0 0 35%;
        display: flex;
        flex-direction: column;
        /* gap: 10px; */

        h2 {
            font-family: var(--gh-font-heading, var(--font-family-serif));
            font-size: 42px;
            line-height: 1.2;
            margin-bottom: 10px;
            font-weight: 600;
        }

        p {
            font-size: var(--font-size-scale-3);
            color: var(--color-text-secondary);
        }

        a {
            margin-top: 15px;
            font-size: 20px;
            padding: 15px 25px;
            font-weight: 400;
            line-height: 1.2;
        }

        a.see-all {
            padding: 4px 10px;
            margin: 0;
            border: 1px solid #333;
            display: inline-block;
            font-weight: 600;

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

    .member-only-posts {
        flex: 0 0 65%;

        .o-grid {
            gap: 30px;
        }

        article {
            display: flex;
            gap: 25px;

            a.feature-image {
                flex: 0 0 35%;
            }

            .post-info {
                flex: 0 0 65%;

                h3 {
                    font-size: 24px;
                    line-height: 1.4;
                    font-weight: 700;
                    font-family: var(--gh-font-heading, var(--font-family-serif));
                }

                .post-meta {
                    margin-top: 10px;
                    display: flex;
                    align-items: center;
                    gap: 5px 8px;
                    flex-wrap: wrap;
                }
            }
        }
    }
}

@media screen and (max-width: 768px) {
.section-member-only {
    .section-member-only-wrap {
        padding: 20px;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 40px;

        .section-intro {
            flex: 0 0 25%;
            a {
                font-size: 14px;
            }
        }

        .member-only-posts {
            .o-grid {
                padding: 0;

                article {
                    gap:15px;
                    a.feature-image {
                        flex: 0 0 30%;
                    }

                    .post-info {
                        h3 {
                            font-size: 16px;
                            line-height: 1.2;
                        }
                    }
                }
            }
        }
    }
}

}

/*
Trending Topics
*/
.author-book-section {
    article.book {

        /* padding: 10px 0; */
        
        &:hover {
            /* background: #f1f1f19e;
            border-radius: 5px;
            padding: 10px 10px; */
        }

        .book-cover {

            img {
                border-radius: 5px;

            }
        }

        .book-title {
            margin-top: 15px;
            font-size: 26px;
            line-height: 1.2;
            font-weight: 500;
            font-family: var(--gh-font-heading, var(--font-family-serif));

            a {
                
            }
        }
    }
}
@media screen and (max-width: 768px) {
    .author-book-section {
        .o-grid--3-columns {
            grid-template-columns: 1fr 1fr 1fr;

            .book {
                h3.book-title {
                    font-size: 16px;
                }
            }
        }
    }
}

/*
Page: Latest
File: index.hbs
*/
.has-post-filter .o-grid {
    grid-template-columns: 1fr 2fr;
    /* align-items: center; */
    gap: 20px;
}

.filter-container {
    display: flex;
    justify-content: right;
    align-items: center;
}

/* #post-filter {
    grid-template-columns: repeat(auto-fill, minmax(max-content, 1fr));
    gap: 15px 25px;
    align-items: center;
    padding: 20px 0;
} */

#post-filter {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 250px;
    margin-left: 15px;
    padding: 8px 10px;
}

/* #post-filter:focus {
    outline: none;
    border-color: #555;
} */

#post-filter a {
  margin-right: 15px;
  text-decoration: none;
  color: #666;
  cursor: pointer;
}

#post-filter a.active {
  color: #000;
  font-weight: bold;
  border-bottom: 2px solid #000;
}


/*
@Tag
File: tag.hbs
*/
.c-share-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.c-share-links a, 
.c-share-links button {
    color: var(--text);
    opacity: 0.6;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
}

.c-share-links a:hover, 
.c-share-links button:hover {
    opacity: 1;
}

/* Tooltip for the copy button */
.copy-status {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: none;
    white-space: nowrap;
}

/*
* @Tag
* Lecture Resources
* tag-lecture-resources.hbs
*/

.tag-template .paid-signup {
    margin-top: 20px;
    margin-bottom: 40px;
}

/*
* @Tag
* Books
* tag.hbs
*/
body.tag-template.tag-books .c-card__media {
    aspect-ratio: 3/4;
}

/*
Footer
*/

footer.c-footer {
    background-color: #e3e3e3;

    .c-footer__content {
        .c-logo {
            margin-top: var(--space-32);

            .c-logo__link {
                font-family: var(--gh-font-heading, var(--font-family-serif));
                font-size: 4rem;
            }
        }

        .c-social-icons {
            li {
                a {
                    width: var(--space-64);
                    height: var(--space-64);
                    background-color: transparent;
                    font-size: 36px;

                    .icon {
                        width: var(--space-48);
                        height: var(--space-48);
                    }
                }
            }
        }

        .footer-columns {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 40px;
            padding: 40px 20px;
            font-family: sans-serif;
            line-height: 1.6;
            color: #333;
            justify-items: center;

            .column {
                h2 {
                    font-size: var(--font-size-scale-7);
                    line-height: var(--line-height-scale-8);
                    font-weight: var(--font-weight-medium);
                    font-family: var(--gh-font-heading, var(--font-family-serif));
                }

                ul {
                    list-style: none;
                    margin: 0;
                    padding: 0;
                    margin-top: 20px;
                    display: flex;
                    flex-direction: column;
                    gap: 8px;

                    li {
                        margin: 0;
                        padding: 0;

                        &::before {
                            display: none;
                        }

                        a {
                            font-size: var(--font-size-scale-1);
                            line-height: var(--line-height-scale-4);
                            font-weight: var(--font-weight-normal);
                            text-transform: initial;
                            color: var(--color-text-secondary);

                            &:hover {
                                text-decoration: underline;
                            }
                        }
                    }
                }

                .contact-links {
                    margin-top: 20px;

                    svg {
                        position: absolute;
                        width: 50px;
                        height: auto;
                        color: #d3d3d3;
                        z-index: -1;
                        top: -10px;
                        left: -10px;
                    }

                    .footer-email {
                        position: relative;
                        margin-bottom: 30px;

                        svg {

                        }
                    }

                    .footer-phone {
                        position: relative;

                        svg {
                            
                        }
                    }

                    a {
                        font-size: var(--font-size-scale-1);
                        line-height: var(--line-height-scale-4);
                        font-weight: var(--font-weight-normal);
                        text-transform: initial;
                        color: var(--color-text-secondary);
                        display: block;
                    }
                }

                .contact-address {
                    margin-top: 30px;
                    position: relative;

                    svg {
                        position: absolute;
                        width: 50px;
                        height: auto;
                        color: #d3d3d3;
                        z-index: -1;
                        top: -10px;
                        left: -10px;
                    }

                    p {
                        font-size: var(--font-size-scale-1);
                        line-height: var(--line-height-scale-4);
                        font-weight: var(--font-weight-normal);
                        text-transform: initial;
                        color: var(--color-text-secondary);
                    }
                }
            }
        }

        .c-footer-copy {
            margin-top: 5px;
            font-size: 12px;
        }
    }
}

/*
* @Post
* Related
* related.hbs
*/

.c-section.c-section--related {
    article.c-teaser {
        gap: 20px;

        a.c-teaser__media {
            margin-left: 0;
        }
    }
}

/*
* @Post
* Subscription
* post.hbs
*/
body.post-template .cta-newsletter-section {
    max-width: 100%;
}

/*
* @Post
* Topper
* post.hbs
*/
body.post-template {
    .c-tag__link:not(:last-child)::after {
        content: ", ";
    }

    .c-tag__link:last-child::after {
        content: "";
    }
}

/*
* @Card
* card.hbs
* In: loop.hbs
*/

.tag-lecture-resources .c-tag__link:is(.webinars),
.tag-cybertraps-for-educator .c-tag__link:is(.webinars) {
    display: none;
}

.tag-webinars .c-tag__link:is(.webinars) {
    display: none;
}

.multi-tags {

    /* .c-tag__link:is(.webinars, .lecture-resources) {
        display: none;
    } */

    .c-tag__link:not(:last-child)::after {
        content: ", ";
    }

    .c-tag__link:last-child::after {
        content: "";
    }
}


/*
* @Tag
* tag.hbs
* tag-webinars.hbs
*/
.tag-template {
    .tag-counters {
        display: flex;
        gap: 45px;
        margin: 40px 0;

        .counter {
            h2 {
                font-size: var(--font-size-scale-8);
                line-height: var(--line-height-scale-8);
                font-weight: var(--font-weight-bold);
                font-family: var(--gh-font-heading, var(--font-family-serif));
                margin-bottom: 10px;
            }

            p {
                font-size: var(--font-size-scale-4);
            }
        }
    }
}

.tag-template.tag-webinars {
    .c-card__meta {
        display: none;
    }
}

/*
* @Page
* Contact
* custom-contact.hbs
*/
body.contact-page > header.c-header {
    /* margin-bottom: 0; */
}
body.contact-page #contact-hero {
    /* margin-bottom: var(--space-32); */

    figure {
        max-height: 500px;
        overflow: hidden;
    }
}

#contact-section {

    padding: 80px 0;

    .o-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 20px; /* Space between columns */
    }

    .contact-info h2.title {
        font-family: var(--gh-font-heading, var(--font-family-serif));
        font-size: clamp(2rem, 3.5rem, 4rem);
        line-height: 1.2;
        margin-bottom: 40px;
        font-weight: 600;
        max-width: 360px;
    }

    .contact-info p.description {

    }

    .contact-information {
        display: flex;
        flex-direction: column;
        gap: 20px;
        
        h3 {
           color: #333;
           margin-bottom: 8px;
           font-size: 22px;
        }

        a, p {
            font-size: 16px;
            line-height: 1.5;
        }
    }

    .contact-form {
        background: #e3e3e3;
        padding: 25px;
        border-radius: 10px;

        .form-group {
            margin-bottom: 20px;
        }

        .form-group input, 
        .form-group textarea {
            background: transparent;
            border: unset;
            border-bottom: 4px solid var(--color-text-secondary);
            padding: 10px 0;

            &:focus {
                outline: none;
                border-bottom-color: #333;
            }
        }
    }

    #submit-btn {
        margin-top: 20px;
        cursor: pointer;
        transition: 0.3s;
    }

    #submit-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .form-feedback {
        text-align: center;
        font-weight: 700;
        margin-top: 10px;
        display: none; /* Hidden by default */
    }

    .form-feedback.success { color: green; display: block; }
    .form-feedback.error { color: red; display: block; }


}

/*
* Global
* WhatsApp Button
* footer-custom.hbs
*/
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 110px;
    right: 40px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: #fff;
}

/* Make it slightly smaller on mobile */
@media screen and (max-width: 600px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/*
* Page
* Publisher
* custom-publisher.hbs
*/
body.publisher-page {
    header.c-header {
        margin-bottom: 0;
    }

    .publisher-header {
        /* position: relative;

        &::before {
            content: " ";
            position: absolute;
            inset: 0;
            background: #e3e3e3;
            height: 250px;
            width: 100%;
            z-index: -1;
        } */

        .author-intro {
            display: flex;
            align-items: end;
            max-width: var(--content-width);
            padding: 80px var(--grid-margin) 0;
            margin: 0px auto 20px;
            gap: 20px;

            .author-image {
                max-width: 300px;
                overflow: hidden;

                img {
                    object-fit: cover;
                    border-radius: 10px;
                }
            }

            .author-info {
                display: flex;
                flex-direction: column;
                gap: 30px;

                /* border: 2px solid #ddd; */
                padding: 10px;
                border-radius: 10px;

                .publisher-name {
                    h2 {
                        font-family: var(--gh-font-heading, var(--font-family-serif));
                        font-size: 42px;
                        line-height: 1.2;
                    }

                    p.publisher-tag {
                        font-weight: 600;
                        color: #333;
                    }
                }

                p.publisher_excerpt {
                    font-size: 18px;
                    line-height: 1.5;
                }

                .social_media {
                    display: flex;
                    gap: 20px;
                    a {

                    }
                }
            }
        }

        /*.author-intro {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            max-width: var(--content-width);
            padding: 0 var(--grid-margin);
            margin: 0px auto;

            .author-image {
                margin-top: 100px;
                max-width: 300px;
                overflow: hidden;
                margin-bottom: 20px;

                img {
                    object-fit: cover;
                }
            }

            .publisher-name {
                font-size: var(--font-size-scale-8);
                font-family: var(--gh-font-heading, var(--font-family-serif)) !important;
            }
        }*/
    }

    .publisher-books {
        .o-grid {
            padding: 0;
        }
    }
}




/* --- Responsive Layout (Mobile) --- */
@media (max-width: 768px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr !important;
    gap: 30px;
  }

  /* Contact Page */
  #contact-section {
    padding: 60px 0;

    .o-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
  }
}