/* =========================================================
   InternHub - Student Internship Portal
   Main Stylesheet
   ========================================================= */

/* ---------- 1. CSS Variables ---------- */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #7c3aed;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --dark: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --light: #f8fafc;
  --light-purple: #f5f3ff;
  --white: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(79, 70, 229, 0.18);
  --transition: all 0.3s ease;

  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", Roboto, sans-serif;
}

/* ---------- 2. Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--dark);
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.4);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ---------- 4. Header / Navbar ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient);
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--dark);
}

.logo-text span {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #eef2ff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-profile-mobile {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  padding: 0 10px;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
}

.shape-1 {
  width: 380px;
  height: 380px;
  background: #c7d2fe;
  top: -120px;
  right: -80px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: #ddd6fe;
  bottom: -120px;
  left: -100px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--white);
  border: 1px solid #e0e7ff;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-text {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat h3 {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.featured-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #eef2ff;
  animation: float 5s ease-in-out infinite;
}

.featured-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  background: var(--light-purple);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 18px;
}

.featured-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.featured-head h3 {
  font-size: 1.15rem;
}

.featured-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.featured-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--light);
  padding: 10px 12px;
  border-radius: 10px;
}

.featured-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.featured-meta strong {
  font-size: 0.9rem;
  color: var(--dark);
}

.featured-card .tags {
  margin-bottom: 22px;
}

.floating-badge {
  position: absolute;
  background: var(--white);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow);
  z-index: 2;
  animation: float 4s ease-in-out infinite;
}

.badge-top {
  top: -20px;
  right: 0;
  animation-delay: 0.5s;
}

.badge-bottom {
  bottom: -24px;
  left: 0;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- 6. Sections (common) ---------- */
.section {
  padding: 90px 0;
}

.section-light {
  background: var(--light);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  background: #eef2ff;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.section-header h2,
.about-content h2,
.contact-info h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- 7. Tags & Company Logos ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
  background: #eef2ff;
  color: var(--primary);
}

.company-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
}

.logo-blue { background: linear-gradient(135deg, #3b82f6, #4f46e5); }
.logo-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.logo-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.logo-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.logo-orange { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.logo-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.logo-green { background: linear-gradient(135deg, #22c55e, #15803d); }
.logo-cyan { background: linear-gradient(135deg, #06b6d4, #0369a1); }

/* ---------- 8. Filters ---------- */
.filter-panel {
  display: grid;
  grid-template-columns: 1fr 200px 200px;
  gap: 14px;
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.search-box input,
.filter-select {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--light);
  color: var(--dark);
  transition: var(--transition);
}

.search-box input {
  padding: 0 16px 0 46px;
}

.filter-select {
  padding: 0 14px;
  cursor: pointer;
}

.search-box input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.category-btn {
  padding: 9px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.category-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-btn.active {
  background: var(--gradient);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

.results-count {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* ---------- 9. Internship Cards ---------- */
.internship-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.internship-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  animation: fadeUp 0.45s ease both;
}

.internship-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #c7d2fe;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.bookmark-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: var(--transition);
  color: var(--muted);
}

.bookmark-btn:hover {
  border-color: var(--primary);
  transform: scale(1.08);
}

.bookmark-btn.saved {
  background: #eef2ff;
  border-color: var(--primary);
  color: var(--primary);
}

.internship-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.card-company {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--secondary);
  margin-bottom: 8px;
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.card-meta li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.card-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

.type-full {
  background: #dcfce7;
  color: #15803d;
}

.type-part {
  background: #fef3c7;
  color: #b45309;
}

.internship-card .tags {
  margin-bottom: 20px;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.card-footer .posted {
  font-size: 0.8rem;
  color: var(--muted);
}

.applied-label {
  background: #dcfce7 !important;
  color: #15803d !important;
  box-shadow: none !important;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--light);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.no-results h3 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 10. Application Dashboard ---------- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.summary-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-blue { background: #dbeafe; }
.icon-orange { background: #fef3c7; }
.icon-purple { background: #ede9fe; }
.icon-green { background: #dcfce7; }

.summary-card p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.summary-card h3 {
  font-size: 1.8rem;
}

.summary-card h3.bump {
  animation: bump 0.4s ease;
}

@keyframes bump {
  50% { transform: scale(1.3); color: var(--primary); }
}

.table-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

.table-card-header h3 {
  font-size: 1.15rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.applications-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.applications-table th,
.applications-table td {
  text-align: left;
  padding: 16px 24px;
  font-size: 0.92rem;
}

.applications-table th {
  background: var(--light);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.applications-table tbody tr {
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}

.applications-table tbody tr:hover {
  background: #fafaff;
}

.applications-table tbody tr.new-row {
  animation: highlight 1.6s ease;
}

@keyframes highlight {
  0% { background: #e0e7ff; }
  100% { background: transparent; }
}

.table-internship {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--dark);
}

.table-internship .company-logo {
  width: 38px;
  height: 38px;
  font-size: 0.95rem;
  border-radius: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-submitted { background: #dbeafe; color: #1d4ed8; }
.status-review { background: #fef3c7; color: #b45309; }
.status-shortlisted { background: #ede9fe; color: #6d28d9; }
.status-selected { background: #dcfce7; color: #15803d; }

.table-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: var(--transition);
  white-space: nowrap;
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.action-btn.withdraw:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.empty-state h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* ---------- 11. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-badge {
  position: absolute;
  bottom: -22px;
  right: 24px;
  background: var(--white);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
}

.about-badge strong {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-badge span {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.about-content > p {
  color: var(--muted);
  margin-bottom: 14px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 26px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.feature-item:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow);
  transform: translateX(6px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #eef2ff;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}

.feature-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- 12. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact-info > p {
  color: var(--muted);
  margin-bottom: 28px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-card > span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eef2ff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-card small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-card strong {
  color: var(--dark);
  font-size: 0.95rem;
  word-break: break-word;
}

.contact-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ---------- 13. Forms ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--light);
  color: var(--dark);
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--danger);
  background: #fef2f2;
}

.form-group.success input,
.form-group.success textarea {
  border-color: var(--success);
}

.error-text {
  display: block;
  min-height: 0;
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
}

.form-success {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 600;
  text-align: center;
  animation: fadeUp 0.4s ease;
}

/* ---------- 14. Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-small {
  max-width: 440px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--light);
  font-size: 1rem;
  color: var(--text);
  transition: var(--transition);
}

.modal-close:hover {
  background: #fee2e2;
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-right: 40px;
}

.modal-header h3 {
  font-size: 1.35rem;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.modal-meta div {
  background: var(--light);
  padding: 12px;
  border-radius: 12px;
}

.modal-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.modal-meta strong {
  color: var(--dark);
  font-size: 0.92rem;
}

.modal-body h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.modal-body > p {
  color: var(--muted);
  margin-bottom: 20px;
}

.modal-body .tags {
  margin-bottom: 26px;
}

.apply-box {
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 100%);
  border: 1px solid #e0e7ff;
  border-radius: var(--radius);
  padding: 22px;
}

.apply-box h4 {
  margin-bottom: 16px;
}

.apply-box .form-group input {
  background: var(--white);
}

/* Profile modal */
.profile-top {
  text-align: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.profile-stats div {
  background: var(--light);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.profile-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
}

.profile-stats span {
  font-size: 0.85rem;
  color: var(--muted);
}

.modal-small h4 {
  margin-bottom: 10px;
}

.saved-list {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
}

.saved-list li small {
  color: var(--muted);
}

.saved-list .empty-saved {
  justify-content: center;
  color: var(--muted);
  border-style: dashed;
}

/* ---------- 15. Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  background: var(--white);
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dark);
  animation: toastIn 0.35s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }

.toast.hide {
  animation: toastOut 0.35s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* ---------- 16. Footer ---------- */
.footer {
  background: var(--dark);
  color: #cbd5e1;
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.logo-light .logo-text {
  color: var(--white);
}

.logo-light .logo-text span {
  color: #a5b4fc;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 320px;
  color: #94a3b8;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #94a3b8;
  transition: var(--transition);
  word-break: break-word;
}

.footer-col a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* ---------- 17. Scroll Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   18. RESPONSIVE MEDIA QUERIES
   ========================================================= */

/* Laptop / small desktop */
@media (max-width: 1100px) {
  .internship-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    gap: 40px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  /* Navbar becomes hamburger menu */
  .hamburger {
    display: flex;
  }

  .profile-btn {
    display: none;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    padding: 16px 5%;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  .nav-menu.open {
    max-height: 480px;
    padding-top: 16px;
    padding-bottom: 20px;
    opacity: 1;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .nav-profile-mobile {
    display: block;
    margin-top: 8px;
  }

  .hero {
    padding: 60px 0 80px;
  }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    text-align: center;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons,
  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 20px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .about-image {
    max-width: 560px;
    margin: 0 auto 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .modal-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .internship-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat h3 {
    font-size: 1.5rem;
  }

  .floating-badge {
    display: none;
  }

  .featured-card {
    padding: 22px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .category-buttons {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .category-btn {
    flex-shrink: 0;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .summary-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 10px;
  }

  .summary-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .table-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: 22px;
  }

  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .modal {
    padding: 24px 18px;
    max-height: 94vh;
    border-radius: 20px 20px 16px 16px;
  }

  .modal-header h3 {
    font-size: 1.15rem;
  }

  .about-badge {
    right: 12px;
    bottom: -18px;
    padding: 12px 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .featured-meta,
  .card-meta {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}
