/* =========================================================
   CleanX Pro Theme — assets/css/theme.css
   Base tokens, layout, header, cards, buttons, footer.
   ========================================================= */

:root {
    --cx-primary: #0057FF;
    --cx-primary-dark: #0043c8;
    --cx-primary-soft: #E6EEFF;
    --cx-accent: #1E293B;
    --cx-bg: #ffffff;
    --cx-muted: #64748b;
    --cx-border: #e2e8f0;
    --cx-radius: 14px;
    --cx-shadow-sm: 0 2px 6px rgba(15, 23, 42, .06);
    --cx-shadow-md: 0 12px 32px rgba(15, 23, 42, .12);
    --cx-max: 1200px;
    --cx-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cx-font-display: 'Poppins', var(--cx-font-sans);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--cx-font-sans);
    color: var(--cx-accent);
    background: var(--cx-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cx-font-display);
    color: var(--cx-accent);
    line-height: 1.2;
    margin: 0 0 .6em;
    font-weight: 700;
}

a { color: var(--cx-primary); text-decoration: none; }
a:hover { color: var(--cx-primary-dark); }
img { max-width: 100%; height: auto; display: block; }

.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; width: 1px; word-wrap: normal !important;
}
.skip-link { position: absolute; top: -100px; left: 8px; background: var(--cx-primary); color: #fff; padding: 10px 14px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 8px; }

.container, .container-wide {
    width: 100%;
    max-width: var(--cx-max);
    margin: 0 auto;
    padding: 0 20px;
}
.container-wide { max-width: 1440px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: 999px; font-weight: 600;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
    border: 0; cursor: pointer; font-family: var(--cx-font-sans);
}
.btn-primary { background: var(--cx-primary); color: #fff; }
.btn-primary:hover { background: var(--cx-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--cx-shadow-md); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 0 rgba(15,23,42,.06); }
.topbar { background: var(--cx-primary); color: #fff; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.topbar a { color: #fff; }
.topbar-info { display: flex; gap: 20px; }
.topbar-social { display: flex; gap: 10px; }
.topbar-social a { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; font-weight: 700; }

.mainbar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.site-title { font-family: var(--cx-font-display); font-weight: 800; font-size: 24px; color: var(--cx-accent); }
.custom-logo { max-height: 52px; width: auto; }

.main-navigation .primary-menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 4px; align-items: center;
}
.primary-menu a { display: inline-block; padding: 10px 14px; color: var(--cx-accent); font-weight: 500; border-radius: 8px; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--cx-primary); background: var(--cx-primary-soft); }
.primary-menu .sub-menu {
    list-style: none; padding: 8px; margin: 0;
    position: absolute; background: #fff; box-shadow: var(--cx-shadow-md);
    border-radius: var(--cx-radius); min-width: 240px; opacity: 0;
    visibility: hidden; transform: translateY(6px);
    transition: all .15s ease; z-index: 10;
}
.primary-menu li { position: relative; }
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-menu .sub-menu a { display: block; }

.header-cta {
    display: inline-flex; flex-direction: column; align-items: flex-start;
    padding: 8px 16px; border-left: 2px solid var(--cx-border); line-height: 1.1;
}
.header-cta-label { font-size: 11px; color: var(--cx-muted); }
.header-cta-number { font-weight: 700; color: var(--cx-primary); }

.menu-toggle {
    display: none; background: transparent; border: 1px solid var(--cx-border);
    border-radius: 8px; width: 42px; height: 42px; cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
    content: ''; display: block; width: 20px; height: 2px; background: var(--cx-accent);
    margin: 0 auto; position: relative;
}
.menu-toggle-bars::before { top: -6px; position: absolute; left: 0; }
.menu-toggle-bars::after  { top:  6px; position: absolute; left: 0; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--cx-primary) 0%, #0043c8 100%);
    color: #fff; padding: 96px 0; text-align: center;
}
.hero-eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 12px; opacity: .85; margin: 0 0 12px; }
.hero-title { color: #fff; font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 16px; }
.hero-subtitle { font-size: 1.15rem; max-width: 680px; margin: 0 auto 28px; opacity: .95; }
.hero .btn-primary { background: #fff; color: var(--cx-primary); }
.hero .btn-primary:hover { background: #f2f5ff; color: var(--cx-primary); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: #f8fafc; }
.section-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 36px; }

/* Grids */
.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* Service card */
.service-card {
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--cx-border); border-radius: var(--cx-radius);
    overflow: hidden; color: inherit; box-shadow: var(--cx-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--cx-shadow-md); color: inherit; }
.service-card-image { aspect-ratio: 4/3; overflow: hidden; background: #f1f5f9; }
.service-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.service-card:hover .service-card-image img { transform: scale(1.04); }
.service-card-body { padding: 18px 20px; }
.service-card-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.service-card-body p { color: var(--cx-muted); font-size: .92rem; margin: 0 0 10px; }

/* Post card */
.post-card {
    background: #fff; border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius); overflow: hidden;
    box-shadow: var(--cx-shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--cx-shadow-md); }
.post-thumbnail img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.post-card-body { padding: 20px; }
.post-categories { display: inline-block; font-size: 12px; color: var(--cx-primary); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 8px; }
.post-categories a { color: inherit; }
.post-card-title { font-size: 1.15rem; margin: 4px 0 8px; }
.post-card-title a { color: var(--cx-accent); }
.post-card-title a:hover { color: var(--cx-primary); }
.post-card-meta { color: var(--cx-muted); font-size: 13px; margin-bottom: 10px; }
.post-card-excerpt { color: var(--cx-muted); font-size: .95rem; }
.read-more { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--cx-primary); }

/* Archive layout with sidebar */
.archive-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) 320px; padding: 60px 20px; }
.archive-layout.sidebar-left { grid-template-columns: 320px minmax(0, 1fr); }
.page-header { margin-bottom: 32px; }
.page-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.widget-area .widget { background: #f8fafc; border-radius: var(--cx-radius); padding: 20px; margin-bottom: 24px; }
.widget-title { margin: 0 0 12px; font-size: 1.1rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px dashed var(--cx-border); }
.widget li:last-child { border-bottom: 0; }

/* Search form */
.search-form { display: flex; gap: 8px; margin: 16px 0; }
.search-field { flex: 1; padding: 12px 16px; border: 1px solid var(--cx-border); border-radius: 999px; font: inherit; }
.search-field:focus { outline: 2px solid var(--cx-primary); }

/* Single */
.single-post .entry-title, .single-service .entry-title, .single-page .entry-title { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.entry-thumbnail { margin: 24px 0 32px; border-radius: var(--cx-radius); overflow: hidden; }
.entry-content { font-size: 1.05rem; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content blockquote { border-left: 4px solid var(--cx-primary); padding: 12px 20px; background: var(--cx-primary-soft); border-radius: 8px; margin: 1.5em 0; }
.service-cta { margin-top: 40px; padding: 28px; background: var(--cx-primary-soft); border-radius: var(--cx-radius); text-align: center; }

/* Comments */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-top: 1px solid var(--cx-border); }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--cx-border);
    border-radius: 10px; font: inherit; margin-top: 6px;
}
.comment-form label { font-weight: 600; }
.comment-form .submit { background: var(--cx-primary); color: #fff; border: 0; padding: 12px 24px; border-radius: 999px; cursor: pointer; }

/* Pagination */
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 40px 0; }
.nav-links .page-numbers { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--cx-border); color: var(--cx-accent); font-weight: 600; }
.nav-links .current { background: var(--cx-primary); color: #fff; border-color: var(--cx-primary); }

/* Footer */
.site-footer { background: var(--cx-accent); color: #cbd5e1; padding: 60px 0 0; margin-top: 60px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 40px; }
.site-footer .widget-title { color: #fff; }
.site-footer .widget { background: transparent; padding: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: 14px; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }

/* WhatsApp float */
.whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px;
    border-radius: 50%; background: #25D366; color: #fff; display: grid;
    place-items: center; font-size: 26px; box-shadow: var(--cx-shadow-md);
    z-index: 50; transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* Error */
.error-404-wrap { padding: 80px 20px; text-align: center; }

/* Mobile */
@media (max-width: 900px) {
    .archive-layout, .archive-layout.sidebar-left { grid-template-columns: 1fr; }
    .topbar { display: none; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .main-navigation .primary-menu {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; background: #fff; box-shadow: var(--cx-shadow-md);
        padding: 12px; gap: 0;
    }
    .main-navigation.toggled .primary-menu { display: flex; }
    .primary-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 12px; }
    .header-cta { display: none; }
    .mainbar .container { position: relative; }
}
