/* ============================================
   SKILL INDIA DIGITAL - ITI RESULT PORTAL
   Main Stylesheet
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&family=Noto+Sans:wght@400;500;600;700&display=swap');

/* CSS Variables - Skill India Theme */
:root {
  --primary-dark: #002147;
  --primary-blue: #003366;
  --primary-medium: #004a8f;
  --primary-light: #0066cc;
  --accent-orange: #f47920;
  --accent-orange-hover: #e06810;
  --accent-green: #28a745;
  --accent-red: #dc3545;
  --bg-light: #f0f4f8;
  --bg-white: #ffffff;
  --bg-gray: #e9ecef;
  --text-dark: #1a1a2e;
  --text-medium: #444444;
  --text-light: #6c757d;
  --text-white: #ffffff;
  --border-color: #d1d9e6;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --header-height: 70px;
  --top-bar-height: 36px;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Roboto', 'Noto Sans', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

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

ul, ol {
  list-style: none;
}

/* ============================================
   TOP BAR - Government Strip
   ============================================ */
.top-bar {
  background: linear-gradient(135deg, #001a33 0%, var(--primary-dark) 100%);
  height: var(--top-bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar a {
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
  margin-left: 15px;
}

.top-bar a:hover {
  color: var(--accent-orange);
}

.top-bar .gov-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar .gov-text img {
  height: 16px;
  filter: brightness(0) invert(1);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 50%, var(--primary-medium) 100%);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.3);
  position: relative;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo .emblem {
  height: 48px;
  filter: brightness(0) invert(1);
}

.header-logo .logo-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
}

.header-logo .skill-logo {
  height: 42px;
}

.header-title {
  color: var(--text-white);
  margin-left: 10px;
}

.header-title h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.header-title p {
  font-size: 11px;
  opacity: 0.8;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-right .dgt-logo {
  height: 42px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  background: var(--primary-medium);
  padding: 0 30px;
  border-bottom: 3px solid var(--accent-orange);
}

.main-nav ul {
  display: flex;
  align-items: center;
}

.main-nav ul li a {
  display: block;
  padding: 12px 20px;
  color: var(--text-white);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  background: rgba(255,255,255,0.1);
  color: var(--accent-orange);
}

.main-nav ul li a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--accent-orange);
}

/* ============================================
   HERO / BANNER SECTION
   ============================================ */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 40%, #1a5276 100%);
  padding: 50px 30px;
  text-align: center;
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(244,121,32,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,102,204,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-banner h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-banner p {
  font-size: 15px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  padding: 40px 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--bg-gray);
}

.card-header i {
  font-size: 24px;
  color: var(--primary-light);
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
}

.card-header .orange-line {
  width: 50px;
  height: 3px;
  background: var(--accent-orange);
  border-radius: 2px;
  margin-top: 4px;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

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

.form-group label .required {
  color: var(--accent-red);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-blue) 100%);
  color: var(--text-white);
  box-shadow: 0 3px 10px rgba(0,51,102,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-dark) 100%);
  box-shadow: 0 5px 15px rgba(0,51,102,0.4);
  transform: translateY(-1px);
}

.btn-orange {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #e06810 100%);
  color: var(--text-white);
  box-shadow: 0 3px 10px rgba(244,121,32,0.3);
}

.btn-orange:hover {
  background: linear-gradient(135deg, #e06810 0%, #c85a0e 100%);
  box-shadow: 0 5px 15px rgba(244,121,32,0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: var(--text-white);
  box-shadow: 0 3px 10px rgba(40,167,69,0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155d27 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
  color: var(--text-white);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #bd2130 0%, #9a1b28 100%);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 15px 40px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
}

.data-table thead {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
}

.data-table thead th {
  padding: 14px 16px;
  color: var(--text-white);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--bg-gray);
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(0,102,204,0.04);
}

.data-table tbody tr:nth-child(even) {
  background: #f8f9fc;
}

.data-table tbody tr:nth-child(even):hover {
  background: rgba(0,102,204,0.06);
}

.data-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-medium);
}

/* ============================================
   BADGES / STATUS
   ============================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pass {
  background: rgba(40,167,69,0.12);
  color: #1e7e34;
}

.badge-fail {
  background: rgba(220,53,69,0.12);
  color: #bd2130;
}

.badge-pending {
  background: rgba(255,193,7,0.15);
  color: #856404;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-form {
  max-width: 600px;
  margin: 0 auto;
}

.search-form .card {
  padding: 35px 40px;
}

.search-form .card-header {
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.search-form .card-header h3 {
  font-size: 20px;
}

/* ============================================
   ALERTS / MESSAGES
   ============================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(40,167,69,0.1);
  color: #155724;
  border: 1px solid rgba(40,167,69,0.2);
}

.alert-danger {
  background: rgba(220,53,69,0.1);
  color: #721c24;
  border: 1px solid rgba(220,53,69,0.2);
}

.alert-warning {
  background: rgba(255,193,7,0.1);
  color: #856404;
  border: 1px solid rgba(255,193,7,0.2);
}

.alert-info {
  background: rgba(0,102,204,0.08);
  color: var(--primary-blue);
  border: 1px solid rgba(0,102,204,0.15);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #001a33 100%);
  color: rgba(255,255,255,0.8);
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 40px 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-orange);
  display: inline-block;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-orange);
  padding-left: 5px;
}

.footer-bottom {
  background: rgba(0,0,0,0.3);
  text-align: center;
  padding: 15px 30px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom a {
  color: var(--accent-orange);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,33,71,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.spinner-overlay.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 18px;
  color: var(--primary-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--accent-red);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-light); }
.text-orange { color: var(--accent-orange); }
.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.text-muted { color: var(--text-light); }
.text-white { color: var(--text-white); }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }

.hidden { display: none !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .form-row-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: 0 15px;
    font-size: 10px;
  }
  .header {
    padding: 0 15px;
    height: 60px;
  }
  .header-title h1 {
    font-size: 14px;
  }
  .header-title p {
    font-size: 9px;
  }
  .header-logo .emblem,
  .header-logo .skill-logo {
    height: 32px;
  }
  .main-nav ul {
    overflow-x: auto;
  }
  .main-nav ul li a {
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  .hero-banner {
    padding: 30px 15px;
  }
  .hero-banner h2 {
    font-size: 20px;
  }
  .main-content {
    padding: 20px 15px;
  }
  .card {
    padding: 20px;
  }
  .search-form .card {
    padding: 25px 20px;
  }
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    padding: 30px 15px;
  }
}

@media (max-width: 480px) {
  .header-logo .logo-divider,
  .header-right .dgt-logo {
    display: none;
  }
  .top-bar-right {
    display: none;
  }
  .btn-lg {
    padding: 12px 30px;
    font-size: 14px;
  }
}
