/*
Theme Name: RGM School - PHP MVC
Theme URI: https://rgmschool.edu.in/
Author: Cyber Omega IT
Description: RGM School Website - MVC Architecture
Version: 2.0
*/

/*--------------------------------------------------------------
This is main CSS file that contains custom style rules
------------------------------------------------------*/

/* CSS Variables */
:root {
  --accent-color: #1D157C;
  --black-color: #111111;
  --light-black-color: #343536;
  --dark-color: #111111;
  --primary-color: #1D157C;
  --secondary-color: #3C5494;
  --tertiary-color: #5B7BCE;
  --background-color: #E3EBFF;
  --gray-color: #777F81;
  --bs-dark-rgb: 17, 17, 17;
  --bs-gray-100: #F6F6F6;
  --bs-gray-300: #8d0505;
  --bs-primary-text-emphasis: var(--primary-color);
  --bs-light-rgb: rgba(255, 255, 255, 1);
  --bs-primary-rgb: 29, 21, 124;
  --light-color: #fdfdfd;
  --swiper-theme-color: #111 !important;
  --cadet-blue-color: #9AB4B7;
  --body-font: "Roboto", sans-serif;
}

/* General Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
}

body {
  background-color: var(--light-color);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 164%;
  letter-spacing: 0.32px;
  color: var(--dark-color);
  margin: 0;
}

p {
  color: var(--dark-color);
}

a {
  color: inherit;
  text-decoration: none;
  transition: 0.3s ease-in-out;
}

a:hover {
  color: var(--tertiary-color);
}

.text-light {
  color: var(--light-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-black {
  color: var(--black-color) !important;
}

.bg-light {
  background-color: var(--light-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-tertiary {
  background-color: var(--tertiary-color) !important;
}

.bg-gray {
  background-color: var(--bs-gray-100) !important;
}

.bg-background {
  background-color: var(--background-color) !important;
}

/* Section Spacing */
.padding-small {
  padding-top: 8.125em;
  padding-bottom: 8.125em;
}

.padding-medium {
  padding-top: 10em;
  padding-bottom: 10em;
}

.padding-large {
  padding-top: 12em;
  padding-bottom: 12em;
}

.margin-small {
  margin-top: 8.125em;
  margin-bottom: 8.125em;
}

.margin-medium {
  margin-top: 10em;
  margin-bottom: 10em;
}

.margin-large {
  margin-top: 12em;
  margin-bottom: 12em;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--black-color);
  text-transform: capitalize;
  font-weight: 700;
  letter-spacing: 0.84px;
  line-height: 115%;
}

@media (min-width: 1200px) {
  .display-1 {
    font-size: 6.5rem;
  }
}

/* Buttons */
.btn {
  --bs-btn-padding-x: 1.9rem;
  --bs-btn-padding-y: 0.8rem;
  --bs-btn-font-size: 1rem;
  --bs-btn-font-weight: 500;
  text-transform: uppercase;
  transition: 0.3s ease-in-out;
  border-radius: 0;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--secondary-color);
  --bs-btn-hover-border-color: var(--secondary-color);
}

/* Dropdown */
.dropdown-item {
  color: var(--dark-color);
}

.dropdown-item.active,
.dropdown-item:hover,
.dropdown-item:active {
  color: var(--dark-color);
  background-color: var(--bs-gray-300);
}

/* Form */
.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: none;
}

.form-check-input:focus {
  border-color: var(--accent-color);
  outline: 0;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--dark-color);
  outline: 0;
  box-shadow: none;
}

/* Swiper */
.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet {
  margin: 0 5px;
}

.swiper-pagination-bullet {
  width: 14px;
  height: 14px;
}

.swiper-pagination-bullet-active {
  background: var(--primary-color);
}

/* Offcanvas */
.offcanvas {
  height: 100vh;
  z-index: 9999;
  /* Ensure it stays on top */
}

/* Modal */
.modal-dialog {
  max-width: 800px;
  margin: auto;
  height: 100vh;
  display: flex;
  align-items: center;
}

.modal-content {
  padding: 0;
  background-color: #f5f3ef;
  border: none;
  border-radius: 0;
}

/* Header */
.header-top {
  transition: transform 0.8s ease-in-out;
}

#primary-header {
  transition: all 0.4s ease-in-out;
  background: linear-gradient(135deg, #1D157C 0%, #3C5494 100%) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Nav Links */
a.nav-link {
  text-transform: uppercase;
  color: var(--light-color);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  padding: 8px 0 !important;
  transition: all 0.3s ease;
}

a.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.5));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

a.nav-link:hover::after,
a.nav-link.active::after {
  width: 100%;
}

a.nav-link:focus {
  color: var(--light-color);
}

a.nav-link.active,
.nav-link.show,
a.nav-link:hover {
  color: #fff !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Dropdown Toggle Arrow */
.nav-link.dropdown-toggle::after {
  border: none;
  content: '▾';
  font-size: 10px;
  margin-left: 6px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.nav-item.dropdown:hover .nav-link.dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Dropdown Menu Styles */
.nav-item.dropdown .dropdown-menu {
  background: linear-gradient(180deg, rgba(29, 21, 124, 0.98) 0%, rgba(18, 60, 151, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 0;
  margin-top: 10px;
  min-width: 220px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block !important;
}

.nav-item.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Items */
.nav-item.dropdown .dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.nav-item.dropdown .dropdown-menu .dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #5B7BCE, #fff);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.nav-item.dropdown .dropdown-menu .dropdown-item:hover::before,
.nav-item.dropdown .dropdown-menu .dropdown-item:focus::before {
  transform: scaleY(1);
}

.nav-item.dropdown .dropdown-menu .dropdown-item:hover,
.nav-item.dropdown .dropdown-menu .dropdown-item:focus {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: #fff;
  padding-left: 30px;
}

.nav-item.dropdown .dropdown-menu .dropdown-item:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Dropdown divider for visual appeal */
.nav-item.dropdown .dropdown-menu .dropdown-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Search Dropdown Styles */
#primary-header .dropdown .search::after {
  content: none;
}

#primary-header .search-dropdown .dropdown-menu {
  width: 280px;
  background: linear-gradient(180deg, rgba(29, 21, 124, 0.98) 0%, rgba(18, 60, 151, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 16px;
}

#primary-header .search-dropdown .dropdown-menu input {
  min-width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 10px 50px 10px 16px;
}

#primary-header .search-dropdown .dropdown-menu input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#primary-header .search-dropdown .dropdown-menu input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}

#primary-header .search-dropdown .dropdown-menu button {
  padding: 0 14px;
  min-height: -webkit-fill-available;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  transition: all 0.3s ease;
}

#primary-header .search-dropdown .dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media only screen and (max-width: 610px) {
  #primary-header.hidden {
    transform: translateY(-105%);
  }
}

@media only screen and (max-width: 990px) {

  /* Hide Top Bar on Mobile to save space */
  .header-top {
    display: none !important;
  }

  /* Adjust Logo Size */
  .navbar-brand img {
    max-height: 50px;
    width: auto;
  }

  /* Offcanvas Menu Styles */
  .offcanvas-body {
    padding-top: 20px;
  }

  a.nav-link {
    color: var(--dark-color);
    font-size: 1.1rem;
    /* Smaller font explicitly for mobile menu */
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Divider between items */
  }

  a.nav-link::after {
    display: none;
  }

  a.nav-link:focus {
    color: var(--dark-color);
  }

  a.nav-link.active,
  .nav-link.show,
  a.nav-link:hover {
    color: var(--primary-color) !important;
    text-shadow: none;
    padding-left: 10px !important;
    /* Visual feedback on hover/active */
  }

  /* Mobile Dropdown Styling */
  .nav-item.dropdown .dropdown-menu {
    background: rgba(29, 21, 124, 0.05);
    border: none;
    box-shadow: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0;
    padding: 0;
    margin-bottom: 10px;
  }

  .nav-item.dropdown .dropdown-menu .dropdown-item {
    color: var(--dark-color);
    padding: 8px 16px 8px 30px;
    /* Indented for hierarchy */
    font-size: 0.95rem;
  }

  .nav-item.dropdown .dropdown-menu .dropdown-item:hover {
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
  }
}

/* Slider Section */
.hero-slide {
  height: 90vh;
}

@media only screen and (max-width: 768px) {
  .hero-slide {
    height: 60vh;
    /* Reduced height for mobile */
  }
}

section#slider .banner-content {
  width: 50%;
}

section#slider .main-slider-button-next,
.main-slider-button-prev {
  z-index: 111111;
  height: fit-content;
  opacity: 0.9;
}

section#slider .main-slider-button-next.swiper-button-disabled,
.main-slider-button-prev.swiper-button-disabled {
  opacity: 0.6;
}

@media only screen and (max-width: 999px) {
  section#slider .banner-content {
    width: 66%;
  }
}

/* Features Section */
#features {
  transform: translateX(-50%);
  left: 50%;
  bottom: 0;
  position: absolute;
}

@media only screen and (max-width: 999px) {
  #features {
    left: 0;
    transform: translateX(0%);
    position: static;
    padding-top: 10em;
    padding-bottom: 10em;
  }
}

/* About Section */
#about {
  padding-top: 240px;
  padding-bottom: 350px;
}

#courses {
  top: 75%;
  transform: translateX(-50%);
  left: 50%;
  bottom: 0;
  position: absolute;
}

@media only screen and (max-width: 999px) {
  #about {
    padding-top: 150px;
    padding-bottom: 0px;
  }

  #courses {
    left: 0;
    transform: translateX(0%);
    position: static;
    padding-top: 10em;
    padding-bottom: 10em;
  }
}

/* Founder Section */
#founder {
  padding-top: 18rem;
}

@media only screen and (max-width: 999px) {
  #founder {
    padding-top: 10rem;
  }
}

/* Facilities Section */
.facility-block {
  margin: auto;
  width: 25%;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  position: absolute;
}

.product-item img.post-image {
  transform: scale(1);
  transition: all 0.5s ease-in-out;
}

.product-item:hover img.post-image {
  opacity: 0.7;
  transform: scale(1.1);
}

.product-description {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.product-item:hover .product-description {
  opacity: 1;
  visibility: visible;
}

@media only screen and (max-width: 999px) {
  .facility-block {
    left: 0;
    transform: translateX(0%);
    position: static;
    margin: auto;
    width: 100%;
  }
}

/* Notification Bar */
.notification-bar {
  transition: top 0.3s;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  color: red;
}

.notification-bar.hidden {
  top: 0;
}

/* Testimonials */
.testimonial-item {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
}

.testimonial-author h6 {
  color: var(--primary-color);
}

.testimonial-author span {
  color: var(--gray-color);
  font-size: 14px;
}

/* Page Banner */
.page-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(29, 21, 124, 0.85) 0%, rgba(60, 84, 148, 0.75) 100%);
  z-index: 1;
}

.page-banner .container {
  position: relative;
  z-index: 2;
}

.page-banner h1 {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-banner .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
}

@media only screen and (max-width: 768px) {
  .page-banner {
    height: 40vh !important;
    margin-top: 100px !important;
  }

  .page-banner h1 {
    font-size: 2rem;
  }

  .page-banner .lead {
    font-size: 1rem;
  }

  /* Reduce excessive padding on mobile */
  .padding-medium,
  .padding-large,
  .padding-small {
    padding-top: 4em !important;
    padding-bottom: 4em !important;
  }

  .margin-medium,
  .margin-large,
  .margin-small {
    margin-top: 4em !important;
    margin-bottom: 4em !important;
  }

  /* Adjust features section position on mobile */
  #features {
    position: relative !important;
    left: 0 !important;
    transform: none !important;
    padding-top: 3em !important;
    padding-bottom: 3em !important;
  }

  /* Hero Slider Mobile */
  section#slider .banner-content {
    width: 90% !important;
  }

  /* Adjust facility block positioning */
  .facility-block {
    width: 90% !important;
    position: relative !important;
    transform: none !important;
    left: 0 !important;
    top: 0 !important;
    margin-bottom: 2rem !important;
  }

  /* About section spacing */
  #about {
    padding-top: 3em !important;
  }
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}