/*
 * CLPT Redesign System - Main Stylesheet
 * Primary Color: #0F3C6E (University Blue)
 * Secondary Color: #F4B400 (Academic Gold)
 * Fonts: Poppins, Roboto
 */

:root {
  --primary-color: #0F3C6E;
  --primary-dark: #08284B;
  --primary-light: #1A5FA8;
  --secondary-color: #F4B400;
  --secondary-light: #FFD147;
  --secondary-dark: #D49C00;
  --text-dark: #1A1A1A;
  --text-gray: #555555;
  --bg-light: #F8FAFC;
  --white: #FFFFFF;
  --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --box-shadow-hover: 0 15px 35px rgba(15, 60, 110, 0.15);
  --border-radius: 12px;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background-color: var(--bg-light);
  font-size: 1.05rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--primary-light);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Top Bar */
.top-bar {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-contact a {
  color: var(--white);
  margin-right: 15px;
}

.top-bar-contact i {
  color: var(--secondary-color);
  margin-right: 5px;
}

.top-bar-links a {
  color: var(--white);
  margin-left: 15px;
  font-weight: 500;
}

.top-bar-links a:hover {
  color: var(--secondary-color);
}

/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  /* Smoother shadow */
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-main {
  padding: 12px 0;
  /* Slightly tighter padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-area img {
  height: 70px;
}

.institute-name {
  display: flex;
  flex-direction: column;
}

.institute-name h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
  line-height: 1.2;
}

.institute-name p {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.accreditations {
  display: flex;
  gap: 10px;
  align-items: center;
}

.accreditations img {
  height: 40px;
}

/* Main Navbar */
.main-nav {
  background-color: var(--primary-color);
}

.nav-menu {
  display: flex;
  justify-content: center;
  margin: 0;
}

.nav-menu>li {
  position: relative;
}

.nav-menu>li>a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 15px 20px;
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-menu>li>a:hover,
.nav-menu>li.active>a {
  background-color: var(--primary-dark);
  color: var(--secondary-color);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  min-width: 240px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transform: translateY(15px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-top: 3px solid var(--secondary-color);
  border-radius: 0 0 8px 8px;
  /* Rounded bottom */
  z-index: 1000;
}

.nav-menu li:hover .dropdown {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.dropdown li {
  border-bottom: 1px solid #eee;
}

.dropdown li:last-child {
  border-bottom: none;
}

.dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.dropdown a:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
  padding-left: 25px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  height: 650px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1576086213369-97a306d36557?q=80&w=2000&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  z-index: 1;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 850px;
  padding-left: 20px;
  border-left: 5px solid var(--secondary-color);
}

.hero-content h1 {
  color: var(--white);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 25px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 35px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-weight: 300;
  max-width: 700px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

/* Section Common */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
}

.section-bg-light {
  background-color: var(--white);
}

/* Card Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* Modern Card */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-hover);
}

.card-img {
  height: 220px;
  background-color: #e0e0e0;
  /* Placeholder */
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.3;
}

.card-title a {
  color: var(--primary-dark);
}

.card-title a:hover {
  color: var(--primary-color);
}

.card-text {
  color: var(--text-gray);
  margin-bottom: 20px;
  font-size: 0.95rem;
  /* Fixed typography error */
  flex-grow: 1;
  /* Pushes button to bottom */
}

/* Quick Links Strip (After Hero) */
.quick-links-strip {
  position: relative;
  z-index: 10;
  margin-top: -60px;
  /* Pull up over hero */
  padding: 0 15px;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--white);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.quick-link-item {
  padding: 30px 15px;
  text-align: center;
  border-right: 1px solid #f0f0f0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.quick-link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: 0;
}

.quick-link-item:last-child {
  border-right: none;
}

.quick-link-item:hover::before {
  height: 100%;
}

.quick-link-item:hover .ql-icon,
.quick-link-item:hover .ql-text {
  color: var(--white);
  transform: translateY(-3px);
  position: relative;
  z-index: 2;
}

.ql-icon {
  font-size: 2.2rem;
  color: var(--primary-light);
  margin-bottom: 15px;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.ql-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 60px 0 20px;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--white);
  opacity: 0.5;
}

.footer-logo {
  max-width: 250px;
  margin-bottom: 20px;
  background: white;
  padding: 10px;
  border-radius: 4px;
}

.footer-contact li {
  display: flex;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.footer-contact i {
  color: var(--secondary-color);
  margin-top: 5px;
  margin-right: 15px;
}

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

.footer-links a {
  color: #ccc;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #aaa;
}

/* Admin Specific Overrides */
.admin-body {
  background-color: #f4f6f9;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background-color: var(--primary-dark);
  color: white;
  transition: var(--transition);
}

.admin-sidebar .logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .logo h2 {
  color: white;
  font-size: 1.2rem;
  margin: 0;
}

.admin-menu {
  padding: 20px 0;
}

.admin-menu a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.admin-menu a i {
  width: 20px;
  margin-right: 10px;
}

.admin-menu a:hover,
.admin-menu a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-left: 3px solid var(--secondary-color);
}

.admin-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: white;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-main {
  padding: 20px;
  flex: 1;
}

/* Forms & Tables */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(15, 60, 110, 0.2);
}

.admin-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.admin-table th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--primary-dark);
}

.admin-table tr:hover {
  background-color: #f9f9f9;
}

/* Alerts */
.alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 992px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-links-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 65vh;
    overflow-y: auto;
    background-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    justify-content: flex-start;
  }

  .nav-menu>li {
    width: 100%;
  }

  .nav-menu>li>a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
  }

  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: none;
    width: 100%;
    border-radius: 0;
    border-top: none;
    background-color: var(--primary-dark);
  }

  .dropdown a {
    color: var(--white);
    padding: 12px 20px 12px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .dropdown a:hover {
    background-color: transparent;
    color: var(--secondary-color);
  }

  .nav-menu li:hover .dropdown,
  .nav-menu li:focus-within .dropdown {
    display: block;
  }
}

@media (max-width: 768px) {
  .header-main {
    flex-direction: row;
    align-items: center;
  }

  .institute-name h1 {
    font-size: 1.2rem;
  }

  .institute-name h2 {
    font-size: 0.8rem;
    margin-bottom: 0;
  }

  .institute-name p {
    display: none;
  }

  .accreditations img {
    height: 30px;
  }

  .logo-area img {
    height: 50px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .top-bar-container {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 576px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .quick-links-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}