/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: GeneratePress Child Theme
Author: Tom Usborne
Author URI: https://tomusborne.com
Template: generatepress
Version: 1.0
*/
/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --header-height: 80px;
    --primary-blue: #24A1DE;     /* Telegram Like Blue */
    --glass-bg: rgba(255, 255, 255, 0.85); /* Glass Background */
    --google-grey: #f1f3f4;      
    --text-dark: #202124;
    --border-radius: 50px;       
}

* { box-sizing: border-box; }

html, body {
    width: 100%; margin: 0; padding: 0;
    overflow-x: hidden !important;
    font-family: Arial, sans-serif;
}

body {
    padding-top: var(--header-height);
    background-color: #fff;
    display: flex; flex-direction: column; min-height: 100vh;
}

/* =========================================
   2. MAIN SITE HEADER (Glass Effect + Border)
   ========================================= */
.custom-site-header {
    position: fixed; top: 0; left: 0;
    width: 100%; height: var(--header-height);
    
    /* GLASS EFFECT CODE START */
    background: var(--glass-bg); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    /* GLASS EFFECT CODE END */

    /* Light Telegram Border */
    border-bottom: 2px solid #24A1DE; 

    display: flex; align-items: center;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header-inner {
    width: 95%; max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; gap: 15px;
}

/* Logo Styling */
.site-branding { display: flex; align-items: center; height: 100%; flex-shrink: 0; }
.site-branding a { display: flex; align-items: center; height: 100%; } /* Alignment Fix */
.site-branding img {
    height: auto !important; max-height: 50px !important;
    width: auto !important; display: block; object-fit: contain;
}

/* =========================================
   3. SEARCH BAR
   ========================================= */
.search-wrapper { 
    flex-grow: 1; display: flex; justify-content: flex-end; 
    margin: 0 15px; 
}
.search-form-ai { width: 100%; max-width: 400px; }

.input-box-ai {
    display: flex; align-items: center; background-color: var(--google-grey);
    border-radius: var(--border-radius); padding: 8px 15px;
    transition: 0.3s;
}
.input-box-ai:focus-within {
    background-color: #fff; box-shadow: 0 4px 12px rgba(36, 161, 222, 0.15);
}
.search-field-ai {
    border: none; background: transparent; outline: none;
    width: 100%; font-size: 15px; color: var(--text-dark);
}

/* Header Widget */
.header-widget-area { display: none; margin-right: 15px; }

/* =========================================
   4. NAVIGATION & HAMBURGER (Fixed)
   ========================================= */

/* Desktop Links */
.desktop-nav {
    display: flex !important; gap: 8px; align-items: center; flex-shrink: 0;
}

.nav-btn {
    text-decoration: none; color: var(--primary-blue);
    background: rgba(36, 161, 222, 0.08);
    padding: 8px 15px; border-radius: 50px;
    font-weight: 600; font-size: 14px;
    white-space: nowrap; transition: 0.2s ease;
}
.nav-btn:hover { background: var(--primary-blue); color: #fff; transform: translateY(-2px); }

/* Hamburger Button Fix - Center Alignment */
.hamburger {
    display: flex !important;
    flex-direction: column; 
    justify-content: center; /* Center lines vertically inside box */
    align-items: center; /* Center lines horizontally */
    gap: 5px; /* Gap between lines */
    
    cursor: pointer; 
    padding: 8px;
    margin-left: 10px;
    height: 40px; /* Fixed height for better alignment */
    width: 40px;
    
    /* Ensure it centers in the header */
    align-self: center; 
    
    background: transparent; border: none;
    z-index: 99999 !important;
}
.hamburger span { 
    display: block;
    width: 26px; height: 3px; 
    background-color: #333; 
    border-radius: 4px; 
    transition: all 0.3s ease;
}

/* =========================================
   5. MOBILE RESPONSIVE RULES
   ========================================= */
@media (max-width: 900px) {
    .desktop-nav { display: none !important; }
    .header-widget-area { display: none !important; }
    
    .site-branding img { max-height: 40px !important; }
    .search-form-ai { max-width: 200px; }
    .search-wrapper { justify-content: center; } 
}

@media (min-width: 901px) {
    .header-widget-area { display: block; }
}

/* =========================================
   6. SIDE MENU PANEL & FOOTER (Same as before)
   ========================================= */
.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 9998;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

.side-nav-panel {
    position: fixed; top: 0; left: -320px;
    width: 280px; height: 100vh;
    background: #fff; z-index: 9999;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    display: flex; flex-direction: column; 
}
.side-nav-panel.active { left: 0; }

.side-nav-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 25px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.close-btn { font-size: 28px; cursor: pointer; }

.side-nav-content {
    flex-grow: 1; overflow-y: auto; padding: 20px 25px;
}
.side-nav-content a {
    display: block; padding: 12px 15px; margin-bottom: 8px;
    text-decoration: none; color: #333; font-weight: 500;
    background: #f9f9f9; border-radius: 12px;
}
.side-nav-content a:hover { background: #eee; color: var(--primary-blue); }

.side-nav-footer {
    padding: 20px 25px 30px 25px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex; flex-direction: column;
    gap: 20px; flex-shrink: 0;
}

.nav-login-btn {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    width: 100%; padding: 12px;
    background: #24A1DE; color: #fff;
    border-radius: 12px; font-weight: 600; text-decoration: none;
    transition: 0.3s;
}
.nav-login-btn:hover { background: #1b8ec7; transform: translateY(-2px); }

.nav-social-icons {
    display: flex; justify-content: center; gap: 20px; padding: 5px 0;
}
.social-icon {
    width: 42px; height: 42px; border-radius: 50%;
    background: #f1f3f4; display: flex; align-items: center; justify-content: center;
    color: #555; transition: all 0.3s ease; text-decoration: none;
}
.social-icon svg { width: 22px; height: 22px; }

.social-icon:hover { transform: translateY(-3px); color: #fff; }
.social-icon.telegram:hover { background-color: #0088cc; }
.social-icon.facebook:hover { background-color: #1877F2; }
.social-icon.instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

.nav-settings-row { display: flex; justify-content: center; }
.setting-item {
    width: 100%; background: #f1f3f4; padding: 12px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; font-size: 15px; font-weight: 600; color: #555; transition: 0.2s;
}
.setting-item:hover { background: #e0e0e0; }

.site-footer { width: 100%; background-color: #f0f8ff; padding: 40px 0; margin-top: auto; }
.custom-footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; padding: 0 20px; }
.footer-nav-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
.footer-btn {
    text-decoration: none; color: #333; background: #fff;
    padding: 10px 20px; border-radius: 50px; font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.3s;
}
.footer-btn:hover { background: var(--primary-blue); color: #fff; transform: translateY(-3px); }

/* Scroll Top Button - Updated Logic */
#fastScrollBtn {
    position: fixed; bottom: 20px; right: 20px;
    width: 45px; height: 45px; 
    background: var(--primary-blue); color: #fff;
    border: none; border-radius: 50%; cursor: pointer;
    align-items: center; justify-content: center; z-index: 1001;
    display: flex; /* Flex important to center arrow */
    opacity: 0; visibility: hidden; /* JS will handle show class */
    transition: all 0.3s ease;
}
#fastScrollBtn.show { opacity: 1; visibility: visible; }

/* Dark Mode */
body.dark-mode { background-color: #121212 !important; color: #fff !important; }
body.dark-mode .custom-site-header { 
    background: rgba(30, 30, 30, 0.85); /* Dark Glass */
    border-bottom-color: #333;
}
body.dark-mode .side-nav-panel,
body.dark-mode .side-nav-footer, 
body.dark-mode .site-footer {
    background-color: #1e1e1e !important; color: #fff; border-color: #333;
}
body.dark-mode .input-box-ai, 
body.dark-mode .side-nav-content a,
body.dark-mode .setting-item,
body.dark-mode .social-icon {
    background-color: #333; color: #fff;
}
body.dark-mode .nav-login-btn { border: 1px solid #444; }
body.dark-mode a { color: #fff; }
/* =========================================
   MOBILE CONTENT OVERFLOW FIX (PATCH)
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Body & HTML ko restrict karein */
    html, body {
        max-width: 100% !important;
        overflow-x: hidden !important; /* Horizontal scroll band */
    }

    /* 2. Main Content Container Fix */
    .site-content, 
    .site.grid-container, 
    .container.grid-container {
        width: 100% !important;
        max-width: 100vw !important; /* Viewport width se jyada na ho */
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
    }

    /* 3. Post ke andar text ke liye Padding (Taaki kinare se chipke nahi) */
    .inside-article, 
    .entry-content, 
    .post-content {
        padding-left: 5px !important;
        padding-right: 5px !important;
        width: 100% !important;
        box-sizing: border-box; /* Padding width me count hogi */
    }

    /* 4. Images aur Iframes (Videos) ko screen ke andar rakhein */
    .entry-content img, 
    .entry-content iframe, 
    .entry-content video,
    .wp-block-image img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* 5. Table Fix (Agar Syllabus table chauda hai to scroll aayega, site nahi fategi) */
    table, .wp-block-table {
        display: block;
        width: auto !important;
        overflow-x: auto; /* Table ke andar scroll aayega */
    }

    /* 6. Comment Section Fix */
    .comments-area {
        padding: 0 15px;
    }
}
/* =========================================
   CHAT STYLE COMMENT BOX (ONE LINE)
   ========================================= */

/* 1. Sabhi Extra Fields ko Hide karein */
.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-cookies-consent,
.comment-notes,
.logged-in-as,
.comment-form-comment label { /* Label bhi hataya */
    display: none !important;
}

/* 2. Text Area ko One Line banayein */
.comment-form-comment textarea#comment {
    height: 50px !important;       /* Sirf ek line ki height */
    min-height: 50px !important;   /* Default bada box band */
    padding: 12px 20px;            /* Text beech mein */
    border-radius: 50px;           /* Gol kinaare (Capsule shape) */
    resize: none;                  /* Side se khichne wala option band */
    overflow: hidden;              /* Scrollbar gayab */
    border: 1px solid #ccc;
    transition: all 0.3s ease-in-out; /* Smooth animation */
    width: 100%;
    font-size: 15px;
}

/* 3. Click karne par Box Bada ho jaye (Focus State) */
.comment-form-comment textarea#comment:focus {
    height: 120px !important;      /* Likhne ke liye bada hoga */
    border-radius: 15px;           /* Kinaare thode square honge */
    border-color: #24A1DE;         /* Border Blue ho jayegi */
    box-shadow: 0 4px 10px rgba(36, 161, 222, 0.1);
    overflow: auto;                /* Scroll wapis aayega */
}

/* 4. Button Styling (Telegram Blue) */
.form-submit {
    text-align: right; /* Button right side mein */
    margin-top: 10px;
}

.comments-area input[type="submit"],
#submit {
    background-color: #24A1DE !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 8px 25px !important;
    border: none !important;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}


