/* ═══════════════════════════════════════════════════════════════
   UET TAXILA — STUDENT SERVICES SURVEY
   uet_survey.css
   Theme: Official Navy-Blue & Gold | Playfair Display + DM Sans
═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --navy:        #00234B;
  --navy-mid:    #00336E;
  --navy-light:  #E8EFF8;
  --gold:        #C8A84B;
  --gold-light:  #F4E8C1;
  --gold-dark:   #9E7D2A;
  --white:       #FFFFFF;
  --off-white:   #F7F9FC;
  --text-dark:   #1A2235;
  --text-mid:    #4A5568;
  --text-light:  #8898AA;
  --border:      #D6E0EE;
  --shadow-sm:   0 2px 8px rgba(0,35,75,0.08);
  --shadow-md:   0 6px 24px rgba(0,35,75,0.12);
  --shadow-lg:   0 16px 48px rgba(0,35,75,0.16);
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--off-white);
  min-height: 100vh;
}

/* ── HEADER ───────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.crest {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  border-radius: 50%;
  background: white;
  padding: 2px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.uni-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.uni-city {
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  padding: 4px 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-stripe {
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
}

/* ── HERO BANNER ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #003A7A 100%);
  position: relative;
  overflow: hidden;
  padding: 70px 32px 80px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(200,168,75,0.12) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(200,168,75,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero-bg-pattern::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(200,168,75,0.15);
  border-radius: 50%;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.survey-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.survey-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--gold);
}

.survey-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
}

.survey-title em {
  font-style: italic;
  color: var(--gold);
}

.survey-intro {
  font-size: 15px;
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
  max-width: 680px;
}

.survey-intro strong {
  color: var(--gold-light);
  font-weight: 600;
}

/* ── FORM SHELL ────────────────────────────────────────────────── */
.form-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.survey-form {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ── FIELDSET SECTIONS ────────────────────────────────────────── */
.fs-section {
  border: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.fs-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 28px;
  width: 100%;
  letter-spacing: 0.02em;
  border-bottom: 3px solid var(--gold);
}

.legend-tag {
  background: var(--gold);
  color: var(--navy);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}

.fs-section > *:not(.fs-legend) {
  padding: 28px 28px;
}

.section-note {
  color: var(--text-mid);
  font-size: 13.5px;
  background: var(--navy-light);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
}

/* ── FORM FIELDS ──────────────────────────────────────────────── */
.field-row { display: flex; gap: 20px; flex-wrap: wrap; }
.field-row.two-col > * { flex: 1 1 200px; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field-group:last-child { margin-bottom: 0; }

label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}

select, textarea, input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-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='%2300234B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select:focus, textarea:focus, input[type="text"]:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,35,75,0.1);
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

textarea::placeholder, select option[value=""] { color: var(--text-light); }

/* ── RATING CARDS ─────────────────────────────────────────────── */
.rating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.rating-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 18px;
  background: var(--off-white);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.rating-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.rc-icon {
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15));
}

.rc-body { flex: 1; }

.rc-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.rc-sub {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ── STAR RATING ──────────────────────────────────────────────── */
.star-row {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.star-label {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.star-input {
  display: none;
}

.star-icon {
  font-size: 26px;
  color: var(--border);
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
  user-select: none;
}

.star-label:hover .star-icon,
.star-icon.hovered {
  color: var(--gold);
  transform: scale(1.15);
}

.star-icon.selected {
  color: var(--gold);
}

.rc-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ── OVERALL SATISFACTION ─────────────────────────────────────── */
.overall-group label:first-child { margin-bottom: 10px; display: block; }

.overall-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ov-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-mid);
  transition: all var(--transition);
  background: var(--white);
}

.ov-option:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-light);
}

.ov-option input[type="radio"] { display: none; }

.ov-option:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

/* ── SUBMIT ZONE ──────────────────────────────────────────────── */
.submit-zone {
  text-align: center;
  padding: 12px 0 0;
}

.privacy-note {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 16px 48px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 24px rgba(0,35,75,0.35);
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,35,75,0.4);
}

.submit-btn:hover::before { opacity: 1; }

.submit-btn:active { transform: translateY(0); }

.btn-text, .btn-arrow {
  position: relative;
  z-index: 1;
}

.btn-arrow {
  font-size: 20px;
  transition: transform var(--transition);
}

.submit-btn:hover .btn-arrow { transform: translateX(5px); }

.submit-btn.loading {
  opacity: 0.8;
  pointer-events: none;
}

.submit-btn.loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ── FOOTER ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--gold);
  padding: 36px 32px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-crest {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  background: white;
  padding: 3px;
  opacity: 0.92;
}

.footer-uni {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.footer-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .header-inner { padding: 12px 18px; }
  .header-tag { display: none; }
  .hero { padding: 50px 20px 60px; }
  .form-shell { padding: 28px 14px 60px; }
  .fs-section > *:not(.fs-legend) { padding: 20px 18px; }
  .rating-grid { grid-template-columns: 1fr; }
  .field-row.two-col > * { flex: 1 1 100%; }
  .overall-options { flex-direction: column; }
  .submit-btn { padding: 14px 36px; font-size: 15px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .logo-text .uni-name { font-size: 13px; }
  .star-icon { font-size: 22px; }
}

/* ── SMOOTH FADE-IN ON LOAD ───────────────────────────────────── */
.fs-section {
  animation: fadeUp 0.5s ease both;
}
.fs-section:nth-child(1) { animation-delay: 0.05s; }
.fs-section:nth-child(2) { animation-delay: 0.15s; }
.fs-section:nth-child(3) { animation-delay: 0.25s; }

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