/*
Theme Name: TechAnalyzing
Theme URI: https://techanalyzing.com
Author: TechAnalyzing
Author URI: https://techanalyzing.com
Description: Modern tech blog theme with 3D hero
Version: 3.0
*/

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1a1a2e;
    line-height: 1.6;
    padding-top: 70px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== PRO HEADER STYLES ===== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.pro-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 12px 0;
}

.pro-header.sticky {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 8px 0;
}

body.dark-mode .pro-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255,255,255,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Logo Styles */
.logo-area {
    flex-shrink: 0;
}

.pro-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.3s;
}

.pro-logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.logo-text {
    color: #1e293b;
    font-weight: 700;
}

.logo-accent {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dark-mode .logo-text {
    color: #e2e8f0;
}

/* Pro Navigation */
.main-nav {
    margin-left: auto;
}

.pro-nav {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pro-nav li {
    position: relative;
}

.pro-nav a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    padding: 8px 0;
    display: inline-block;
}

.pro-nav a:hover {
    color: #3b82f6;
}

body.dark-mode .pro-nav a {
    color: #e2e8f0;
}

body.dark-mode .pro-nav a:hover {
    color: #60a5fa;
}

/* Active menu item indicator */
.pro-nav .current-menu-item a,
.pro-nav .current-page-ancestor a {
    color: #3b82f6;
    position: relative;
}

.pro-nav .current-menu-item a::after,
.pro-nav .current-page-ancestor a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

body.dark-mode .pro-nav .current-menu-item a {
    color: #60a5fa;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 24px;
}

.pro-search,
.pro-dark,
.pro-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
}

.pro-search:hover,
.pro-dark:hover {
    background: #f1f5f9;
    transform: scale(1.05);
}

body.dark-mode .pro-search,
body.dark-mode .pro-dark {
    color: #e2e8f0;
}

body.dark-mode .pro-search:hover,
body.dark-mode .pro-dark:hover {
    background: #334155;
}

/* Hamburger Menu Icon */
.pro-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
}

.pro-menu-toggle span {
    width: 22px;
    height: 2px;
    background: #1e293b;
    transition: 0.3s;
    border-radius: 2px;
}

body.dark-mode .pro-menu-toggle span {
    background: #e2e8f0;
}

.pro-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pro-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.pro-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive Navigation */
@media (max-width: 992px) {
    .pro-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: white;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0,0,0,0.1);
        z-index: 999;
        margin-left: 0;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .pro-nav {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }
    
    .pro-nav li {
        border-bottom: 1px solid #eef2ff;
    }
    
    .pro-nav a {
        display: block;
        padding: 14px 24px;
        width: 100%;
    }
    
    body.dark-mode .main-nav {
        background: #1e293b;
    }
    
    body.dark-mode .pro-nav li {
        border-bottom-color: #334155;
    }
    
    .header-actions {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .pro-logo {
        font-size: 20px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero .gradient {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 18px;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 3D BUTTON STYLES ===== */
.btn-3d-primary {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-3d-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-3d-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(59,130,246,0.5);
}

.btn-3d-primary:hover::before {
    left: 100%;
}

.btn-3d-secondary {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-3d-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2);
}

/* ===== 3D HERO SECTION STYLES ===== */
.hero-3d {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #0f172a;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content-3d {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid #cbd5e1;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ===== STATS ===== */
.stats {
    padding: 60px 0;
    background: white;
    border-top: 1px solid #eef2ff;
    border-bottom: 1px solid #eef2ff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== BLOG GRID ===== */
.blog-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.post-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #eef2ff;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.post-card:hover::before {
    opacity: 1;
}

.post-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.25);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 24px;
}

.post-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.post-card h3 a {
    text-decoration: none;
    color: #1e293b;
}

.post-category {
    display: inline-block;
    background: #eef2ff;
    color: #3b82f6;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ===== TOOLS SECTION ===== */
.tools-section {
    padding: 80px 0;
    background: #f8fafc;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    border: 1px solid #eef2ff;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.25);
}

.tool-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ===== REVIEWS ===== */
.reviews-section {
    padding: 80px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.review-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid #eef2ff;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.review-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.25);
}

.review-rating {
    font-size: 20px;
    margin-bottom: 16px;
}

/* ===== NEWSLETTER ===== */
.newsletter {
    padding: 80px 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    text-align: center;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 500px;
    margin: 30px auto 0;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
}

.newsletter-form button {
    padding: 14px 28px;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 30px;
    text-align: center;
}

/* ===== DARK MODE - COMPLETE FIX ===== */
body.dark-mode {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

body.dark-mode .hero,
body.dark-mode .stats,
body.dark-mode .blog-section,
body.dark-mode .tools-section,
body.dark-mode .reviews-section {
    background: #0f172a !important;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

body.dark-mode .hero h1,
body.dark-mode .hero p {
    color: #e2e8f0 !important;
}

body.dark-mode .stats {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .post-card,
body.dark-mode .tool-card,
body.dark-mode .review-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .post-card h3 a,
body.dark-mode .tool-card h3,
body.dark-mode .review-card strong {
    color: #f1f5f9 !important;
}

body.dark-mode .post-category {
    background: #334155 !important;
    color: #60a5fa !important;
}

body.dark-mode .newsletter {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
}

body.dark-mode .site-footer {
    background: #020617 !important;
}

body.dark-mode .search-modal-content {
    background: #1e293b !important;
    color: white !important;
}

body.dark-mode .search-modal input,
body.dark-mode .search-filters select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: white !important;
}

/* ===== STICKY HEADER ===== */
.site-header.sticky {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
    display: none;
}

.loading-spinner.active {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
    display: none;
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: rgba(59,130,246,0.2);
}

/* ===== SEARCH MODAL ===== */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 24px;
    padding: 32px;
}

.search-modal input {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    margin-bottom: 20px;
}

.search-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-filters select {
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: white;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.search-result-item a {
    text-decoration: none;
    font-weight: 600;
    color: #3b82f6;
}

/* ===== SOCIAL SHARE ===== */
.share-buttons {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 40px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-twitter { background: #1DA1F2; }
.share-facebook { background: #4267B2; }
.share-linkedin { background: #0077B5; }
.share-whatsapp { background: #25D366; }

/* ===== RELATED POSTS ===== */
.related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* ===== AUTHOR BOX ===== */
.author-box {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.author-info h3 {
    margin-bottom: 8px;
}

/* ===== LOAD MORE BUTTON ===== */
.load-more-btn {
    display: block;
    width: 200px;
    margin: 40px auto 0;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.3s;
}

.load-more-btn:hover {
    transform: translateY(-2px);
}

.load-more-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== TOOL POPUP ===== */
.tool-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 24px;
    padding: 32px;
    z-index: 3000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: center;
}

.tool-popup.active {
    display: block;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2999;
}

.popup-overlay.active {
    display: block;
}

.close-popup {
    margin-top: 20px;
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.post-card {
    animation: float 4s ease-in-out infinite;
}

.post-card:nth-child(2) { animation-delay: 0.5s; }
.post-card:nth-child(3) { animation-delay: 1s; }

/* ===== PRODUCTS CAROUSEL ===== */
.products-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.carousel-prev { left: -20px; }
.carousel-next { right: -20px; }

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 44px;
    }
    
    .stats-grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .posts-grid,
    .tools-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .carousel-prev, .carousel-next {
        display: none;
    }
    
    .hero-3d {
        min-height: 80vh;
    }
    
    .btn-3d-primary,
    .btn-3d-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: 16px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
}