/* =========================================
   1. GLOBAL RESET & VARIABLES
   ========================================= */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --bg-body: #ffffff;
    --white: #ffffff;
    --win-bg: #111827;
    --mac-bg: #081735;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. HEADER & HERO
   ========================================= */
.site-header {
    background: var(--white);
    height: 80px;
    position: sticky; top: 0; z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    
}
.navbar { display: flex; justify-content:space-around; align-items: center; height: 100%; }

/* --- LOGO FIX (SMOOTH & SHARP) --- */
.logo {  
    display: flex !important; 
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.logo img {
    /* PC Size */
    width: 220px !important; 
    height: 50px !important; /* Height auto karne se dundhla-pan khatam hota hai */
    max-width: 100%;
    object-fit: contain !important;
    
    /* Mobile Sharpness Fixes */
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: crisp-edges;
    transform: translateZ(0); /* Hardware acceleration for clarity */
}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    .logo img {
        width: 300px !important; /* Mobile par logo thoda chota rakha hai taake pixelate na ho */
    }
    
    .navbar {
        justify-content: space-between; /* Hamburger aur Logo ke darmiyan space */
        padding: 0 15px;
    }
}

.nav-menu { display: flex; gap: 44px; }
.nav-link { font-weight: 500; color:rgb(17, 17, 17); font-size: 18px;}
.nav-link:hover, .nav-link.active {color: rgb(32 16 245);}

/* FIX: Hamburger Button Background Transparent */
.hamburger { display: none; cursor: pointer; background: transparent; border: none; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: rgb(0, 0, 0); transition: 0.3s; }

/* Mobile Menu */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu {
        position: fixed; left: -100%; top: 70px; flex-direction: column;
        background-color: var(--white); width: 100%; height: 100%; text-align: center;
        padding: 20px 0; box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05); transition: 0.3s;
    }
    .nav-menu.active { left: 0; background-color: #ffffff; }
    .nav-item { margin: 15px 0; }
}

.hero-section { text-align: center; padding: 40px 0 20px;}
.hero-section h1 { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.hero-subtitle {
    font-size: 1.2rem;
    color: #969595;
    margin-top: 10px;
    text-align: center;
    font-weight: 400;
}

/* --- MOBILE ALERT MESSAGE --- */
.mobile-tip{ display: none; }

@media (max-width: 768px) {
    .mobile-tip{
        display: block;
        background-color: #fff3cd; /* Yellow Background */
        color: #856404; /* Dark Yellow Text */
        border: 1px solid #ffeeba;
        padding: 10px;
        text-align: center;
        margin: 10px auto;
        border-radius: 6px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 400px;
    }
}

/* =========================================
   3. TOOL AREA (CONTROLS)
   ========================================= */
.tool-section { padding: 20px 0; margin-bottom: 40px;}

.controls-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: #ffffff; padding: 10px 15px; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px;
    flex-wrap: wrap; gap: 15px;
}

.os-switch-group { display: flex; gap: 8px; background: #f3f4f6; padding: 4px; border-radius: 6px; }
.btn-os { padding: 6px 14px; border-radius: 4px; font-weight: 600; color: #4b5563; background: transparent; border: 1px solid transparent; display: flex; align-items: center; gap: 5px; font-size: 0.9rem; transition: 0.2s; }
.btn-os:hover { background: #e5e7eb; }
.btn-os.active { background: #ffffff; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }

.action-group { display: flex; gap: 10px; align-items: center; }
#last-key-display { font-family: monospace; color: var(--text-light); font-size: 0.85rem; margin-right: 10px; }
.btn-action { background: white; border: 1px solid #d1d5db; padding: 6px 12px; border-radius: 4px; font-weight: 500; font-size: 0.9rem; transition: 0.2s; }
.btn-action:hover { border-color: var(--text-main); }

/* =========================================
   4. KEYBOARD LAYOUT (PC View Default)
   ========================================= */
.keyboard-scroll-wrapper {
    width: 100%;
    display: flex; 
    justify-content: center; /* Center on PC */
    padding-bottom: 10px;
    overflow: visible; /* PC par scroll na ho */
}

.keyboard-body {
    display: inline-block;
    padding: 20px;
    border-radius: 12px;
    user-select: none;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
    vertical-align: top;
    text-align: left;
    transform-origin: top center;
    transition: transform 0.3s ease;
}

.row { display: flex; gap: 4px; margin-bottom: 4px; }

/* --- Key Styling (40px Base) --- */
.key {
    width: 40px; height: 40px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; cursor: pointer;
    position: relative; top: 0; transition: 0.05s;
}

/* Spacer & Special Widths */
.key-spacer { width: 20px; }
.key.backspace { width: 84px; }
.key.tab { width: 60px; padding-left: 8px; align-items: flex-start; }
.key.caps { width: 70px; padding-left: 8px; align-items: flex-start; }
.key.enter { width: 94px; }
.key.shift-l { width: 94px; }
.key.shift-r { width: 108px; }
.key.ctrl, .key.alt, .key.win, .key.cmd, .key.fn { width: 50px; font-size: 10px; }
.key.space { width: 255px; }

/* =========================================
   5. WINDOWS THEME (Black)
   ========================================= */
.kb-win {
    background-color: var(--win-bg);
    border: 4px solid #1f2937;
    display: inline-flex; 
    gap: 10px;
    align-items: flex-start;
}

.kb-main, .kb-nav, .kb-numpad { display: flex; flex-direction: column; }
.kb-nav { width: 130px; }
.kb-numpad { padding-left: 10px; border-left: 1px solid #374151; }

.kb-win .key { background-color: #1f2937; color: #f3f4f6; border-bottom: 3px solid #000; }
.kb-win .key:hover { background-color: #374151; }
.kb-win .key.active { background-color: #22c55e; color: #fff; border-bottom: 0px; transform: translateY(3px); }
.kb-win .key.tested { border-color: #15803d; color: #4ade80; }

.row-arrow-pad { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; margin-top: 20px; }
.row-arrow-pad .key.empty { visibility: hidden; }
.numpad-grid { display: grid; grid-template-columns: repeat(4, 40px); gap: 4px; }
.key.tall { grid-row: span 2; height: 84px; }
.key.wide { grid-column: span 2; width: 84px; }

/* =========================================
   6. MAC THEME (Silver)
   ========================================= */
.kb-mac {
    background-color: var(--mac-bg);
    border: 1px solid #d1d5db;
    display: inline-block;
}
.kb-mac .key { background-color: #fff; color: #374151; border: 1px solid #d1d5db; border-bottom: 2px solid #9ca3af; font-size: 11px; }
.kb-mac .key:hover { background-color: #f9fafb; }
.kb-mac .key.active { background-color: #22c55e; color: #fff; border-bottom: 0px; transform: translateY(2px); border-color: #16a34a; }
.kb-mac .key.tested { background-color: #dcfce7; border-color: #86efac; }
.kb-mac .small-row .key { height: 30px; font-size: 10px; margin-bottom: 6px; }
.mac-arrows { display: flex; flex-direction: column; align-items: center; margin-top: 15px; margin-left: 5px; }
.mac-arrows .sub-row { display: flex; gap: 3px; margin-top: 3px; }
.mac-arrows .key { width: 35px; height: 30px; font-size: 9px; }

/* =========================================
   7. AUTO-SCALING (ORIGINAL RESTORED)
   ========================================= */
@media (max-width: 768px) {
    .keyboard-scroll-wrapper {
        overflow-x: auto; /* Allow horizontal swiping on mobile instead of shrinking it to unreadable levels */
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .keyboard-body {
        transform: scale(0.8); /* Less aggressive scaling */
        margin-left: 0;
        transform-origin: left top;
    }
}

/* =========================================
   8. ARTICLE & FOOTER
   ========================================= */
.content-section { padding: 40px 0; background-color: #fff; border-top: 1px solid #e5e7eb; }
.content-section h2 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 15px; font-weight: 700; }
.content-section h3 { font-size: 1.2rem; margin-top: 20px; font-weight: 600; }
.content-section p { font-size: 1rem; color: #4b5563; margin-bottom: 15px; }
.p-internal-linking { text-align: center; }
.steps-list { list-style: none; counter-reset: steps-counter; margin-left: 10px; }
.steps-list li { position: relative; padding-left: 40px; margin-bottom: 10px; }
.steps-list li::before { counter-increment: steps-counter; content: counter(steps-counter); position: absolute; left: 0; top: 0; width: 25px; height: 25px; background: var(--primary); color: white; border-radius: 50%; text-align: center; line-height: 25px; font-size: 0.8rem; }

.faq-section { margin-top: 30px; background: #f9fafb; padding: 20px; border-radius: 12px; }
.faq-item { background: white; padding: 15px; border-radius: 8px; margin-bottom: 10px; border: 1px solid #e5e7eb; }
.faq-item h3 { margin: 0 0 5px 0; color: var(--primary); font-size: 1rem; }

/* FIX: Footer & Footer Logo Styling */
.site-footer { background-color: rgb(32 16 245); color: #ffffff; padding: 40px 0 20px; margin-top: auto; }

/* --- FOOTER LOGO FIX (FORCED SIZE) --- */
.footer-logo { 
    display: block !important; 
    text-decoration: none;
    margin-bottom: 15px;
    line-height: 0; 
}
.footer-logo img {
    width: 300px !important;
    height: 50px !important;
    min-width: 300px !important;
    object-fit: contain !important;
    display: block;
}

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h3 { color: #fff; font-size: 1.1rem; margin-bottom: 15px; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a:hover { color: #fff; padding-left: 5px; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; text-align: center; font-size: 0.9rem; }

#scrollToTopBtn { position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px; background: var(--primary); color: white; border-radius: 50%; font-size: 1.2rem; display: none; align-items: center; justify-content: center; z-index: 999; }
/* HAMBURGER → CROSS ANIMATION */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}



/* =========================================
   CONTACT PAGE SPECIFIC STYLES
   ========================================= */
.contact-page { padding: 50px 0; }
.contact-heading { text-align: center; margin-bottom: 40px; }
.contact-heading h1 { font-size: 2.5rem; color: var(--text-main); }
.contact-heading p { color: var(--text-light); }

.contact-grid-layout { 
    display: grid; 
    grid-template-columns: 1.4fr 0.6fr; 
    gap: 30px; 
}

.form-wrapper { 
    background: #ffffff; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
.form-field input, .form-field textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 8px; font-family: 'Inter', sans-serif; transition: 0.3s;
}

.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.contact-btn {
    background: var(--primary); color: white; width: 100%;
    padding: 15px; border-radius: 8px; font-weight: 700; font-size: 1rem; transition: 0.3s;
}
.contact-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }

.info-sidebar .detail-card {
    background: #f8fafc; padding: 25px; border-radius: 12px;
    text-align: center; border: 1px solid #e2e8f0; margin-bottom: 20px;
}
.info-sidebar .detail-card i { font-size: 2rem; color: var(--primary); margin-bottom: 15px; }
.info-sidebar .detail-card h3 { font-size: 1.1rem; margin-bottom: 5px; }

/* Responsive View */
@media (max-width: 768px) {
    .contact-grid-layout { grid-template-columns: 1fr; }
    .contact-heading h1 { font-size: 2rem; }
}

/* =========================================
   ABOUT PAGE STYLES
   ========================================= */
.about-section { padding: 60px 0; animation: fadeIn 0.6s ease-in-out; }

.about-header { text-align: center; margin-bottom: 50px; }
.about-header h1 { font-size: 2.8rem; color: var(--primary); margin-bottom: 10px; }

.about-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 40px; 
    align-items: center; 
}

.about-text h2 { font-size: 1.8rem; margin-bottom: 20px; color: var(--text-main); }
.about-text p { color: var(--text-light); margin-bottom: 25px; line-height: 1.8; }

.features-list { list-style: none; padding: 0; }
.features-list li { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 15px; 
    font-weight: 600;
    color: var(--text-main);
}
.features-list li i { color: #22c55e; font-size: 1.2rem; }

/* Stats Cards */
.about-stats { display: flex; flex-direction: column; gap: 20px; }
.stat-card {
    background: #f8fafc;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.stat-card h3 { font-size: 2.5rem; color: var(--primary); margin-bottom: 5px; }
.stat-card p { font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }

/* Responsive About Page */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .features-list li { justify-content: center; }
    .about-header h1 { font-size: 2.2rem; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- LEGAL PAGES (Privacy/Terms) --- */
.legal-section { padding: 60px 0; max-width: 800px; margin: 0 auto; }
.legal-header { text-align: center; margin-bottom: 40px; border-bottom: 2px solid #eee; padding-bottom: 20px; }
.legal-header h1 { font-size: 2.5rem; color: var(--text-main); }

.legal-content h2 { font-size: 1.5rem; margin: 30px 0 15px 0; color: var(--primary); }
.legal-content p { line-height: 1.8; color: var(--text-light); margin-bottom: 15px; }
.legal-content a { color: var(--primary); text-decoration: underline; }

@media (max-width: 768px) {
    .legal-section { padding: 30px 15px; }
    .legal-header h1 { font-size: 2rem; }
}

/* =========================================
   BLOG PAGE STYLES
   ========================================= */
.blog-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--primary); /* Agar var(--primary) kaam na kare to #333 likh dein */
    margin-bottom: 10px;
}

.blog-header p {
    color: #64748b;
    font-size: 1.1rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.blog-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-content {
    padding: 20px;
}

.blog-category {
    font-size: 0.8rem;
    color: #fff;
    background: #007bff; /* Apna theme color laga sakte hain */
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 600;
}

.blog-content h2 {
    font-size: 1.25rem;
    margin: 15px 0 10px;
    line-height: 1.4;
}

.blog-content h2 a {
    color: #1e293b;
    text-decoration: none;
}

.blog-content h2 a:hover {
    color: #007bff;
}

.blog-content p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* --- Article Specific Styles --- */
.post-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 10px;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #64748b;
}

.breadcrumb-list li a { color: #007bff; text-decoration: none; }
.breadcrumb-list li:not(:last-child)::after { content: ">"; margin-left: 10px; color: #cbd5e1; }

.main-featured-img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.post-header h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    color: #0f172a;
    margin: 15px 0;
}

.post-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

.post-body h2 {
    margin-top: 40px;
    color: #1e293b;
    font-size: 1.8rem;
}

/* Responsive Table */
.table-container { overflow-x: auto; margin: 30px 0; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { border: 1px solid #e2e8f0; padding: 15px; text-align: left; }
th { background: #f8fafc; color: #475569; }

.badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .post-header h1 { font-size: 2rem; }
    .post-body { font-size: 1.05rem; }
}