/* 
   Modern Theme Overrides for Rane Vidyalaya
   Enhances the existing bootstrap/template layout with a premium feel.
*/

:root {
    /* Color Palette - Premium & Trustworthy */
    --primary-color: #1a4fbd;
    /* Richer Royal Blue */
    --primary-dark: #0d3285;
    /* Darker shade for hovers */
    --secondary-color: #f59e0b;
    /* Warm Amber/Gold for accents */
    --accent-color: #ef4444;
    /* Modern Red for alerts/important */

    /* Neutrals */
    --text-main: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    /* Typography */
    --font-heading: 'Outfit', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- Global Resets & Improvements --- */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
}

a {
    transition: all 0.3s ease;
}

/* --- Header Area --- */
.header-area {
    box-shadow: var(--shadow-sm);
    background: var(--bg-white);
}

.header-top_area {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
}

.header-top_area .text_wrap p,
.header-top_area .text_wrap span {
    color: #fff !important;
    font-size: 14px;
}

/* Logo Area */
.header_left img {
    transition: transform 0.3s ease;
}

.header_left:hover img {
    transform: scale(1.05);
}

/* Navigation */
.main-menu ul li a {
    font-weight: 600;
    color: var(--text-main);
    font-size: 18px;
    padding: 30px 16px;
    position: relative;
}

.main-menu ul li a:hover,
.main-menu ul li a.active {
    color: var(--primary-color);
}

/* Add a subtle underline animation to nav items */
.main-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.main-menu ul li:hover a::after {
    width: 60%;
}

/* Submenu refinement */
.main-menu ul li .submenu {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: none;
    overflow: hidden;
    padding: 10px 0;
}

.main-menu ul li .submenu li a {
    padding: 10px 20px;
    font-size: 14px;
    text-align: left !important;
    display: block;
    width: 100%;
}

.main-menu ul li .submenu li a::after {
    display: none;
}

/* No underline for submenu */

.main-menu ul li .submenu li:hover>a {
    background: var(--primary-color);
    color: #ffffff !important;
}

/* --- Admission Scroller --- */
.admission-scroller {
    background: linear-gradient(90deg, var(--secondary-color), #fbbf24);
    color: #000;
    font-weight: 700;
    font-size: 16px;
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

/* --- Buttons --- */
.boxed-btn3,
.boxed-btn5 {
    background: var(--primary-color);
    border-radius: var(--radius-pill);
    color: #fff !important;
    font-weight: 600;
    padding: 12px 30px;
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.boxed-btn3:hover,
.boxed-btn5:hover {
    background: var(--bg-white);
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* --- Slider/Hero --- */
.slider_text h3 {
    font-size: 64px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    margin-bottom: 30px;
}

/* --- About Us / Cards --- */
.section_title h3 {
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section_title h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.single_event {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    margin-bottom: 24px;
}

.single_event:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.single_event .date span {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 20px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.single_event .event_info h4 {
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 0;
}

.single_event .event_info h4 li {
    list-style: none;
    /* Remove default bullets inside h4 if any */
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
    font-weight: 500;
}

.single_event .event_info h4 li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-size: 20px;
    line-height: 1;
}

/* --- Services / Cards Grid --- */
.single_service {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    transition: all 0.3s;
    height: auto !important;
    /* Allow auto height overrides */
    min-height: 280px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    border-top: 5px solid var(--primary-color);
}

.single_service:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--secondary-color);
}

.single_service .icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    background: transparent;
    width: auto;
    height: auto;
    border: none;
}

.single_service .service_info h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

/* --- Tab Content --- */
.custom_tabs .nav-item {
    color: var(--text-main);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    padding: 15px 25px;
    font-size: 16px;
}

.custom_tabs .nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.custom_tabs {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
    justify-content: center;
    display: flex;
}

.single__program {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* --- Footer --- */
.footer {
    background: #111827 !important;
    /* Very dark blue-gray */
    color: #e5e7eb;
}

.footer-widget h5 {
    color: var(--secondary-color) !important;
    letter-spacing: 1px;
    font-size: 16px;
    margin-bottom: 25px;
}

.footer .contact-info__icon {
    color: var(--secondary-color);
    font-size: 18px;
    margin-right: 15px;
    margin-top: 3px;
}

.footer h3 {
    color: #fff !important;
    font-size: 18px;
    margin-bottom: 8px;
}

.footer p {
    color: #9ca3af !important;
    font-size: 14px;
}

.footer hr {
    border-color: #374151 !important;
}

/* --- Responsive Helpers --- */
@media (max-width: 991px) {
    .slider_text h3 {
        font-size: 36px;
    }

    .single_service {
        margin-bottom: 30px;
    }
}


/* Fix for Vision/Goals Layout - Overriding inline styles in HTML */
.single_event,
.single_service {
    height: auto !important;
    min-height: 280px !important;
    /* Restore logical minimum height */
}

.single_event .date {
    padding: 24px !important;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}


@media (max-width: 991px) {
    .main-menu ul li a {
        font-size: 22px !important;
    }
}

.single_event .event_info h4,
.single_service .service_info h4 {
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
    height: auto !important;
    font-size: 18px !important;
}

.single_service,
.single_event {
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

@media (min-width: 992px) {

    /* Desktop Two-Row Header Styles */
    .main-menu {
        text-align: center !important;
        width: 100% !important;
        clear: both !important;
        padding: 5px 0 !important;
        border-top: 1px solid #f0f0f0;
        /* Subtle separator line */
    }

    .main-menu ul {
        display: flex !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-menu ul li a {
        padding: 15px 20px !important;
        /* Reduced vertical padding for row 2 */
        font-size: 16px !important;
        font-weight: 600 !important;
    }
}

@media (max-width: 991px) {

    /* Hide the raw menu on mobile, SlickNav uses its clone */
    .main-menu {
        display: none !important;
    }

    /* Mobile Header Layout (Merged) */
    .header_wrap {
        display: flex !important;
        flex-wrap: nowrap !important;
        /* Force side-by-side */
        justify-content: space-between !important;
        align-items: center !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        width: 100% !important;
    }

    .header-buttons,
    .btn-header-area {
        display: none !important;
        /* Strictly hide buttons on mobile */
    }

    .header_left,
    .header_right {
        flex: 0 0 auto !important;
        /* Don't grow, keep natural size */
        display: flex !important;
        align-items: center !important;
        max-width: 45% !important;
        /* Prevent one logo from pushing the other out */
    }

    .header_right {
        justify-content: flex-end !important;
    }
}

/* --- Logo Sizes --- */
.header_left img,
.header_right img,
.logo img,
.logo_foundation img {
    height: 75px !important;
    width: auto !important;
    max-width: 100% !important;
    transition: all 0.3s ease;
}

@media (min-width: 992px) {

    .logo_foundation img,
    .logo img {
        height: 85px !important;
        /* Dedicated logo row allows larger logos */
    }
}

/* Top Bar Buttons */
.btn-top-bar {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    padding: 2px 10px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-top-bar:hover {
    background: #fff;
    color: var(--primary-color) !important;
}

/* Header Area Buttons (White Background) */
.btn-header-area {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.btn-header-area:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (min-width: 992px) {

    /* Align Header Right Content */
    .header_right {
        display: flex !important;
        align-items: center !important;
    }

    /* Standardize Header Button Sizes */
    .header-buttons {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        flex-direction: row !important;
    }
}

/* --- Full Width Layout Override --- */
.boxed-layout {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* --- Vertical Dropdown / Submenu Overrides --- */

/* Ensure the main submenu (Level 2) is a vertical block */
.header-area .main-header-area .main-menu ul li .submenu {
    min-width: 250px !important;
    position: absolute !important;
    display: block !important;
    /* Force block layout */
    text-align: left !important;
    /* Reset alignment for vertical list */
    white-space: normal !important;
    /* Allow items to wrap if needed */
}

/* Force submenu items to stack vertically */
.header-area .main-header-area .main-menu ul li .submenu li {
    display: block !important;
    width: 100% !important;
}

/* Make Nested Submenus (Level 3+) expand to the right */
.header-area .main-header-area .main-menu ul li .submenu .submenu {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.1) !important;
    border-left: 1px solid #eee !important;
    padding-left: 0 !important;
    /* Reset indentation for absolute positioning */
    min-width: 250px !important;
    background: #fff !important;
    z-index: 10003 !important;
}

/* Show nested submenu on hover of its parent item */
.header-area .main-header-area .main-menu ul li .submenu li:hover>.submenu {
    display: block !important;
}

/* Adjust nested links padding to match Level 2 */
.header-area .main-header-area .main-menu ul li .submenu .submenu li a {
    padding: 10px 15px !important;
    font-size: 15px !important;
}

/* Add indicator for items with submenus */
.main-menu ul li .submenu li a i.ti-angle-right {
    float: right;
    margin-top: 5px;
}

/* PDF View Buttons for Mandatory Disclosure */
.pdf-view-btn {
    display: inline-block !important;
    padding: 8px 16px !important;
    background: #f8f9fa !important;
    color: #1B368F !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    margin: 4px 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.pdf-view-btn i {
    margin-right: 8px !important;
    color: #d9534f !important;
    /* PDF Red */
}

.pdf-view-btn:hover {
    background: #1B368F !important;
    color: #fff !important;
    border-color: #1B368F !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.pdf-view-btn:hover i {
    color: #fff !important;
}

/* --- Global Form Overrides (Contact & Careers) --- */
.contact-section,
.contact-section .container,
.contact_form,
.careers-section {
    background: var(--bg-light) !important;
    padding: 80px 0 !important;
    position: relative;
    z-index: 1;
}

.contact-section::before,
.contact-section::after,
.careers-section::before,
.careers-section::after {
    display: none !important;
    background: none !important;
    content: none !important;
}

.contact-title {
    color: var(--primary-dark) !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    margin-bottom: 30px !important;
    text-align: center !important;
}

/* --- Admission Page Redesign (Refined) --- */

/* Admission Area Background - removed suppression to allow image to show */


.admission_area {
  background: url("/img/admission/Book.jpg") no-repeat center / cover !important;
  padding: 80px 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Admission Steps Cards */
.admission-step-card {
    background: #ffffff !important;
    padding: 35px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.admission-step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.admission-step-card .step-number {
    font-size: 40px;
    font-weight: 800;
    color: rgba(26, 79, 189, 0.08);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.admission-step-card h4 {
    color: var(--primary-color) !important;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
}

.admission-step-card p {
    color: var(--text-light) !important;
    font-size: 15px;
    margin-bottom: 0;
    line-height: 1.6;
}

.admission-step-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border: none;
}

.admission-step-card.highlight h4,
.admission-step-card.highlight p {
    color: #ffffff !important;
}

.admission-step-card.highlight .step-number {
    color: rgba(255, 255, 255, 0.1) !important;
}

/* Admission Card Modern (Form Container) */
.admission-card-modern {
    background: #ffffff !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.card-header-modern {
    background: var(--primary-dark) !important;
    padding: 40px 30px;
    color: #ffffff !important;
}

.card-header-modern h3 {
    color: #ffffff !important;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.card-header-modern p {
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 0;
}

/* Form Fields - Fixing Visibility & Alignment */
.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-main) !important;
}

.form-group-modern input,
.form-group-modern select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: var(--radius-md) !important;
    font-size: 15px !important;
    color: var(--text-main) !important;
    background: #f9fafb !important;
    transition: all 0.3s ease;
    height: auto !important;
    margin-bottom: 0 !important;
}

.form-group-modern input::placeholder {
    color: #9ca3af !important;
}

.form-group-modern input:focus,
.form-group-modern select:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(26, 79, 189, 0.1) !important;
    background: #ffffff !important;
}

.btn-modern-full {
    width: 100% !important;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 16px !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 10px;
    display: block !important;
}

.btn-modern-full:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-footer-modern {
    padding: 25px 30px;
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb;
}

.card-footer-modern p {
    font-size: 14px !important;
    color: var(--text-light) !important;
    margin-bottom: 0;
    line-height: 1.5;
}

.card-footer-modern b {
    color: var(--primary-dark) !important;
}

/* Student Strength Table Modernization */
.book-section {
    background: #ffffff !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.section-header {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 20px;
    font-weight: 700;
    font-size: 20px;
    text-align: center;
}

.book-table {
    width: 100%;
    border-collapse: collapse;
}

.book-table th {
    background: #f3f4f6 !important;
    color: var(--primary-dark) !important;
    font-weight: 700;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

.book-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main) !important;
}

.book-table tr:hover td {
    background: #f9fafb !important;
}

.book-table tbody tr:last-child td {
    border-bottom: none;
}

.book-table thead:last-child td {
    background: var(--primary-dark) !important;
    color: #ffffff !important;
    font-weight: 800;
}