/*--------------------------------------------------------------
 * xTheme - Main Stylesheet
 * Version: 1.0.0
 *--------------------------------------------------------------*/

/* =============================================
   CSS Custom Properties (Defaults)
   ============================================= */
:root {
    --xtheme-primary: #1a2b4a;
    --xtheme-secondary: #2d4a7a;
    --xtheme-accent: #e8913a;
    --xtheme-text: #333333;
    --xtheme-text-light: #666666;
    --xtheme-light-bg: #f8f9fa;
    --xtheme-border: #e5e7eb;
    --xtheme-white: #ffffff;
    --xtheme-black: #111111;
    --xtheme-container: 1200px;
    --xtheme-radius: 8px;
    --xtheme-radius-sm: 4px;
    --xtheme-radius-lg: 12px;
    --xtheme-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --xtheme-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --xtheme-transition: 0.3s ease;
    --xtheme-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================
   Reset / Normalize
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--xtheme-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--xtheme-text);
    background-color: var(--xtheme-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* =============================================
   Typography
   ============================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--xtheme-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.2em;
}

a {
    color: var(--xtheme-accent);
    text-decoration: none;
    transition: color var(--xtheme-transition);
}

a:hover,
a:focus {
    color: var(--xtheme-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    padding-left: 1.5em;
    margin-bottom: 1.2em;
}

blockquote {
    border-left: 4px solid var(--xtheme-accent);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background: var(--xtheme-light-bg);
    border-radius: 0 var(--xtheme-radius) var(--xtheme-radius) 0;
    font-style: italic;
}

pre,
code {
    font-family: 'Fira Code', monospace;
    background: var(--xtheme-light-bg);
    border-radius: var(--xtheme-radius-sm);
}

code {
    padding: 0.2em 0.4em;
    font-size: 0.9em;
}

pre {
    padding: 1.5em;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

hr {
    border: 0;
    border-top: 1px solid var(--xtheme-border);
    margin: 2em 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

th,
td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid var(--xtheme-border);
}

th {
    background: var(--xtheme-light-bg);
    font-weight: 600;
    color: var(--xtheme-primary);
}

/* =============================================
   Layout
   ============================================= */
.xtheme-container {
    max-width: var(--xtheme-container);
    margin: 0 auto;
    padding: 0 20px;
}

.xtheme-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.xtheme-content--full {
    width: 100%;
}

.xtheme-content--has-sidebar {
    flex: 1;
    min-width: 0;
}

.xtheme-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-left .xtheme-row {
    flex-direction: row-reverse;
}

/* =============================================
   Buttons
   ============================================= */
.xtheme-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: var(--xtheme-radius);
    font-family: var(--xtheme-font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--xtheme-transition);
    text-decoration: none;
    line-height: 1.4;
}

.xtheme-btn--primary {
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
    border-color: var(--xtheme-accent);
}

.xtheme-btn--primary:hover {
    background: var(--xtheme-primary);
    border-color: var(--xtheme-primary);
    color: var(--xtheme-white);
    transform: translateY(-2px);
    box-shadow: var(--xtheme-shadow-lg);
}

.xtheme-btn--outline {
    background: transparent;
    color: var(--xtheme-accent);
    border-color: var(--xtheme-accent);
}

.xtheme-btn--outline:hover {
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
}

/* =============================================
   Forms
   ============================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--xtheme-border);
    border-radius: var(--xtheme-radius);
    font-family: var(--xtheme-font);
    font-size: 0.95rem;
    color: var(--xtheme-text);
    background: var(--xtheme-white);
    transition: border-color var(--xtheme-transition), box-shadow var(--xtheme-transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--xtheme-accent);
    box-shadow: 0 0 0 3px rgba(232, 145, 58, 0.15);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--xtheme-primary);
}

/* =============================================
   Widgets
   ============================================= */
.xtheme-widget {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--xtheme-white);
    border: 1px solid var(--xtheme-border);
    border-radius: var(--xtheme-radius);
}

.xtheme-widget__title {
    font-size: 1.1rem;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--xtheme-accent);
    color: var(--xtheme-primary);
}

.xtheme-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xtheme-widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--xtheme-border);
}

.xtheme-widget ul li:last-child {
    border-bottom: none;
}

.xtheme-widget ul li a {
    color: var(--xtheme-text);
    transition: color var(--xtheme-transition);
}

.xtheme-widget ul li a:hover {
    color: var(--xtheme-accent);
    padding-left: 5px;
}

/* =============================================
   Pagination
   ============================================= */
.xtheme-pagination {
    margin: 40px 0;
    text-align: center;
}

.xtheme-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.xtheme-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--xtheme-border);
    border-radius: var(--xtheme-radius);
    color: var(--xtheme-text);
    font-weight: 500;
    transition: all var(--xtheme-transition);
}

.xtheme-pagination .page-numbers:hover,
.xtheme-pagination .page-numbers.current {
    background: var(--xtheme-accent);
    border-color: var(--xtheme-accent);
    color: var(--xtheme-white);
}

/* =============================================
   404 Page
   ============================================= */
.xtheme-404 {
    text-align: center;
    padding: 80px 20px;
}

.xtheme-404__number {
    font-size: 8rem;
    font-weight: 700;
    color: var(--xtheme-accent);
    line-height: 1;
    margin-bottom: 10px;
    opacity: 0.6;
}

.xtheme-404__title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.xtheme-404__description {
    font-size: 1.1rem;
    color: var(--xtheme-text-light);
    max-width: 500px;
    margin: 0 auto 30px;
}

.xtheme-404__search {
    max-width: 400px;
    margin: 0 auto 30px;
}

/* =============================================
   Preloader
   ============================================= */
.xtheme-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--xtheme-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.xtheme-preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.xtheme-preloader__spinner {
    display: flex;
    gap: 8px;
}

.xtheme-preloader__dot {
    width: 12px;
    height: 12px;
    background: var(--xtheme-accent);
    border-radius: 50%;
    animation: xthemeBounce 1.4s infinite ease-in-out both;
}

.xtheme-preloader__dot:nth-child(1) {
    animation-delay: -0.32s;
}

.xtheme-preloader__dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes xthemeBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* =============================================
   Scroll to Top
   ============================================= */
.xtheme-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--xtheme-transition);
    z-index: 999;
    box-shadow: var(--xtheme-shadow);
}

.xtheme-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.xtheme-scroll-top:hover {
    background: var(--xtheme-primary);
    transform: translateY(-3px);
    box-shadow: var(--xtheme-shadow-lg);
}

/* =============================================
   Page Header
   ============================================= */
.page-header {
    padding: 30px 0 10px;
}

.page-title {
    margin-bottom: 10px;
}

.archive-description {
    color: var(--xtheme-text-light);
    max-width: 700px;
}

/* =============================================
   Screen Reader
   ============================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--xtheme-light-bg);
    clip: auto !important;
    clip-path: none;
    color: var(--xtheme-primary);
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* =============================================
   Breadcrumbs
   ============================================= */
.xtheme-breadcrumbs {
    margin-bottom: 20px;
}

.xtheme-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.xtheme-breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--xtheme-text-light);
}

.xtheme-breadcrumbs__item:not(:last-child)::after {
    content: '/';
    color: var(--xtheme-border);
}

.xtheme-breadcrumbs__item a {
    color: var(--xtheme-text-light);
}

.xtheme-breadcrumbs__item a:hover {
    color: var(--xtheme-accent);
}

.xtheme-breadcrumbs__item--current {
    color: var(--xtheme-primary);
    font-weight: 500;
}

/* =============================================
   Elementor Page overrides
   ============================================= */
.elementor-page .site-main {
    padding: 0;
}

.elementor-page .xtheme-container {
    max-width: 100%;
    padding: 0;
}

/* Search form */
.search-form {
    display: flex;
    gap: 0;
}

.search-form .search-field {
    border-radius: var(--xtheme-radius) 0 0 var(--xtheme-radius);
    border-right: none;
}

.search-form .search-submit {
    padding: 12px 20px;
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
    border: 1px solid var(--xtheme-accent);
    border-radius: 0 var(--xtheme-radius) var(--xtheme-radius) 0;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--xtheme-transition);
}

.search-form .search-submit:hover {
    background: var(--xtheme-primary);
    border-color: var(--xtheme-primary);
}

/* Site main default spacing */
.site-main {
    padding: 40px 0;
    min-height: 50vh;
}

/* WP Alignment */
.alignwide {
    max-width: calc(var(--xtheme-container) + 200px);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.aligncenter {
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

/* No results */
.xtheme-no-results {
    text-align: center;
    padding: 60px 20px;
}

.xtheme-no-results__title {
    margin-bottom: 15px;
}

.xtheme-no-results__search {
    max-width: 400px;
    margin: 20px auto 0;
}