/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://qsh.in/boards/wbbse/
 Description:  A child theme for GeneratePress with PWA install prompt and performance styling.
 Author:       Mehrunnisa
 Author URI:   https://qsh.in
 Template:     generatepress
 Version:      1.5.0
*/

/* =========================================
   1. PWA INSTALL BANNER
   ========================================= */
#pwa-install-banner {
    background-color: #e3f2fd;
    color: #1e3a56;
    padding: 16px 24px;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    display: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease;
}

#pwa-install-banner.is-visible {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

#pwa-install-banner p {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
}

#pwa-install-button {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#pwa-install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* =========================================
   2. MAIN NAVIGATION
   ========================================= */
.main-navigation {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.main-navigation .main-nav ul li a {
    color: #333745;
    font-weight: 600;
    padding: 20px;
    transition: all 0.25s ease-in-out;
    border-bottom: 3px solid transparent;
}

.main-navigation .main-nav ul li:not(.current-menu-item) a:hover {
    color: #4A90E2;
    background-color: #f7f9fb;
}

.main-navigation .main-nav ul li.current-menu-item > a {
    color: #4A90E2;
    font-weight: 700;
    border-bottom-color: #4A90E2;
    background-color: transparent;
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
.entry-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e3a56;
    padding-bottom: 15px;
    border-bottom: 4px solid #4A90E2;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .entry-title {
        font-size: 21px;
    }
}

.archive .entry-title a,
.blog .entry-title a {
    font-size: 22px;
    color: #1e3a56;
    text-decoration: none;
    transition: color 0.3s ease;
}

.archive .entry-title a:hover,
.blog .entry-title a:hover {
    color: #4A90E2;
}

/* =========================================
   4. BUTTONS & POST NAVIGATION
   ========================================= */
.read-more-button a.button,
a.read-more {
    background: linear-gradient(45deg, #4A90E2, #1976D2);
    color: #ffffff !important;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-button a.button:hover,
a.read-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    min-width: 0;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    color: #4A90E2 !important;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 10px 0;
    background: none !important;
    border: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-navigation a:hover {
    color: #1e3a56 !important;
    text-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
}

/* =========================================
   5. TOP BAR ACTION BUTTONS
   ========================================= */
#gp-top-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    padding: 10px 0;
    width: 100%;
    z-index: 99;
}

#gp-top-bar .gp-top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end !important;
    align-items: center;
    gap: 15px;
}

.gp-top-btn {
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.gp-btn-courses,
.gp-btn-perf {
    background: linear-gradient(135deg, #4A90E2 0%, #0077b6 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

.gp-btn-courses:hover,
.gp-btn-perf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    color: #fff !important;
}

#gp-top-bar .gp-top-bar-inner .gp-btn-login,
#gp-top-bar .gp-top-bar-inner .gp-btn-logout {
    background-color: #ffffff !important;
    color: #4A90E2 !important;
    border: 2px solid #4A90E2 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
}

#gp-top-bar .gp-top-bar-inner .gp-btn-login:hover,
#gp-top-bar .gp-top-bar-inner .gp-btn-logout:hover {
    background-color: #4A90E2 !important;
    color: #ffffff !important;
    border-color: #4A90E2 !important;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    #gp-top-bar .gp-top-bar-inner {
        justify-content: center;
        flex-wrap: wrap;
        padding-bottom: 5px;
    }
    #gp-top-bar {
        padding: 12px 0;
    }
    .gp-top-btn {
        font-size: 13px;
        padding: 6px 14px;
        margin-bottom: 5px;
    }
}

/* =========================================
   6. STUDY GUIDE BOXES (STRONGER SELECTORS)
   ========================================= */
/* Added 'div' and 'a' specifically to override theme defaults */
div.study-chapter-box {
    background-color: #f8f9fa;
    border-left: 5px solid #4A90E2;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

div.study-chapter-box:hover {
    transform: translateX(5px);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

div.study-chapter-box h3 {
    margin-top: 0;
    color: #1e3a56;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 700;
}

div.study-chapter-box p {
    margin-bottom: 15px;
    color: #444;
}

a.study-btn {
    display: inline-block;
    background: #4A90E2;
    color: #ffffff !important;
    padding: 10px 20px;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border-bottom: none;
}

a.study-btn:hover {
    background: #1e3a56;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* =========================================
   7. VOCABULARY & DATA TABLES (STRONGER SELECTORS)
   ========================================= */
/* Added 'table' prefix to force style application */
table.vocab-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    border-radius: 8px;
    background-color: #fff;
    border: none; /* Remove default theme border */
}

table.vocab-table thead tr {
    background-color: #1e3a56 !important; /* Force blue header */
}

table.vocab-table th {
    background-color: #1e3a56 !important;
    color: #ffffff !important;
    text-align: left;
    padding: 15px;
    font-weight: 600;
    border-bottom: 3px solid #4A90E2;
}

table.vocab-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #333;
    vertical-align: top;
}

table.vocab-table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

table.vocab-table tbody tr:hover {
    background-color: #eef6fc;
}

/* Mobile responsive */
@media (max-width: 600px) {
    table.vocab-table {
        display: block;
        overflow-x: auto;
    }
}

/* =========================================
   8. NOTE BOXES
   ========================================= */
div.note-box {
    padding: 20px;
    border-left: 5px solid;
    margin: 30px 0;
    border-radius: 0 6px 6px 0;
}

div.note-box h3 {
    margin-top: 0;
    font-size: 19px;
    margin-bottom: 10px;
}

div.note-info {
    background-color: #e3f2fd;
    border-color: #2196F3;
    color: #0d47a1;
}

div.note-success {
    background-color: #e8f5e9;
    border-color: #43a047;
    color: #1b5e20;
}

div.note-warning {
    background-color: #fff8e1;
    border-color: #ffb300;
    color: #3e2723;
}