:root {
  --primary-color: #0c2781ff;
  --secondary-color: #e8f0ff;
  --accent-color: #ffc107;
  --dark-color: #0a1f66;
  --light-color: #f5f9ff;
}

html,
body {
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background-color: var(--light-color);
  background: linear-gradient(135deg, #f5f9ff 0%, #e8f0ff 100%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--dark-color);
}

::selection {
  background-color: var(--accent-color);
  color: white;
}

::-moz-selection {
  background-color: var(--accent-color);
  color: white;
}

/* Notice and Tender Boxes - Equal Height */
.notice-box, .tender-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(12, 39, 129, 0.1);
  transition: all 0.3s ease;
  height: 400px; /* Same fixed height */
  border-left: 5px solid var(--primary-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notice-box:hover, .tender-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(12, 39, 129, 0.15);
}

.notice-box h4, .tender-box h4 {
  color: var(--primary-color);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  margin-bottom: 15px;
}

.notice-box marquee, .tender-box marquee {
  flex-grow: 1;
  min-height: 300px;
}

.notice-box .pt-2, .tender-box .pt-2 {
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.notice-box a, .tender-box a {
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.notice-box a:hover, .tender-box a:hover {
  color: var(--primary-color);
}

/* Slider Section - Equal Height */
.banner_sec {
  height: 400px; /* Same fixed height */
}

#carouselExampleIndicators {
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(12, 39, 129, 0.15);
}

.carousel-inner, .carousel-item {
  height: 100%;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 5s ease;
}

.carousel-item.active img {
  transform: scale(1.1);
}

.carousel-indicators {
  bottom: 15px;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.carousel-indicators .active {
  background-color: white;
  border-color: var(--accent-color);
  transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(12, 39, 129, 0.7);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 15px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: var(--primary-color);
}

/* Principal's Message Section - Redesigned */
.principal-section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgba(12, 39, 129, 0.03) 0%, 
    rgba(255, 255, 255, 0.1) 100%);
}

.principal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(12, 39, 129, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(12, 39, 129, 0.05) 0%, transparent 50%);
  z-index: 0;
}

.principal-section .container {
  position: relative;
  z-index: 1;
}

.principal-container {
  background: linear-gradient(145deg, #ffffff, #f5f9ff);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(12, 39, 129, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(12, 39, 129, 0.1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.principal-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    #0c2781ff, 
    #ffc107, 
    #0c2781ff);
  z-index: -1;
  border-radius: 22px;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: borderGlow 4s linear infinite;
}

.principal-container:hover::before {
  opacity: 1;
}

@keyframes borderGlow {
  0%, 100% {
    filter: blur(0px);
    opacity: 0.3;
  }
  50% {
    filter: blur(8px);
    opacity: 0.6;
  }
}

.principal-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
  min-height: 450px;
}

/* Left Side - Profile Card with Floating Animation */
.principal-profile {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(12, 39, 129, 0.9) 0%, 
    rgba(10, 31, 102, 0.95) 100%);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.principal-profile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="white" opacity="0.05"><path d="M0,50 Q25,40 50,50 T100,50 L100,100 L0,100 Z"/></svg>'),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="white" opacity="0.03"><circle cx="10" cy="10" r="5"/><circle cx="90" cy="90" r="5"/><circle cx="90" cy="10" r="5"/><circle cx="10" cy="90" r="5"/></svg>');
  background-size: cover, 50px;
  animation: backgroundFloat 20s linear infinite;
}

@keyframes backgroundFloat {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 100px 100px, 50px 50px;
  }
}

.profile-image-container {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  padding: 6px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  position: relative;
  margin-bottom: 25px;
  animation: float 6s ease-in-out infinite;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(1deg);
  }
}

.profile-image-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: linear-gradient(45deg, 
    transparent, 
    rgba(255, 193, 7, 0.4), 
    transparent);
  animation: rotate 8s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.profile-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-color);
  font-size: 24px;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.6);
  }
}

.principal-info {
  position: relative;
  z-index: 1;
}

.principal-info h3 {
  color: white;
  font-size: 24px;
  margin-bottom: 8px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.principal-designation {
  color: #ffc107;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
  letter-spacing: 1px;
}

.principal-college {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.5;
  max-width: 200px;
  margin: 0 auto;
}

/* Right Side - Message with Typing Animation */
.principal-message-container {
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.message-header {
  position: relative;
  margin-bottom: 30px;
}

.message-header h2 {
  font-size: 36px;
  color: var(--dark-color);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.message-header h2::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 2px;
  animation: lineExpand 1.5s ease-out forwards;
}

@keyframes lineExpand {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

.message-subtitle {
  color: var(--primary-color);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  opacity: 0.8;
}

.message-content {
  position: relative;
}

.quote-icon {
  position: absolute;
  top: -20px;
  left: -30px;
  font-size: 80px;
  color: rgba(12, 39, 129, 0.1);
  font-family: 'Playfair Display', serif;
  z-index: 0;
}

.message-text {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
  text-align: justify;
}

/* Typing Animation Effect */
.typing-animation {
  position: relative;
}

.typing-animation::after {
  content: '|';
  position: absolute;
  right: -10px;
  color: var(--primary-color);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.principal-signature {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid rgba(12, 39, 129, 0.1);
  position: relative;
}

.signature-image {
  height: 60px;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.signature-name {
  font-size: 20px;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.signature-title {
  color: #666;
  font-size: 14px;
  font-style: italic;
}

/* Floating Elements Animation */
.floating-element {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(12, 39, 129, 0.1);
  border-radius: 50%;
  animation: floatAround 20s linear infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: -5s;
  width: 15px;
  height: 15px;
}

.floating-element:nth-child(3) {
  bottom: 30%;
  left: 20%;
  animation-delay: -10s;
  width: 25px;
  height: 25px;
}

@keyframes floatAround {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, 20px) rotate(90deg);
  }
  50% {
    transform: translate(0, 40px) rotate(180deg);
  }
  75% {
    transform: translate(-20px, 20px) rotate(270deg);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .principal-grid {
    grid-template-columns: 1fr;
  }
  
  .principal-profile {
    padding: 40px 20px;
    flex-direction: row;
    text-align: left;
    gap: 30px;
  }
  
  .profile-image-container {
    width: 150px;
    height: 150px;
    margin-bottom: 0;
  }
  
  .principal-message-container {
    padding: 40px 30px;
  }
  
  .message-header h2 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .principal-profile {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .profile-image-container {
    width: 140px;
    height: 140px;
  }
  
  .principal-message-container {
    padding: 30px 20px;
  }
  
  .message-header h2 {
    font-size: 28px;
  }
  
  .message-text {
    font-size: 16px;
  }
  
  .quote-icon {
    font-size: 60px;
    left: -20px;
  }
}

@media (max-width: 576px) {
  .principal-section {
    padding: 60px 0;
  }
  
  .profile-image-container {
    width: 120px;
    height: 120px;
  }
  
  .profile-badge {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .message-header h2 {
    font-size: 24px;
  }
  
  .message-text {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* Counter Section */
.counter-section {
  background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.counter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="white" opacity="0.05"><path d="M0,0 L100,100 M100,0 L0,100"/></svg>');
  background-size: 50px;
}

.counter-item {
  text-align: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.counter-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-family: 'Playfair Display', serif;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.counter-label {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Gallery Section */
.gallery-section {
  padding: 80px 0;
  background-color: var(--light-color);
}

.gallery-title {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.gallery-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.gallery-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(12, 39, 129, 0.1);
  transition: all 0.4s ease;
  margin-bottom: 30px;
  border: none;
  background: white;
}

.gallery-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(12, 39, 129, 0.2);
}

.gallery-card img {
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s ease;
  width: 100%;
}

.gallery-card:hover img {
  transform: scale(1.15);
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, var(--light-color) 0%, white 100%);
  padding: 80px 0;
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%230c2781" opacity="0.03"><circle cx="50" cy="50" r="40"/></svg>');
  background-size: 100px;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #081a4d 100%);
  color: white;
  padding: 60px 0 20px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--accent-color), var(--primary-color));
}

.footer-logo img {
  height: 80px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-links h5 {
  color: var(--accent-color);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  font-weight: 600;
}

.footer-links h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

.footer-links ul {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-color);
  transform: translateX(5px);
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 45px;
  margin-right: 12px;
  transition: all 0.3s ease;
  font-size: 18px;
}

.social-icons a:hover {
  background-color: var(--accent-color);
  color: var(--dark-color);
  transform: translateY(-5px) rotate(10deg);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 25px;
  margin-top: 40px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Back to Top Button */
.back-to-top {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  border: none;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(12, 39, 129, 0.3);
  transition: all 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(12, 39, 129, 0.4);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(12, 39, 129, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(12, 39, 129, 0.3);
  background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(12, 39, 129, 0.2);
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  margin: 20px auto 30px;
  border-radius: 2px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .notice-box, .tender-box, .banner_sec {
    height: 350px;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
  }
  
  .counter-number {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .notice-box, .tender-box, .banner_sec {
    height: 300px;
    margin-bottom: 20px;
  }
  
  .principal-image {
    min-height: 250px;
    border-radius: 15px 15px 0 0;
  }
  
  .principal-image::after {
    border-radius: 15px 15px 0 0;
  }
  
  .counter-number {
    font-size: 42px;
  }
}

@media (max-width: 576px) {
  .notice-box, .tender-box, .banner_sec {
    height: 280px;
  }
  
  .notice-box marquee, .tender-box marquee {
    min-height: 200px;
  }
}
  .counter-number::after {
    content: "+";
    margin-left: 2px;
}