/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
}

html, body {
    height: 100%;
}

.site-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2980b9;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(225, 232, 237, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-branding .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.site-tagline {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

.main-nav .nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* Category Navigation Links */
.category-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.category-nav-link:hover,
.category-nav-link.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    background-color: #f8f9fa;
}

.post-count {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 400;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 6px;
    z-index: 1000;
    padding: 0.5rem 0;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-toggle:hover + .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #2c3e50;
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #3498db;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e1e8ed;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-home {
    background: #f8f9fa;
    color: #2c3e50;
}

.nav-home:hover {
    background: #e1e8ed;
}

.nav-category {
    background: #3498db;
    color: white;
}

.nav-category:hover {
    background: #2980b9;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #050510 0%, #0a0a15 50%, #0f0f1e 100%);
    color: white;
    overflow: hidden;
    text-align: center;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(52, 152, 219, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 152, 219, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(52, 152, 219, 1) 0%, rgba(52, 152, 219, 0.3) 50%, rgba(52, 152, 219, 0) 70%);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 20%;
    animation-delay: 1s;
    animation-duration: 8s;
}

.particle:nth-child(3) {
    top: 30%;
    left: 70%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 60%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    top: 10%;
    left: 80%;
    animation-delay: 4s;
    animation-duration: 6s;
}

.particle:nth-child(6) {
    top: 70%;
    left: 90%;
    animation-delay: 5s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(15px) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-15px) translateX(-15px) scale(0.8);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-40px) translateX(8px) scale(1.1);
        opacity: 0.6;
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1.2s ease-out;
    transform-style: preserve-3d;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.1);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.post-card .post-content p {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    max-height: 4.5em;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #7f8c8d;
}

.category {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.category:hover {
    background: #2980b9;
    color: white;
}

.post-content h3 {
    margin-bottom: 0.5rem;
}

.post-content h3 a {
    color: #2c3e50;
}

.post-content h3 a:hover {
    color: #3498db;
}

.read-more {
    color: #3498db;
    font-weight: 500;
    margin-top: auto;
    display: inline-block;
}

/* Features Section */
.features {
    margin: 4rem 0;
    text-align: center;
}

.features h2 {
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Single Post Styles */
.post {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-featured-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content h2,
.post-content h3 {
    margin-top: 2rem;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1rem 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #7f8c8d;
}

.post-content code {
    background: #f1f3f4;
    padding: 0.2rem 0.1rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #0d1117;
    color: #e6edf3;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    white-space: pre;
    word-wrap: normal;
    display: block;
}

/* Style all pre code blocks to match the dark theme */
.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
}



/* Affiliate Disclosure */
.affiliate-disclosure {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.affiliate-disclosure p {
    margin: 0;
    color: #856404;
}

/* FAQ Section */
.faq-section {
    margin: 3rem 0;
}

.faq-list {
    margin-top: 2rem;
}

.faq-item {
    background: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* Related Products */
.related-products {
    margin: 3rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.product-rating {
    margin: 1rem 0;
}

/* Post Footer */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e8ed;
}

.post-tags {
    margin-bottom: 2rem;
}

.tag {
    background: #e1e8ed;
    color: #2c3e50;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.author-bio,
.newsletter-cta {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        margin-top: 0.5rem;
    }
    
    .category-nav-link {
        display: block;
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .post-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.2rem);
        margin-bottom: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Categories Responsive */
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .categories-hero {
        padding: 2rem 1rem;
    }
    
    .terms-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-header {
        padding: 1rem;
    }
    
    .category-icon {
        font-size: 2rem;
        margin-right: 0.75rem;
    }
    
    .category-info h2 {
        font-size: 1.25rem;
    }
    
    .category-preview {
        padding: 1rem;
    }
    
    .recent-posts li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
    }
    
    .category-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .category-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 12px;
    }
}
    
    .hero {
        padding: 2rem 0;
    }
    
    .post {
        padding: 1rem 0;
    }
}

/* Categories Hero Section */
.categories-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Terms Grid */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.category-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e1e8ed 100%);
    border-bottom: 1px solid #e1e8ed;
}

.category-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.category-info h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-info h2 a:hover {
    color: #3498db;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.post-count {
    color: #7f8c8d;
    font-weight: 500;
}

.category-trend {
    color: #27ae60;
    font-weight: 500;
}

.trend-indicator {
    background: rgba(39, 174, 96, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.category-preview {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-description {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.recent-posts {
    margin-top: auto;
}

.recent-posts h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

.recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts li a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.recent-posts li a:hover {
    color: #2980b9;
}

.recent-posts time {
    color: #7f8c8d;
    font-size: 0.75rem;
    font-weight: 400;
}

.category-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e1e8ed;
}

.category-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.category-link:hover {
    color: #2980b9;
}