@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #4facfe;
  --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --secondary: #ff9a06;
  --secondary-gradient: linear-gradient(135deg, #ff9a06 0%, #ff5252 100%);
  --accent: #80cd33;
  --dark: #1a1a2e;
  --light: #f4f7f6;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --shadow-hover: 0 15px 40px 0 rgba(31, 38, 135, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 16px;
}

/* Global Typography & Resets */
body, h1, h2, h3, h4, h5, h6, p, a, span, div, input, button {
  font-family: 'Poppins', sans-serif !important;
}

body {
  background-color: var(--light) !important;
  color: #333;
}

/* Fix FontAwesome Override */
span.fa, i.fa, .fa, .fas, .fab {
  font-family: 'FontAwesome' !important;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700 !important;
  color: var(--dark);
}

.wthree-title {
  color: var(--dark) !important;
  font-weight: 800 !important;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 15px;
}

span.sub-line {
  color: var(--secondary) !important;
  font-weight: 700 !important;
  letter-spacing: 2px;
}
span.sub-line:before {
  background: var(--secondary) !important;
}

/* Header & Navigation */
header {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  position: fixed;
  width: 100%;
  z-index: 1000;
  top: 0;
  transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--dark) !important;
  font-weight: 500 !important;
  border-radius: 8px;
  margin: 0 5px;
  transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .active > .nav-link {
  background: var(--primary-gradient) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

a.navbar-brand.logo-box {
  background: var(--white) !important;
  padding: 5px 15px !important;
  display: inline-block;
  font-weight: 400 !important;
  letter-spacing: 2px;
  border-radius: 4px;
}
.logo-box span.l-1 { color: var(--accent) !important; }
.logo-box span.l-2 { color: var(--secondary) !important; }
.logo-box span.l-3 { color: #00bcd4 !important; }

/* Buttons */
.btn.bg-theme, .w3_pvt-link-bnr, .btn-w3_pvt {
  background: var(--primary-gradient) !important;
  color: var(--white) !important;
  border-radius: 30px !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4) !important;
  font-weight: 600 !important;
  letter-spacing: 1px;
  transition: var(--transition) !important;
}

.btn.bg-theme:hover, .w3_pvt-link-bnr:hover, .btn-w3_pvt:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.5) !important;
}

/* Cards & Glassmorphism */
.card, .w3ls-servgrid.card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-soft) !important;
  transition: var(--transition) !important;
  overflow: hidden;
}

.card:hover, .w3ls-servgrid.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: none !important;
}

/* Student Portal Sections (Login & Info) */
#login_div, #user_div {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem !important;
  margin-top: 1rem;
}

#login_div p b {
  color: var(--dark);
}

.loggedin-div .card .col-md-12 {
  background: var(--primary-gradient) !important;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

/* Inputs */
input.form-control, select.custom-select, textarea.form-control {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid transparent !important;
  border-radius: 10px !important;
  padding: 12px 15px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
  transition: var(--transition) !important;
}

input.form-control:focus, select.custom-select:focus, textarea.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.2) !important;
  outline: none !important;
}

/* Custom Table Styles */
.table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.table thead th {
  background: var(--primary-gradient);
  color: white;
  border: none;
}
.table td, .table th {
  border-top: 1px solid #f0f0f0;
  vertical-align: middle;
}

/* Register Container */
.container.z-depth-1 {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
}
.dark-grey-text {
  color: var(--dark) !important;
}

/* Section Padding adjustments for fixed header */
#home {
  margin-top: 80px;
}
section {
  padding: 5rem 0;
}
#student_dashboard {
  padding-top: 0 !important;
}

/* About Section Specifics */
.abt-pos {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  right: 2% !important;
  top: 5% !important;
  padding: 2.5rem !important;
  border: 1px solid var(--glass-border);
}
.abt-pos h3, .abt-pos h4 {
  color: var(--dark) !important;
  text-shadow: none !important;
}

/* Carousel Revamp */
.slider-info {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 40px !important;
  box-shadow: var(--shadow-hover);
  max-width: 600px;
}

.slider-info h3 {
  font-size: 3.2rem !important;
  color: var(--dark) !important;
  text-shadow: none !important;
  line-height: 1.2 !important;
  text-transform: capitalize !important;
  margin-bottom: 20px;
}

.slider-info h3 span {
  color: var(--primary) !important;
  border-bottom: 3px solid var(--secondary) !important;
  font-weight: 800;
}

.slider-info span.line {
  color: var(--secondary) !important;
  font-weight: 700;
  letter-spacing: 3px !important;
  margin-bottom: 15px !important;
  font-size: 1.1rem !important;
  text-transform: uppercase;
}

.slider-info p.text-white {
  color: #555 !important;
  font-size: 1.1rem !important;
  line-height: 1.6;
  margin-bottom: 30px;
  width: 100% !important;
  text-shadow: none !important;
}

.w3_pvt-link-bnr {
  background: var(--primary-gradient) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4) !important;
  border: none !important;
  transition: var(--transition);
}

.w3_pvt-link-bnr:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6) !important;
  color: var(--white) !important;
}

/* Gallery Hover */
.gallery-grid1 {
  overflow: hidden;
  border-radius: var(--border-radius);
}
.gallery-grid1 img {
  transition: var(--transition);
}
.gallery-grid1:hover img {
  transform: scale(1.1);
}

/* Footer */
.footer {
  position: relative;
  background: var(--dark) !important;
}
.footer:before {
  background: linear-gradient(to bottom, rgba(26,26,46,0.95), var(--dark)) !important;
}
.footer h2 a.navbar-brand, .footer p {
  color: var(--white) !important;
}

/* Testimonials Revamp */
.slide-left-wthree .card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border) !important;
  border-radius: 25px !important;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-hover);
}

.testi-img {
  text-align: center;
}

.testi-img img {
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
  padding: 6px;
  background: var(--primary-gradient);
  max-width: 140px;
  transition: var(--transition);
}

.testi-img img:hover {
  transform: scale(1.05);
}

.slide-left-wthree .carousel-caption {
  position: static !important;
  text-align: left;
  text-shadow: none !important;
  padding: 0 !important;
}

.slide-left-wthree .carousel-caption p.my-3 {
  font-size: 1.25rem !important;
  line-height: 1.8 !important;
  color: #4a5568 !important;
  font-weight: 500;
  font-style: italic;
  position: relative;
}

.slide-left-wthree .carousel-caption p.my-3::before {
  content: '\f10d';
  font-family: 'FontAwesome';
  font-size: 2rem;
  color: rgba(79, 172, 254, 0.2);
  position: absolute;
  top: -15px;
  left: -25px;
  z-index: -1;
}

.slide-left-wthree .carousel-caption p.text-theme {
  font-weight: 800 !important;
  font-size: 1.3rem !important;
  color: var(--primary) !important;
  margin-top: 1.5rem !important;
  letter-spacing: 1px;
}

.slide-left-wthree .navi {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.slide-left-wthree .navi a {
  background: var(--primary-gradient) !important;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  color: var(--white) !important;
  border: none !important;
}

.slide-left-wthree .navi a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  background: var(--secondary-gradient) !important;
}

/* Registration Page Revamp */
.register-body {
  background: linear-gradient(-45deg, #4facfe, #00f2fe, #ff9a06, #ff5252);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  min-height: 100vh;
}

.register-body .container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  padding: 3rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.slide-left-wthree .navi a .ico {
  font-size: 1.2rem;
}

/* Fix Input Cropping */
.form-control, .custom-select {
  height: auto !important;
  min-height: 48px !important;
  padding: 10px 15px !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 991px) {
  header {
    padding: 10px 0;
  }
  .navbar-collapse {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }
  .abt-pos {
    position: relative !important;
    width: 100% !important;
    right: auto !important;
    top: auto !important;
    margin-top: 2rem;
  }
  .banner {
    min-height: 60vh !important;
  }
  .slider-info {
    top: 25% !important;
    left: 5% !important;
  }
  .slider-info h3 {
    font-size: 2.5em !important;
  }
  .slider-info p {
    width: 90% !important;
    font-size: 1em !important;
  }
  .wthree-title {
    font-size: 1.8em !important;
  }
  section {
    padding: 3rem 0 !important;
  }
  .contact-form form .row .col-lg-4 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .slider-info h3 {
    font-size: 2em !important;
  }
  #login_div, #user_div {
    padding: 1.5rem !important;
  }
  .btn.bg-theme {
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
}

/* Utilities */
.img-fluid {
  border-radius: var(--border-radius);
}

/* Testimonials Contrast Fix */
.carousel-item p {
  color: var(--dark) !important;
  font-weight: 500;
}
.testi-img img {
  border: 4px solid var(--primary);
  background: white;
}

/* Registration Form Specifics */
.md-form label {
  text-align: left !important;
  display: block;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 5px;
}

/* Notices Contrast Fix */
.card-body p, .card-body ul li {
  color: var(--dark) !important;
  font-weight: 500;
}
.card-header.bg-theme2, .card-header.bg-theme1, .card-header.bg-theme3 {
  background: var(--primary-gradient) !important;
}
.card-header span.fa {
  color: var(--white) !important;
}
.card-body .text-theme2, .card-body .text-theme1, .card-body .text-theme3 {
  color: var(--primary) !important;
}

/* Animated Trophy for Achievers Board */
.animated-trophy {
  font-size: 2rem;
  color: gold;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  display: inline-block;
  animation: float-glow 2s ease-in-out infinite alternate;
}

@keyframes float-glow {
  0% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
  }
  100% {
    transform: translateY(-5px) scale(1.1);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 140, 0, 0.6);
  }
}
