:root {
  --primary1: #B9375D;  
  --primary2: #D25D5D;   
  --primary3: #E7D3D3;  
  --white:    #EEEEEE;   
  --dark-text: #222;     
  --bg-light: var(--white);
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-light);
  color: var(--dark-text);
  margin: 0;
  padding: 0;
}

/* Header */
.school-header {
  background-color: var(--primary2);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 2px solid #ccc;
  margin-bottom: 0;
}
.school-header .institute-tag {
  text-align: right;
  margin-left: auto;
}
.school-logo {
  height: 60px;
  margin-right: 10px;
  border-radius: 50%;
}
.institute-tag {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  color: var(--white);
}

/* Logo Glow */
.glow-logo {
  filter: drop-shadow(0 0 6px #000);
  transition: transform 0.6s ease;
}
.glow-logo:hover {
  transform: scale(1.09);
}

/* Navigation Styling */
.main-nav {
  background-color: var(--primary1);
  padding: 10px 0;
  border-top: 2px solid #eee;
  transition: top 0.3s ease, background-color 0.3s ease;
}
.main-nav.scrolled {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 100%;
  background-color: var(--primary1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
body.nav-scrolled {
  padding-top: calc(var(--main-nav-height, 60px));
}
.nav-links,
.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-links li a,
.navbar-nav .nav-link {
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}
.nav-links li a:hover,
.nav-links li a.active,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--primary3);
}
.navbar-nav .nav-link i {
  color: var(--white);
  transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover i,
.navbar-nav .nav-link:focus i {
  color: var(--primary3);
}

/* Dropdown */
.dropdown-menu {
  background-color: var(--primary3);
  border: none;
}
.dropdown-menu .dropdown-item {
  color: var(--black);
  transition: background-color 0.3s, color 0.3s;
}
.dropdown-menu .dropdown-item:hover {
  background-color: var(--primary2);
  color: var(--white);
}

/* College */
.college-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
}
.college-building-img {
  display: block;
  margin: 3rem auto;    /* top/bottom margin 3rem; left/right auto to center */
  padding: 30px 10px;
  max-width: 1400px;
  width: 100%;           /* adjust width as needed */
  max-height: 550px;
  object-fit: fill;
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.college-building-img:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Links Marquee */
.links-marquee {
  position: relative;
  overflow: hidden;
  height: 400px;
}
.links-marquee ul {
  position: absolute;
  bottom: 0;
  width: 100%;
  animation: scroll-links-up 10s linear infinite;
}
.links-marquee li {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}
.links-marquee:hover ul {
  animation-play-state: paused;
}
@keyframes scroll-links-up {
  0% { transform: translateY(100%); }
  100% { transform: translateY(-100%); }
}
.links-marquee a {
  text-decoration: none;
  color: var(--white);
  position: relative;
}
.links-marquee a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary2);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}
.links-marquee a:hover::after,
.links-marquee a:focus::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Footer */
footer {
  background-color: var(--primary1);
  color: var(--white);
  text-align: center;
  padding: 10px 5px;
  margin-top: 30px;
  font-size: 15px;
  line-height: 1.6;
}
footer p {
  margin: 0 auto 10px;
  max-width: 800px;
  text-align: center;
}
footer .social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}
footer .social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  font-size: 20px;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}
.footer-text a {
  color: var(--primary3);
  text-decoration: none;
  transition: color 0.3s ease;
}
footer .social-icons a:hover,
.footer-text a:hover {
  color: var(--white);
  transform: scale(1.1);
}

/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary2);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 1000;
}
#backToTop:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background-color: var(--primary3);
  color: #000;
}

/* About Link */
.about-link {
  margin-top: 10px;
  display: inline-block;
  padding: 10px 10px;
  background-color: var(--primary2);
  color: var(--white);
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}
.about-link:hover {
  background-color: var(--primary3);
  color: #000;
}

/* News Marquee */
.news-marquee {
  position: relative;
  overflow: hidden;
  height: 4rem;
  color: var(--white);
}
.news-marquee ul {
  position: absolute;
  bottom: 0;
  width: 100%;
  animation: scroll-up 6s linear infinite;
}
.news-marquee li {
  display: block;
  padding: 0.5rem 1rem;
}
.news-marquee:hover ul {
  animation-play-state: paused;
}
@keyframes scroll-up {
  0% { transform: translateY(100%); }
  100% { transform: translateY(-100%); }
}
.marquee-link {
  position: relative;
  text-decoration: none;
  color: inherit;
}
.marquee-link::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary2);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}
.marquee-link:hover::after,
.marquee-link:focus::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* About College Section */
.container,
.box-container {
  max-width: 70rem;
  padding: 1.5rem;
  margin: 2rem auto;
  background-color: var(--primary2);
  color: var(--white);
  border: 1px solid #CCCCCC;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  line-height: 1.6;
  word-wrap: break-word;
  text-align: justify;
}

.box-container h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: bold;
  text-align: center;
}

.box-container h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
}

.box-container p {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.box-container ul {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.5em;
}

.box-container li {
  margin-bottom: 0.75em;
}

.box-container strong {
  color: inherit;
  font-weight: 600;
}

/* Focus state for accessibility */
.box-container:focus-within {
  outline: 3px solid var(--primary1);
  outline-offset: 4px;
}

/* Courses */
/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  color: #ffffff;
}

table th,
table td {
  border: 1px solid #000000;
  padding: 10px;
  text-align: left;
}

.box-container table {
  margin: 0 auto;              
  border-collapse: collapse;  
}

/* Center text in all header and body cells */
.box-container table th,
.box-container table td {
  text-align: center;         
  vertical-align: middle;     
  padding: 0.75rem 0.5rem;    
}

/* (Optional) Add subtle separation between numeric intake values */
.box-container table td:nth-child(3) {
  font-weight: 500;
}

/* Teaching Staff */
.staff-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  background: linear-gradient(to right, #D16BA5, #86A8E7, #5FFBF1);  
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

.staff-table th,
.staff-table td {
  padding: 0.75rem 0.5rem;
  border: 1px solid rgb(0, 0, 0);
  text-align: center;           
  vertical-align: middle;
  overflow: visible;
}

.staff-table th {
  background:#D16BA5;
  font-weight: 600;
}

.staff-table tbody tr:nth-child(even) {
  background: linear-gradient(to right, #D16BA5, #86A8E7, #5FFBF1);  
}

.staff-table th:nth-child(2),
.staff-table td:nth-child(2) {
  text-align: left;
}

.staff-table th.photo,
.staff-table td.photo {
  text-align: center;
}

.staff-photo {
  width: 100px;
  height: 120px;
  object-fit: contain;
  border-radius: 12px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.staff-photo:hover {
  transform: scale(1.10);        
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
  z-index: 1;                    
}

/* Responsive mobile stacking */
@media (max-width: 600px) {
  .staff-table,
  .staff-table thead,
  .staff-table tbody,
  .staff-table th,
  .staff-table td,
  .staff-table tr {
    display: block;
    width: 100%;
  }

  /* Hide the desktop header */
  .staff-table thead { display: none; }

  .staff-table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #000000;
    border-radius: 8px;
    padding: 0.5rem;
    background: linear-gradient(to right, #D16BA5, #86A8E7, #5FFBF1);  
  }

  .staff-table td {
    position: relative;
    padding: 0.75rem 1rem 0.75rem 50%;
    text-align: center; /* center all values by default */
    border: none;
    border-bottom: 1px solid #ddd;
    min-height: 40px;
    word-wrap: break-word;
  }
  .staff-table td:last-child {
    border-bottom: none;
  }

  /* Inject column labels on the left */
  .staff-table td::before {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    width: 45%;
    font-weight: 600;
    white-space: normal;
    text-align: left; /* labels appear left-aligned */
    font-size: 0.95rem;
    color: #333;
  }
  .staff-table td:nth-of-type(1)::before { content: "SL.No"; }
  .staff-table td:nth-of-type(2)::before { content: "Name"; }
  .staff-table td:nth-of-type(3)::before { content: "Designation"; }
  .staff-table td:nth-of-type(4)::before { content: "Department / Section"; }
  .staff-table td:nth-of-type(5)::before { content: "Photo"; }
  
  /* Center only the Name value (not its label) */
  .staff-table td:nth-of-type(2) {
    padding-left: 1rem !important;   /* pull the name in from the right edge */
    text-align: center !important;    /* this centers the actual staff name */
  }
  .staff-table td:nth-of-type(2)::before {
    /* keep the “Name” label at its normal left spot */
    left: 1rem !important;
    transform: none !important;
    width: auto;
    text-align: left;
  }

  /* photo cell tweaks remain unchanged */
  .staff-table td.photo {
    text-align: center;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem;
  }
  .staff-table .staff-photo {
    width: 100px;
    height: auto;
    margin-top: 0.5rem;
    object-fit: cover;
    border-radius: 10px;
    text-align: center;
  }
}

/* Reach Us  */
.contact-section {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1em;
  border: 2px solid #e2edf1;
  border-radius: 20px;
  background-color: var(--primary2);
  font-family: "Segoe UI", Arial, sans-serif;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.contact-photo {
  margin: 0 auto 1rem;
  width: 160px;
  height: 160px;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid #e2edf1;
}

.principal-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-style: normal;
  color: var(--white);
  line-height: 1.5;
  margin: 0 0 1em 0;
  padding: 0;
  min-width: 280px;
}

.principal-contact dt,
.principal-contact dd {
  width: 100%;
  max-width: 400px;
  text-align: center;
  margin: 0 0 0.75em 0 !important;
}

.principal-contact a {
  color: var(--primary1);
  text-decoration: none;
}

.principal-contact a:hover,
.principal-contact a:focus {
  color: var(--primary3);
}

@media (max-width: 480px) {
  .principal-contact dt,
  .principal-contact dd {
    width: 100%;
    margin-left: 0;
  }
}

/* Feedback */
.feedback-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem 1rem;
  background-color: var(--primary2);
  border: 2px solid #e2edf1;
  border-radius: 20px;
}

.feedback-container h2,
.feedback-container legend {
  color: var(--white);
  margin-bottom: 1rem;
}

.feedback-form fieldset {
  border: none;
}

.feedback-form .form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.feedback-form label {
  margin-bottom: 0.5em;
  font-weight: 600;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 0.8em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
}

.feedback-form textarea {
  min-height: 120px;
}

.feedback-form .submit-center {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 1.5rem auto 0;
  padding: 0.8em;
  font-size: 1rem;
  color: var(--white);
  background-color: var(--primary1);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.feedback-form .submit-center:hover {
  background-color: var(--primary3);
}

/* Responsive Navigation */
@media screen and (max-width: 991px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: var(--secondary);
    margin-top: 0.5rem;
    padding: 10px 20px;
    width: 100%;
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  /* Show the hamburger toggle */
  .hamburger {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1001;
  }

  /* White Home background in mobile menu */
  .nav-links.active li a.home {
    background-color: var(--black);
    color: var(--primary3) !important;
  }
}

/* Base hamburger styles */
.hamburger {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
  display: none;
}

/* Force hamburger lines to white */
.hamburger .menu-icon,
.hamburger .menu-icon::before,
.hamburger .menu-icon::after {
  background-color: var(--white);
}

/* ==================== */
/* Center Branding Only on Mobile (<= 768px) */
@media screen and (max-width: 768px) {
  .school-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .school-header .brand-wrap {
    width: 100%;
    text-align: center !important;
  }

  .school-logo,
  .college-name,
  .institute-tag {
    margin-left: auto;
    margin-right: auto;
  }
}
