/*
Theme Name: Schools Classic
Theme URI: http://localhost/rampur/
Author: Antigravity
Description: A premium, dynamic classic theme for Eklavya Model Residential Schools (EMRS) replicating the NESTS look and feel.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: schools-classic
*/

.navbar-area .dropdown-item:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
}

/* Fallback Page List Menu (When no menu is assigned in Admin Panel) */
.navbar-area .menu {
    width: 100%;
}
.navbar-area .menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 2px;
}
.navbar-area .menu ul li {
    display: inline-block;
}
.navbar-area .menu ul li a {
    color: #ffffff !important;
    font-weight: 600;
    padding: 15px 18px !important;
    text-transform: none;
    font-size: 16px;
    letter-spacing: 0.5px;
    display: block;
    text-decoration: none;
}
.navbar-area .menu ul li a:hover {
    background-color: var(--secondary-color);
}


/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* Color Variables and Base Styling */
:root {
    --primary-color: #0a2240;      /* Deep Royal Blue/Navy */
    --secondary-color: #ff5d24;    /* Saffron/Orange Accent */
    --gold-color: #f59f00;         /* Golden Yellow Accent */
    --dark-red-color: #9e271f;     /* Dark Red Accent */
    --text-color: #333333;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e5e8eb;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(10,34,64,0.08);
    --font-primary: 'Outfit', sans-serif;
    --font-hindi: 'Noto Sans Devanagari', sans-serif;
}

/* Base resets & typography */
body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 15px;
    transition: font-size 0.2s ease, background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Skip to Main Content */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    z-index: 99999;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
}

/* Expand header, topbar and internal containers for desktop viewports to match NESTS width */
@media (min-width: 1200px) {
    .topbar-main .container,
    .header-main .container,
    .navbar-area .container,
    .internal-page-container {
        max-width: 1450px !important;
        width: 95% !important;
    }
}

/* Top Bar Styling */
.topbar-main {
    background-color: #06162b;
    color: #ffffff;
    padding: 6px 0;
    font-size: 16px; /* Increased font-size for better readability */
    border-bottom: 2px solid var(--secondary-color);
}
.topbar-left {
    color: #ffffff;
    opacity: 0.85;
}
.topbar-left a {
    color: #ffffff;
    text-decoration: none;
}
.topbar-left a:hover {
    color: var(--gold-color);
}
.topbar-right ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}
.topbar-right ul li {
    display: inline-block;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 15px;
}
.topbar-right ul li:last-child {
    border-right: none;
    padding-right: 0;
}
.topbar-right a {
    color: #ffffff;
    opacity: 0.85;
}
.topbar-right a:hover {
    opacity: 1;
    color: var(--gold-color);
}

/* Font Resizing buttons */
.font-resize-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 12px;
}
.font-resize-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Color schemes toggler */
.scheme-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 5px;
    cursor: pointer;
    border: 1px solid #fff;
}
.scheme-dot.normal { background-color: var(--primary-color); }
.scheme-dot.contrast-1 { background-color: #000000; border-color: #ffff00; } /* Yellow contrast */
.scheme-dot.contrast-2 { background-color: #000000; border-color: #ff00ff; } /* Fuchsia contrast */

/* Main Header Logo & Titles */
.header-main {
    background: var(--bg-white);
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
}
.header-emblem img {
    max-height: 120px; /* Increased from 100px for a bolder presence */
}
.header-titles h1 {
    font-family: var(--font-hindi);
    font-size: 28px; /* Increased from 24px to look prominent and bold */
    color: var(--dark-red-color);
    margin: 0;
    font-weight: 800;
    line-height: 1.4;
}
.header-titles h2 {
    font-family: var(--font-primary);
    font-size: 30px; /* Increased from 26px to match NESTS title text */
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-weight: 850;
}
.header-titles span {
    font-size: 15px; /* Increased from 14px */
    color: var(--text-muted);
    display: block;
    line-height: 1.4;
    font-weight: 500;
}
.header-right-logos img {
    max-height: 95px; /* Increased from 80px to balance left emblem logo */
}
.header-slogan {
    font-size: 17px; /* Slightly adjusted to fit beautifully on all desktop sizes */
    font-weight: 750;
    color: var(--dark-red-color);
    display: block;
    margin-top: 6px;
    font-family: var(--font-primary);
    white-space: nowrap !important; /* Prevent slogan wrapping on desktop */
}

.header-school-codes {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 5px;
}
.header-school-codes .code-item {
    display: inline-block;
}
.header-school-codes strong {
    color: var(--primary-color);
}

/* Navigation Bar */
.navbar-area {
    background-color: var(--primary-color);
    border-bottom: 4px solid var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.navbar-area .navbar {
    padding: 0;
}
.navbar-area .navbar-nav {
    align-items: center; /* Vertically center all menu items */
}
.navbar-area .nav-item .nav-link {
    color: #ffffff !important;
    font-weight: 600;
    padding: 15px 12px !important;
    text-transform: none; /* Changed from uppercase to match NESTS Title Case styling */
    font-size: 16px; /* Increased font size to match NESTS prominent styling */
    letter-spacing: 0.3px;
    white-space: nowrap; /* Prevent items from wrapping to 2 or 3 lines */
}

/* Medium screens (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .navbar-area .nav-item .nav-link {
        padding: 15px 8px !important;
        font-size: 14.5px;
    }
}

/* Tablet / Small Laptop screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-area .nav-item .nav-link {
        padding: 15px 5px !important;
        font-size: 12.5px;
    }
}
.navbar-area .nav-item .nav-link:hover,
.navbar-area .nav-item.active .nav-link {
    background-color: var(--secondary-color);
    color: #ffffff !important;
}
.navbar-area .dropdown-menu {
    background-color: var(--primary-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 0;
    padding: 0;
    box-shadow: var(--shadow-md);
    min-width: 220px;
}

/* Open dropdowns on mouse hover on desktops (width >= 992px) */
@media (min-width: 992px) {
    .navbar-area .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0; /* Align perfectly with navbar border */
    }
}
.navbar-area .dropdown-item {
    color: #ffffff;
    padding: 10px 15px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.navbar-area .dropdown-item:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
}

/* News Flash Ticker */
.ticker-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    margin: 15px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}
.ticker-title {
    background: var(--dark-red-color);
    color: #ffffff;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    position: relative;
    white-space: nowrap;
}
.ticker-title::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 10px solid var(--dark-red-color);
}
.ticker-marquee {
    flex-grow: 1;
    padding: 8px 15px;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}
.ticker-marquee marquee a {
    color: var(--primary-color);
    margin-right: 30px;
}
.ticker-marquee marquee a:hover {
    color: var(--secondary-color);
}
.ticker-marquee img.new-gif {
    height: 15px;
    vertical-align: middle;
}
.ticker-view-all {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-light);
    border-left: 1px solid var(--border-color);
}

/* Carousel Banner custom height */
.carousel-inner img,
.carousel-item > div {
    height: 580px !important;
}

.hero-slider-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* Custom Accessibility Styles */
.accessibility-size-large {
    font-size: 18px !important;
}
.accessibility-size-large .topbar-main { font-size: 18px; }
.accessibility-size-large .navbar-area .nav-item .nav-link { font-size: 19px; }
.accessibility-size-large .navbar-area .menu ul li a { font-size: 19px; }

.accessibility-size-small {
    font-size: 13px !important;
}
.accessibility-size-small .topbar-main { font-size: 13px; }
.accessibility-size-small .navbar-area .nav-item .nav-link { font-size: 13px; }
.accessibility-size-small .navbar-area .menu ul li a { font-size: 13px; }


/* Quick styles for widgets & columns */
.section-title {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 12px;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
}
.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.card-emrs {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card-emrs:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

/* Mobile Optimization for Header (max-width: 767px) */
@media (max-width: 767px) {
    .topbar-main {
        font-size: 13px;
        text-align: center;
        padding: 8px 0;
    }
    .topbar-left span {
        display: inline-block;
        margin-right: 18px !important;
        margin-bottom: 3px;
        white-space: nowrap;
    }
    .topbar-left span:last-child {
        margin-right: 0 !important;
        margin-bottom: 0;
    }
    .topbar-right ul {
        justify-content: center;
        margin-top: 8px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .topbar-right ul li {
        border-right: none;
        padding-right: 0;
    }
    .header-main {
        padding: 12px 0;
    }
    .header-emblem img {
        max-height: 90px;
    }
    .header-titles {
        padding-left: 10px !important;
    }
    .header-titles h1 {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
    }
    .header-titles h2 {
        font-size: 17px;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 3px;
    }
    .header-titles span {
        font-size: 11px;
        line-height: 1.3;
    }
    .header-right-logos {
        margin-top: 10px !important;
        text-align: center !important;
    }
    .header-right-logos img {
        max-height: 65px;
    }
    .header-slogan {
        font-size: 13px;
        margin-top: 4px;
    }
    .header-school-codes {
        font-size: 11px;
        margin-top: 3px;
    }
}

/* Sidebar Submenu Styles (NESTS Replica) */
.sidebar-submenu {
    border: 1px solid #e5e8eb;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sidebar-submenu-item {
    display: block;
    padding: 12px 18px;
    color: #333333;
    font-weight: 500;
    font-size: 14.5px;
    text-decoration: none;
    border-bottom: 1px solid #e5e8eb;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}
.sidebar-submenu-item:last-child {
    border-bottom: none;
}
.sidebar-submenu-item:hover {
    background-color: #f8f9fa;
    color: var(--secondary-color);
}
.sidebar-submenu-item.active {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 700;
    border-left-color: var(--primary-color);
}

/* Premium Back to Top Button styling */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    background-color: var(--secondary-color);
    color: #ffffff !important;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
#back-to-top i {
    font-size: 16px;
}
#back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    color: #ffffff !important;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Styling for tables inside entry content (e.g. copy-pasted from Excel) */
.entry-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
    border: 1px solid #dee2e6 !important;
    background-color: #ffffff;
}

.entry-content table th,
.entry-content table td {
    border: 1px solid #dee2e6 !important;
    padding: 10px 12px !important;
    text-align: left;
    vertical-align: middle;
}

.entry-content table th {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.entry-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.entry-content table tr:hover {
    background-color: #f1f3f5;
}

/* Premium Hover elevations for cards/widgets */
.p-4.bg-white.rounded.shadow-sm.border,
.card-emrs,
.sidebar-submenu {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease !important;
}

.p-4.bg-white.rounded.shadow-sm.border:hover,
.card-emrs:hover,
.sidebar-submenu:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(10, 34, 64, 0.12) !important;
    border-color: var(--secondary-color) !important;
}

/* =============================================
   GALLERY MARQUEE SCROLL — Like Footer Logos
   ============================================= */
.emrs-gallery-grid-wrapper {
    position: relative;
}

/* Outer wrapper clips overflow — only the visible strip shows */
.emrs-gallery-marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    /* Fade edges on left and right for premium look */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

/* The scrolling track — display flex, no wrap */
.emrs-gallery-marquee-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 20px;
    width: max-content;
    animation: emrsGalleryScroll 28s linear infinite;
    will-change: transform;
    padding: 8px 0 12px 0;
}

/* Pause on hover — just like footer marquee */
.emrs-gallery-marquee-wrapper:hover .emrs-gallery-marquee-track {
    animation-play-state: paused;
}

/* Keyframes for infinite scroll */
@keyframes emrsGalleryScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Each item in the marquee */
.emrs-mq-item {
    flex-shrink: 0;
    width: 240px;
}

/* Card wrapper (a or div) */
.emrs-mq-card-wrap {
    display: block;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.emrs-mq-card-wrap:hover {
    text-decoration: none;
    color: inherit;
}

/* The image card box */
.emrs-mq-card {
    width: 240px;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 12px rgba(10,34,64,0.12);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.emrs-mq-card-wrap:hover .emrs-mq-card {
    box-shadow: 0 8px 24px rgba(10,34,64,0.22);
    transform: translateY(-4px);
}

.emrs-mq-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.emrs-mq-card-wrap:hover .emrs-mq-thumb {
    transform: scale(1.08);
}

/* Dark overlay on hover */
.emrs-mq-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 34, 64, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.emrs-mq-card-wrap:hover .emrs-mq-overlay {
    background: rgba(10, 34, 64, 0.55);
}

/* Play/Expand icon */
.emrs-mq-play-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: var(--primary-color);
    font-size: 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}

.emrs-mq-card-wrap:hover .emrs-mq-play-btn {
    opacity: 1;
    transform: scale(1);
}

/* Title label below each card */
.emrs-mq-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin-top: 8px;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.emrs-mq-card-wrap:hover + .emrs-mq-label,
.emrs-mq-card-wrap:hover ~ .emrs-mq-label {
    color: var(--secondary-color);
}

/* View All button */
.btn-gallery-archive {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 14.5px;
    transition: all 0.3s ease;
    background: transparent;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}
.btn-gallery-archive:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    text-decoration: none;
}

/* =============================================
   QUICK LINKS ICON GRID
   ============================================= */
.emrs-quick-links-section {
    margin: 32px 0;
}

.emrs-quick-links-wrapper {
    padding: 4px 0;
}

.emrs-ql-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 10px 14px;
    border-radius: 10px;
    transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.28s ease;
    text-decoration: none !important;
    background: transparent;
}

.emrs-ql-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 28px rgba(10, 34, 64, 0.13);
    text-decoration: none !important;
}

.emrs-ql-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    flex-shrink: 0;
}

.emrs-ql-card:hover .emrs-ql-icon-circle {
    transform: scale(1.12) rotate(-6deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}

.emrs-ql-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.emrs-ql-card:hover .emrs-ql-label {
    color: var(--secondary-color);
}

/* Responsive Quick Links */
@media (max-width: 480px) {
    .emrs-ql-icon-circle {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    .emrs-ql-label {
        font-size: 12px;
    }
}
