/*
Theme Name:   WiConnect Cert Theme
Theme URI:    https://wiconnect.tech
Author:       WiConnect
Author URI:   https://wiconnect.tech
Description:  A clean, customizable WordPress theme built for the WiConnect Cert. Features full Customizer support, block editor compatibility, and seamless plugin integration.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  wiconnect-theme
Tags:         certificate, education, clean, customizer, full-site-editing

/* =====================================================
   WICONNECT CERT THEME — Design Tokens
   ===================================================== */
:root {
    /* Brand */
    --color-primary:     #2563eb;
    --color-primary-dark:#1d4ed8;
    --color-dark:        #111827;
    --color-dark-mid:    #1e293b;
    --color-slate:       #64748b;
    --color-slate-light: #94a3b8;
    --color-bg:          #f8fafc;
    --color-white:       #ffffff;
    --color-border:      #e2e8f0;
    --color-success:     #16a34a;
    --color-danger:      #dc2626;

    /* Typography */
    --font-sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono:   'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

    /* Spacing */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  40px;
    --space-2xl: 64px;

    /* Sizing */
    --max-width:    1200px;
    --radius-sm:    6px;
    --radius-md:    12px;
    --radius-lg:    20px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
    --shadow-md:    0 4px 20px rgba(0,0,0,.08);
    --shadow-lg:    0 12px 48px rgba(0,0,0,.12);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-dark-mid);
    background: var(--color-bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color .2s;
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.25;
    color: var(--color-dark);
    margin-top: 0;
}

p { margin-top: 0; }

code, pre {
    font-family: var(--font-mono);
    background: #f1f5f9;
    border-radius: var(--radius-sm);
}
code { padding: 2px 6px; font-size: .875em; }
pre  { padding: 16px; overflow-x: auto; }

/* ── Layout ── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-dark);
}

.site-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1rem;
    flex-shrink: 0;
}

.site-logo-text {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.site-logo-sub {
    display: block;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-slate);
}

/* ── Navigation ── */
.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-slate);
    transition: all .2s;
}
.primary-nav a:hover, .primary-nav .current-menu-item a {
    color: var(--color-dark);
    background: var(--color-bg);
}

.nav-btn-verify {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 20px !important;
}
.nav-btn-verify:hover { background: var(--color-primary-dark) !important; }

.nav-btn-admin {
    background: var(--color-dark) !important;
    color: var(--color-white) !important;
    border-radius: var(--radius-sm) !important;
}
.nav-btn-admin:hover { background: #1f2937 !important; }

/* ── Hero ── */
.wiconnect-hero {
    background: var(--color-dark);
    color: white;
    padding: 96px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wiconnect-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(37,99,235,.3) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(139,92,246,.2) 0%, transparent 60%);
    pointer-events: none;
}

.wiconnect-hero .container { position: relative; z-index: 1; }

.wiconnect-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37,99,235,.2);
    border: 1px solid rgba(37,99,235,.4);
    color: #93c5fd;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 28px;
}

.wiconnect-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.wiconnect-hero h1 span { color: #60a5fa; }

.wiconnect-hero p {
    font-size: 1.15rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 40px;
}

.wiconnect-hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover { background: var(--color-primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.35); }

.btn-white {
    background: white;
    color: var(--color-dark);
}
.btn-white:hover { background: #f1f5f9; color: var(--color-dark); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,.3);
}
.btn-outline:hover { border-color: white; color: white; background: rgba(255,255,255,.08); }

.btn-dark {
    background: var(--color-dark);
    color: white;
}
.btn-dark:hover { background: #1f2937; color: white; }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: .82rem; }

/* ── Features Section ── */
.wiconnect-features {
    padding: 96px 0;
    background: white;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--color-slate);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--color-border);
    transition: all .25s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--color-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.feature-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.feature-card p  { font-size: .9rem; color: var(--color-slate); margin: 0; }

/* ── Stats Section ── */
.wiconnect-stats {
    background: var(--color-dark);
    color: white;
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: .82rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

/* ── CTA Section ── */
.wiconnect-cta {
    padding: 96px 0;
    text-align: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.wiconnect-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.wiconnect-cta p { font-size: 1.1rem; color: var(--color-slate); margin-bottom: 36px; }

/* ── Content Pages ── */
.site-main {
    min-height: 60vh;
    padding: 64px 0;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.entry-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

/* ── Footer ── */
.site-footer {
    background: var(--color-dark);
    color: #94a3b8;
    padding: 60px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    font-size: .9rem;
    margin: 12px 0 0;
    max-width: 280px;
}

.footer-col h4 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: white;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    color: #94a3b8;
    font-size: .9rem;
    text-decoration: none;
    transition: color .2s;
}
.footer-col a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
}

/* ── Mobile Menu Toggle ── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-dark);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid    { grid-template-columns: repeat(2, 1fr); }
    .footer-grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .primary-nav  { display: none; }
    .primary-nav.open { display: block; position: absolute; top: 72px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--color-border); padding: 16px; z-index: 200; }
    .primary-nav.open ul { flex-direction: column; gap: 4px; }
    .menu-toggle  { display: block; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid    { grid-template-columns: 1fr 1fr; }
    .footer-grid   { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .wiconnect-hero   { padding: 64px 16px; }
}

/* ── WordPress Core Classes ── */
.alignleft  { float: left; margin-right: 24px; margin-bottom: 16px; }
.alignright { float: right; margin-left: 24px; margin-bottom: 16px; }
.aligncenter { text-align: center; margin: 0 auto 24px; display: block; }
.wp-block-image { margin-bottom: 24px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--color-slate); text-align: center; margin-top: 8px; }

/* ── Gutenberg Block Styles ── */
.wp-block-quote {
    border-left: 4px solid var(--color-primary);
    padding: 16px 24px;
    margin: 32px 0;
    background: var(--color-bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.wp-block-code {
    border-radius: var(--radius-md);
    background: #0f172a;
    color: #e2e8f0;
    padding: 24px;
    font-size: .875rem;
}

/* ── Customizer live preview support ── */
body.wiconnect-preview-active .site-header { outline: 2px dashed #60a5fa; }
*/
