/* Custom Styles */

body {
    font-family: 'Poppins', Arial, sans-serif; /* Modern, clean font */
    margin: 0;
    padding-top: 0px;
    color: #002855; /* Dark blue for text */
    background-color: #FFFFFF; /* White background */
}

.container {
    margin-top: 0px; /* Adjust as needed */
}

.content-wrapper {
    padding-top: 0px;
}

/* Jumbotron */
.jumbotron {
    background-color: #F8F9FA; /* Light grey for contrast */
    padding: 4rem 2rem;
    margin: 0;
    color: #003366; /* Navy Blue text */
}

.jumbotron h1, .jumbotron h2 {
    font-weight: 700; /* Bold headings */
    margin-bottom: 20px;
}

.jumbotron p {
    font-weight: 400;
    line-height: 1.6; /* Improved readability */
}

.jumbotron .btn {
    background-color: #003366; /* Navy Blue button */
    border-color: #003366;
    font-weight: 600;
    color: #fff;
}

.jumbotron .btn:hover {
    background-color: #0056b3; /* Slightly lighter blue on hover */
    border-color: #0056b3;
}

/* Features Section */
.features .col-md-4 {
    margin-bottom: 2rem;
}

.features img {
    max-width: 100%;
    height: auto;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.card-title {
    font-weight: 700;
    color: #003366; /* Navy Blue */
    margin-bottom: 1rem;
}

.card-text {
    font-style: italic;
    font-weight: 400;
    color: #002855; /* Dark blue */
}

/* Buttons */
.btn-primary {
    background-color: #003366; /* Navy Blue */
    border-color: #003366;
    font-weight: 600;
    color: #fff;
    border-radius: 5px;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #002855; /* Darker Blue */
    border-color: #002855;
    font-weight: 600;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #004080; /* Slightly lighter blue */
    border-color: #004080;
}

/* Footer */
.footer {
    background-color: #003366; /* Navy Blue */
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Trustpilot-style boxes */
.trustpilot-box {
    background-color: #003366; /* Navy Blue */
    color: #fff;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
}

.trustpilot-box h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Media Queries for responsiveness */
@media (min-width: 768px) {
    .jumbotron {
        padding: 6rem 2rem;
    }
}

/* ============== FORM WIZARD STYLES ============== */
/* Multi-step form styling */
.multi-step-form-container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 51, 102, 0.08);
    padding: 2rem;
    margin-bottom: 3rem;
}

.form-wizard-title {
    color: #003366;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Progress bar */
.form-progress {
    height: 10px !important;
    background-color: #e9ecef;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.form-progress-bar {
    background: linear-gradient(90deg, #003366, #0066cc);
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite;
    border-radius: 50px;
    transition: width 0.4s ease;
}

@keyframes gradientShift {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

/* Step indicators */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.step {
    text-align: center;
    position: relative;
    width: 100px;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}

.step.active .step-number {
    background-color: #003366;
    color: white;
    border-color: #003366;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
    transform: scale(1.1);
}

.step.completed .step-number {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.step-text {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.step.active .step-text, 
.step.completed .step-text {
    color: #003366;
    font-weight: 600;
}

/* Connect steps with lines */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 3px;
    background-color: #e9ecef;
    z-index: -1;
    transition: background-color 0.3s ease;
}

.step.completed:not(:last-child)::after {
    background-color: #28a745;
}

/* Form cards and fields */
.form-step-card {
    background-color: white;
    border: none;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.form-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.1);
}

.form-step-title {
    color: #003366;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Form controls */
.form-control {
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #dfe3e8;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
    border-color: #0066cc;
}

.form-label {
    font-weight: 500;
    color: #444;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Buttons */
.form-nav-btn {
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-next {
    background-color: #003366;
    border-color: #003366;
    color: white;
}

.btn-next:hover {
    background-color: #004080;
    border-color: #004080;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.2);
}

.btn-prev {
    background-color: #f8f9fa;
    border-color: #dfe3e8;
    color: #495057;
}

.btn-prev:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.btn-submit {
    background: linear-gradient(135deg, #28a745, #20914a);
    border: none;
    padding: 12px 30px;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

/* Witness sections */
.witness-section {
    padding: 1.5rem;
    background-color: #f8faff;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #003366;
}

.witness-title {
    color: #003366;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Animation for step transitions */
.form-step {
    animation: fadeIn 0.5s ease;
}

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

/* Deed Poll Form Styling */
:root {
    --primary: #003366;
    --primary-hover: #004d80;
    --secondary: #F3F4F6;
    --text: #1F2937;
    --text-light: #6B7280;
}

.form-header {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #003366, #004d80) !important;
}

.form-header h3 {
    color: #ffffff !important;
}

.form-tips {
    background-color: rgba(0, 51, 102, 0.05);
    border-left: 4px solid #003366;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.tip-content {
    display: flex;
    align-items: flex-start;
}

.tip-icon {
    color: #4fc3f7;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.tip-content p {
    margin-bottom: 0;
    color: #4B5563;
    font-size: 0.95rem;
}

.form-card {
    border: 1px solid #E5E7EB;
    border-top: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating label {
    color: var(--text-light);
    transition: all 0.2s ease;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out,transform .1s ease-in-out;
}

.form-control:focus ~ label,
.form-control:not(:placeholder-shown) ~ label,
.form-select:focus ~ label,
.form-select:not([value=""]):valid ~ label {
    transform: scale(.85) translateY(-.5rem) translateX(.15rem);
    background-color: white;
    padding: 0 .5rem;
    height: auto;
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 1rem;
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    border: 2px solid #E5E7EB;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.step-indicator {
    text-align: center;
    z-index: 1;
    width: 85px;
}

.step-bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #E5E7EB;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-bubble {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(0, 51, 102, 0.1);
}

.step-indicator.completed .step-bubble {
    background: #10B981;
    color: white;
}

.step-title {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.step-indicator.active .step-title {
    color: var(--primary);
    font-weight: 600;
}

.progress-line {
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 4px;
    background: #E5E7EB;
    z-index: 0;
}

.btn-primary {
    background: var(--primary);
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 51, 102, 0.2);
}

.btn-outline-secondary {
    color: var(--text);
    border: 2px solid #E5E7EB;
    background: white;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: var(--secondary);
    border-color: #D1D5DB;
}

.btn-success {
    background: linear-gradient(135deg, #10B981, #059669);
    border: none;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
}

.btn-lg {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
}

.form-step {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: none;
}

.form-step.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.witness-section {
    background-color: #F9FAFB;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
}

.witness-title {
    color: var(--primary);
    font-weight: 600;
}

/* Enhanced Selection Boxes */
.deed-poll-option {
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    height: 100%;
    transition: all 0.3s ease;
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.deed-poll-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.deed-poll-icon {
    width: 90px;
    height: 90px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 51, 102, 0.05);
    border-radius: 50%;
    padding: 15px;
    transition: all 0.3s ease;
}

.deed-poll-option:hover .deed-poll-icon,
.deed-poll-option.selected .deed-poll-icon {
    background: rgba(0, 51, 102, 0.1);
    transform: scale(1.05);
}

.deed-poll-text h5 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.deed-poll-option:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.1);
}

.deed-poll-option:before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border: 2px solid transparent;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.deed-poll-radio:checked + .deed-poll-label .deed-poll-option:before,
.deed-poll-option.selected:before {
    border-color: var(--primary);
    background: linear-gradient(to bottom right, rgba(0, 51, 102, 0), rgba(0, 51, 102, 0.05));
}

.deed-poll-radio:checked + .deed-poll-label .deed-poll-text h5,
.deed-poll-option.selected .deed-poll-text h5 {
    color: var(--primary);
    font-weight: 700;
}

/* Package Selection Enhanced Styling */
.package-option {
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    background: #FFFFFF;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.package-label {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
    height: 100%;
}

.package-header {
    background-color: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.package-header h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.4rem;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-currency {
    font-size: 1.25rem;
    margin-right: 2px;
}

.price-amount {
    line-height: 1;
}

.package-features {
    padding: 1.5rem;
}

.package-features ul {
    margin-bottom: 0;
    padding-left: 2.5rem;
}

.package-features li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 5px;
}

.package-features .fa-li {
    left: -2em;
}

.package-features .fa-check {
    color: #10B981;
}

.package-features .fa-times {
    color: #9CA3AF;
}

/* Package Selection - Homepage Style Cards */
.package-option {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.package-option .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.08);
    height: 100%;
}

.package-option:hover .card {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 51, 102, 0.12);
}

.package-radio:checked + .package-label .card,
.package-option.selected .card,
.selected .card {
    border: 2px solid #4fc3f7 !important;
    box-shadow: 0 15px 30px rgba(79, 195, 247, 0.2), 0 0 0 2px rgba(79, 195, 247, 0.1) !important;
    transform: translateY(-5px);
}

.package-radio:checked + .package-label .selection-indicator,
.package-option.selected .selection-indicator,
.selected .selection-indicator {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6) !important;
    border-color: #4fc3f7 !important;
    transform: scale(1.02);
}

.recommended {
    border-color: var(--primary);
}

.recommended .package-header {
    background: linear-gradient(135deg, #003366, #004d80);
    color: white;
}

.recommended .package-header h4 {
    color: white;
}

.recommended .price {
    color: white;
}

.recommended-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: #003366;
    color: #ffffff;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 20px;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-radio:checked + .package-label .package-header,
.package-option.selected .package-header {
    border-bottom: 2px solid var(--primary);
}

/* Mobile responsive text switching for better readability */
.step-mobile-text {
    display: none;
}

.step-full-text {
    display: inline;
}

@media (max-width: 768px) {
    .step-indicator {
        width: 60px !important;
        margin: 0 2px !important;
    }
    
    .step-bubble {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.8rem !important;
        margin-bottom: 6px !important;
    }
    
    .step-title-small {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: 60px !important;
        height: auto !important;
        text-align: center !important;
        display: block !important;
    }
    
    /* Show mobile text, hide full text on mobile */
    .step-full-text {
        display: none !important;
    }
    
    .step-mobile-text {
        display: inline !important;
    }
    
    .progress-line {
        left: 30px !important;
        right: 30px !important;
        top: 18px !important;
    }
    
    /* Container adjustments */
    .d-flex.justify-content-between {
        gap: 2px !important;
        padding: 0 5px !important;
    }
}

@media (max-width: 480px) {
    .step-indicator {
        width: 50px !important;
        margin: 0 1px !important;
    }
    
    .step-bubble {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        margin-bottom: 5px !important;
    }
    
    .step-title-small {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        max-width: 50px !important;
    }
    
    .progress-line {
        left: 25px !important;
        right: 25px !important;
        top: 16px !important;
    }
    
    .d-flex.justify-content-between {
        padding: 0 3px !important;
        gap: 1px !important;
    }
}

/* Child Form Witness Styling */
.child-form-required {
    background-color: #e3f2fd !important;
    border: 2px solid #1976d2 !important;
    color: #1976d2 !important;
    font-weight: 600;
}

.child-form-required:disabled {
    opacity: 0.9 !important;
    cursor: not-allowed;
    background-color: #e3f2fd !important;
}

.child-witness-note {
    animation: fadeIn 0.3s ease-in;
}

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

.child-witness-note .text-info {
    color: #1976d2 !important;
    font-weight: 500;
}

/* Child Witness Side-by-Side Layout */
@media (min-width: 768px) {
    #child-witness-section .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    #child-witness-section .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    #child-witness1-section {
        border-right: 1px solid #e9ecef;
        padding-right: 15px;
    }
}

@media (max-width: 767px) {
    #child-witness1-section {
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

/* Fix for witness dropdown display issues */
#id_witness_option {
    width: 100% !important;
    min-width: 250px;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    position: relative;
    z-index: 10;
}

#id_witness_option option {
    padding: 8px 12px;
    white-space: normal;
    word-wrap: break-word;
    background-color: white;
    color: #333;
}

/* Ensure form-floating container doesn't clip dropdown text */
.form-floating .form-select {
    background-color: white;
    position: relative;
    z-index: 1;
    border: 2px solid #E5E7EB;
    font-size: 1rem;
    line-height: 1.5;
    height: auto;
    min-height: calc(3.5rem + 2px);
}

.form-floating .form-select:focus {
    z-index: 15;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Fix witness section form-floating containers */
.form-floating {
    position: relative;
    margin-bottom: 1rem;
    z-index: 1;
}

/* Fix form-text positioning */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    background-color: transparent;
    z-index: 1;
}

/* Ensure the witness dropdown container has proper overflow handling */
#step-5 .form-floating {
    overflow: visible;
}

/* Fix any Bootstrap conflicts */
.form-select {
    appearance: menulist;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
}
