/* Client Progress Portal Styles */

.portal-hero {
    background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-medium) 100%);
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.portal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/nautical-map.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
}

/* Upload Section */
.upload-section {
    background: var(--sand-light);
}

.upload-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.upload-icon {
    text-align: center;
    font-size: 4rem;
    color: var(--ocean-light);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.upload-zone {
    border: 3px dashed var(--ocean-light);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-light);
}

.upload-zone:hover {
    border-color: var(--ocean-sky);
    background: rgba(5, 191, 219, 0.1);
    transform: scale(1.02);
}

.upload-zone-icon {
    font-size: 4rem;
    color: var(--ocean-light);
    display: block;
    margin-bottom: 1rem;
}

.upload-zone.drag-over {
    border-color: var(--ocean-sky);
    background: rgba(0, 255, 202, 0.2);
    transform: scale(1.05);
}

/* Progress Dashboard */
.progress-dashboard {
    background: var(--sand-light);
    min-height: 100vh;
}

.project-header {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.project-title {
    color: var(--ocean-deep);
    font-weight: 700;
    font-size: 2rem;
}

.project-subtitle {
    color: var(--ocean-medium);
    font-size: 1.1rem;
}

.project-subtitle i {
    margin-right: 0.5rem;
}

.progress-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--ocean-light), var(--ocean-sky));
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-badge i {
    margin-right: 0.5rem;
    animation: spin 2s linear infinite;
}

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

/* Overall Progress Card */
.overall-progress-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.overall-progress-card h3 {
    color: var(--ocean-deep);
    font-weight: 700;
}

.progress-bar-container {
    margin: 2rem 0;
}

.progress-bar-custom {
    height: 40px;
    background: var(--gray-light);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ocean-light), var(--ocean-sky));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.progress-stats {
    border-top: 2px solid var(--gray-light);
    padding-top: 2rem;
}

.stat-box {
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: var(--ocean-light);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

.stat-box i {
    font-size: 2.5rem;
    color: var(--ocean-light);
    margin-bottom: 0.5rem;
}

.stat-box:hover i {
    color: var(--white);
}

.stat-box h4 {
    color: var(--ocean-deep);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-box:hover h4 {
    color: var(--white);
}

.stat-box p {
    color: var(--ocean-medium);
    margin: 0;
    font-weight: 500;
}

.stat-box:hover p {
    color: var(--white);
}

/* Timeline Section */
.timeline-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.timeline-section h3 {
    color: var(--ocean-deep);
    font-weight: 700;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gray-light);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item.left {
    flex-direction: row;
}

.timeline-item.right {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: var(--white);
    box-shadow: 0 10px 30px var(--shadow);
    transform: scale(1.05);
}

.timeline-item.completed .timeline-content {
    background: linear-gradient(135deg, rgba(5, 191, 219, 0.1), rgba(0, 255, 202, 0.1));
    border: 2px solid var(--ocean-light);
}

.timeline-item.in-progress .timeline-content {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border: 2px solid #ffc107;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border: 4px solid var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--ocean-medium);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item.completed .timeline-icon {
    background: var(--ocean-light);
    border-color: var(--ocean-light);
    color: var(--white);
    animation: pulse-icon 2s infinite;
}

.timeline-item.in-progress .timeline-icon {
    background: #ffc107;
    border-color: #ffc107;
    color: var(--white);
    animation: rotate-icon 2s linear infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 191, 219, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(5, 191, 219, 0);
    }
}

@keyframes rotate-icon {
    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

.timeline-title {
    color: var(--ocean-deep);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--ocean-medium);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-description {
    color: #666;
    margin: 0;
}

.timeline-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.timeline-status.completed {
    background: var(--ocean-light);
    color: var(--white);
}

.timeline-status.in-progress {
    background: #ffc107;
    color: var(--white);
}

.timeline-status.pending {
    background: var(--gray-medium);
    color: var(--white);
}

/* Gallery Section */
.gallery-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.gallery-section h3 {
    color: var(--ocean-deep);
    font-weight: 700;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px var(--shadow);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-overlay h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.photo-overlay p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

/* Notes Section */
.notes-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.notes-section h3 {
    color: var(--ocean-deep);
    font-weight: 700;
}

.notes-container {
    margin-top: 2rem;
}

.note-item {
    background: var(--gray-light);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--ocean-light);
    transition: all 0.3s ease;
}

.note-item:hover {
    background: var(--white);
    box-shadow: 0 5px 20px var(--shadow);
    transform: translateX(10px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.note-date {
    color: var(--ocean-medium);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-author {
    color: var(--ocean-deep);
    font-weight: 600;
    font-size: 0.9rem;
}

.note-content {
    color: #666;
    line-height: 1.6;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item.left,
    .timeline-item.right {
        flex-direction: row;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-icon {
        left: 30px;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .upload-card {
        padding: 2rem 1.5rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-light);
    border-top-color: var(--ocean-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid var(--ocean-light);
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .icon-line {
    height: 5px;
    background-color: var(--ocean-light);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }
    5% {
        transform: rotate(-45deg);
    }
    12% {
        transform: rotate(-405deg);
    }
    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

/* PIN Entry Styles */
.pin-input {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--ocean-dark);
    border: 3px solid var(--ocean-light);
    padding: 1rem;
    text-transform: uppercase;
}

.pin-input:focus {
    border-color: var(--ocean-medium);
    box-shadow: 0 0 0 0.25rem rgba(6, 182, 212, 0.25);
}

.pin-entry-container {
    animation: fadeIn 0.5s ease-in-out;
}

.file-upload-container {
    animation: fadeIn 0.5s ease-in-out;
}

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

#pinError {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.upload-icon i {
    font-size: 4rem;
    color: var(--ocean-light);
}
