/* ========== Global Reset & Base Styles ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #F0E9D2;
  color: #181D31;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Logo Animation - Initial Hidden State ========== */
.header-bar {
  padding: 10px;
  background-color: #181D31;
  color: #fff;
}

.logo-left {
  display: flex;
  align-items: center;
  width: 100%;
}

.logo-left img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
}

.logo-left img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.title-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-text .hke-text {
  font-size: 1.2em;
  font-weight: bold;
}

.estd {
  margin-left: auto;
  font-size: 1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  color: #ffffff;
  text-align: right;
}

/* Mobile Responsive: Center it properly */
@media (max-width: 768px) {
  .estd {
    margin-left: 0;
    margin-right: 0;
    text-align: center;
    display: block;
    width: 100%;
    margin-top: 10px;
  }
}



/* ========== Footer Specific Styles ========== */
footer p {
  text-align: center;
  font-size: 14px;
  margin: 0.5rem 0 0;
}

/* ========== Responsive Styles ========== */
@media (max-width: 768px) {
  .header-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .logo-left {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .title-text .hke-text {
    font-size: 13px;
  }

  .title-text .college-name {
    font-size: 15px;
  }

  .estd-text {
    text-align: center;
    font-size: 13px;
  }
}

/* ========== Navigation Bar ========== */
nav {
  position: relative; 
  top: 0;
  left: 0;
  width: 100%;
  background-color: #678983;
  box-shadow: none;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
}

nav.fixed {
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
 
}

/* Flex container for main nav items */
nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0.5rem;
  position: relative;
  opacity: 1;
  transform: none;
}

/* Nav Links */
nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: none !important;
  animation: none !important;
}

/* Nav Hover Effects */
nav a:hover {
  color: #E6DDC4;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transform: scale(1.05);
  
}

/* ========== Dropdown Menu ========== */
nav ol {
  position: absolute;
  top: 100%;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  background: #181D31;
  padding: 0.25rem;
  list-style: none;
  min-width: 180px;
  border-radius: 6px;
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Show dropdown on hover */
nav li:hover > ol {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
 
}

/* Dropdown Items */
nav ol li {
  margin: 0.3rem 0;
}

/* Dropdown Links */
nav ol li a {
  display: block;
  padding: 0.5rem 1rem;
  color: #fff;
  transition: background-color 0.3s ease;
}

nav ol li a:hover {
  color: #E6DDC4;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  }

/* ========== Wide Dropdown (for mega menu) ========== */
nav ol.spreadwide.about {
  column-count: 1;
  column-gap: 20px;
  min-width: 200px;
}

/* Target only the Departments dropdown to be 2-column */
nav ol.spreadwide.department {
  column-count: 2 !important;
  column-gap: 20px !important;
  min-width: 300px !important;
}



marquee a:hover {
    color: red; /* change to your preferred hover color */
  }

/* About-college */
.justified {
  text-align: justify;
}

.container-box {
  background: #fff;
  padding: 30px;
  margin: 40px auto;
  max-width: 1000px;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Courses */ 
/* Scrollable table on mobile */
.table-responsive-container {
  width: 100%;
  overflow-x: auto;
}

/* Keep table structured */
.table-responsive-container {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: center;
}


/* Even row background */
.container-box table tbody tr:nth-child(even) {
  background-color: #f7f7f7;
}

/* Alignment rules */
.container-box table td,
.container-box table th {
  text-align: center;
}

/* Mobile: Center content */
@media (max-width: 768px) {
  .container-box table th,
  .container-box table td {
    text-align: center;
  }
}

/* Students Admitted */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
  }

  table thead {
    background-color: #678983;
    color: white;
  }

  table th,
  table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
  }

  table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
  }

  table a {
    color: #678983;
    font-weight: 500;
    text-decoration: none;
  }

  table a:hover {
    text-decoration: underline;
  }

  h2 {
    color: #678983;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  @media screen and (max-width: 768px) {
    table, thead, tbody, th, td, tr {
      display: block;
    }

    thead {
      display: none;
    }

    tr {
      margin-bottom: 1rem;
      border: 1px solid #ccc;
      border-radius: 5px;
      padding: 10px;
      background-color: #fff;
    }

    td {
      padding: 8px;
      text-align: right;
      position: relative;
    }

    td::before {
      content: attr(data-label);
      float: left;
      font-weight: bold;
      color: #444;
    }
  }

  /* Click here */
  .admission-link:link,
.admission-link:visited {
  color: #007BFF;
  text-decoration: none;
}
.admission-link:hover {
  color: #0056b3;
  text-decoration: underline;
}
.admission-link:active {
  color: #003f7f;
}


  /* Forensic Medicine */
  .container-box {
  padding: 20px;
}

.section-heading {
  font-size: 28px;
  font-weight: bold;
  color: #181D31;
  margin-bottom: 20px;
}

.content-box {
  max-width: 1000px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.common-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 15px;
}

.common-table thead {
  background-color: #678983;
  color: white;
}

.common-table th,
.common-table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
}

.common-table td img.faculty-photo {
  width: 80px;
  height: auto;
  border-radius: 6px;
}

/* Department of Psychiatry */
.container-box {
  padding: 20px;
}

.section-heading {
  font-size: 28px;
  font-weight: bold;
  color: #181D31;
  margin-bottom: 20px;
}

.content-box {
  max-width: 1000px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.common-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 1rem;
}

.common-table thead {
  background-color: #678983;
  color: white;
}

.common-table th,
.common-table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
}

.common-table td img.faculty-photo {
  width: 80px;
  height: auto;
  border-radius: 6px;
}

/* Skin & VD */
.container-box {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', sans-serif;
}

.section-heading {
  font-size: 2rem;
  color: #181D31;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
}

.content {
  background: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.content p {
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #333;
}

.content h3 {
  text-align: center;
  color: #181D31;
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
}

.table-responsive {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

thead {
  background-color: #678983;
  color: white;
}

th, td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

td:nth-child(2) {
  text-align: left;
}

img {
  width: 80px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
  .container-box {
    padding: 1rem;
  }

  .section-heading {
    font-size: 1.5rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    font-size: 14px;
    padding: 8px;
  }

  img {
    width: 60px;
  }
}

/* Gallery */
/* Container wrapper */
.container-box {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', sans-serif;
}

/* Section heading */
.section-heading {
  font-size: 2rem;
  color: #181D31;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
}

/* Album card */
.album {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.album h2 {
  color: #678983;
  font-size: 1.5rem;
  text-align: center;
  margin: 1rem 0 0.5rem;
}

.album p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
  text-align: center;
  margin: 0.5rem 0 1rem;
}

/* Gallery/thumbnails */
.media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.media img,
.media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.media img:hover,
.media video:hover {
  transform: scale(1.03);
}


/* Gallery thumbnails for hover‑detail viewists */
.gallery-thumb {
  width: 180px;
  height: 120px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.3s;
}

.gallery-thumb:hover {
  transform: scale(1.05);
}

/* Responsive breakpoints (mobile‑first) */
@media screen and (min-width: 600px) {
  .media img,
  .media video {
    flex: 1 0 calc((100% - 12px) / 2);
  }
}

@media screen and (min-width: 900px) {
  .media img,
  .media video {
    flex: 1 0 calc((100% - 24px) / 3);
  }
}

@media screen and (min-width: 1200px) {
  .media img,
  .media video {
    flex: 1 0 calc((100% - 36px) / 4);
  }
}

/* Reduce spacing for tighter mobile screens for better UX */
@media screen and (max-width: 500px) {
  .container-box {
    margin: 1rem auto;
    padding: 0.5rem;
  }

  .section-heading {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }

  .album {
    padding: 1rem;
  }
}

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox img {
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.lightbox .controls {
  margin-top: 15px;
  display: flex;
  gap: 20px;
}

.lightbox .controls button {
  background: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.lightbox .close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 2.5rem;
  background: none;
  color: #fff;
  border: none;
  cursor: pointer;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .media img,
  .media video {
    width: 100%;
    height: auto;
  }

  .album h2 {
    font-size: 1.3rem;
  }

  .lightbox .controls {
    flex-direction: column;
  }
}



/* ========== Section Slide Animations ========== */
.section {
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
  will-change: transform, opacity;
}

/* Slide from Left */
.section.fly-in-left {
  transform: translateX(-100px);
}
.section.fly-in-left.in-view {
  transform: translateX(0);
  opacity: 1;
}

/* Slide from Right */
.section.fly-in-right {
  transform: translateX(100px);
}
.section.fly-in-right.in-view {
  transform: translateX(0);
  opacity: 1;
}

/* Accessibility: disable animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .section,
  .section.fly-in-left,
  .section.fly-in-right {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Default banner style */
.banner {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  height: 500px;
  width: 100%;
  opacity: 0;
  transform: translateY(-60px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
  will-change: transform, opacity;
}

/* Optional: show banner after page load */
.banner.slide-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: Disable animation if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .banner {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .banner {
    height: 100vh; /* Full height on mobiles */
  }
}

@media (max-width: 480px) {
  .banner {
    background-size: 100% 100%; /* Stretch on very small screens */
  }
}


   /* ========== Main Content Area ========== */
main {
  padding: 2rem;
}

section {
  background-color: #ffffff;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Content Wrapper */
.content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Headings */
h2, h4 {
  color: #181D31;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

/* Text Alignment */
p, li, .recognition ul {
  text-align: justify;
}

/* ========== Responsive Grid Layout ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Card Design with Animation */
.card {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== News Scroller ========== */
.news-container {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  }

/* Click Here */
a.click-here-link {
  color: #007bff; /* Base blue color */
  text-decoration: underline;
  transition: color 0.2s ease; /* smooth transition */
}

a.click-here-link:hover,
a.click-here-link:focus {
  color: #0056b3; /* Darker shade on hover or focus */
  outline: none;
  /* Optionally add a custom focus style like: */
  /* box-shadow: 0 0 0 3px rgba(0,123,255,0.5); */
}


/* ========== Map Section ========== */
.map {
  text-align: center;
  margin-top: 2rem;
}

/* ===== Back to Top Button (Redefined) ===== */
#backToTop {
  position: fixed;
  bottom: 2.5rem;  /* 40px */
  right: 2rem;     /* 30px */
  z-index: 999;
  width: 48px;
  height: 48px;
  font-size: 20px;
  background-color: #678983;
  color: #fff;
  border: none;
  outline: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop:hover {
  background-color: #3D5656;
  transform: scale(1.1);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

/* ========== Footer ========== */
footer {
  background-color: #181D31;
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 16px;
  line-height: 1.6;
}

/* Social Icons Container */
.footer-icons {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Common Link Style */
.footer-icons a,
footer .social-links a {
  color: #ffffff;
  font-size: 1.5rem;
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer-icons a:hover,
footer .social-links a:hover {
  color: #00ADB5;
  transform: scale(1.15) rotate(6deg);
}

/* Footer Text */
footer p {
  margin-top: 0.5rem;
  font-size: 18px;
  text-align: center;
}

.footer-link {
  color: #007BFF;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #0056b3;
}


/* ========== Hamburger Menu Button ========== */
.hamburger {
  display: none;
  font-size: 1.6rem;
  color: white;
  padding: 0.75rem 1rem;
  cursor: pointer;
  background-color: #678983;
  border: none;
  width: 100%;
  text-align: right;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

.hamburger:hover {
  background-color: #4e6d60;
}

/* Show hamburger & mobile nav styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background-color: #678983;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    position: relative;
  }

  nav ul li a {
    display: block;
    width: 100%;
  }

  nav ul li:hover .dropdown {
    display: block;
    position: relative;
  }

  .dropdown {
    display: none;
    flex-direction: column;
    background-color: #809b8f;
    padding: 0;
    width: 100%;
  }

  .dropdown a {
    padding: 10px;
    color: white;
    text-decoration: none;
    display: block;
    text-align: center;
  }

  .dropdown a:hover {
    background-color: #506a61;
  }
}




