@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #f5317f; 
    --primary-dark: #d81b60;
    --primary-gradient: linear-gradient(90deg, #ffd145 0%, #ff774a 35%, #f5317f 70%, #c438e8 100%);
    --accent-color: #ffd145; 
    --bg-color: #ffffff;
    --body-bg: #fdf2f8;
    --body-gradient: linear-gradient(135deg, #fffbeb 0%, #fce7f3 50%, #f3e8ff 100%);
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-light: #64748b;
    --separator-color: #cbd5e1;
    --input-bg: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background: var(--body-gradient);
    min-height: 100vh;
    font-size: 13px;
    line-height: 1.6;
    padding: 40px 0;
}

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.8);
}

.separator {
    color: var(--separator-color);
    margin: 0 5px;
    font-weight: 400;
}

/* Header */
.header {
    background: var(--primary-gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-radius: 16px;
    margin-bottom: 35px;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.2);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
}

.logo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.title-section h1 {
    font-size: 19px;
    letter-spacing: 0.5px;
    margin-bottom: 0px;
    font-weight: 700;
}

.title-section p {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #bae6fd;
    text-transform: uppercase;
    font-weight: 500;
}

.header-right {
    text-align: right;
}

.header-right h2 {
    font-size: 16px;
    margin-bottom: 2px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-right p {
    font-size: 12px;
    color: #bae6fd;
}

/* Main Title */
.main-title {
    margin-bottom: 35px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.main-title h2 {
    font-size: 22px;
    color: var(--primary-dark);
    margin-bottom: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.main-title h3 {
    font-size: 17px;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 600;
}

.main-title p {
    font-size: 12px;
    color: var(--text-light);
}

/* Form Sections */
fieldset.section { border: none; border-radius: 16px; padding: 30px; margin-bottom: 25px; background-color: var(--bg-color); box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; position: relative; transition: transform 0.3s, box-shadow 0.3s; }

fieldset.section:hover {
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.06);
    transform: translateY(-2px);
}

legend { font-weight: 700; font-size: 13px; color: #ffffff; background: var(--primary-gradient); padding: 6px 16px; border-radius: 8px; margin-left: -10px; margin-bottom: 20px; float: left; display: block; width: auto; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }

fieldset {
    display: flex;
    flex-direction: column;
}

.form-row { display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.half {
    flex: 1;
}

.form-group.full {
    width: 100%;
}

.form-group label {
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"] {
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 10px;
    outline: none;
    width: 100%;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Subsections & Checkboxes */
.subsection { margin-bottom: 25px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.subsection:last-child {
    margin-bottom: 0;
}

.label-p { font-size: 13px; margin-bottom: 15px; color: var(--primary-color); font-weight: 700; }

.checkbox-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.checkbox-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.checkbox-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }

.inline-group {
    display: flex;
    align-items: center;
}

.inline-label { width: 250px; margin-bottom: 0; color: var(--primary-color); font-weight: 700; font-size: 13px; }

.checkbox-group {
    display: flex;
    gap: 30px;
}

label { display: flex; align-items: center; font-size: 12px; cursor: pointer; color: var(--text-light); font-weight: 500; transition: color 0.2s; white-space: nowrap; }

label:hover {
    color: var(--primary-color);
}

/* Custom Checkbox */
input[type="checkbox"] { margin-right: 10px; width: 20px; height: 20px; appearance: none; border: 2px solid #cbd5e1; border-radius: 6px; background-color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }

input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

input[type="checkbox"]:checked::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Rating Section */
.rating-section { position: relative;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    align-items: center;
}

.rating-legend { width: auto; margin-bottom: 0; padding: 0; background: none; color: inherit; font-size: inherit; font-weight: inherit; float: none; border-radius: 0; box-sizing: border-box; display: inline; text-transform: none; }

.rating-scale-info {
    font-size: 11px;
    color: var(--primary-dark);
    background: #e0f2fe;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.rating-table {
    width: 100%;
    border-collapse: collapse;
}

.rating-table td {
    padding: 15px 10px;
    border-bottom: 1px dashed var(--border-color);
}

.rating-table tr:last-child td {
    border-bottom: none;
}

.rating-label {
    font-size: 13px;
    width: auto;
    color: var(--text-main);
    font-weight: 600;
}

.rating-radios {
    display: flex;
    justify-content: flex-end; gap: 8px;
    width: auto;
}

.rating-radios label {
    position: relative;
    cursor: pointer;
}

.rating-radios input[type="radio"] {
    opacity: 0;
    position: absolute;
}

.rating-radios span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid #cbd5e1;
    border-radius: 50%;
    font-size: 15px;
    color: var(--text-light);
    background: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

.rating-radios label:hover span {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.rating-radios input[type="radio"]:checked + span {
    border-color: var(--primary-color);
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(2, 132, 199, 0.3);
}

/* Final Feedback */
.line-input label {
    display: inline-block;
    width: auto;
    margin-right: 15px;
    white-space: nowrap;
}

.line-input input {
    flex: 1;
}

.form-group.line-input { flex-direction: row;
    align-items: center;
}

.footer {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

/* Language Toggle */
.lang-selector {
    margin-bottom: 10px;
    text-align: right;
}

.lang-selector select {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.lang-selector select:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-selector select option {
    color: #333;
    background: white;
}

body.show-en .lang-hi, body.show-en .separator { display: none !important; }
body.show-hi .lang-en, body.show-hi .separator { display: none !important; }

/* Actions */
.actions {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.actions button {
    padding: 14px 35px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(2, 132, 199, 0.4);
}

.print-btn {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.print-btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

/* ========================================= */
/* Responsive Design / Mobile Optimization */
/* ========================================= */

@media (max-width: 850px) {
    .container { width: 95%; padding: 25px 20px; margin: 20px auto; }
    .form-row { flex-direction: column; gap: 20px; margin-bottom: 20px; }
}

@media (max-width: 768px) {
    body { padding: 0; background: var(--body-bg); }
    .container { width: 100%; padding: 20px 15px; margin: 0; border-radius: 0; border: none; box-shadow: none; }
    
    .header { flex-direction: column; text-align: center; gap: 15px; padding: 25px 15px; }
    .logo-section { flex-direction: column; gap: 12px; align-items: center; justify-content: center; }
    .title-section h1 { font-size: 20px; text-align: center; }
    .title-section p { text-align: center; font-size: 11px; }
    
    .header-right, .lang-selector { text-align: center; width: 100%; }
    .lang-selector { display: flex; justify-content: center; }
    
    fieldset.section { padding: 0; margin-bottom: 30px; background-color: #ffffff; border: 1px solid #f1f5f9; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); overflow: hidden; position: relative; }
    
    legend { width: 100%; margin: 0; padding: 12px 20px; background: var(--primary-gradient); color: white; font-size: 13px; font-weight: 700; float: none; border-radius: 0; box-sizing: border-box; display: block; text-transform: uppercase; }
    
    .inline-group { flex-direction: column; align-items: flex-start; gap: 12px; }
    .inline-label { width: 250px; margin-bottom: 0; color: var(--primary-color); font-weight: 700; font-size: 13px; }
    
    .checkbox-grid-3, .checkbox-grid-4, .checkbox-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    
    .rating-table, .rating-table tbody, .rating-table tr, .rating-table td { display: block; width: 100%; }
    .rating-table td { border-bottom: none; padding: 10px 0; }
    .rating-label { margin-bottom: 10px; text-align: center; width: 100%; }
    .rating-radios { width: 100%; justify-content: space-evenly; margin: 0 auto 10px auto; gap: 5px; }
    
    .rating-table tr { border-bottom: 1px dashed var(--border-color); margin-bottom: 10px; }
    .rating-table tr:last-child { border-bottom: none; }
    
    .form-group.line-input { flex-direction: column; align-items: flex-start; gap: 10px; }
    .line-input label { width: 100%; margin-right: 0; }
    .line-input input { width: 100%; }
    
    .actions { flex-direction: column; gap: 15px; }
    .actions button { width: 100%; padding: 15px; font-size: 16px; }
}

@media (max-width: 480px) {
    .checkbox-grid-3, .checkbox-grid-4, .checkbox-grid-5 { grid-template-columns: 1fr; }
    .rating-radios span { width: 32px; height: 32px; font-size: 13px; }
}

@media print {
    /* Base settings to fit exactly on one page */
    @page {
        size: A4;
        margin: 0.5cm;
    }
    
    body { 
        background: white !important; 
        padding: 0 !important; 
        font-size: 9px !important; 
        line-height: 1.15 !important;
    }
    
    .container { 
        margin: 0 !important; 
        padding: 0 !important; 
        max-width: 100% !important; 
        box-shadow: none !important; 
        border: none !important; 
    }
    
    /* Header Compression */
    .header { 
        padding: 8px 15px !important; 
        margin-bottom: 8px !important; 
        border-radius: 6px !important;
        box-shadow: none !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
        flex-direction: row !important;
    }
    
    .logo-section { flex-direction: row !important; gap: 10px !important; }
    .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
}
    .title-section h1 { font-size: 14px !important; margin: 0 !important; text-align: left !important; }
    .title-section p { font-size: 8px !important; margin: 0 !important; text-align: left !important; }
    
    .header-right { text-align: right !important; margin: 0 !important; }
    .header-right h2 { font-size: 12px !important; margin: 0 !important; }
    .header-right p { font-size: 9px !important; margin: 0 !important; }
    
    .main-title { margin-bottom: 10px !important; padding-bottom: 0 !important; }
    .main-title::after { display: none !important; }
    .main-title h2 { font-size: 14px !important; margin: 0 !important; }
    .main-title h3 { font-size: 12px !important; margin: 0 !important; }
    .main-title p { font-size: 9px !important; margin: 0 !important; }
    
    /* Section Compression */
    fieldset.section { padding: 0; margin-bottom: 30px; background-color: #ffffff; border: 1px solid #f1f5f9; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); overflow: hidden; position: relative; }
    
    legend { width: 100%; margin: 0; padding: 12px 20px; background: var(--primary-gradient); color: white; font-size: 13px; font-weight: 700; float: none; border-radius: 0; box-sizing: border-box; display: block; text-transform: uppercase; }
    
    .form-row { margin-bottom: 6px !important; gap: 15px !important; flex-direction: row !important; }
    .form-group label { font-size: 9px !important; margin-bottom: 2px !important; }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="date"] { 
        padding: 2px 0 !important; 
        font-size: 10px !important; 
        border: none !important;
        border-bottom: 1px solid #777 !important;
        border-radius: 0 !important;
        background: transparent !important;
        height: 16px !important;
        box-shadow: none !important;
    }
    
    /* Subsections */
    .subsection { margin-bottom: 6px !important; padding: 0 !important; border: none !important; background: transparent !important; }
    .label-p { font-size: 13px; margin-bottom: 15px; color: var(--primary-color); font-weight: 700; }
    
    .inline-group { flex-direction: row !important; align-items: center !important; }
    .inline-label { width: 250px; margin-bottom: 0; color: var(--primary-color); font-weight: 700; font-size: 13px; }
    
    .checkbox-grid-3 { grid-template-columns: repeat(3, 1fr) !important; gap: 4px !important; }
    .checkbox-grid-4 { grid-template-columns: repeat(4, 1fr) !important; gap: 4px !important; }
    .checkbox-grid-5 { grid-template-columns: repeat(5, 1fr) !important; gap: 4px !important; }
    .checkbox-group { gap: 10px !important; flex-wrap: nowrap !important; }
    label { font-size: 9px !important; color: #000 !important; }
    
    input[type="checkbox"] { width: 10px !important; height: 10px !important; margin-right: 4px !important; border-width: 1px !important; border-color: #555 !important; }
    input[type="checkbox"]:checked::after { width: 3px !important; height: 6px !important; margin-bottom: 1px !important; }
    
    /* Rating Table */
    .rating-section { padding-top: 4px !important; }
    .rating-header { margin-bottom: 4px !important; }
    .rating-scale-info { font-size: 8px !important; padding: 2px 6px !important; border: none !important; background: transparent !important; color: #000 !important; }
    
    .rating-table, .rating-table tbody, .rating-table tr, .rating-table td { display: table !important; width: 100% !important; }
    .rating-table tr { display: table-row !important; border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
    .rating-table td { display: table-cell !important; padding: 4px 0 !important; border-bottom: 1px solid #ddd !important; }
    
    .rating-label { font-size: 9px !important; width: 65% !important; margin-bottom: 0 !important; text-align: left !important; }
    .rating-radios { width: 35% !important; margin-bottom: 0 !important; background: transparent !important; border: none !important; padding: 0 !important; justify-content: space-between !important; }
    
    .rating-radios span { 
        width: 14px !important; 
        height: 14px !important; 
        font-size: 8px !important; 
        border-width: 1px !important; 
        border-color: #555 !important;
    }
    
    /* Final Feedback */
    .form-group.line-input { flex-direction: row !important; align-items: flex-end !important; }
    .line-input label { width: auto !important; margin-right: 10px !important; }
    
    .footer { margin-top: 5px !important; font-size: 8px !important; }
    
    .lang-selector, .actions { display: none !important; }
    
    input[type="checkbox"]:checked, .rating-radios input[type="radio"]:checked + span, .rating-scale-info, .header, legend { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}




