/*
Theme Name: Pathshala
Theme URI: https://rjtanjid24.github.io/me/
Author: RJ Tanjid
Description: A modern, responsive WordPress theme designed for educational institutions with dynamic result verification and staff directory.
Version: 1.0.0
*/

/* --------------------------------------------------------------------------
   1. FONTS & TYPOGRAPHY
--------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'SolaimanLipi';
    src: url('assets/fonts/SolaimanLipi.ttf') format('truetype');
}

body {
    font-family: 'SolaimanLipi', 'Hind Siliguri', sans-serif !important;
    background-color: #f0f2f5;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, a, li {
    font-family: 'SolaimanLipi', sans-serif !important;
}

/* --------------------------------------------------------------------------
   2. LAYOUT & CONTAINERS
--------------------------------------------------------------------------- */
.boxed-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 25px rgba(0,0,0,0.05);
    min-height: 100vh;
    overflow: hidden;
    padding-bottom: 0 !important;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

.custom-logo {
    height: auto;
    max-height: 90px;
    width: auto;
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   3. NAVIGATION BAR
--------------------------------------------------------------------------- */
.main-nav-container { 
    background-color: #f8f9fa;
    border-top: 1px solid #eee; 
    border-bottom: 3px solid #166534;
    padding: 0;
}

.main-nav-inner {
    display: flex;
    align-items: stretch;
    height: 100%;
}

/* Fixed Home Button (Full Height) */
.fixed-home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #166534;
    color: #ffffff !important;
    padding: 0 24px;
    font-size: 18px;
    margin-right: 0;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 50px;
}

.fixed-home-btn:hover {
    background-color: #14532d;
}

/* Main Menu Items */
.main-menu ul {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.main-menu ul li {
    display: flex;
    align-items: stretch;
    position: relative;
    border-left: 1px dotted #9ca3af; 
}

/* Remove border from the first item next to Home button */
.main-menu ul li:first-child {
    border-left: none;
}

.main-menu ul li a {
    display: flex;
    align-items: center;
    padding: 0 22px;
    color: #374151;
    text-decoration: none; 
    font-size: 16px; 
    font-weight: 600; 
    transition: all 0.2s ease;
    height: 100%;
}

.main-menu ul li a:hover,
.main-menu ul li.current-menu-item > a {
    background-color: #e5e7eb;
    color: #166534;
}

/* Dropdown Menu */
.main-menu ul ul { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background-color: #fff; 
    min-width: 220px; 
    z-index: 999; 
    border: 1px solid #ddd; 
    border-top: 3px solid #166534; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    height: auto; /* Reset height for dropdown */
}

.main-menu ul li:hover > ul {
    display: block;
}

.main-menu ul ul li {
    border-bottom: 1px solid #f0f0f0;
    border-left: none !important;
    width: 100%;
    height: auto;
    display: block;
}

.main-menu ul ul li a {
    padding: 10px 15px;
    font-size: 14px;
    color: #333;
    height: auto;
    display: block;
}

.main-menu ul ul li:hover > a {
    background: #f0fdf4;
    color: #166534;
    padding-left: 20px;
}

/* --------------------------------------------------------------------------
   4. VIDEO GALLERY & EMBEDS
--------------------------------------------------------------------------- */
.aspect-video iframe, 
.aspect-video object, 
.aspect-video embed,
.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.aspect-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.aspect-video p {
    margin: 0 !important;
    padding: 0 !important;
}

.hover\:bg-gray-750:hover {
    background-color: #2d3748;
}

/* --------------------------------------------------------------------------
   5. FOOTER & PAGINATION
--------------------------------------------------------------------------- */
.footer-links li a:before {
    content: "\f0da";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: #4ade80;
}

.footer-links li a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Pagination */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a, 
.nav-links span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.nav-links span.current,
.nav-links a:hover {
    background: #166534;
    color: #fff;
    border-color: #166534;
}

/* --------------------------------------------------------------------------
   6. SCROLL TO TOP BUTTON (Smart Positioning)
--------------------------------------------------------------------------- */
#scrollToTop { 
    display: none; 
    position: fixed; 
    bottom: 25px; 
    right: 20px; 
    z-index: 9999; 
    background-color: #166534; 
    color: white; 
    padding: 10px 14px; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: 0.3s; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    border: 2px solid #fff;
}

#scrollToTop:hover { 
    transform: translateY(-3px); 
    background-color: #14532d; 
}

/* Center button relative to boxed wrapper on large screens */
@media (min-width: 1300px) {
    #scrollToTop {
        right: auto;
        left: 50%;   
        margin-left: 600px; 
    }
}

/* --------------------------------------------------------------------------
   7. RESPONSIVE MEDIA QUERIES
--------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .main-nav-inner { 
        flex-direction: column; 
        height: auto; 
    }
    
    .main-menu ul { 
        flex-direction: column; 
        width: 100%; 
        height: auto; 
    }
    
    .main-menu ul li { 
        border-left: none !important; 
        border-bottom: 1px dotted #ccc; 
        width: 100%; 
    }
    
    .main-menu ul li a { 
        width: 100%; 
        padding: 12px 20px; 
    }
    
    .fixed-home-btn { 
        width: 100%; 
        height: auto; 
        padding: 15px; 
    }
    
    .header-banner { 
        display: none; 
    }
}