/*
Theme Name: hwebstories Premium
Theme URI: https://hwebstories.com
Author: hweb Tech Desk
Description: A premium, dark tech & finance theme built exclusively for hwebstories.com.
Version: 1.0.1
Tags: dark, modern, finance, tech, premium
*/

/* Core Global Variables & Resets */
:root {
    --primary: #3B82F6;
    --secondary: #10B981;
    --accent: #F59E0B;
    --dark: #0A0F1C;
    --darker: #05080F;
    --light: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: radial-gradient(circle at top center, #111827, var(--darker));
    color: var(--light);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: rgba(10, 15, 28, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo a {
    text-decoration: none;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--light);
}

.logo span {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #60A5FA);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--light);
}

.mobile-menu {
    display: none;
    cursor: pointer;
    color: var(--light);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 5% 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60A5FA;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 4.8rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content span {
    background: linear-gradient(to right, #60A5FA, #34D399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.cta-button.primary:hover {
    background: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-shapes .shape {
    position: absolute;
    filter: blur(120px);
    z-index: 0;
    border-radius: 50%;
    opacity: 0.5;
}

.shape-1 {
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    background: rgba(59, 130, 246, 0.15);
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    background: rgba(16, 185, 129, 0.1);
    bottom: -10%;
    right: -10%;
}

/* Articles Section / Archive Grid */
.articles-section {
    padding: 8rem 5%;
    position: relative;
    z-index: 10;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title span {
    color: var(--text-muted);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--glass-shadow);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image .category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    background: rgba(10, 15, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E2E8F0;
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--light);
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding: 1rem 2rem 2rem;
    font-size: 0.85rem;
}

.read-time {
    color: var(--text-muted);
}

.read-more {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.read-more span {
    transition: transform 0.2s ease;
}

.card:hover .read-more span {
    transform: translateX(4px);
}

/* SINGLE POST STYLING */
.article-header {
    padding: 10rem 5% 4rem;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(10, 15, 28, 0) 100%);
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.article-category {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.article-header h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    max-width: 900px;
    margin: 0 auto 1.5rem;
    line-height: 1.2;
    color: var(--light);
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.article-hero-image {
    max-width: 1000px;
    margin: -2rem auto 3rem;
    padding: 0 5%;
    position: relative;
    z-index: 10;
}

.article-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
}

.content-container {
    max-width: 760px;
    margin: 4rem auto 4rem;
    padding: 0 5%;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #CBD5E1;
}

.article-content p {
    margin-bottom: 1.8rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--light);
    margin: 3rem 0 1.5rem;
}

.article-content h2 {
    font-size: 2rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.article-content li::marker {
    color: var(--primary);
}

/* WP Post Content Overrides */
.wp-block-image img {
    border-radius: 12px;
    margin: 2rem 0;
}

.article-content blockquote,
.pull-quote,
.wp-block-quote {
    font-size: 1.4rem;
    font-style: italic;
    color: #60A5FA;
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 12px 12px 0;
    line-height: 1.6;
}

.key-takeaways {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-top: 4px solid var(--primary);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.key-takeaways h3 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Author Box inside Article */
.author-bio-box {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.author-bio-box .author-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-details {
    flex: 1;
    min-width: 250px;
}

.author-details h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.author-details p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Newsletter Section */
.newsletter-section {
    margin: 0 5% 5rem;
    padding: 5rem 2rem;
    text-align: center;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2.2rem;
    color: var(--light);
}

.newsletter-content p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.subscribe-form input {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: var(--light);
    font-family: var(--font-body);
    font-size: 1rem;
}

.subscribe-form button {
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    background: var(--light);
    color: var(--darker);
    font-weight: 600;
    cursor: pointer;
}

.subscribe-form button:hover {
    background: #E2E8F0;
}

.privacy-note {
    font-size: 0.8rem;
}

/* Footer Section */
.footer {
    background: var(--darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5rem 5% 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.footer-brand span {
    color: var(--primary);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-links h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--light);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.floating-share {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.floating-share svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.floating-share:hover {
    transform: translateY(-5px) scale(1.05);
}

@media (max-width: 860px) {
    .nav-links {
        display: none;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
    }
}