/* 
 * Jomi Gyan (জমি জ্ঞান) - cPanel Stylesheet
 * Palette: Royal Blue, Steel Silver, Crisp White, Light Green Accent
 */

:root {
  --primary-blue: #1e3a8a;
  --primary-blue-hover: #1d4ed8;
  --accent-blue: #2563eb;
  --light-blue: #eff6ff;
  --steel-silver-bg: #f8fafc;
  --steel-silver-border: #cbd5e1;
  --steel-silver-light: #e2e8f0;
  --steel-silver-text: #64748b;
  --pure-white: #ffffff;
  --accent-green: #10b981;
  --accent-green-dark: #059669;
  --accent-green-light: #ecfdf5;
  --text-dark: #0f172a;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(30, 58, 138, 0.1), 0 8px 10px -6px rgba(30, 58, 138, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hind Siliguri', 'Inter', -apple-system, sans-serif;
  background-color: var(--steel-silver-bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Announcement */
.site-header {
  background: var(--pure-white);
  border-bottom: 2px solid var(--steel-silver-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.top-announcement {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
  color: #f8fafc;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link.highlight {
  color: #34d399;
  font-weight: 600;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main Brand Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 4px 8px rgba(30, 58, 138, 0.25));
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.brand-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1.15;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge-bn {
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 0.15rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--steel-silver-text);
  font-size: 0.95rem;
  margin-top: 0.2rem;
  font-weight: 500;
}

.header-stats {
  display: flex;
  gap: 1.25rem;
}

.stat-item {
  background: var(--steel-silver-bg);
  border: 1px solid var(--steel-silver-border);
  border-radius: 10px;
  padding: 0.4rem 0.85rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--steel-silver-text);
  font-weight: 500;
}

.stat-item.green-accent {
  background: var(--accent-green-light);
  border-color: #a7f3d0;
}

.stat-item.green-accent .stat-number {
  color: var(--accent-green-dark);
}

/* Navigation Tabs */
.main-tabs-nav {
  background: var(--pure-white);
  border-bottom: 1px solid var(--steel-silver-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1.25rem;
  scrollbar-width: thin;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.65rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--steel-silver-text);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: var(--steel-silver-bg);
  color: var(--primary-blue);
}

.tab-btn.active {
  background: var(--light-blue);
  color: var(--primary-blue);
  box-shadow: inset 0 -2px 0 var(--accent-blue);
}

/* Page Content */
.page-content {
  padding: 2rem 1.25rem 4rem;
}

.app-card {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--steel-silver-light);
}

.card-pill {
  display: inline-block;
  background: var(--light-blue);
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  border: 1px solid #bfdbfe;
}

.card-pill.green-pill {
  background: var(--accent-green-light);
  color: var(--accent-green-dark);
  border-color: #a7f3d0;
}

.card-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.card-header .desc {
  color: var(--steel-silver-text);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.quick-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--steel-silver-text);
}

.quick-chip {
  background: var(--steel-silver-bg);
  border: 1px solid var(--steel-silver-border);
  color: var(--text-dark);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-chip:hover {
  background: var(--light-blue);
  border-color: var(--accent-blue);
  color: var(--primary-blue);
}

/* Converter Grid */
.converter-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

/* Mobile Responsive Enhancements */
@media (max-width: 640px) {
  .main-header {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .brand-logo-wrap {
    width: 48px;
    height: 48px;
  }

  .brand-title {
    font-size: 1.7rem;
  }

  .brand-badge-bn {
    font-size: 0.8rem;
    padding: 0.1rem 0.5rem;
  }

  .brand-subtitle {
    font-size: 0.8rem;
  }

  .header-stats {
    width: 100%;
    display: flex;
  }

  .stat-item {
    flex: 1;
    padding: 0.35rem 0.5rem;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .page-content {
    padding: 1rem 0.75rem 3rem;
  }

  .app-card {
    padding: 1.25rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }

  .card-header h2 {
    font-size: 1.3rem;
  }

  .input-with-select {
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-input, .result-display, .main-select {
    width: 100%;
    font-size: 1.15rem;
    min-height: 44px;
  }

  .matrix-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .matrix-card {
    padding: 0.65rem;
  }

  .matrix-label {
    font-size: 0.75rem;
  }

  .matrix-val {
    font-size: 0.95rem;
  }

  .conversion-summary-banner {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-actions {
    width: 100%;
    display: flex;
  }

  .summary-actions .action-btn {
    flex: 1;
    text-align: center;
  }

  .plot-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
  }

  .plot-shape-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 0.4rem;
  }

  .shape-btn {
    text-align: center;
    padding: 0.4rem;
    font-size: 0.75rem;
  }

  .articles-grid, .states-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .converter-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .swap-action-col {
    display: flex;
    justify-content: center;
  }
}

.converter-box {
  background: var(--steel-silver-bg);
  border: 2px solid var(--steel-silver-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s;
}

.converter-box:focus-within {
  border-color: var(--accent-blue);
  background: var(--pure-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.box-to {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.box-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--steel-silver-text);
  margin-bottom: 0.75rem;
}

.unit-code-badge {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
}

.unit-code-badge.badge-green {
  background: #dcfce7;
  color: #166534;
}

.input-with-select {
  display: flex;
  gap: 0.5rem;
}

.main-input {
  flex: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  border: 1px solid var(--steel-silver-border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  outline: none;
  background: var(--pure-white);
  min-width: 0;
}

.result-display {
  flex: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-green-dark);
  background: var(--pure-white);
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
}

.main-select {
  flex: 1.2;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  border: 1px solid var(--steel-silver-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: var(--pure-white);
  cursor: pointer;
  outline: none;
}

.unit-footnote {
  font-size: 0.8rem;
  color: var(--steel-silver-text);
  margin-top: 0.5rem;
}

.swap-btn {
  background: var(--pure-white);
  border: 2px solid var(--steel-silver-border);
  color: var(--primary-blue);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}

.swap-btn:hover {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
  transform: rotate(180deg);
}

/* Summary Banner */
.conversion-summary-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.summary-title {
  font-size: 0.85rem;
  color: #93c5fd;
  text-transform: uppercase;
  font-weight: 600;
}

.summary-formula {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.summary-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Equivalents Matrix */
.equivalents-matrix {
  margin-top: 2rem;
  background: var(--steel-silver-bg);
  border: 1px solid var(--steel-silver-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.section-subheading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.matrix-card {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.matrix-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

.matrix-label {
  font-size: 0.85rem;
  color: var(--steel-silver-text);
  font-weight: 500;
}

.matrix-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-blue);
}

/* Plot Calculator */
.plot-shape-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shape-btn {
  background: var(--steel-silver-bg);
  border: 1px solid var(--steel-silver-border);
  color: var(--text-dark);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.shape-btn.active {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
}

.plot-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plot-input-box {
  background: var(--steel-silver-bg);
  border: 1px solid var(--steel-silver-border);
  border-radius: 8px;
  padding: 0.85rem;
}

.plot-input-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--steel-silver-text);
  margin-bottom: 0.4rem;
}

.plot-input-box input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  border: 1px solid var(--steel-silver-border);
  border-radius: 6px;
  outline: none;
}

.plot-result-showcase {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.plot-result-showcase h3 {
  color: var(--primary-blue);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.plot-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.plot-stat-badge {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.plot-stat-badge .stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
}

.plot-stat-badge .stat-label {
  font-size: 0.8rem;
  color: var(--steel-silver-text);
  font-weight: 600;
}

.plot-stat-badge.highlight-green {
  border-color: #86efac;
  background: #f0fdf4;
}
.plot-stat-badge.highlight-green .stat-value {
  color: var(--accent-green-dark);
}

.plot-stat-badge.highlight-blue {
  border-color: #93c5fd;
  background: #eff6ff;
}
.plot-stat-badge.highlight-blue .stat-value {
  color: var(--primary-blue);
}

.plot-notes {
  font-size: 0.85rem;
  color: var(--steel-silver-text);
  margin-top: 0.5rem;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.article-card {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
}

.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--light-blue);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.article-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.article-card p {
  font-size: 0.9rem;
  color: var(--steel-silver-text);
  margin-bottom: 1rem;
}

.launch-btn {
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
}

.launch-btn:hover {
  background: var(--primary-blue-hover);
}

/* Data Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--steel-silver-border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--steel-silver-bg);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-blue);
  border-bottom: 2px solid var(--steel-silver-border);
}

.data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--steel-silver-light);
}

.data-table tr:nth-child(even) {
  background: #f8fafc;
}

.data-table tr:hover {
  background: #eff6ff;
}

/* State Grid */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.state-card-item {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.state-card-item h3 {
  font-size: 1.25rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.state-units {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.state-unit-tag {
  background: var(--light-blue);
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.state-details {
  font-size: 0.88rem;
  color: var(--steel-silver-text);
  line-height: 1.5;
}

/* cPanel Showcase Card */
.cpanel-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 2px dashed #93c5fd;
}

.cpanel-badge {
  display: inline-block;
  background: var(--accent-green);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cpanel-intro {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.cpanel-intro code {
  background: #e2e8f0;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  color: var(--primary-blue);
}

.files-checklist-box {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.box-title {
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.75rem;
}

.files-list {
  list-style: none;
}

.files-list li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.files-list li:last-child {
  border-bottom: none;
}

.cpanel-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.step-card {
  background: var(--pure-white);
  border: 1px solid var(--steel-silver-border);
  border-radius: 10px;
  padding: 1.25rem;
  position: relative;
}

.step-card.green-step {
  border-color: #86efac;
  background: #f0fdf4;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--primary-blue);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.step-card.green-step .step-num {
  background: var(--accent-green-dark);
}

.step-card h4 {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.step-card p {
  font-size: 0.82rem;
  color: var(--steel-silver-text);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 2rem;
  border-top: 3px solid var(--primary-blue);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.brand-col .footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.footer-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.footer-brand-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-title {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.footer-badge-bn {
  font-size: 0.8rem;
  background: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.3);
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
}

.footer-text {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.copyright {
  font-size: 0.8rem;
  color: #64748b;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #38bdf8;
}

/* ========================================================
 * Marks Percentage Calculator - Modal & Button Styles
 * ======================================================== */
.highlight-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  border: none !important;
}

.highlight-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-1px);
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.percentage-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.percentage-header-btn:hover {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.percentage-header-btn:active {
  transform: translateY(0);
}

/* Modal Overlay & Animation */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(203, 213, 225, 0.5);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon-badge {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.2;
}

.modal-header p {
  font-size: 0.75rem;
  color: #bfdbfe;
  margin: 0;
  font-weight: 500;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 1.25rem 1.5rem;
}

.modal-body .form-group {
  margin-bottom: 1rem;
}

.modal-body label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.4rem;
}

.modal-body input[type="number"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.modal-body input[type="number"]:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.modal-error {
  padding: 0.6rem 0.8rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.modal-body .calculate-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.modal-body .calculate-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

/* Percentage Result Card */
.percentage-result-card {
  margin-top: 1.25rem;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border: 2px solid #bfdbfe;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.result-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  display: block;
  margin-bottom: 0.25rem;
}

.result-percentage {
  font-size: 2.75rem;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.result-marks-row {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

.result-marks-row strong {
  color: #0f172a;
  font-weight: 700;
}

.result-grade-row {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.grade-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
}

.grade-c {
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.grade-a-plus {
  color: #059669;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

.grade-a {
  color: #16a34a;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.grade-b {
  color: #2563eb;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.grade-d {
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.grade-f {
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.result-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-whatsapp {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-whatsapp:hover {
  background: #20ba59;
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35);
}

.btn-reset {
  width: 100%;
  padding: 0.65rem 1rem;
  background: #475569;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-reset:hover {
  background: #334155;
}

@media (max-width: 768px) {
  .header-right-group {
    width: 100%;
    justify-content: space-between;
  }
  
  .percentage-header-btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.8rem;
  }
}

