/*
Theme Name: Ask Digilab Hub Stable
Theme URI: https://askdigilab.co.in
Author: Senior WP Developer
Description: Advanced educational and consulting theme for Ask Digilab. PHP syntax error free and fully stable.
Version: 10.0.0
*/

:root {
    --primary-navy: #152238;
    --accent-blue: #2a4365;
    --accent-cyan: #06b6d4;
    --bg-light: #f4f7f6;
    --bg-white: #ffffff;
    --text-main: #334155;
    --text-heading: #0f172a;
    --border-light: #e2e8f0;
    --code-bg: #0f172a;
    --code-text: #38bdf8;
}

* { box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; margin: 0; padding: 0; background-color: var(--bg-white); color: var(--text-main); line-height: 1.7; overflow-x: hidden; cursor: default; }

/* Sticky Header Group */
.header-group { position: sticky; top: 0; z-index: 1000; width: 100%; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Top Navigation */
.top-nav { background-color: var(--primary-navy); color: white; display: flex; align-items: center; padding: 0 5%; height: 70px; }
.top-nav .logo { font-size: 24px; font-weight: 800; margin-right: auto; cursor: pointer; letter-spacing: 0.5px; }
.top-nav .logo a { color: var(--bg-white); text-decoration: none; }
.top-nav .logo span { color: var(--accent-cyan); }
.top-nav-links { display: flex; height: 100%; align-items: center; }
.top-nav-links ul { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; }
.top-nav-links li { height: 100%; }
.top-nav-links a { color: #cbd5e1; text-decoration: none; padding: 0 20px; font-size: 15px; font-weight: 600; transition: 0.3s; height: 100%; display: flex; align-items: center; border-bottom: 3px solid transparent; cursor: pointer; }
.top-nav-links a:hover, .top-nav-links li.current-menu-item > a { color: white; border-bottom: 3px solid var(--accent-cyan); background: rgba(255,255,255,0.05); }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 26px; cursor: pointer; margin-right: 15px; padding: 0; }

/* Sub Navigation Scroller */
.sub-nav-container { display: flex; align-items: center; background-color: var(--accent-blue); border-top: 1px solid rgba(255,255,255,0.1); width: 100%; height: 55px; position: relative; }
.nav-arrow { position: absolute; top: 0; height: 100%; width: 60px; border: none; font-size: 24px; font-weight: bold; cursor: pointer; display: none; align-items: center; justify-content: center; color: var(--bg-white); z-index: 10; transition: color 0.3s; }
.nav-arrow:hover { color: var(--accent-cyan); }
.left-arrow { left: 0; background: linear-gradient(to right, var(--accent-blue) 60%, transparent); justify-content: flex-start; padding-left: 5%; }
.right-arrow { right: 0; background: linear-gradient(to left, var(--accent-blue) 60%, transparent); justify-content: flex-end; padding-right: 5%; }

.sub-nav { display: flex; overflow-x: auto; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; flex-grow: 1; align-items: center; height: 100%; padding: 0 5%; }
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.sub-nav li { margin: 0 5px; }
.sub-nav a { color: #e2e8f0; text-decoration: none; padding: 8px 18px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: 0.3s; border-radius: 20px; cursor: pointer; border: 1px solid transparent; white-space: nowrap; display: inline-block; }
.sub-nav a:hover, .sub-nav li.current-menu-item > a { background-color: var(--accent-cyan); color: var(--primary-navy); border-color: var(--accent-cyan); }

/* Layout Container */
.main-container { display: flex; min-height: calc(100vh - 125px); position: relative; width: 100%; }

/* Left Sidebar (Accordion with Custom Scrollbar) */
.sidebar { width: 280px; background-color: var(--bg-light); overflow-y: auto; padding: 20px 0; border-right: 1px solid var(--border-light); height: calc(100vh - 125px); position: sticky; top: 125px; flex-shrink: 0; }
.sidebar::-webkit-scrollbar { width: 12px; }
.sidebar::-webkit-scrollbar-track { background: var(--bg-light); border-left: 1px solid var(--border-light); }
.sidebar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; border: 3px solid var(--bg-light); }
.sidebar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

.accordion-btn { background-color: transparent; color: var(--primary-navy); cursor: pointer; padding: 12px 25px; width: 100%; text-align: left; border: none; outline: none; transition: 0.2s; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-light); }
.accordion-btn:hover { background-color: var(--border-light); }
.accordion-btn::after { content: '\25BC'; font-size: 10px; color: #94a3b8; transition: transform 0.3s; }
.accordion-btn.active::after { transform: rotate(180deg); }
.accordion-content { background-color: var(--bg-white); display: none; overflow: hidden; }
.accordion-content ul { list-style: none; padding: 0; margin: 0; }
.accordion-content a { display: block; padding: 10px 25px 10px 40px; color: var(--text-main); text-decoration: none; font-size: 14px; font-weight: 500; transition: 0.2s; border-left: 3px solid transparent; cursor: pointer; }
.accordion-content a:hover { background-color: var(--bg-light); color: var(--primary-navy); }
.accordion-content li.current-menu-item > a { background-color: rgba(6, 182, 212, 0.1); color: var(--accent-blue); border-left: 3px solid var(--accent-cyan); font-weight: 600; }

/* Main Content Area */
.content-wrapper { flex-grow: 1; padding: 40px 5%; max-width: calc(100% - 580px); overflow-x: hidden; }
.page-content { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.page-content h1 { font-size: 38px; color: var(--primary-navy); margin-top: 0; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.page-content h2 { font-size: 26px; color: var(--accent-blue); margin-top: 50px; border-bottom: 2px solid var(--border-light); padding-bottom: 10px; font-weight: 700; }
.page-content h3 { font-size: 22px; color: var(--text-heading); margin-top: 30px; font-weight: 600; }
.page-content p, .page-content li { font-size: 16px; margin-bottom: 20px; color: #475569; }

/* Rich Media Elements */
.content-image, .wp-post-image { width: 100%; height: 350px; object-fit: cover; border-radius: 12px; margin: 30px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid var(--border-light); }
.graph-container { background: var(--bg-light); border: 1px solid var(--border-light); border-radius: 16px; padding: 30px; margin: 40px 0; text-align: center; overflow-x: auto; }
.graph-container img { width: 100%; max-width: 700px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

/* Preformatted Text & Tables */
pre { background: var(--primary-navy); color: #e2e8f0; padding: 20px; border-radius: 8px; overflow-x: auto; font-family: 'Fira Code', monospace; font-size: 13px; line-height: 1.5; border-left: 4px solid var(--accent-cyan); margin: 30px 0; }
table { width: 100%; border-collapse: collapse; margin: 30px 0; }
th, td { padding: 15px; border: 1px solid var(--border-light); text-align: left; }
th { background: var(--bg-light); color: var(--primary-navy); }

/* Video Blocks */
.video-wrapper { max-width: 650px; margin: 60px auto 20px; background: var(--bg-light); padding: 20px; border-radius: 12px; border: 1px solid var(--border-light); }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Prompt Box */
.example-box { background-color: var(--bg-white); padding: 30px; margin: 40px 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid var(--border-light); border-left: 5px solid var(--accent-cyan); }
.example-box h3 { margin-top: 0; color: var(--primary-navy); font-size: 18px; }
.code-wrapper { position: relative; margin-top: 20px; }
.code-container { background-color: var(--code-bg); color: var(--code-text); padding: 25px; border-radius: 8px; font-family: 'Fira Code', monospace; font-size: 14px; overflow-x: auto; line-height: 1.6; white-space: pre-wrap; box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); }
.try-btn { position: absolute; top: 15px; right: 15px; background-color: var(--accent-cyan); color: var(--primary-navy); border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 700; transition: 0.2s; }
.try-btn:hover { background-color: var(--bg-light); }

/* Navigation Buttons */
.nav-buttons { display: flex; justify-content: space-between; margin: 50px 0; padding-top: 30px; border-top: 1px solid var(--border-light); }
.nav-btn { background-color: var(--primary-navy); color: white; text-decoration: none; padding: 12px 25px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; transition: 0.2s; font-size: 16px; display: inline-block; }
.nav-btn:hover { background-color: var(--accent-blue); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* Right Sidebar (Ads) */
.right-sidebar { width: 300px; background-color: var(--bg-light); padding: 20px; border-left: 1px solid var(--border-light); flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; align-items: center; }
.ad-container { width: 100%; max-width: 250px; background-color: var(--bg-white); border: 1px solid var(--border-light); border-radius: 8px; padding: 15px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.ad-label { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: block; }
.widget { width: 100%; margin-bottom: 20px; }
.ad-placeholder-tall { width: 100%; height: 600px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #64748b; font-weight: bold; border-radius: 4px; border: 1px dashed #94a3b8; }
.ad-placeholder-square { width: 100%; height: 250px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #64748b; font-weight: bold; border-radius: 4px; border: 1px dashed #94a3b8; }

/* Footer */
.footer { background-color: var(--primary-navy); color: white; padding: 80px 5% 40px; margin-top: 60px; }
.footer-grid { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; }
.footer h3 { color: var(--accent-cyan); margin-top: 0; font-size: 20px; }
.footer p, .footer a { color: #cbd5e1; text-decoration: none; font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; transition: 0.2s; }
.footer a:hover { color: var(--bg-white); padding-left: 5px; }
.social-icons { display: flex; gap: 15px; margin-top: 25px; }
.social-icons a { width: 45px; height: 45px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; transition: 0.3s; border: 1px solid rgba(255,255,255,0.1); padding: 0; }
.social-icons a:hover { background: var(--accent-cyan); color: var(--primary-navy); transform: translateY(-5px); border-color: var(--accent-cyan); }

.floating-wa { position: fixed; bottom: 30px; right: 30px; background: #25D366; color: white; width: 65px; height: 65px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 999; box-shadow: 0 10px 25px rgba(37,211,102,0.4); transition: transform 0.3s; cursor: pointer; }
.floating-wa:hover { transform: scale(1.1); }

/* Responsive */
@media (max-width: 1200px) {
    .content-wrapper { max-width: calc(100% - 280px); }
    .right-sidebar { display: none; }
}

@media (max-width: 992px) {
    .top-nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .main-container { flex-direction: column; }
    .sidebar { position: fixed; top: 125px; left: 0; width: 100%; height: calc(100vh - 125px); z-index: 900; display: none; border-right: none; box-shadow: 0 10px 30px rgba(0,0,0,0.2); padding: 0; }
    .sidebar.show { display: block; }
    .content-wrapper { max-width: 100%; padding: 30px 5%; }
    .page-content h1 { font-size: 32px; }
    .right-sidebar { display: flex; width: 100%; border-left: none; border-top: 1px solid var(--border-light); padding: 40px 5%; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
