/* Modern Navy Blue Color Scheme */
:root {
    --primary-color: #002366; /* Navy Blue */
    --secondary-color: #1a3e8c;
    --accent-color: #3a7bd5;
    --light-color: #f8f9fa;
    --dark-color: #001a4d;
    --text-color: #333;
    --text-light: #6c757d;
    --success-color: #28a745;
    --border-radius: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    padding: 20px;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--dark-color);
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    background-color:whitesmoke;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

/* Header Styles */
.form-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.logo-container {
    width: 80px;
    height: 80px;
    padding: 10px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header-text {
    flex-grow: 1;
}

.header-text h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: white;
}

.header-text h2 {
    font-size: 18px;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.header-text h3 {
    font-size: 16px;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    color: rgba(255, 255, 255, 0.8);
}

/* Form Sections */
.insurance-form {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 8px;
}

.section-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.full-width {
    grid-column: 1 / -1;
}

.half-width {
    grid-column: span 1;
}

/* Floating Label Form Controls */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-label input,
.floating-label textarea,
.floating-label select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 15px;
    background-color: white;
    transition: var(--transition);
}

.floating-label textarea {
    min-height: 100px;
    resize: vertical;
}

.floating-label label {
    position: absolute;
    top: 12px;
    left: 15px;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition);
    background-color: white;
    padding: 0 5px;
}

.floating-label .highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label select:focus,
.floating-label input:not(:placeholder-shown),
.floating-label textarea:not(:placeholder-shown),
.floating-label select:not(:placeholder-shown) {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 35, 102, 0.1);
}

.floating-label input:focus + label,
.floating-label textarea:focus + label,
.floating-label select:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:not(:placeholder-shown) + label,
.floating-label select:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: var(--primary-color);
    background-color: white;
}

.floating-label input:focus ~ .highlight,
.floating-label textarea:focus ~ .highlight,
.floating-label select:focus ~ .highlight {
    width: 100%;
}

/* Sum Insured Card */
.sum-insured-card {
    grid-column: 1 / -1;
    background-color: #f8faff;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.sum-insured-card h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.sum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.sum-item {
    background-color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sum-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.sum-item.total {
    background-color: var(--primary-color);
    color: white;
}

.sum-item.total label {
    color: rgba(255, 255, 255, 0.9);
}

.input-with-rs {
    display: flex;
    align-items: center;
}

.rs-symbol {
    margin-right: 5px;
    font-weight: 500;
}

.sum-item.total .rs-symbol {
    color: white;
}

/* Date Range */
.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.date-range span {
    color: var(--text-light);
}

/* Declaration & Assignment Text */
.declaration-text,
.assignment-text,
.prohibition-text {
    background-color: #f8faff;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    line-height: 1.6;
    border-left: 3px solid var(--primary-color);
}

.declaration-text p,
.assignment-text p,
.prohibition-text p {
    margin-bottom: 15px;
}

.assignment-text input[type="text"] {
    border: none;
    border-bottom: 1px dashed var(--primary-color);
    padding: 0 5px;
    margin: 0 3px;
    text-align: center;
    background: transparent;
    min-width: 100px;
}

/* Signature Section */
.signature-section {
    margin-top: 25px;
}

.signature-box {
    padding: 20px;
    text-align: center;
    border: 1px dashed #ddd;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.signature-line {
    width: 70%;
    height: 1px;
    background-color: #ddd;
    margin: 0 auto 10px;
}

.signature-box span {
    color: var(--text-light);
    font-size: 14px;
}

.date-place {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.date-place .form-group {
    flex: 1;
    margin-bottom: 0;
}

.witness-details {
    margin-bottom: 20px;
}

/* Submit Button */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 35, 102, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 35, 102, 0.3);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
    }
    
    .header-text h1 {
        font-size: 20px;
    }
    
    .header-text h2 {
        font-size: 16px;
    }
    
    .insurance-form {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .date-place {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .submit-btn {
        width: 100%;
        padding: 12px;
    }
    
    .sum-grid {
        grid-template-columns: 1fr;
    }
    
    .assignment-text input[type="text"] {
        min-width: 80px;
    }
}

/* Print Styles */
@media print {
    body {
        background: none;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
        max-width: 100%;
    }
    
    .submit-btn {
        display: none;
    }
    
    @page {
        size: A4;
        margin: 1cm;
    }
}