/* TheTopFollowAPK - Custom Theme CSS */

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

/* === CSS Variables === */
:root {
    --global-palette1: #8920f3;
    --global-palette2: #6d19d4;
    --global-palette3: #f13555;
    --global-palette4: #1e1a3c;
    --global-palette5: #2d2a4a;
    --global-palette6: #ffffff;
    --global-palette7: #f5f5f5;
    --global-palette8: #333333;
    --global-palette9: #666666;
    --global-body-font-family: 'Overpass', sans-serif;
    --global-heading-font-family: 'Montserrat', sans-serif;
    --wp--preset--spacing--60: 30px;
    --wp--preset--spacing--50: 20px;
    --wp--preset--spacing--40: 15px;
}

/* === Base === */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--global-body-font-family);
    font-size: 16px;
    color: #333;
    background: #fff;
    margin: 0;
    padding: 0;
}
a { color: var(--global-palette1); text-decoration: none; }
a:hover { color: var(--global-palette3); }
img { max-width: 100%; height: auto; }

/* === Layout === */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-container { max-width: 1290px; margin: 0 auto; padding: 0 15px; width: 100%; }
.content-area { flex: 1; }
#primary { padding: 40px 0; }
.entry-content { max-width: 100%; }

/* === Header === */
#masthead {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e5e7eb;
}
.site-header-wrap { padding: 0; }
.site-main-header-inner-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}
.site-branding a { display: block; }
.site-branding .custom-logo { max-height: 50px; width: auto; }
#site-navigation .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; align-items: center; }
#site-navigation .menu li a {
    color: #1e1a3c;
    font-family: var(--global-heading-font-family);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#site-navigation .menu li a:hover,
#site-navigation .menu li.current-menu-item > a {
    color: var(--global-palette1);
    background: rgba(137,32,243,0.06);
}
.header-button-wrap a.button {
    background: linear-gradient(90deg, var(--global-palette1), var(--global-palette3));
    color: #fff !important;
    padding: 9px 20px;
    border-radius: 50px;
    font-family: var(--global-heading-font-family);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: opacity 0.2s;
    text-transform: uppercase;
}
.header-button-wrap a.button:hover { opacity: 0.85; }
.search-toggle-open { background: none; border: none; color: #1e1a3c; cursor: pointer; padding: 8px; }
.search-toggle-open svg { display: block; }

/* === Mobile Header === */
#mobile-header { display: none; }
.menu-toggle-open {
    background: none; border: none; cursor: pointer;
    color: #1e1a3c; padding: 8px;
}
#mobile-drawer {
    display: none;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 280px; background: #ffffff; z-index: 99999;
    padding: 20px; overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}
#mobile-drawer.open { display: block; }
#mobile-drawer .menu { list-style: none; margin: 0; padding: 0; }
#mobile-drawer .menu li a {
    display: block; color: #1e1a3c; padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-family: var(--global-heading-font-family); font-weight: 600;
}
.mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 99998;
}
.mobile-overlay.open { display: block; }
.menu-toggle-close {
    background: none; border: none; color: #1e1a3c; cursor: pointer;
    font-size: 24px; margin-bottom: 20px; display: block;
}
#search-drawer {
    display: none; position: fixed; top: 0; left: 0; right: 0;
    background: #1e1a3c; z-index: 99999; padding: 20px;
}
#search-drawer.open { display: flex; align-items: center; gap: 10px; }
#search-drawer .search-field {
    flex: 1; padding: 10px 15px; border-radius: 50px; border: none;
    font-size: 16px;
}
#search-drawer .search-submit {
    background: linear-gradient(90deg, var(--global-palette1), var(--global-palette3));
    color: #fff; border: none; padding: 10px 20px; border-radius: 50px; cursor: pointer;
}

/* === Entry / Content === */
.content-bg,
.entry-content-wrap,
.single-entry,
article.hentry,
.site-main,
body,
#page,
.content-area,
#primary {
    background: #ffffff !important;
}

/* Override Kadence column overlay backgrounds */
.kt-inside-inner-col:before,
[class*="kadence-column"] > .kt-inside-inner-col:before {
    background-color: transparent !important;
}
/* Override any global palette gray backgrounds */
[style*="--global-palette7"],
[style*="--global-palette8"],
.kb-section-has-overlay > .kt-inside-inner-col:before {
    background-color: transparent !important;
}
/* Force all row/column wrappers to white */
.kt-row-column-wrap,
.wp-block-kadence-column,
.kt-inside-inner-col,
.kb-row-layout-wrap {
    background: transparent !important;
}
.entry-title {
    font-family: var(--global-heading-font-family);
    font-size: 2rem; font-weight: 700; line-height: 1.3;
    color: #1e1a3c; margin-bottom: 1.5rem;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
    font-family: var(--global-heading-font-family);
    color: #1e1a3c; margin-top: 1.5em; margin-bottom: 0.5em;
}
.entry-content p { line-height: 1.7; margin-bottom: 1em; }

/* === Kadence Row Layouts === */
.kb-row-layout-wrap { margin-bottom: 30px; }
.kt-row-column-wrap {
    display: grid;
    gap: 30px;
}
.kt-has-1-columns { grid-template-columns: 1fr; }
.kt-has-2-columns { grid-template-columns: 1fr 1fr; }
.kt-has-3-columns { grid-template-columns: 1fr 1fr 1fr; }
.kt-has-4-columns { grid-template-columns: 1fr 1fr 1fr 1fr; }
.kt-row-layout-left-golden { grid-template-columns: 2fr 1fr; }
.kt-row-layout-right-golden { grid-template-columns: 1fr 2fr; }
.kb-theme-content-width { max-width: 1290px; margin-left: auto; margin-right: auto; width: 100%; padding: 0 15px; }
.kt-inside-inner-col { height: 100%; }

/* === WP Block Columns === */
.wp-block-columns.is-layout-flex {
    display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start;
}
.wp-block-column { flex: 1; min-width: 0; }
.wp-block-column.is-vertically-aligned-center { align-self: center; }

/* === Kadence Image === */
.kb-image_544afe-b2 img { border-radius: 10px; width: 100%; height: auto; }
figure.wp-block-kadence-image img { max-width: 100%; height: auto; border-radius: 8px; }
figure.wp-block-kadence-image { margin: 0; }

/* === Icon List === */
.kt-svg-icon-list { list-style: none; padding: 0; margin: 0 0 15px; }
.kt-svg-icon-list-item-wrap {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 8px; font-size: 16px;
}
.kb-svg-icon-wrap { flex-shrink: 0; width: 22px; height: 22px; color: #10b981; margin-top: 2px; }
.kb-svg-icon-wrap svg { width: 22px; height: 22px; }

/* === Download Button (Stackable) === */
.stk-block-button-group { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.stk-block-button a.stk-link.stk-button {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(90deg, var(--global-palette1), var(--global-palette3));
    color: #fff; padding: 14px 28px; border-radius: 50px;
    font-family: var(--global-heading-font-family); font-weight: 700;
    font-size: 16px; text-decoration: none; transition: opacity 0.2s;
    white-space: nowrap;
}
.stk-block-button a.stk-link.stk-button:hover { opacity: 0.85; }
.stk--svg-wrapper svg { width: 24px; height: 24px; }

/* === Info Boxes === */
.kt-blocks-info-box-link-wrap {
    border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 20px; text-align: center; height: 100%;
    background: #fff; transition: box-shadow 0.2s; display: block;
}
.kt-blocks-info-box-link-wrap:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.kt-blocks-info-box-title { font-family: var(--global-heading-font-family); font-size: 18px; font-weight: 700; margin-bottom: 8px; color: #1e1a3c; }
.kt-blocks-info-box-text p { font-size: 14px; color: #666; margin: 0; }
.kt-image-icon-wrap { margin-bottom: 15px; }
.kt-image-icon-wrap svg { width: 50px; height: 50px; color: var(--global-palette1); }

/* === Accordion / FAQ === */
.kt-accordion-pane { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.kt-accordion-header-wrap {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; cursor: pointer; font-weight: 600;
    font-family: var(--global-heading-font-family); color: #1e1a3c;
    transition: background 0.2s;
}
.kt-accordion-header-wrap:hover { background: #f9fafb; }
.kt-accordion-header-icon { flex-shrink: 0; transition: transform 0.3s; }
.kt-accordion-header-icon svg { width: 20px; height: 20px; }
.kt-accordion-pane-active .kt-accordion-header-icon { transform: rotate(180deg); }
.kt-accordion-panel { overflow: hidden; transition: max-height 0.3s ease; }
.kt-accordion-panel-hidden { display: none; }
.kt-accordion-panel-inner { padding: 16px 20px; color: #555; line-height: 1.7; }

/* === Table of Contents === */
.kb-table-of-content-nav { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; margin: 30px 0; }
.kb-table-of-content-nav .kb-table-of-content-header { font-weight: 700; margin-bottom: 12px; font-family: var(--global-heading-font-family); }
.kb-table-of-content-list { list-style: none; padding: 0; margin: 0; }
.kb-table-of-content-list li { padding: 4px 0; }
.kb-table-of-content-list a { color: var(--global-palette1); }

/* === Flexible Table === */
.wp-block-flexible-table-block-table table { width: 100%; border-collapse: collapse; }
.wp-block-flexible-table-block-table table td,
.wp-block-flexible-table-block-table table th {
    border: 1px solid #e5e7eb; padding: 10px 14px;
}
.wp-block-flexible-table-block-table table th { background: #f3f4f6; font-weight: 700; }
.wp-block-flexible-table-block-table table tr:nth-child(even) td { background: #fafafa; }

/* === App Info Box / Rating === */
.wp-block-group { padding: 20px; background: #f9fafb; border-radius: 10px; }
.wp-block-group__inner-container > * { margin-bottom: 12px; }
.wp-block-group__inner-container > *:last-child { margin-bottom: 0; }

/* === Footer === */
#colophon {
    background: #1e1a3c;
    color: #aaa;
    margin-top: auto;
}
.site-middle-footer-wrap { padding: 30px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-middle-footer-inner-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
#footer-navigation .menu { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 15px; }
#footer-navigation .menu li a { color: #aaa; font-size: 14px; transition: color 0.2s; }
#footer-navigation .menu li a:hover { color: #fff; }
.site-bottom-footer-wrap { padding: 20px 0; }
.site-bottom-footer-inner-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-html p { margin: 0; font-size: 14px; color: #888; }
.footer-social-inner-wrap { display: flex; gap: 10px; }
.social-button {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: #aaa; transition: all 0.2s;
}
.social-button:hover { background: var(--global-palette1); color: #fff; }
.social-button svg { width: 18px; height: 18px; }

/* === Blog Cards === */
.post-entry { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.07); margin-bottom: 30px; }
.post-entry-inner { display: flex; gap: 20px; }
.post-featured-image { flex: 0 0 280px; }
.post-featured-image img { width: 100%; height: 200px; object-fit: cover; }
.post-content { flex: 1; padding: 20px; }
.post-title { font-family: var(--global-heading-font-family); font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.post-title a { color: #1e1a3c; }
.post-title a:hover { color: var(--global-palette1); }
.post-excerpt { color: #666; line-height: 1.6; margin: 0 0 15px; }
.post-meta { font-size: 13px; color: #999; }
.read-more-link {
    display: inline-block; background: linear-gradient(90deg, var(--global-palette1), var(--global-palette3));
    color: #fff; padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 600;
}
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.post-grid .post-entry { margin-bottom: 0; }
.post-grid .post-entry-inner { flex-direction: column; }
.post-grid .post-featured-image { flex: none; }
.post-grid .post-featured-image img { width: 100%; height: 200px; object-fit: cover; }

/* === Pagination === */
.navigation.pagination { margin: 40px 0; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid #e5e7eb; color: #333; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--global-palette1); color: #fff; border-color: var(--global-palette1); }
.pagination .page-numbers:hover { background: #f3f4f6; }

/* === 404 / Search === */
.error-404, .search-results { padding: 80px 0; text-align: center; }
.error-404 h1 { font-size: 120px; color: var(--global-palette1); margin: 0; line-height: 1; }
.search-form { display: flex; max-width: 500px; margin: 20px auto 0; }
.search-form .search-field { flex: 1; padding: 12px 20px; border: 2px solid #e5e7eb; border-right: none; border-radius: 50px 0 0 50px; font-size: 16px; outline: none; }
.search-form .search-submit { background: var(--global-palette1); color: #fff; border: none; padding: 12px 25px; border-radius: 0 50px 50px 0; cursor: pointer; font-size: 16px; }

/* === Breadcrumb === */
.breadcrumb-trail { font-size: 14px; color: #999; margin-bottom: 20px; }
.breadcrumb-trail a { color: var(--global-palette1); }
.breadcrumb-trail span { margin: 0 5px; }

/* === Scroll to Top === */
#scroll-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px;
    background: linear-gradient(135deg, var(--global-palette1), var(--global-palette3));
    color: #fff; border: none; border-radius: 50%; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 4px 15px rgba(137,32,243,0.4);
    transition: transform 0.2s; z-index: 9000;
}
#scroll-to-top.visible { display: flex; }
#scroll-to-top:hover { transform: translateY(-3px); }

/* === Responsive === */
@media (max-width: 1024px) {
    .kt-has-4-columns { grid-template-columns: 1fr 1fr; }
    .kt-has-3-columns { grid-template-columns: 1fr 1fr; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    #main-header { display: none; }
    #mobile-header { display: block; }
    .kt-has-2-columns,
    .kt-has-3-columns,
    .kt-has-4-columns,
    .kt-row-layout-left-golden,
    .kt-row-layout-right-golden { grid-template-columns: 1fr; }
    .wp-block-columns.is-layout-flex { flex-direction: column; }
    .wp-block-column[style*="flex-basis:38%"],
    .wp-block-column[style*="flex-basis:62%"] { flex: 1 1 100%; }
    .post-grid { grid-template-columns: 1fr; }
    .post-entry-inner { flex-direction: column; }
    .post-featured-image { flex: none; }
    .site-bottom-footer-inner-wrap { justify-content: center; }
    .entry-title { font-size: 1.5rem; }
    #primary { padding: 20px 0; }
}
@media (max-width: 480px) {
    .stk-block-button a.stk-link.stk-button { width: 100%; justify-content: center; }
    .stk-block-button-group { flex-direction: column; }
}
