/*
Theme Name: Edunest Secure Educational Theme
Theme URI: https://edunest.com
Author: Senior Full-Stack Developer
Description: A security-hardened, lightweight, fast educational theme for Grade IX-XII notes.
Version: 7.0.0
License: GNU General Public License v2 or later
Text Domain: edunest
*/

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --primary-color: #1e3a8a;
    --accent-color: #0d9488;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #3b82f6;
    --accent-color: #2dd4bf;
    --card-bg: #1e293b;
    --border-color: #334155;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

.edunest-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Premium Geometric Hero Section */
.edunest-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
}

.edunest-hero h1 { margin: 0 0 10px 0; font-size: 2.5rem; }
.edunest-hero p { margin: 0 0 25px 0; opacity: 0.9; }

/* Hardened AJAX Live Search Dropdown Styles */
.search-wrapper { max-width: 600px; margin: 0 auto; position: relative; }
.search-input { width: 100%; padding: 15px 20px; border: none; border-radius: 30px; font-size: 1rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); outline: none; }
.search-results-dropdown { 
    position: absolute; top: 55px; left: 0; right: 0; background: var(--card-bg); 
    border-radius: 8px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); border: 1px solid var(--border-color);
    list-style: none; padding: 0; margin: 0; text-align: left; z-index: 999; display: none; max-height: 300px; overflow-y: auto;
}
.search-results-dropdown li { border-bottom: 1px solid var(--border-color); }
.search-results-dropdown li:last-child { border: none; }
.search-results-dropdown a { display: block; padding: 12px 20px; color: var(--text-color); text-decoration: none; }
.search-results-dropdown a:hover { background-color: var(--border-color); }
.search-meta-badge { font-size: 0.75rem; background: var(--primary-color); color: #fff; padding: 2px 6px; border-radius: 4px; margin-right: 8px; }

/* Grid Dashboard */
.grid-title { font-size: 1.75rem; margin-bottom: 20px; }
.matrix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.matrix-card { background: var(--card-bg); border: 1px solid var(--border-color); padding: 25px; border-radius: 8px; text-align: center; text-decoration: none; color: var(--text-color); transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.matrix-card:hover { transform: translateY(-5px); }
.matrix-card svg { width: 48px; height: 48px; fill: var(--accent-color); margin-bottom: 15px; }

/* Inline PDF Reader Frame Area */
.reader-container { background: var(--card-bg); border: 1px solid var(--border-color); padding: 20px; border-radius: 8px; margin-top: 30px; }
.pdf-iframe { width: 100%; height: 600px; border: none; border-radius: 4px; }
.download-btn { display: inline-block; background: var(--accent-color); color: #fff; padding: 12px 24px; text-decoration: none; border-radius: 6px; font-weight: bold; margin-top: 20px; }
.download-btn:hover { opacity: 0.9; }

/* Global Navigation Top Bar */
.edunest-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); background: var(--card-bg); }
.edunest-logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.edunest-menu-list { display: flex; list-style: none; gap: 20px; margin: 0; padding: 0; }
.edunest-menu-list a { color: var(--text-color); text-decoration: none; font-weight: 500; }
.dark-mode-toggle { background: none; border: 1px solid var(--border-color); color: var(--text-color); padding: 8px 12px; border-radius: 20px; cursor: pointer; }
