/* assets/frontend.css */

.pv-lead-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.pv-lead-container {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.pv-header-section {
    background: linear-gradient(135deg, #156215 0%, #1e7e1e 100%);
    color: white;
    text-align: center;
    padding: 60px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.pv-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.2)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    z-index: 1;
}

.pv-header-content {
    position: relative;
    z-index: 2;
}

.pv-header-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.pv-header-section .pv-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 1;
    font-weight: 400;
}

.pv-value-propositions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    list-style: none;
}

.pv-value-prop {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pv-value-prop:hover,
.pv-value-prop:focus-within {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.5);
}

.pv-value-prop h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.pv-value-prop p {
    font-size: 1rem;
    opacity: 1;
}

/* Form Container */
.pv-form-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pv-form-header {
    background: #2c3e50;
    color: white;
    padding: 40px;
    text-align: center;
}

.pv-form-header h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.pv-form-header p {
    font-size: 1.1rem;
    opacity: 1;
    margin-bottom: 30px;
}

/* Progress Indicator */
.pv-progress-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.pv-progress-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pv-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.pv-progress-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.pv-progress-step:last-child::after {
    display: none;
}

.pv-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.pv-progress-step.active .pv-step-circle {
    background: #156215;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(21, 98, 21, 0.2);
}

.pv-progress-step.completed .pv-step-circle {
    background: #156215;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.pv-step-label {
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
}

.pv-form-content {
    padding: 50px;
}

.pv-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.pv-step.active {
    display: block;
}

.pv-step h3 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
}

.pv-step-description {
    text-align: center;
    color: #4a4a4a;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Form Elements */
.pv-form-group {
    margin-bottom: 30px;
}

fieldset.pv-form-group {
    border: none;
    padding: 0;
}

.pv-form-group label,
.pv-form-group legend {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
    font-size: 1.1rem;
}

legend {
    padding: 0;
}

.pv-required {
    color: #d32f2f;
    font-weight: bold;
}

.pv-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pv-form-grid {
    display: grid;
    gap: 20px;
}

.pv-form-grid.pv-two-col {
    grid-template-columns: 1fr 1fr;
}

.pv-radio-group,
.pv-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.pv-option-card {
    position: relative;
    background: #f8f9fa;
    border: 3px solid #156215;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
}

.pv-option-card:hover,
.pv-option-card:focus-within {
    border-color: #d0d7de;
    background: #f0f8f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(21, 98, 21, 0.15);
}

.pv-option-card input {
    margin-right: 15px;
    margin-top: 2px;
    transform: scale(1.3);
    accent-color: #156215;
    flex-shrink: 0;
}

.pv-option-card.selected {
    border-color: #156215;
    background: #f0f8f0;
    box-shadow: 0 8px 25px rgba(21, 98, 21, 0.15);
}

.pv-option-card label.pv-option-content {
    flex: 1;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: normal;
}

.pv-option-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.pv-option-description {
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Input Fields */
.pv-lead-container input[type="text"],
.pv-lead-container input[type="email"],
.pv-lead-container input[type="tel"],
.pv-lead-container input[type="number"],
.pv-lead-container select,
.pv-lead-container textarea {
    width: 100%;
    padding: 16px 20px;
    border: 3px solid #d0d7de;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    font-family: inherit;
    color: #1a1a1a;
}

.pv-lead-container input::placeholder,
.pv-lead-container textarea::placeholder {
    color: #6e7781;
    opacity: 1;
}

.pv-lead-container input:focus,
.pv-lead-container select:focus,
.pv-lead-container textarea:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
    border-color: #156215;
    box-shadow: 0 0 0 2px rgba(21, 98, 21, 0.2);
}

.pv-input-with-unit {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pv-unit-badge {
    background: #1a1a1a;
    color: white;
    padding: 16px 20px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    border: 3px solid #1a1a1a;
}

.pv-help-text {
    font-size: 0.9rem;
    color: #4a4a4a;
    margin-top: 8px;
    font-style: normal;
}

.pv-error-message {
    color: #d32f2f;
    font-size: 0.95rem;
    margin-top: 8px;
    display: none;
    font-weight: 600;
    background: #ffeaea;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #d32f2f;
}

/* Navigation */
.pv-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e1e4e8;
}

.pv-btn {
    padding: 18px 36px;
    border: 3px solid transparent;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    justify-content: center;
    font-family: inherit;
}

.pv-btn:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

.pv-btn-primary {
    background: linear-gradient(135deg, #156215, #0f4a0f);
    color: white;
    border-color: #156215;
    box-shadow: 0 4px 15px rgba(21, 98, 21, 0.3);
}

.pv-btn-primary:hover,
.pv-btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(21, 98, 21, 0.4);
}

.pv-btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.pv-btn-secondary:hover,
.pv-btn-secondary:focus {
    background: #5a6268;
    border-color: #5a6268;
    transform: translateY(-2px);
}

.pv-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Calculation Preview */
.pv-calculation-preview {
    background: linear-gradient(135deg, #156215, #1e7e1e);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    text-align: center;
    border: 3px solid #0f4a0f;
}

.pv-calculation-preview h4 {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.pv-calc-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    list-style: none;
}

.pv-calc-metric {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.pv-calc-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.pv-calc-label {
    font-size: 0.9rem;
    opacity: 1;
}

/* Privacy Section */
.pv-privacy-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border: 2px solid #e1e4e8;
}

.pv-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.pv-checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 4px 0 0 0;
    transform: scale(1.3);
    accent-color: #156215;
    flex-shrink: 0;
}

.pv-checkbox-item label {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1a1a1a;
    font-weight: normal;
}

.pv-checkbox-item a {
    color: #156215;
    text-decoration: underline;
    font-weight: 600;
}

.pv-checkbox-item a:hover,
.pv-checkbox-item a:focus {
    color: #0f4a0f;
    outline: 2px solid #ffd700;
    outline-offset: 1px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .pv-option-card {
        border-width: 4px;
    }
    
    .pv-lead-container input,
    .pv-lead-container select,
    .pv-lead-container textarea {
        border-width: 4px;
    }
    
    .pv-btn {
        border-width: 4px;
    }
    
    .pv-error-message {
        border-left-width: 6px;
    }
}

/* Focus Improvements */
.pv-option-card:focus-within {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

.pv-value-prop:focus-within {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .pv-lead-container {
        padding: 5px;
    }
    
    .pv-header-section {
        padding: 30px 15px;
        margin-bottom: 20px;
    }
    
    .pv-header-section h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .pv-header-section .pv-subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .pv-value-propositions {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pv-value-prop {
        padding: 20px 15px;
    }
    
    .pv-value-prop h3 {
        font-size: 1.2rem;
    }
    
    .pv-value-prop p {
        font-size: 0.95rem;
    }
    
    .pv-form-header {
        padding: 25px 15px;
    }
    
    .pv-form-header h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .pv-form-header p {
        font-size: 1rem;
    }
    
    .pv-form-content {
        padding: 25px 15px;
    }
    
    .pv-step h3 {
        font-size: 1.5rem;
        line-height: 1.4;
        margin-bottom: 20px;
    }
    
    .pv-step-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .pv-form-grid.pv-two-col {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pv-radio-group,
    .pv-checkbox-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .pv-option-card {
        padding: 18px 15px;
        border-width: 2px;
        min-height: 70px;
    }
    
    .pv-option-card input {
        margin-right: 12px;
        transform: scale(1.4);
    }
    
    .pv-option-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .pv-option-description {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    /* Touch-friendly input fields */
    .pv-lead-container input[type="text"],
    .pv-lead-container input[type="email"],
    .pv-lead-container input[type="tel"],
    .pv-lead-container input[type="number"],
    .pv-lead-container select,
    .pv-lead-container textarea {
        padding: 18px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-width: 2px;
        min-height: 56px; /* iOS touch target */
    }
    
    .pv-input-with-unit {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .pv-input-with-unit input {
        order: 1;
    }
    
    .pv-unit-badge {
        order: 2;
        padding: 12px 16px;
        text-align: center;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .pv-form-navigation {
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
        padding-top: 20px;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 3px solid #e1e4e8;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    }
    
    .pv-btn {
        width: 100%;
        padding: 20px 24px;
        font-size: 1.1rem;
        min-height: 56px;
        border-width: 2px;
    }
    
    .pv-progress-container {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .pv-step-circle {
        width: 36px;
        height: 36px;
        font-size: 16px;
        font-weight: 700;
    }
    
    .pv-step-label {
        font-size: 11px;
        margin-top: 6px;
    }
    
    .pv-calculation-preview {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .pv-calc-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .pv-calc-metric {
        padding: 12px;
    }
    
    .pv-calc-value {
        font-size: 1.5rem;
    }
    
    .pv-calc-label {
        font-size: 0.8rem;
    }
    
    .pv-privacy-section {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .pv-checkbox-item {
        gap: 10px;
        margin-bottom: 18px;
        align-items: flex-start;
    }
    
    .pv-checkbox-item input[type="checkbox"] {
        margin-top: 2px;
        transform: scale(1.4);
        min-width: 20px;
        min-height: 20px;
    }
    
    .pv-checkbox-item label {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .pv-error-message {
        font-size: 0.9rem;
        padding: 10px 12px;
        margin-top: 6px;
    }
    
    .pv-help-text {
        font-size: 0.85rem;
        margin-top: 6px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .pv-lead-container {
        padding: 2px;
    }
    
    .pv-header-section {
        padding: 25px 10px;
        border-radius: 12px;
    }
    
    .pv-header-section h1 {
        font-size: 1.6rem;
    }
    
    .pv-header-section .pv-subtitle {
        font-size: 1rem;
    }
    
    .pv-value-propositions {
        gap: 12px;
    }
    
    .pv-value-prop {
        padding: 15px 12px;
    }
    
    .pv-value-prop h3 {
        font-size: 1.1rem;
    }
    
    .pv-value-prop p {
        font-size: 0.9rem;
    }
    
    .pv-form-header {
        padding: 20px 10px;
    }
    
    .pv-form-header h2 {
        font-size: 1.6rem;
    }
    
    .pv-form-content {
        padding: 20px 10px;
    }
    
    .pv-step h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .pv-step-description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .pv-progress-container {
        padding: 0 5px;
    }
    
    .pv-step-label {
        display: none; /* Hide labels on very small screens */
    }
    
    .pv-step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .pv-option-card {
        padding: 15px 12px;
        min-height: 65px;
    }
    
    .pv-option-card input {
        margin-right: 10px;
    }
    
    .pv-option-title {
        font-size: 1rem;
    }
    
    .pv-option-description {
        font-size: 0.85rem;
    }
    
    .pv-lead-container input[type="text"],
    .pv-lead-container input[type="email"],
    .pv-lead-container input[type="tel"],
    .pv-lead-container input[type="number"],
    .pv-lead-container select,
    .pv-lead-container textarea {
        padding: 16px 12px;
        font-size: 16px;
    }
    
    .pv-unit-badge {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .pv-btn {
        padding: 18px 20px;
        font-size: 1rem;
    }
    
    .pv-form-navigation {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .pv-calc-metrics {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .pv-calc-value {
        font-size: 1.3rem;
    }
    
    .pv-calc-label {
        font-size: 0.75rem;
    }
    
    .pv-privacy-section {
        padding: 15px 10px;
    }
    
    .pv-checkbox-item {
        margin-bottom: 15px;
    }
    
    .pv-checkbox-item label {
        font-size: 0.9rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .pv-header-section {
        padding: 20px 15px;
    }
    
    .pv-header-section h1 {
        font-size: 1.6rem;
    }
    
    .pv-value-propositions {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .pv-value-prop {
        padding: 15px 10px;
    }
    
    .pv-form-content {
        padding: 20px 15px;
    }
    
    .pv-step h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .pv-radio-group,
    .pv-checkbox-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .pv-option-card {
        min-height: 60px;
        transition: background-color 0.2s ease, border-color 0.2s ease;
    }
    
    .pv-option-card:hover {
        transform: none; /* Remove hover animations on touch */
    }
    
    .pv-btn:hover {
        transform: none; /* Remove hover animations on touch */
    }
    
    .pv-value-prop:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .pv-option-card input {
        min-width: 44px;
        min-height: 44px;
    }
    
    .pv-checkbox-item input[type="checkbox"] {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .pv-form-navigation {
        background: #1a1a1a;
        border-top-color: #333;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pv-lead-container *, 
    .pv-lead-container *::before, 
    .pv-lead-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .pv-header-section {
        background: #156215 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .pv-btn {
        border: 2px solid #000;
        background: white !important;
        color: #000 !important;
    }
}

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