/*
Theme Name: NSC Child
Theme URI: https://jayjayang.com/
Description: A child theme of NSC.
Author: JayJay Ang
Author URI: https://jayjayang.com/
Template: nsc
Version: 1.0.1
*/

/* === For Default === */
body {
    margin-bottom: 0 !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

p {
    margin: 0 !important;
}

b {
	font-weight: bold;
}

/* === Hide all the default Title in page, and default margin for the container. === */
header.entry-header {
    display: none;
    visibility: hidden;
}

.entry-content,
article.type-page {
    margin: 0 auto;
}

/* Fix the header menu */
.position-fixed {
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 10;
}

/* Styling for post services and pagination */

.services-tabs .elementor-tabs-wrapper div {
    text-align: center;
    width: 100%;
}

.services-tabs .elementor-tab-title {
    background-color: #EEEEEE;
}

.services-tabs .elementor-tab-title.elementor-active {
    background-color: #ffffff;
}

.elementor-tab-content {
    background-color: #F8F8F8;
}

/* === Container & Post List Grid === */
.ajax-post-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px;
    width: 100%;
}

.custom-post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Tablet: 2 Columns */
@media (min-width: 600px) {
    .custom-post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 Columns */
@media (min-width: 1024px) {
    .custom-post-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Flip Box Styles === */
.flip-box {
    background-color: transparent;
    perspective: 1000px;
}

.flip-box-inner {
    height: 280px;
    position: relative;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    width: 100%;
}

.flip-box-inner:hover .flip-box-front h3 {
    visibility: hidden;
}

.flip-box:hover .flip-box-inner {
    transform: rotateY(180deg);
}

.flip-box-front,
.flip-box-back {
    align-items: center;
    background: #fff;
    backface-visibility: hidden;
    border: 1px solid #ccc;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    padding: 15px;
    position: absolute;
    width: 100%;
}

.flip-box-front {
    border-radius: 15px;
    border: 3px dotted #cccccc;
    z-index: 2;
}

.flip-box-front img {
    height: auto;
    margin-bottom: 10px;
    width: 100%;
}

.flip-title {
    color: #222;
    font-size: 1.2rem;
    margin-top: 10px;
    text-align: center;
}

.has-bg {
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.has-bg h3.flip-title {
    color: #fff;
}

.flip-box-back {
    background-color: #ffffff;
    border-radius: 15px;
    border: 3px dotted #cccccc;
    transform: rotateY(180deg);
}

.flip-box-back a {
    margin: 0 auto;
}

.flip-excerpt {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 15px;
    padding: 0;
    text-align: center;
}

.flip-readmore {
    color: #F15A5A;
    font-weight: bold;
    text-decoration: none;
}

.flip-box-back {
    align-items: flex-start;
    justify-content: center;
}

.flip-box-back h3.flip-title {
    text-align: left;
}

/* === Pagination Styles === */
.custom-pagination {
    margin-top: 20px;
    text-align: center;
}

.custom-pagination a {
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    margin: 0 6px;
    padding: 6px 10px;
    text-decoration: none;
}

.custom-pagination .current {
    background: #0073aa;
    color: #fff;
}

/* === Styling for post carousel === */
.sp-pcp-post-content p {
    font-size: 14px;
}

.sp-pcp-readmore {
    display: none !important;
}

div#sp-pcp-id-464 {
    padding-top: 10px;
}

/* === Styling for post listing === */
.posts-by-category {
    margin: 20px 0;
}

.category-section {
    margin-bottom: 30px;
}

.category-section h3 {
    color: #FF8282;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.category-section ul {
    list-style: disc;
    margin: 0;
    padding: 0;
}

.category-section li {
    align-items: center;
    background-color: #FFFFFF;
    border: 1px solid #cccccc;
    display: flex;
    justify-content: center;
    list-style-type: none;
    margin: 0 0 10px;
    min-height: 60px;
    padding: 10px;
    text-align: center;
}

.category-section li.active-post {
    background-color: #FF8282;
    border: 1px solid #FF8282;
    color: #ffffff;
}

.category-section a {
    color: #000000;
    text-decoration: none;
}

.category-section li.active-post a {
    color: #ffffff;
}

/* Base style for the UL */
.category-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mobile-specific: Horizontal scroll */
@media (max-width: 768px) {
    .scrollable-posts {
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        overflow-x: auto;
    }

    .category-posts {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        min-width: max-content;
    }

    .category-posts li {
        background: #ffffff;
        border-radius: 6px;
        flex: 0 0 auto;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .category-posts li.active-post {
        background: #FF8282;
        color: white;
    }

    .category-posts li a {
        color: inherit;
        text-decoration: none;
    }

    .category-section h3 {
        display: none;
    }
}

/* === Back to Top === */
.back-to-top {
    background-color: #FF8282;
    bottom: 30px;
    border-radius: 50%;
    color: #fff;
    display: none;
    font-size: 18px;
    padding: 10px 18px;
    position: fixed;
    right: 30px;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
    z-index: 999;
}

.back-to-top:hover {
    background-color: #FF8282;
    transform: scale(1.1);
}

/* === Breadcrumb === */
.breadcrumbs {
    text-align: center;
}

.breadcrumbs a {
    color: #F0595A;
    font-size: 14px;
}

/* === Home: Post listing === */
.ns-carousel-wrapper {
    margin: 40px auto;
    width: 100%;
}

.ns-carousel-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    height: 360px !important;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.ns-carousel-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-thumb {
    border-radius: 5px;
    margin: 0 0 15px;
    max-height: 200px;
    overflow: hidden;
}

.carousel-thumb img {
    border-radius: 6px;
    height: auto;
    margin-bottom: 12px;
    width: 100%;
}

.carousel-title {
    color: #FF8282;
    font-size: 1rem;
    margin: 0 0 10px;
}

.carousel-excerpt {
    color: #555;
    font-size: 0.9rem;
}

.service-points .elementor-widget-wrap.elementor-element-populated {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service-points .elementor-widget-button {
    margin-top: auto;
}

.service-points {
    position: relative;
}

.service-points:before {
    background-image: url('../../../wp-content/uploads/quote.png');
    background-position: center;
    background-size: 100%;
    content: " ";
    left: 20px;
    height: 40px;
    position: absolute;
    top: 0;
    width: 40px;
}

@media all and (max-width: 991px) {
    .service-points:before {
        left: 30px;
        top: -15px;
    }
}