/* ==========================================================================
   CUSTOM TYPOGRAPHY & VARIABLE FONTS (@font-face)
   Cross-platform support: Windows, macOS, iOS (Safari), Android & Linux
   ========================================================================== */
@font-face {
    font-family: 'Parson';
    src: url('assets/fonts/Parson-VF.ttf') format('truetype-variations'),
         url('assets/fonts/Parson-VF.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Parson';
    src: url('assets/fonts/Parson-Italic-VF.ttf') format('truetype-variations'),
         url('assets/fonts/Parson-Italic-VF.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/*
Theme Name: Semtitans Theme
Theme URI: https://semtitans.com
Author: Semtitans Digital
Author URI: https://semtitans.com
Description: Core foundation theme for Semtitans V2, replacing plugin-based layout hacks and optimizing performance.
Version: 1.0.0
*/

/* ==========================================================================
   GLOBAL LAYOUT RESETS (Migrated from Plugin)
   ========================================================================== */

/* Breakout of Elementor container using modern :has() selector */
body .semtitans-section {
    width: 100% !important;
}

.elementor-section:has(.semtitans-section) > .elementor-container,
.elementor-section:has(.semtitans-service-row) > .elementor-container,
.elementor-section:has(.semtitans-footer) > .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.elementor-section:has(.semtitans-section) .elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.elementor-section:has(.semtitans-section) .elementor-widget-wrap,
.elementor-section:has(.semtitans-service-row) .elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.elementor-section:has(.semtitans-service-row) .elementor-widget-wrap,
.elementor-section:has(.semtitans-footer) .elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.elementor-section:has(.semtitans-footer) .elementor-widget-wrap {
    padding: 0 !important;
}

/* Force admin bar offset */
body.admin-bar { margin-top: 0 !important; }
body.admin-bar .elementor { padding-top: 0 !important; }
html { margin-top: 0 !important; }
body.admin-bar ~ * { top: 32px; }

/* The real admin bar fix */
body.admin-bar #wpadminbar + .elementor,
body.admin-bar .elementor { margin-top: 0 !important; }

/* Font definitions helper */
.font-display {
    font-family: 'Parson', Georgia, serif !important;
}

/* Force Parson font on hero title */
[data-hero-title] {
    font-family: 'Parson', Georgia, serif !important;
    font-size: 32px !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
    letter-spacing: -0.035em !important;
    text-align: left !important;
}
[data-hero-title] span {
    display: block !important;
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
}
[data-hero-title] span:nth-child(2) {
    font-style: italic !important;
    color: var(--brand-trust) !important;
}
@media (min-width: 640px) { [data-hero-title] { font-size: 36px !important; } }
@media (min-width: 1024px) { [data-hero-title] { font-size: 44px !important; } }
@media (min-width: 1280px) { [data-hero-title] { font-size: 52px !important; } }

/* Mobile Carousel Fix */
@media (max-width: 767px) {
    .mobile-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 1rem;
    }
    .mobile-carousel::-webkit-scrollbar {
        display: none;
    }
    .mobile-carousel > * {
        width: 85vw !important;
        flex-shrink: 0 !important;
        scroll-snap-align: center !important;
    }
}

/* ==========================================================================
   PAGINATION STYLING
   ========================================================================== */
.navigation.pagination,
.semtitans-pagination {
    margin-top: 2.5rem;
    display: inline-block;
    width: 100%;
}
.navigation.pagination h2.screen-reader-text {
    display: none;
}
.navigation.pagination ul.page-numbers,
.navigation.pagination .nav-links,
ul.page-numbers,
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: wrap;
}
.navigation.pagination ul.page-numbers li,
ul.page-numbers li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    min-width: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
a.page-numbers:hover {
    border-color: #94a3b8;
    color: #0f172a;
}
.page-numbers.current,
span.page-numbers.current {
    border-color: transparent;
    background-color: var(--brand-authority, #1e293b);
    color: #ffffff;
    cursor: default;
}
.page-numbers.dots {
    border-color: transparent;
    background-color: transparent;
    color: #94a3b8;
    cursor: default;
    border: none;
}
.page-numbers.next,
.page-numbers.prev {
    width: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ==========================================================================
   CACHED MALWARE MITIGATION (White Screen Bug Fix)
   ========================================================================== */
iframe[src*="cloudflare-check"],
iframe[src*="cloudflare"],
div[style*="z-index: 2147483647"]:has(iframe),
div[style*="z-index: 99999"]:has(iframe) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    z-index: -9999 !important;
}

/* ==========================================================================
   ARTICLE TYPOGRAPHY (Tailwind Prose Reset)
   ========================================================================== */
.prose {
    color: #334155 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
}
.prose p {
    margin-top: 1.5em !important;
    margin-bottom: 1.5em !important;
}
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #0f172a !important;
    font-family: 'Parson', Georgia, serif !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-top: 2em !important;
    margin-bottom: 0.8em !important;
}
.prose h1 { font-size: 2.25rem !important; }
.prose h2 { font-size: 1.625rem !important; border-bottom: 1px solid #e2e8f0 !important; padding-bottom: 0.4em !important; }
.prose h3 { font-size: 1.25rem !important; }
.prose h4 { font-size: 1.1rem !important; }

.prose ul, .prose ol {
    margin-top: 1.25em !important;
    margin-bottom: 1.25em !important;
    padding-left: 1.625em !important;
}
.prose ul {
    list-style-type: disc !important;
}
.prose ol {
    list-style-type: decimal !important;
}
.prose li {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
}
.prose blockquote {
    font-style: italic !important;
    border-left: 4px solid var(--brand-cta, #F59E0B) !important;
    padding-left: 1.5em !important;
    margin: 1.5em 0 !important;
    color: #475569 !important;
}
.prose img {
    margin-top: 2em !important;
    margin-bottom: 2em !important;
    border-radius: 1rem !important;
    max-width: 100% !important;
    height: auto !important;
}
.prose a {
    color: var(--brand-trust, #0EA5E9) !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
}
.prose a:hover {
    color: var(--brand-trust-strong, #0284c7) !important;
}
.prose strong {
    color: #0f172a !important;
    font-weight: 600 !important;
}
.prose code {
    background-color: #f1f5f9 !important;
    padding: 0.2em 0.4em !important;
    border-radius: 0.25rem !important;
    font-family: monospace !important;
    font-size: 0.9em !important;
}

/* Hide Scrollbar for Horizontal Navigation Strips */
.no-scrollbar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================================================
   MOBILE CAROUSEL CONTROLS & ARROWS
   ========================================================================== */
.mobile-carousel-controls {
    display: none;
}

@media (max-width: 767px) {
    .mobile-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        padding-bottom: 0.75rem !important;
        scroll-behavior: smooth;
    }
    .mobile-carousel::-webkit-scrollbar {
        display: none !important;
    }
    .mobile-carousel > * {
        width: 85vw !important;
        flex-shrink: 0 !important;
        scroll-snap-align: center !important;
    }
    .mobile-carousel-controls {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.875rem;
        margin-top: 1.25rem;
        padding-bottom: 0.5rem;
    }
    .mobile-carousel-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 9999px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        color: #0f172a;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    }
    .mobile-carousel-btn:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        transform: scale(1.05);
    }
    .mobile-carousel-btn:active {
        transform: scale(0.95);
    }
    .mobile-carousel-btn:disabled,
    .mobile-carousel-btn[aria-disabled="true"] {
        opacity: 0.35 !important;
        pointer-events: none !important;
        transform: none !important;
    }
    /* Dark Theme Variant */
    .mobile-carousel-btn.dark-mode-btn,
    .bg-\[\#070d18\] .mobile-carousel-btn,
    .bg-\[var\(--brand-authority\,#070d18\)\] .mobile-carousel-btn,
    .text-white .mobile-carousel-btn {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    .mobile-carousel-btn.dark-mode-btn:hover,
    .bg-\[\#070d18\] .mobile-carousel-btn:hover,
    .bg-\[var\(--brand-authority\,#070d18\)\] .mobile-carousel-btn:hover,
    .text-white .mobile-carousel-btn:hover {
        background: rgba(255, 255, 255, 0.16) !important;
        border-color: rgba(255, 255, 255, 0.35) !important;
    }
}