/*
Theme Name: Prasad Govenkar Premium Blog Theme
Theme URI: https://prasadgovenkar.online/
Author: Antigravity AI
Author URI: https://prasadgovenkar.online/
Description: An ultra-professional, modern, responsive, and performance-optimized WordPress theme designed for Prasad Govenkar's personal blog. Featuring dynamic "Most Visited Posts" sorting, a sleek dark/light mode toggle, premium glassmorphism accents, and smooth interactive animations.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prasadgovenkar
*/

/* --- Import Typography --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- Root Variables & Theme Tokens --- */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Light Theme (Default) */
    --color-primary: #0f172a;      /* Deep Slate Charcoal */
    --color-secondary: #059669;    /* Deep Emerald Green (from motorcycle) */
    --color-secondary-hover: #047857;
    --color-secondary-light: #ecfdf5;
    --color-accent: #d97706;       /* Premium Gold / Amber */
    --color-accent-hover: #b45309;
    
    --color-text-dark: #1e293b;
    --color-text-muted: #64748b;
    --color-bg-light: #f8fafc;
    --color-bg-white: #ffffff;
    --color-border: #e2e8f0;
    --color-card-bg: #ffffff;
    --color-card-border: #f1f5f9;
    
    /* Structural tokens */
    --max-width: 1200px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.03);
    --shadow-premium: 0 20px 40px rgba(5, 150, 105, 0.07);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
    --color-primary: #f8fafc;      /* White text/accents */
    --color-text-dark: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-bg-light: #0b0f19;     /* Deep space black */
    --color-bg-white: #111827;     /* Dark grey card/header bg */
    --color-border: #1f2937;
    --color-card-bg: #111827;
    --color-card-border: #1f2937;
    --shadow-premium: 0 20px 40px rgba(5, 150, 105, 0.15);
}

/* --- Base & Reset Styles --- */
*, ::before, ::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-secondary-hover);
}

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

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--color-accent);
    color: #ffffff !important;
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
}

.grid {
    display: grid;
    gap: 30px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

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

/* ==========================================
   THEME COMPONENT STYLES
   ========================================== */

/* Hero Section */
.hero-section {
    padding: 120px 0 90px;
    position: relative;
    background: radial-gradient(circle at 10% 20%, var(--color-secondary-light) 0%, transparent 40%);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1.2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-secondary-light);
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(5, 150, 105, 0.15);
}

[data-theme="dark"] .hero-badge {
    background-color: rgba(5, 150, 105, 0.15);
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 36px;
    line-height: 1.7;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    border-top: 1px solid var(--color-border);
    padding-top: 30px;
}

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

.stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-secondary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Beautiful Hero Profile frame */
.hero-visual {
    flex: 0.8;
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-frame {
    position: relative;
    width: 360px;
    height: 440px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--color-bg-white);
    transform: rotate(2deg);
    transition: var(--transition);
}

.profile-frame:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: var(--shadow-premium);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.profile-card-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 16px;
    border-radius: 16px;
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

[data-theme="dark"] .profile-card-overlay {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.profile-card-overlay h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: #0f172a;
}

[data-theme="dark"] .profile-card-overlay h3 {
    color: #ffffff;
}

.profile-card-overlay p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-secondary);
}

/* Quick Floating Accents */
.accent-shape-1 {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--color-accent);
    filter: blur(80px);
    top: 10%;
    right: 5%;
    opacity: 0.25;
    z-index: -1;
}

.accent-shape-2 {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: var(--color-secondary);
    filter: blur(120px);
    bottom: 10%;
    left: -5%;
    opacity: 0.2;
    z-index: -1;
}

/* Most Visited Posts Section */
.visited-section {
    padding: 100px 0;
    background-color: var(--color-bg-white);
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 24px;
}

.section-header-flex h2 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-header-flex h2 span {
    color: var(--color-secondary);
}

.section-header-flex p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-top: 8px;
}

/* Interactive Tabs */
.tab-filters {
    display: flex;
    gap: 8px;
    background-color: var(--color-bg-light);
    padding: 6px;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.tab-btn {
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 22px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 50px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--color-secondary);
    color: #ffffff;
}

/* Cards Grid styles */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.visited-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.visited-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(5, 150, 105, 0.2);
}

.visited-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.visited-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.visited-card:hover .visited-card-thumb img {
    transform: scale(1.04);
}

.visited-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--color-secondary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.visited-card-pop {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.visited-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.visited-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.visited-card-meta i {
    color: var(--color-secondary);
    margin-right: 4px;
}

.visited-card-body h3 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 800;
}

.visited-card-body h3 a {
    color: var(--color-primary);
}

.visited-card-body h3 a:hover {
    color: var(--color-secondary);
}

.visited-card-body p {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.visited-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    padding-top: 18px;
    font-size: 0.85rem;
}

.visited-author {
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.visited-readmore {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Newsletter section box */
.newsletter-box {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--color-primary), #1e293b);
    border-radius: var(--border-radius);
    padding: 60px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .newsletter-box {
    background: linear-gradient(135deg, #111827, #030712);
    border: 1px solid var(--color-border);
}

.newsletter-box::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: var(--color-secondary);
    filter: blur(150px);
    right: -100px;
    bottom: -100px;
    opacity: 0.15;
}

.newsletter-info {
    flex: 1;
}

.newsletter-info h2 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.newsletter-info p {
    color: #94a3b8;
    font-size: 1rem;
    max-width: 480px;
}

.newsletter-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.newsletter-form {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 6px;
    gap: 6px;
}

.newsletter-form input {
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 18px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    flex-grow: 1;
}

.newsletter-form input::placeholder {
    color: #64748b;
}

.newsletter-form button {
    border-radius: var(--border-radius-sm);
}

@media (max-width: 991px) {
    .newsletter-box {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }
    .newsletter-info p {
        margin: 0 auto;
    }
    .newsletter-action {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .newsletter-form {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }
    .newsletter-form input {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--border-radius-sm);
    }
}

/* ==========================================
   WORDPRESS TEMPLATE COMPATIBILITY RULES
   ========================================== */
.wp-block-button__link {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--color-secondary);
    color: #ffffff !important;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    transition: var(--transition);
}
.wp-block-button__link:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-2px);
}

.aligncenter { display: block; margin: 2rem auto; }
.alignleft { float: left; margin: 0.5rem 1.5rem 0.5rem 0; }
.alignright { float: right; margin: 0.5rem 0 0.5rem 1.5rem; }

.wp-caption {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    max-width: 98%;
    padding: 8px;
    text-align: center;
    border-radius: var(--border-radius-sm);
}
.wp-caption-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}
