/* Demo Animation Styles */
.demo-container {
    background: transparent;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: none;
    margin: 2rem 0;
    position: relative;
}

.demo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    display: none;
    text-align: center;
}

.demo-loading.active {
    display: block;
}

.demo-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.demo-loading-text {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.demo-phone {
    width: 320px;
    height: 640px;
    background: #1a1a1a;
    border-radius: 25px;
    padding: 20px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.demo-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.demo-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: white;
}

.demo-step.active {
    opacity: 1;
    transform: translateY(0);
}

.demo-step.prev {
    transform: translateY(-100%);
}

.demo-header {
    background: #0d6efd;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border-radius: 10px 10px 0 0;
    margin: -20px -20px 20px -20px;
}

.demo-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 30px;
}

.inspection-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.inspection-item:hover {
    border-color: #0d6efd;
    background: #e7f3ff;
}

.inspection-item.good {
    border-color: #198754;
    background: #d1e7dd;
}

.inspection-item.bad {
    border-color: #dc3545;
    background: #f8d7da;
}

.inspection-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.inspection-item-content {
    flex: 1;
}

.inspection-item-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}

.inspection-item-details.expanded {
    max-height: 300px;
    padding-top: 15px;
}

.inspection-comment {
    margin-bottom: 15px;
}

.inspection-comment textarea {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.inspection-photo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border: 2px dashed #6c757d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inspection-photo:hover {
    border-color: #0d6efd;
    background: #e7f3ff;
}

.inspection-photo.has-photo {
    border-color: #198754;
    background: #d1e7dd;
}

.inspection-photo i {
    font-size: 1.2rem;
    color: #6c757d;
}

.inspection-photo.has-photo i {
    color: #198754;
}

.three-state-checkbox {
    width: 30px;
    height: 30px;
    border: 2px solid #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.three-state-checkbox.neutral {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #6c757d;
}

.three-state-checkbox.good {
    background: #198754;
    border-color: #198754;
    color: white;
}

.three-state-checkbox.bad {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.demo-signature {
    width: 100%;
    height: 100px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    position: relative;
    margin: 10px 0;
}

.demo-signature.signed {
    border-color: #0d6efd;
}

.demo-btn {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.demo-btn:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
}

.demo-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.demo-progress {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
}

.demo-progress-bar {
    height: 100%;
    background: #0d6efd;
    width: 0%;
    transition: width 0.5s ease;
}

.demo-steps-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.demo-step-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-step-indicator.active {
    background: #0d6efd;
    transform: scale(1.2);
}

.demo-step-indicator.completed {
    background: #198754;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.demo-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #0d6efd;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.8s ease;
    opacity: 0;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.demo-cursor.active {
    opacity: 1;
}

.demo-cursor.clicking::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 30px;
    height: 30px;
    border: 2px solid #0d6efd;
    border-radius: 50%;
    opacity: 0;
    animation: cursor-click 0.3s ease-out;
}

@keyframes cursor-click {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(2); }
}

.demo-cursor.typing {
    animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.camera-flash {
    animation: cameraFlash 0.5s ease-out;
}

@keyframes cameraFlash {
    0% { background: white; }
    50% { background: #f0f0f0; }
    100% { background: transparent; }
}

.camera-capture {
    animation: cameraCapture 0.8s ease-out;
}

@keyframes cameraCapture {
    0% { transform: scale(1); }
    30% { transform: scale(1.1); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.photo-reveal {
    animation: photoReveal 1s ease-out;
}

@keyframes photoReveal {
    0% { 
        opacity: 0; 
        transform: scale(0.8) rotateY(-90deg);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05) rotateY(-45deg);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotateY(0deg);
    }
}

.signature-drawing {
    position: relative;
    overflow: hidden;
}

.signature-svg {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    z-index: 1;
}

.signature-path {
    fill: none;
    stroke: #007bff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawSignature 2s ease-in-out forwards;
}

@keyframes drawSignature {
    to {
        stroke-dashoffset: 0;
    }
}

.signature-pen {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #007bff;
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    animation: penMovement 2s ease-in-out forwards;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
}

@keyframes penMovement {
    0% { opacity: 1; transform: translateX(15px) translateY(30px); }
    20% { transform: translateX(60px) translateY(20px); }
    40% { transform: translateX(120px) translateY(35px); }
    60% { transform: translateX(180px) translateY(25px); }
    80% { transform: translateX(240px) translateY(30px); }
    95% { transform: translateX(280px) translateY(35px); }
    100% { opacity: 0; transform: translateX(285px) translateY(35px); }
}

.signature-complete {
    animation: signatureComplete 0.5s ease-out forwards;
}

@keyframes signatureComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.demo-notification {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #198754;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.demo-notification.show {
    transform: translateX(0);
}

/* Navbar styling */
.navbar {
    padding: 0.5rem 0;
}

/* Hero section responsive spacing */
.hero-content {
    padding: 2rem 0;
}

.hero-title {
    margin-top: 2rem;
    margin-bottom: 0;
}

.hero-explanation {
    margin-top: 3rem;
    flex-grow: 1;
}

.hero-buttons-container {
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-content {
        text-align: center;
        padding: 1rem 0;
    }
    
    .hero-title {
        margin-top: 1rem;
        font-size: 2.5rem;
    }
    
    .hero-explanation {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons-container {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }
    
    .demo-phone {
        width: 280px;
        height: 560px;
        padding: 15px;
    }
    
    .demo-container {
        padding: 1rem;
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .demo-phone {
        width: 260px;
        height: 520px;
        padding: 12px;
    }
    
    .hero-explanation {
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .demo-phone {
        width: 240px;
        height: 480px;
        padding: 10px;
    }
}