/*
Theme Name: Hello Child Matami Sangat
Theme URI: https://example.com/
Description: Child theme for Hello Elementor with featured image header, Poppins font, and consistent spacing specifically for posts and pages using Matami Sangat templates
Author: Your Name
Template: hello-elementor
Version: 1.0
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Reset & Font Setup */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
}

/* === Featured Image Hero Section === */
.single-post .custom-post-hero,
.page-template-matami-sangat .custom-post-hero,
.page-template-template-matami-page .custom-post-hero {
    position: relative;
    height: 400px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: #37b6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    margin: 0 !important;
    padding: 0 !important;
}

.single-post .custom-post-hero .overlay,
.page-template-matami-sangat .custom-post-hero .overlay,
.page-template-template-matami-page .custom-post-hero .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.single-post .custom-post-hero .post-title,
.page-template-matami-sangat .custom-post-hero .post-title,
.page-template-template-matami-page .custom-post-hero .post-title {
    z-index: 2;
    font-size: 40px;
    text-align: center;
    font-weight: bold;
    padding: 0 5%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    max-width: 90%;
}

/* === Gutenberg Content Area === */
.single-post .elementor-post-content,
.page-template-matami-sangat .elementor-post-content,
.page-template-template-matami-page .elementor-post-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3% 5% 10% 5%;
    box-sizing: border-box;
}

/* === Typography === */
.single-post .elementor-post-content h2,
.page-template-matami-sangat .elementor-post-content h2,
.page-template-template-matami-page .elementor-post-content h2 {
    font-size: 26px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
}

.single-post .elementor-post-content h3,
.page-template-matami-sangat .elementor-post-content h3,
.page-template-template-matami-page .elementor-post-content h3 {
    font-size: 26px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
}

.single-post .elementor-post-content h4,
.page-template-matami-sangat .elementor-post-content h4,
.page-template-template-matami-page .elementor-post-content h4 {
    font-size: 18px;
    font-weight: bold;
    color: #000080;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* === Links === */
.single-post .elementor-post-content a,
.page-template-matami-sangat .elementor-post-content a,
.page-template-template-matami-page .elementor-post-content a {
    color: #8B0000;
    font-weight: bold;
    text-decoration: none;
}

.single-post .elementor-post-content a:hover,
.page-template-matami-sangat .elementor-post-content a:hover,
.page-template-template-matami-page .elementor-post-content a:hover {
    color: #a30000;
    text-decoration: underline;
}

/* === Responsive Adjustments === */
@media (max-width: 992px) {
    .single-post .custom-post-hero .post-title,
    .page-template-matami-sangat .custom-post-hero .post-title,
    .page-template-template-matami-page .custom-post-hero .post-title {
        font-size: 30px;
    }

    .single-post .elementor-post-content h2,
    .page-template-matami-sangat .elementor-post-content h2,
    .page-template-template-matami-page .elementor-post-content h2 {
        font-size: 22px;
    }

    .single-post .elementor-post-content h3,
    .page-template-matami-sangat .elementor-post-content h3,
    .page-template-template-matami-page .elementor-post-content h3 {
        font-size: 20px;
    }

    .single-post .elementor-post-content h4,
    .page-template-matami-sangat .elementor-post-content h4,
    .page-template-template-matami-page .elementor-post-content h4 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .single-post .custom-post-hero,
    .page-template-matami-sangat .custom-post-hero,
    .page-template-template-matami-page .custom-post-hero {
        margin-top: 70px; /* adjust to sticky header height */
    }

    .single-post .custom-post-hero .post-title,
    .page-template-matami-sangat .custom-post-hero .post-title,
    .page-template-template-matami-page .custom-post-hero .post-title {
        font-size: 28px;
    }

    .single-post .elementor-post-content,
    .page-template-matami-sangat .elementor-post-content,
    .page-template-template-matami-page .elementor-post-content {
        padding: 3% 5% 10% 5%;
    }

    .single-post .elementor-post-content h2,
    .page-template-matami-sangat .elementor-post-content h2,
    .page-template-template-matami-page .elementor-post-content h2 {
        font-size: 20px;
    }

    .single-post .elementor-post-content h3,
    .page-template-matami-sangat .elementor-post-content h3,
    .page-template-template-matami-page .elementor-post-content h3 {
        font-size: 18px;
    }

    .single-post .elementor-post-content h4,
    .page-template-matami-sangat .elementor-post-content h4,
    .page-template-template-matami-page .elementor-post-content h4 {
        font-size: 16px;
    }
}

/* === Ensure shortcode content is clickable === */
.single-post .elementor-post-content,
.single-post .elementor-post-content *,
.page-template-matami-sangat .elementor-post-content,
.page-template-matami-sangat .elementor-post-content *,
.page-template-template-matami-page .elementor-post-content,
.page-template-template-matami-page .elementor-post-content * {
    position: relative;
    z-index: 2;
}

/* Lower z-index of hero to avoid overlap */
.single-post .custom-post-hero,
.single-post .custom-post-hero .overlay,
.page-template-matami-sangat .custom-post-hero,
.page-template-matami-sangat .custom-post-hero .overlay,
.page-template-template-matami-page .custom-post-hero,
.page-template-template-matami-page .custom-post-hero .overlay {
    z-index: 0 !important;
}

/* === Category Archive Styling (Scoped) === */
body.archive.category .category-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Header */
body.archive.category .category-header {
    text-align: center;
    padding: 60px 0 40px 0;
    background-color: #f5f5f5;
}

body.archive.category .category-title {
    font-size: 36px;
    color: #003366; /* Dark blue */
    font-weight: bold;
    margin: 0 auto;
    text-shadow: none;
}

/* Post Card */
body.archive.category .category-post {
    margin: 40px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

body.archive.category .category-post:hover {
    transform: scale(1.01);
}

body.archive.category .category-post-thumbnail {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

body.archive.category .category-post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1;
}

body.archive.category .category-post-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.archive.category .category-post-title {
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    padding: 0 5%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 3;
    position: relative;
}

body.archive.category .category-post-excerpt {
    padding: 20px;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

body.archive.category .category-post-date {
    font-size: 14px;
    color: #666;
    margin-top: -10px;
    margin-bottom: 10px;
    padding: 0 20px;
    text-align: center;
}

body.archive.category .read-more-button {
    display: inline-block;
    background-color: #FFD700; /* Yellow */
    color: #000000; /* Black text */
    font-weight: bold;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 20px 20px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

body.archive.category .read-more-button:hover {
    background-color: #e6c200;
}

body.archive.category .pagination {
    text-align: center;
    margin: 40px 0 60px;
}

body.archive.category .pagination .page-numbers {
    display: inline-block;
    margin: 0 6px;
    padding: 10px 15px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
}

body.archive.category .pagination .page-numbers.current {
    background: #003366;
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    body.archive.category .category-post-title {
        font-size: 30px;
    }

    body.archive.category .category-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    body.archive.category .category-post-title {
        font-size: 22px;
    }

    body.archive.category .category-post-excerpt {
        font-size: 14px;
        padding: 15px;
    }

    body.archive.category .read-more-button {
        margin-bottom: 20px;
    }

    body.archive.category .category-title {
        font-size: 24px;
    }
}
/* === Curved Edges for Featured Images === */
.category-post-thumbnail {
    border-radius: 30px;
    overflow: hidden;
}
/* === Spacing After Lists === */
.single-post .elementor-post-content ul,
.page-template-matami-sangat .elementor-post-content ul,
.page-template-template-matami-page .elementor-post-content ul,
.single-post .elementor-post-content ol,
.page-template-matami-sangat .elementor-post-content ol,
.page-template-template-matami-page .elementor-post-content ol {
    margin-bottom: 15px;
}
/* === Reusable Matami Button Shortcode Styling === */
.matami-button-shortcode {
    display: inline-block;
    background-color: #FFD700; /* Yellow background */
    color: #000;               /* Black text */
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    margin: 15px 0;            /* 15px gap above and below */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.matami-button-shortcode:hover {
    background-color: #e6c200; /* Slightly darker yellow on hover */
    color: #000;
}

