/*
Theme Name: xValidateAI
Theme URI: https://xvalidateai.com
Author: xValidateAI Team
Author URI: https://xvalidateai.com
Description: A lightweight, Elementor-compatible WordPress theme for xValidateAI — AI Governance & Compliance platform for education. Built for use with Elementor page builder. Includes custom AGRI Scanner widget, brand colors, and global font settings.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xvalidateai
Tags: one-page, education, elementor, custom-colors, custom-logo, full-width-template
*/

/* =========================================
   THEME BASE — Minimal, Elementor-first
   ========================================= */

:root {
    --xv-navy:      #0D2040;
    --xv-accent:    #0f3357;
    --xv-white:     #ffffff;
    --xv-card-bg:   #F0F7FF;
    --xv-body:      #334155;
    --xv-border:    #E2E8F0;
    --xv-success:   #10B981;
    --xv-warning:   #F59E0B;
    --xv-danger:    #EF4444;
    --xv-font:      'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--xv-font);
    color: var(--xv-body);
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove default margins so Elementor has full control */
body.elementor-page .site-header,
body.elementor-page .site-footer {
    display: none;
}

/* Elementor canvas template - completely blank */
body.elementor-template-canvas {
    background: #fff;
}

/* Full-width support for Elementor sections */
.elementor-section.elementor-section-full_width {
    max-width: 100%;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* =========================================
   SITE LAYOUT (fallback when not Elementor)
   ========================================= */

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1;
}

.site-main {
    padding: 0;
}

/* =========================================
   DEFAULT SITE HEADER (Elementor can replace)
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 1px 0 var(--xv-border);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(13, 32, 64, 0.12);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-branding img,
.site-branding .custom-logo {
    height: 40px;
    width: auto;
}

.site-branding .site-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--xv-navy);
    letter-spacing: -0.5px;
}

/* Primary Nav */
.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-navigation ul li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--xv-body);
    transition: color 0.2s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
    color: var(--xv-accent);
}

/* CTA Button in Nav */
.header-cta .xv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: var(--xv-navy);
    color: #fff;
    border: 2px solid var(--xv-navy);
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-cta .xv-btn:hover {
    background: var(--xv-accent);
    border-color: var(--xv-accent);
    transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--xv-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--xv-border);
    padding: 24px;
    box-shadow: 0 8px 30px rgba(13,32,64,0.1);
    z-index: 9998;
}

.mobile-menu.open { display: block; }

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu ul li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--xv-navy);
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--xv-border);
}

/* =========================================
   SITE FOOTER (Elementor can replace)
   ========================================= */

.site-footer {
    background: var(--xv-navy);
    color: rgba(255,255,255,0.8);
    padding: 64px 0 32px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.footer-brand img { height: 56px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.6; }

.footer-links h4,
.footer-contact h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: 20px;
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s ease; }
.footer-links ul li a:hover { color: #fff; }

.footer-contact p { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.footer-contact a { color: rgba(255,255,255,0.7); transition: color 0.2s ease; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.5); }

/* =========================================
   GLOBAL UTILITY CLASSES (use in Elementor)
   ========================================= */

.xv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--xv-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.xv-btn--primary {
    background: var(--xv-navy);
    color: #fff;
    border-color: var(--xv-navy);
}
.xv-btn--primary:hover {
    background: var(--xv-accent);
    border-color: var(--xv-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,32,64,0.25);
    color: #fff;
}

.xv-btn--accent {
    background: var(--xv-accent);
    color: #fff;
    border-color: var(--xv-accent);
}
.xv-btn--accent:hover {
    background: #0a2540;
    border-color: #0a2540;
    transform: translateY(-2px);
    color: #fff;
}

.xv-btn--ghost {
    background: transparent;
    color: var(--xv-accent);
    border-color: var(--xv-accent);
}
.xv-btn--ghost:hover {
    background: var(--xv-accent);
    color: #fff;
}

.xv-btn--outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.xv-btn--outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

/* =========================================
   AGRI SCANNER WIDGET STYLES
   ========================================= */

.xv-agri-widget {
    font-family: var(--xv-font);
}

.xv-agri-scanner-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px;
    max-width: 720px;
    margin: 0 auto 48px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
    border: 1px solid var(--xv-border);
}

/* Progress */
.xv-agri-progress-wrap {
    height: 6px;
    background: #E2E8F0;
    border-radius: 99px;
    margin-bottom: 12px;
    overflow: hidden;
}

.xv-agri-progress-bar {
    height: 100%;
    background: var(--xv-accent);
    border-radius: 99px;
    width: 0%;
    transition: width 0.4s ease;
}

.xv-agri-step-counter {
    font-size: 13px;
    font-weight: 600;
    color: var(--xv-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 32px;
    display: block;
}

/* Questions */
.xv-agri-question { display: none; animation: xvSlideIn 0.35s ease; }
.xv-agri-question.active { display: block; }

@keyframes xvSlideIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.xv-agri-question h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--xv-navy);
    margin-bottom: 28px;
    line-height: 1.4;
}

.xv-agri-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xv-agri-opt {
    padding: 16px 20px;
    border: 2px solid var(--xv-border);
    border-radius: 10px;
    background: #fff;
    font-family: var(--xv-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--xv-body);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.xv-agri-opt:hover:not(:disabled) {
    border-color: var(--xv-accent);
    background: #F0F7FF;
    color: var(--xv-navy);
    transform: translateX(6px);
}

.xv-agri-opt.selected {
    border-color: var(--xv-accent);
    background: var(--xv-accent);
    color: #fff;
}

.xv-agri-opt:disabled { cursor: not-allowed; opacity: 0.7; }

/* Results */
.xv-agri-results {
    text-align: center;
    animation: xvFadeIn 0.5s ease;
}

@keyframes xvFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.xv-agri-gauge-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.xv-agri-gauge-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1;
}

.xv-agri-score-num {
    font-size: 48px;
    font-weight: 800;
    color: var(--xv-navy);
    display: block;
}

.xv-agri-score-denom {
    font-size: 16px;
    color: #94a3b8;
    font-weight: 500;
}

.xv-agri-tier-label {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--xv-navy);
}

.xv-agri-message {
    font-size: 16px;
    color: var(--xv-body);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.75;
}

.xv-agri-breakdown {
    text-align: left;
    background: #F8FAFC;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.xv-agri-breakdown h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--xv-navy);
    margin-bottom: 20px;
}

.xv-agri-bar-row { margin-bottom: 16px; }

.xv-agri-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--xv-body);
}

.xv-agri-bar-track {
    height: 8px;
    background: var(--xv-border);
    border-radius: 99px;
    overflow: hidden;
}

.xv-agri-bar-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    transition: width 1s ease;
}

.xv-agri-result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Score badges below scanner */
.xv-agri-score-badges {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.xv-agri-badge {
    padding: 10px 22px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.xv-agri-badge--red   { background: rgba(239,68,68,0.1); color: #EF4444; }
.xv-agri-badge--amber { background: rgba(245,158,11,0.1); color: #F59E0B; }
.xv-agri-badge--blue  { background: rgba(15,51,87,0.12);  color: var(--xv-accent); }
.xv-agri-badge--green { background: rgba(16,185,129,0.1); color: #10B981; }

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .main-navigation { display: none; }
    .nav-toggle { display: flex; }
    .header-cta { display: none; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .xv-agri-scanner-card { padding: 24px 20px; }
    .xv-agri-question h3 { font-size: 18px; }
    .xv-agri-score-num { font-size: 36px; }
    .xv-agri-result-actions { flex-direction: column; align-items: center; }
    .xv-agri-score-badges { flex-direction: column; align-items: center; }
}
