/* =========================================================
   NAAC CRITERIA SPECIFIC STYLES
   ========================================================= */

/* Page Header */
.naac-header {
  background: linear-gradient(135deg, #26428b 0%, #1a3372 100%);
  position: relative;
  overflow: hidden;
}

.naac-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.05"><path d="M0,70 Q250,10 500,70 T1000,70 L1000,100 L0,100 Z"/></svg>');
  background-size: cover;
}

.naac-header .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.naac-header .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.naac-header .breadcrumb-item a:hover {
  color: white;
  text-decoration: underline;
}

.naac-header .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.7);
}

/* Main Content */
.naac-content {
  background-color: #f8f9fa;
  min-height: 600px;
}

/* Criteria Table */
.naac-criteria-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.naac-criteria-table th {
  background: linear-gradient(135deg, #26428b 0%, #1a3372 100%);
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: center;
  font-size: 1rem;
  border: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.naac-criteria-table td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  vertical-align: top;
  line-height: 1.5;
}

.naac-criteria-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.naac-criteria-table tbody tr:hover {
  background-color: #e9ecef;
  transition: background-color 0.3s ease;
}

/* Criteria Heading Rows */
.criteria-heading td {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #26428b;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1rem;
  border-left: 4px solid #26428b;
}

.criteria-heading:hover td {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}

/* Nested Tables */
.nested-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.85rem;
  border: 1px solid #dee2e6;
}

.nested-table th {
  background: #6495ed;
  color: white;
  font-weight: 600;
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #dee2e6;
}

.nested-table td {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  text-align: center;
  vertical-align: middle;
}

.nested-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.nested-table tbody tr:hover {
  background-color: #e3f2fd;
}

/* Links */
.naac-criteria-table a {
  color: #26428b;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.naac-criteria-table a:hover {
  color: white;
  background-color: #26428b;
  text-decoration: none;
  border-color: #26428b;
  transform: translateY(-1px);
}

.nested-table a {
  color: #1565c0;
  font-weight: 500;
}

.nested-table a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

/* Empty Cells */
.naac-criteria-table td:empty::before {
  content: "—";
  color: #999;
  font-style: italic;
}

/* PDF Icon for Links */
.naac-criteria-table a[href$=".pdf"]::after {
  content: " 📄";
  font-size: 0.9em;
  margin-left: 2px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .naac-criteria-table {
    font-size: 0.9rem;
  }

  .naac-criteria-table th,
  .naac-criteria-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 992px) {
  .naac-criteria-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .naac-criteria-table th,
  .naac-criteria-table td {
    min-width: 150px;
  }

  .criteria-heading td {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .naac-header h1 {
    font-size: 1.75rem;
  }

  .naac-header .lead {
    font-size: 1rem;
  }

  .naac-criteria-table {
    font-size: 0.85rem;
  }

  .nested-table {
    font-size: 0.8rem;
  }

  .naac-criteria-table a {
    padding: 0.15rem 0.3rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .naac-header {
    padding: 2rem 0;
  }

  .naac-header h1 {
    font-size: 1.5rem;
  }

  .department-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    margin-top: 1rem;
  }

  .internal-nav .navbar-nav {
    gap: 0.25rem;
  }

  .internal-nav .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }

  .section-card {
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .naac-header,
  .internal-nav,
  #backToTop {
    display: none !important;
  }

  .naac-criteria-table {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .naac-criteria-table th {
    background: #f0f0f0 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .criteria-heading td {
    background: #f5f5f5 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .naac-criteria-table a {
    color: black;
    text-decoration: underline;
  }

  .naac-criteria-table a[href$=".pdf"]::after {
    content: " (PDF)";
  }

  .naac-content {
    padding: 0;
  }
}

/* Animation for table rows */
@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.naac-criteria-table tbody tr {
  animation: fadeInRow 0.5s ease forwards;
}

.naac-criteria-table tbody tr:nth-child(1) {
  animation-delay: 0.1s;
}
.naac-criteria-table tbody tr:nth-child(2) {
  animation-delay: 0.2s;
}
.naac-criteria-table tbody tr:nth-child(3) {
  animation-delay: 0.3s;
}
.naac-criteria-table tbody tr:nth-child(4) {
  animation-delay: 0.4s;
}
.naac-criteria-table tbody tr:nth-child(5) {
  animation-delay: 0.5s;
}
.naac-criteria-table tbody tr:nth-child(6) {
  animation-delay: 0.6s;
}
.naac-criteria-table tbody tr:nth-child(7) {
  animation-delay: 0.7s;
}
.naac-criteria-table tbody tr:nth-child(8) {
  animation-delay: 0.8s;
}
.naac-criteria-table tbody tr:nth-child(9) {
  animation-delay: 0.9s;
}

/* Highlight current criteria in navigation */
.internal-nav .nav-link.active {
  color: #26428b;
  background: #e3f2fd;
  border-radius: 20px;
  position: relative;
}

.internal-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 80%;
  height: 3px;
  background: #26428b;
  border-radius: 2px;
  transform: translateX(-50%);
}

/* Department Icon for NAAC */
.naac-header .department-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 3rem;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.naac-header .department-icon:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

/* Section Card */
.naac-content .section-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #26428b;
  transition: transform 0.3s ease;
}

.naac-content .section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   CRITERIA 5 SPECIFIC STYLES (Add to existing naac-criteria.css)
   ========================================================= */

/* Fix for Criteria 5 specific table structure */
.naac-criteria-table td[rowspan] {
  vertical-align: middle;
  text-align: center;
}

/* Nested tables within nested tables */
.nested-table .nested-table {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.nested-table .nested-table th {
  background: #5a82d4;
  padding: 0.25rem 0.5rem;
}

.nested-table .nested-table td {
  padding: 0.25rem 0.5rem;
}

/* Empty cell styling */
.naac-criteria-table td:empty:not([colspan]):not([rowspan])::before {
  content: "—";
  color: #999;
  font-style: italic;
}

/* Special handling for complex nested structures */
.nested-table tr:empty {
  display: none;
}

/* Rowspan cells with centered content */
td[rowspan] {
  position: relative;
}

/* Ensure proper alignment for multi-row content */
td[rowspan] > * {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Fix for tables with many columns */
.nested-table[colspan="8"],
.nested-table[colspan="6"],
.nested-table[colspan="5"] {
  font-size: 0.8rem;
}

/* Responsive adjustments for complex tables */
@media (max-width: 1200px) {
  .nested-table[colspan="8"],
  .nested-table[colspan="6"],
  .nested-table[colspan="5"] {
    font-size: 0.75rem;
  }

  .nested-table .nested-table {
    font-size: 0.7rem;
  }
}

@media (max-width: 992px) {
  .naac-criteria-table td[rowspan] {
    min-width: 80px;
  }

  .nested-table th,
  .nested-table td {
    padding: 0.25rem;
  }
}

/* Print styles for complex tables */
@media print {
  .nested-table {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .nested-table .nested-table {
    font-size: 0.7rem;
  }

  td[rowspan] {
    background: #f5f5f5 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Icon for Criteria 5 */
.naac-header .department-icon .bi-people-fill {
  font-size: 3rem;
}

/* =========================================================
   NAAC CRITERIA SPECIFIC STYLES
   ========================================================= */

/* Page Header */
.naac-header {
  background: linear-gradient(135deg, #26428b 0%, #1a3372 100%);
  position: relative;
  overflow: hidden;
}

.naac-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.05"><path d="M0,70 Q250,10 500,70 T1000,70 L1000,100 L0,100 Z"/></svg>');
  background-size: cover;
}

.naac-header .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.naac-header .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.naac-header .breadcrumb-item a:hover {
  color: white;
  text-decoration: underline;
}

.naac-header .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.7);
}

/* Main Content */
.naac-content {
  background-color: #f8f9fa;
  min-height: 600px;
}

/* Criteria Table */
.naac-criteria-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.naac-criteria-table th {
  background: linear-gradient(135deg, #26428b 0%, #1a3372 100%);
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: center;
  font-size: 1rem;
  border: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.naac-criteria-table td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  vertical-align: top;
  line-height: 1.5;
}

.naac-criteria-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.naac-criteria-table tbody tr:hover {
  background-color: #e9ecef;
  transition: background-color 0.3s ease;
}

/* Criteria Heading Rows */
.criteria-heading td {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #26428b;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1rem;
  border-left: 4px solid #26428b;
}

.criteria-heading:hover td {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}

/* Criteria Sub-heading Rows (for 6.3.2, 6.3.3 in Criteria 6) */
.criteria-subheading td {
  background: linear-gradient(135deg, #f0f7ff 0%, #e1f0ff 100%);
  color: #26428b;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid #6495ed;
  border-top: 2px solid #dee2e6;
  border-bottom: 2px solid #dee2e6;
}

.criteria-subheading:hover td {
  background: linear-gradient(135deg, #e1f0ff 0%, #d0e7ff 100%);
}

/* Nested Tables */
.nested-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.85rem;
  border: 1px solid #dee2e6;
}

.nested-table th {
  background: #6495ed;
  color: white;
  font-weight: 600;
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #dee2e6;
}

.nested-table td {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  text-align: left;
  vertical-align: middle;
}

.nested-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.nested-table tbody tr:hover {
  background-color: #e3f2fd;
}

/* Double nested tables (tables within nested tables) */
.nested-table .nested-table {
  font-size: 0.8rem;
  margin: 0.5rem 0;
  background: white;
}

.nested-table .nested-table td {
  padding: 0.25rem 0.5rem;
  border: 1px solid #dee2e6;
}

.nested-table .nested-table tr:hover {
  background-color: #f0f7ff;
}

/* Links */
.naac-criteria-table a {
  color: #26428b;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.naac-criteria-table a:hover {
  color: white;
  background-color: #26428b;
  text-decoration: none;
  border-color: #26428b;
  transform: translateY(-1px);
}

.nested-table a {
  color: #1565c0;
  font-weight: 500;
}

.nested-table a:hover {
  color: #0d47a1;
  text-decoration: underline;
  background-color: #e3f2fd;
}

/* External links (different styling) */
.naac-criteria-table a[href^="http"]:not([href*="igceng.com"]) {
  color: #2e7d32;
  border-left: 3px solid #2e7d32;
  padding-left: 0.75rem;
}

.naac-criteria-table a[href^="http"]:not([href*="igceng.com"]):hover {
  color: white;
  background-color: #2e7d32;
  border-color: #2e7d32;
}

/* Empty Cells */
.naac-criteria-table td:empty::before {
  content: "—";
  color: #999;
  font-style: italic;
}

/* PDF Icon for Links */
.naac-criteria-table a[href$=".pdf"]::after {
  content: " 📄";
  font-size: 0.9em;
  margin-left: 2px;
}

/* Multiple links in one cell */
.naac-criteria-table td > a + br + a {
  margin-top: 0.5rem;
  display: inline-block;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .naac-criteria-table {
    font-size: 0.9rem;
  }

  .naac-criteria-table th,
  .naac-criteria-table td {
    padding: 0.5rem;
  }

  .criteria-heading td {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .criteria-subheading td {
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 992px) {
  .naac-criteria-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .naac-criteria-table th,
  .naac-criteria-table td {
    min-width: 150px;
  }

  /* Adjust column widths for mobile */
  .naac-criteria-table th:nth-child(1),
  .naac-criteria-table td:nth-child(1) {
    min-width: 100px;
  }

  .naac-criteria-table th:nth-child(3),
  .naac-criteria-table td:nth-child(3) {
    min-width: 200px;
  }

  .naac-criteria-table th:nth-child(4),
  .naac-criteria-table td:nth-child(4) {
    min-width: 120px;
  }

  .criteria-heading td {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .nested-table {
    font-size: 0.8rem;
  }

  .nested-table .nested-table {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .naac-header h1 {
    font-size: 1.75rem;
  }

  .naac-header .lead {
    font-size: 1rem;
  }

  .naac-criteria-table {
    font-size: 0.85rem;
  }

  .nested-table {
    font-size: 0.75rem;
  }

  .nested-table .nested-table {
    font-size: 0.7rem;
  }

  .naac-criteria-table a {
    padding: 0.15rem 0.3rem;
    font-size: 0.85rem;
  }

  .criteria-heading td {
    font-size: 0.95rem;
    padding: 0.5rem;
  }

  .criteria-subheading td {
    font-size: 0.9rem;
    padding: 0.4rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .naac-header {
    padding: 2rem 0;
  }

  .naac-header h1 {
    font-size: 1.5rem;
  }

  .department-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    margin-top: 1rem;
  }

  .internal-nav .navbar-nav {
    gap: 0.25rem;
  }

  .internal-nav .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }

  .section-card {
    padding: 1.5rem;
  }

  .naac-criteria-table {
    font-size: 0.8rem;
  }

  .nested-table {
    font-size: 0.7rem;
  }

  .nested-table .nested-table {
    font-size: 0.65rem;
  }

  /* Stack nested tables vertically on very small screens */
  .nested-table .nested-table {
    display: block;
    overflow-x: auto;
  }
}

/* Print Styles */
@media print {
  .naac-header,
  .internal-nav,
  #backToTop {
    display: none !important;
  }

  .naac-criteria-table {
    box-shadow: none;
    border: 1px solid #ddd;
    font-size: 10pt;
  }

  .naac-criteria-table th {
    background: #f0f0f0 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .criteria-heading td {
    background: #f5f5f5 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .criteria-subheading td {
    background: #f8f8f8 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .naac-criteria-table a {
    color: black;
    text-decoration: underline;
  }

  .naac-criteria-table a[href$=".pdf"]::after {
    content: " (PDF)";
  }

  .naac-content {
    padding: 0;
  }

  /* Break pages appropriately */
  .naac-criteria-table {
    page-break-inside: auto;
  }

  .criteria-heading {
    page-break-after: avoid;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}

/* Animation for table rows */
@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.naac-criteria-table tbody tr {
  animation: fadeInRow 0.5s ease forwards;
}

.naac-criteria-table tbody tr:nth-child(1) {
  animation-delay: 0.1s;
}
.naac-criteria-table tbody tr:nth-child(2) {
  animation-delay: 0.2s;
}
.naac-criteria-table tbody tr:nth-child(3) {
  animation-delay: 0.3s;
}
.naac-criteria-table tbody tr:nth-child(4) {
  animation-delay: 0.4s;
}
.naac-criteria-table tbody tr:nth-child(5) {
  animation-delay: 0.5s;
}
.naac-criteria-table tbody tr:nth-child(6) {
  animation-delay: 0.6s;
}
.naac-criteria-table tbody tr:nth-child(7) {
  animation-delay: 0.7s;
}
.naac-criteria-table tbody tr:nth-child(8) {
  animation-delay: 0.8s;
}
.naac-criteria-table tbody tr:nth-child(9) {
  animation-delay: 0.9s;
}
.naac-criteria-table tbody tr:nth-child(10) {
  animation-delay: 1s;
}
.naac-criteria-table tbody tr:nth-child(11) {
  animation-delay: 1.1s;
}
.naac-criteria-table tbody tr:nth-child(12) {
  animation-delay: 1.2s;
}

/* Highlight current criteria in navigation */
.internal-nav .nav-link.active {
  color: #26428b;
  background: #e3f2fd;
  border-radius: 20px;
  position: relative;
}

.internal-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 80%;
  height: 3px;
  background: #26428b;
  border-radius: 2px;
  transform: translateX(-50%);
}

/* Department Icon for NAAC */
.naac-header .department-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 3rem;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.naac-header .department-icon:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

/* Section Card */
.naac-content .section-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #26428b;
  transition: transform 0.3s ease;
}

.naac-content .section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Numbered lists within table cells */
.naac-criteria-table td ol,
.naac-criteria-table td ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.naac-criteria-table td li {
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* Line breaks in table cells */
.naac-criteria-table td br {
  margin-bottom: 0.5rem;
  display: block;
  content: "";
}

/* Fix for very long text in criteria name column */
.naac-criteria-table td:nth-child(2) {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Zebra striping for deeply nested tables */
.nested-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.nested-table .nested-table tr:nth-child(even) {
  background-color: #f0f7ff;
}

/* =========================================================
   ADDITIONAL STYLES FOR CRITERIA 7
   ========================================================= */

/* Fix for rowspan cells in nested tables */
.nested-table td[rowspan] {
  vertical-align: middle;
  text-align: center;
}

/* Style for links that open in new tab */
.naac-criteria-table a[target="_blank"]::after {
  content: " ↗";
  font-size: 0.8em;
  opacity: 0.7;
}

/* Special styling for external page links */
.naac-criteria-table a[href*="circulars-notifications"] {
  color: #0d6efd;
  font-weight: 600;
  border: 1px solid #0d6efd;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: #e7f1ff;
}

.naac-criteria-table a[href*="circulars-notifications"]:hover {
  background: #0d6efd;
  color: white;
  text-decoration: none;
}

/* Better alignment for text-justify cells */
.naac-criteria-table td[style*="text-align: justify"] {
  text-align: justify !important;
  line-height: 1.6;
}

/* Adjust column widths for Criteria 7 */
.naac-criteria-table th[style*="width: 5%"],
.naac-criteria-table td:first-child {
  text-align: center;
  font-weight: 600;
}

/* Special icon for Criteria 7 header */
.naac-header.criteria-7 .department-icon {
  background: linear-gradient(135deg, #0d6efd 0%, #0d6efd 100%);
}

.naac-header.criteria-7 {
  background: linear-gradient(135deg, #0d6efd 0%, #0d6efd 100%);
}

/* Highlight for environmental/green initiatives */
.environment-link {
  color: #0d6efd !important;
  font-weight: 600;
}

.environment-link:hover {
  color: white !important;
  background-color: #0d6efd !important;
}

/* Better spacing for multi-line content in criteria name column */
.naac-criteria-table td:nth-child(2) br {
  display: block;
  margin: 0.5rem 0;
  content: " ";
}

/* Responsive adjustments for Criteria 7 tables */
@media (max-width: 992px) {
  .naac-criteria-table th[style*="width: 5%"],
  .naac-criteria-table td:first-child {
    min-width: 80px;
  }

  .naac-criteria-table th[style*="width: 35%"],
  .naac-criteria-table td:nth-child(2) {
    min-width: 250px;
  }

  .naac-criteria-table th[style*="width: 40%"],
  .naac-criteria-table td:nth-child(3) {
    min-width: 300px;
  }

  .naac-criteria-table th[style*="width: 20%"],
  .naac-criteria-table td:nth-child(4) {
    min-width: 150px;
  }
}

/* Print styles for rowspan cells */
@media print {
  .nested-table td[rowspan] {
    border-bottom: 1px solid #ddd !important;
  }
}

/* Animation for Criteria 7 specific content */
@keyframes fadeInGreen {
  from {
    opacity: 0;
    transform: translateY(10px);
    background-color: rgba(76, 175, 80, 0.1);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    background-color: transparent;
  }
}

.naac-criteria-table tbody tr:nth-child(1) {
  animation: fadeInGreen 0.5s ease 0.1s forwards;
}
.naac-criteria-table tbody tr:nth-child(2) {
  animation: fadeInGreen 0.5s ease 0.2s forwards;
}
.naac-criteria-table tbody tr:nth-child(3) {
  animation: fadeInGreen 0.5s ease 0.3s forwards;
}
.naac-criteria-table tbody tr:nth-child(4) {
  animation: fadeInGreen 0.5s ease 0.4s forwards;
}
.naac-criteria-table tbody tr:nth-child(5) {
  animation: fadeInGreen 0.5s ease 0.5s forwards;
}
.naac-criteria-table tbody tr:nth-child(6) {
  animation: fadeInGreen 0.5s ease 0.6s forwards;
}
.naac-criteria-table tbody tr:nth-child(7) {
  animation: fadeInGreen 0.5s ease 0.7s forwards;
}
.naac-criteria-table tbody tr:nth-child(8) {
  animation: fadeInGreen 0.5s ease 0.8s forwards;
}

/* Styling for the "VIEW DOCUMENT" links in Additional Link column */
.naac-criteria-table td:nth-child(4) a {
  display: block;
  text-align: center;
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: #e3f2fd;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.naac-criteria-table td:nth-child(4) a:hover {
  background: #26428b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile optimization for Criteria 7 */
@media (max-width: 768px) {
  .naac-criteria-table td[style*="text-align: justify"] {
    text-align: left !important;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .naac-criteria-table td br {
    margin: 0.25rem 0;
  }

  .naac-criteria-table td:nth-child(4) a {
    padding: 0.35rem;
    font-size: 0.85rem;
  }
}

/* Touch-friendly links for mobile */
@media (hover: none) and (pointer: coarse) {
  .naac-criteria-table a {
    padding: 0.5rem;
    margin: 0.25rem 0;
    display: inline-block;
    min-height: 44px;
    min-width: 44px;
    line-height: 44px;
  }

  .nested-table a {
    min-height: 36px;
    min-width: 36px;
    line-height: 36px;
  }
}

/* =========================================================
   DVV (Data Validation and Verification) SPECIFIC STYLES
   ========================================================= */

/* DVV Table */
.dvv-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.dvv-table th[colspan="10"] {
  background: linear-gradient(135deg, #26428b 0%, #1a3372 100%);
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: center;
  font-size: 1.1rem;
  border: none;
}

.dvv-table th.criteria-head {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #26428b;
  font-weight: 800;
  font-size: 1rem;
  padding: 1rem;
  text-align: left;
  border-right: 2px solid #dee2e6;
  width: 150px;
  min-width: 150px;
  border-bottom: 1px solid #dee2e6;
}

.dvv-table td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #dee2e6;
  min-width: 80px;
}

.dvv-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.dvv-table tbody tr:hover {
  background-color: #e9ecef;
  transition: background-color 0.3s ease;
}

.dvv-table tbody tr:hover th.criteria-head {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}

/* DVV Links */
.dvv-table a {
  color: #26428b;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  background: #f8f9fa;
  margin: 0.1rem;
  min-width: 60px;
}

.dvv-table a:hover {
  color: white;
  background-color: #26428b;
  text-decoration: none;
  border-color: #26428b;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(38, 66, 139, 0.3);
}

.dvv-table td:has(> a) {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dvv-table td:empty::before {
  content: "—";
  color: #999;
  font-style: italic;
}

/* Multiple links in one cell */
.dvv-table td:has(br) {
  padding: 0.5rem;
}

.dvv-table td a + br + a {
  margin-top: 0.3rem;
}

/* PDF Icon */
.dvv-table a[href$=".pdf"]::after {
  content: " 📄";
  font-size: 0.9em;
  margin-left: 2px;
}

/* Empty cell styling */
.dvv-table td:empty {
  background: #f8f9fa;
  opacity: 0.6;
}

/* Responsive Design for DVV Table */
@media (max-width: 1200px) {
  .dvv-table {
    font-size: 0.9rem;
  }

  .dvv-table th.criteria-head {
    width: 130px;
    min-width: 130px;
    font-size: 0.95rem;
    padding: 0.75rem;
  }

  .dvv-table td {
    padding: 0.5rem;
    min-width: 70px;
  }

  .dvv-table a {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    min-width: 55px;
  }
}

@media (max-width: 992px) {
  .dvv-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .dvv-table th.criteria-head {
    position: sticky;
    left: 0;
    z-index: 5;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  }

  .dvv-table td {
    min-width: 80px;
  }
}

@media (max-width: 768px) {
  .dvv-table {
    font-size: 0.85rem;
  }

  .dvv-table th[colspan="10"] {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .dvv-table th.criteria-head {
    width: 100px;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .dvv-table td {
    padding: 0.4rem;
    min-width: 60px;
  }

  .dvv-table a {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    min-width: 50px;
  }

  .dvv-table td:has(br) {
    padding: 0.3rem;
  }
}

@media (max-width: 576px) {
  .dvv-table th[colspan="10"] {
    font-size: 0.95rem;
    padding: 0.6rem;
  }

  .dvv-table th.criteria-head {
    width: 90px;
    min-width: 90px;
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .dvv-table td {
    padding: 0.3rem;
    min-width: 55px;
  }

  .dvv-table a {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    min-width: 45px;
  }

  .dvv-table a[href$=".pdf"]::after {
    content: "";
  }

  .dvv-table a[href$=".pdf"]::before {
    content: "📄 ";
    font-size: 0.8em;
  }
}

/* Print Styles */
@media print {
  .dvv-table {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .dvv-table th[colspan="10"] {
    background: #f0f0f0 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .dvv-table th.criteria-head {
    background: #f5f5f5 !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-right: 1px solid #ddd;
  }

  .dvv-table a {
    color: black;
    text-decoration: underline;
    background: transparent;
    padding: 0;
    border: none;
  }

  .dvv-table a[href$=".pdf"]::after {
    content: " (PDF)";
  }
}

/* Animation for DVV table rows */
@keyframes fadeInDVVRow {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dvv-table tbody tr {
  animation: fadeInDVVRow 0.5s ease forwards;
}

.dvv-table tbody tr:nth-child(1) {
  animation-delay: 0.1s;
}
.dvv-table tbody tr:nth-child(2) {
  animation-delay: 0.2s;
}
.dvv-table tbody tr:nth-child(3) {
  animation-delay: 0.3s;
}
.dvv-table tbody tr:nth-child(4) {
  animation-delay: 0.4s;
}
.dvv-table tbody tr:nth-child(5) {
  animation-delay: 0.5s;
}
.dvv-table tbody tr:nth-child(6) {
  animation-delay: 0.6s;
}
.dvv-table tbody tr:nth-child(7) {
  animation-delay: 0.7s;
}
.dvv-table tbody tr:nth-child(8) {
  animation-delay: 0.8s;
}

/* Status indicator for missing documents */
.dvv-table td:empty::before {
  content: "—";
  color: #999;
  font-style: italic;
  font-size: 0.9em;
}

/* Hover effect for criteria headers */
.dvv-table th.criteria-head {
  position: relative;
  overflow: hidden;
}

.dvv-table th.criteria-head::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.dvv-table th.criteria-head:hover::after {
  left: 100%;
}

/* Count badge for documents */
.document-count {
  display: inline-block;
  background: #26428b;
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Alert box styling */
.alert-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #90caf9;
  border-left: 4px solid #26428b;
}

.alert-info h5 {
  color: #26428b;
}

/* Department icon for DVV */
.naac-header .department-icon i.bi-file-check {
  font-size: 2.5rem;
}
