/*
 * BASE.CSS - Variables, Reset, Typography, Buttons, Badges
 * Techo Theme - NexusByte Design
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    /* Colors */
    --bg-body: #090915;
    --bg-card: #13132B;
    --bg-card-hover: #1A1A3A;
    --primary: #3B82F6;
    --accent: #8B5CF6;
    --neon-blue: #00F0FF;
    --neon-purple: #BD00FF;
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;

    /* Spacing & Sizing */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --header-height: 80px;
    --container-width: 1280px;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-card: linear-gradient(180deg, rgba(19, 19, 43, 0.8), rgba(13, 13, 32, 0.9));
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-muted);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem 0;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-white {
    color: var(--text-main);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.site-content-wrapper {
    min-height: 100vh;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.w-100 {
    width: 100%;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-accent {
    background: var(--accent);
    color: white;
}

.badge-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   UTILITIES
   ======================================== */
.mt-5 {
    margin-top: 50px;
}

.mb-5 {
    margin-bottom: 50px;
}

.mt-4 {
    margin-top: 30px;
}

.mb-4 {
    margin-bottom: 30px;
}

.mt-3 {
    margin-top: 20px;
}

.mb-3 {
    margin-bottom: 20px;
}

/* Accessibility */
.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;
}

.screen-reader-text:focus {
    background: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wire-card,
.feed-item,
.review-card,
.enterprise-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.wire-card.animated,
.feed-item.animated,
.review-card.animated,
.enterprise-card.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.reviews-row .review-card:nth-child(1) { transition-delay: 0.1s; }
.reviews-row .review-card:nth-child(2) { transition-delay: 0.2s; }
.reviews-row .review-card:nth-child(3) { transition-delay: 0.3s; }
.reviews-row .review-card:nth-child(4) { transition-delay: 0.4s; }

/* ========================================
   SEARCH OVERLAY
   ======================================== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
    text-align: center;
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.search-overlay .search-form {
    display: flex;
    position: relative;
}

.search-overlay .search-field {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    padding: 25px 80px 25px 35px;
    font-size: 1.3rem;
    width: 100%;
    color: white;
}

.search-overlay .search-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.search-overlay .search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   BODY STATES
   ======================================== */
body.menu-open {
    overflow: hidden;
}

/* Header Scroll State */
.site-header.scrolled {
    background: rgba(9, 9, 21, 0.95);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

/* ========================================
   LIGHT MODE THEME
   ======================================== */
body.light-mode {
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f5;
    --text-main: #1a1a2e;
    --text-muted: #64748b;
}

body.light-mode .site-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .site-footer {
    background: linear-gradient(180deg, #e8eef5 0%, #dde5ee 100%);
}

body.light-mode .main-navigation ul {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .main-navigation a {
    color: var(--text-muted);
}

body.light-mode .main-navigation a:hover,
body.light-mode .main-navigation .current-menu-item > a {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .wire-card,
body.light-mode .feed-item,
body.light-mode .review-card,
body.light-mode .enterprise-card,
body.light-mode .widget-card {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

body.light-mode .search-toggle,
body.light-mode .theme-toggle {
    color: var(--text-muted);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
}

/* ========================================
   NOTIFICATIONS
   ======================================== */
.techo-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 15px 25px;
    background: var(--bg-card);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.techo-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.techo-notification.success {
    border-left-color: #10b981;
}

.techo-notification.error {
    border-left-color: #ef4444;
}

/* Loader spin animation */
@keyframes ri-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ri-spin {
    animation: ri-spin 1s linear infinite;
}

/* ========================================
   AD PLACEMENTS
   ======================================== */
.techo-ad {
    margin: 30px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ad-header {
    margin: 0;
    padding: 10px 0;
    background: transparent;
    min-height: 90px;
}

.ad-after_hero {
    margin: 40px 0;
    min-height: 250px;
}

.ad-sidebar_1,
.ad-sidebar_2 {
    margin: 20px 0;
    min-height: 250px;
}

.ad-in-content {
    margin: 30px auto;
    max-width: 100%;
}

.ad-after_content {
    margin: 40px 0;
    padding: 20px;
}

.ad-before_footer {
    margin: 50px 0 0;
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.2);
}

.ad-between_posts {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

/* Responsive ads */
.techo-ad img,
.techo-ad iframe,
.techo-ad ins {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* ========================================
   CURSOR EFFECTS FOR LINKS & BUTTONS
   ======================================== */
a,
button,
.btn,
.nav-btn,
.menu-toggle,
.search-toggle,
.theme-toggle,
.back-to-top,
.share-btn,
.topic-item,
.badge,
.footer-social-icons a,
.nav-menu a,
.footer-menu a,
input[type="submit"],
input[type="button"],
.wire-card,
.review-card,
.enterprise-card,
.related-card,
.side-card,
.hero-main-card,
[role="button"],
label[for] {
    cursor: pointer;
}

/* Disabled state */
button:disabled,
.btn:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Text selection cursor for inputs */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea {
    cursor: text;
}

/* Grab cursor for draggable elements */
.hot-scroll {
    cursor: grab;
}

.hot-scroll:active {
    cursor: grabbing;
}

/* Help cursor for tooltips/info */
[title],
abbr[title] {
    cursor: help;
}

/* Zoom cursor for images */
.post-featured-image img,
.wire-img img,
.review-img img {
    cursor: zoom-in;
}

/* Wait cursor for loading states */
.loading,
.loading * {
    cursor: wait !important;
}
