@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #1e40af;
    --primary-hover: #1e3a8a;
    --primary-light: #eff6ff;
    --accent-color: #7c3aed;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #cbd5e1;
    --focus-ring: rgba(30, 64, 175, 0.25);
    --success-bg: #dcfce7;
    --success-text: #15803d;
    --error-bg: #fee2e2;
    --error-text: #b91c1c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4.75rem 1rem 1.5rem 1rem; /* Top padding for sticky header bar */
    color: var(--text-primary);
    direction: ltr;
}

.container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

/* Floating Sticky Top Progress Header */
.sticky-progress-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.sticky-progress-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
}

.sticky-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #93c5fd;
}

.sticky-brand i {
    color: #60a5fa;
    font-size: 1.05rem;
}

.sticky-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-percentage-badge {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
    flex-shrink: 0;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* Card */
.form-card {
    background: var(--card-bg);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

@media (max-width: 640px) {
    body {
        padding: 4.25rem 0.5rem 1rem 0.5rem;
    }
    .form-card {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }
    .sticky-progress-content {
        padding: 0.55rem 0.85rem;
        font-size: 0.8rem;
    }
}

/* Header & Logo */
.school-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed #e2e8f0;
}

.school-logo {
    width: 115px;
    height: 115px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.school-logo:hover {
    transform: scale(1.05);
}

.school-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: -0.5px;
}

/* Form Main Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cognia-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #1e40af);
    color: white;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.form-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

/* Notice Banner */
.notice-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 5px solid var(--primary-color);
    padding: 1.15rem 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #1e3a8a;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
}

.notice-banner i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Sections */
.form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease;
}

.form-section:focus-within {
    border-color: var(--primary-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-step {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
}

/* Inputs & Grids */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .form-grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    outline: none;
}

textarea {
    padding: 1rem;
    resize: vertical;
    min-height: 110px;
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Webinar Choice Cards */
.webinar-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.checkbox-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.checkbox-card input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.checkbox-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

/* Likert Scale Cards */
.likert-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .likert-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

.radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.5rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.radio-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-card span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.radio-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.radio-card.selected span {
    color: var(--primary-color);
}

/* Question Label */
.question-label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.98rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1.15rem 1.5rem;
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 12px 24px -6px rgba(30, 64, 175, 0.4);
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px -6px rgba(30, 64, 175, 0.5);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

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

.alert {
    padding: 1.1rem;
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #fecaca;
}

/* Thank You Success Container */
.thank-you-card {
    display: none;
    text-align: center;
    padding: 3.5rem 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

.thank-you-icon {
    width: 95px;
    height: 95px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.75rem auto;
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.35);
}

.thank-you-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.35;
}

.thank-you-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.25rem auto;
    line-height: 1.65;
}

.btn-new-response {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.85rem;
    background: #f1f5f9;
    color: #1e293b;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-new-response:hover {
    background: #e2e8f0;
    color: #0f172a;
}

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

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    width: 100%;
    margin-top: 2rem;
}

.site-footer p {
    margin-bottom: 0.35rem;
}

.it-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: #93c5fd;
    margin-top: 0.5rem;
}

.it-badge i {
    color: #60a5fa;
}
