/* ========================================
   Student Digital Support Program – UP
   Government-Style CSS | Mobile-First
   ======================================== */

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

:root {
  --blue-dark:   #0b3d91;
  --blue-mid:    #1a5cba;
  --blue-light:  #e8f0fe;
  --blue-accent: #2979ff;
  --gold:        #FFD700;
  --white:       #ffffff;
  --grey-light:  #f4f6f9;
  --grey-mid:    #dde3ec;
  --grey-dark:   #555f6e;
  --text-main:   #1a2233;
  --text-muted:  #6b7585;
  --red-err:     #d32f2f;
  --green:       #1b8a4c;
  --notice-bg:   #ffc107;
  --notice-text: #1a2233;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(11,61,145,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: var(--grey-light);
  line-height: 1.6;
}

a { color: var(--blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ========================================
   NOTICE STRIP (Scrolling Ticker)
   ======================================== */
.notice-strip {
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
  border-bottom: 2px solid #e6a800;
}

.notice-track {
  display: inline-block;
  animation: ticker 28s linear infinite;
}

.notice-content {
  padding-right: 60px;
}

@keyframes ticker {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  background: var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 12px;
}

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

.logo-placeholder svg { flex-shrink: 0; }

.header-title-block { flex: 1; }

.header-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.header-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
}

@media (min-width: 480px) {
  .header-title { font-size: 16px; }
}

@media (min-width: 640px) {
  .header-title { font-size: 18px; }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  color: var(--white);
  padding: 40px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero-headline {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--white);
}

.hero-subtext {
  font-size: 15px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 20px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 20px;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--blue-dark);
  font-size: 16px;
  font-weight: 700;
  padding: 13px 36px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.20);
}

.btn-primary:hover {
  background: #e6c200;
  transform: translateY(-1px);
  text-decoration: none;
}

@media (min-width: 640px) {
  .hero-headline { font-size: 28px; }
}

/* ========================================
   FORM SECTION
   ======================================== */
.form-section {
  padding: 40px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--blue-dark);
}

.form-group {
  margin-bottom: 16px;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-row .form-group {
  min-width: 140px;
}

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.required { color: var(--red-err); }

input[type="text"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230b3d91' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input:focus, select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(26,92,186,0.12);
}

input.invalid, select.invalid {
  border-color: var(--red-err);
}

.field-error {
  display: block;
  font-size: 12px;
  color: var(--red-err);
  margin-top: 4px;
  min-height: 16px;
}

.form-msg {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 14px;
}

.form-msg.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-msg.error {
  background: #ffebee;
  color: var(--red-err);
  border: 1px solid #ef9a9a;
}

.btn-submit {
  width: 100%;
  background: var(--blue-dark);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  padding: 13px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-submit:hover { background: var(--blue-mid); }
.btn-submit:disabled { background: var(--grey-dark); cursor: not-allowed; }

/* Loader spinner */
.loader {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ========================================
   REFERRAL PANEL
   ======================================== */
.referral-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
  text-align: center;
}

.referral-header { margin-bottom: 20px; }

.referral-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.referral-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}

.referral-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.referral-link-box {
  text-align: left;
  margin-bottom: 18px;
}

.referral-link-box label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.link-copy-row {
  display: flex;
  gap: 8px;
}

.link-copy-row input {
  flex: 1;
  font-size: 13px;
  background: var(--grey-light);
  color: var(--text-muted);
  border-color: var(--grey-mid);
  cursor: text;
}

.btn-copy {
  background: var(--blue-dark);
  color: var(--white);
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-copy:hover { background: var(--blue-mid); }

.referral-progress-box { margin-bottom: 20px; }

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.progress-bar-bg {
  background: var(--grey-mid);
  border-radius: 20px;
  height: 12px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #4caf50);
  border-radius: 20px;
  transition: width 0.6s ease;
}

.progress-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  width: 100%;
  transition: background 0.2s;
}

.btn-whatsapp:hover {
  background: #1da851;
  text-decoration: none;
  color: var(--white);
}

/* ========================================
   TRUST SECTION
   ======================================== */
.trust-section {
  background: var(--blue-light);
  padding: 40px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.trust-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  text-align: center;
}

.trust-icon { font-size: 30px; margin-bottom: 10px; }

.trust-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.trust-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (min-width: 540px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.82);
  padding: 24px 0 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  align-items: center;
}

.footer-links a {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-decoration: none;
  padding: 2px 4px;
}

.footer-links a:hover { color: var(--gold); text-decoration: underline; }

.footer-admin-link {
  color: var(--gold) !important;
  font-weight: 600;
  font-size: 13px;
}

.footer-sep { color: rgba(255,255,255,0.35); font-size: 12px; }

.footer-disclaimer {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  max-width: 620px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: var(--radius);
  line-height: 1.5;
}

.footer-copy {
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.20);
}

.modal-box h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 16px;
}

.modal-body p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--grey-light);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s;
  font-family: inherit;
}

.modal-close:hover { background: var(--grey-mid); }

/* ========================================
   ADMIN PAGE SPECIFIC STYLES
   ======================================== */
/* (in admin panel page inline or in admin.css) */

/* ========================================
   UTILITY
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
