/**
 * Frontend Styles for SCORM Portfolio
 */

.ssp-portfolio-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.ssp-portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ssp-portfolio-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.ssp-portfolio-nav {
    display: flex;
    gap: 10px;
}

.ssp-nav-prev,
.ssp-nav-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.ssp-nav-prev:hover,
.ssp-nav-next:hover {
    background: #f5f5f5;
    border-color: #999;
}

.ssp-nav-prev:disabled,
.ssp-nav-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ssp-portfolio-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: hidden;
    gap: 24px;
    transition: transform 0.3s ease;
}

.ssp-portfolio-grid[data-columns="2"] .ssp-card {
    flex: 0 0 calc((100% - 24px) / 2);
}

.ssp-portfolio-grid[data-columns="3"] .ssp-card {
    flex: 0 0 calc((100% - 48px) / 3);
}

.ssp-portfolio-grid[data-columns="4"] .ssp-card {
    flex: 0 0 calc((100% - 72px) / 4);
}

.ssp-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ssp-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.ssp-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.ssp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ssp-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ssp-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.ssp-card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.ssp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.ssp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.ssp-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    margin: 5% auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.ssp-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ssp-modal-close:hover {
    background: #fff;
}

#ssp-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media screen and (max-width: 1024px) {
    .ssp-portfolio-grid[data-columns="4"] .ssp-card {
        flex: 0 0 calc((100% - 48px) / 3);
    }
}

@media screen and (max-width: 768px) {
    .ssp-portfolio-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .ssp-portfolio-title {
        font-size: 24px;
    }
    
    .ssp-portfolio-grid .ssp-card,
    .ssp-portfolio-grid[data-columns="3"] .ssp-card,
    .ssp-portfolio-grid[data-columns="4"] .ssp-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }
    
    .ssp-card-image {
        height: 150px;
    }
    
    .ssp-modal-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
}

@media screen and (max-width: 480px) {
    .ssp-portfolio-grid .ssp-card,
    .ssp-portfolio-grid[data-columns="2"] .ssp-card,
    .ssp-portfolio-grid[data-columns="3"] .ssp-card,
    .ssp-portfolio-grid[data-columns="4"] .ssp-card {
        flex: 0 0 100%;
    }
    
    .ssp-portfolio-title {
        font-size: 20px;
    }
}

/**
 * Password Protection Overlay Styles
 */
.ssp-password-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ssp-password-form {
    text-align: center;
    padding: 40px;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ssp-password-icon {
    color: #667eea;
    margin-bottom: 20px;
}

.ssp-password-form h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.ssp-password-form p {
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.ssp-password-input-wrapper {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ssp-password-input {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    outline: none;
    width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ssp-password-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ssp-password-submit {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ssp-password-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ssp-password-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ssp-password-error {
    margin-top: 15px;
    color: #d63638;
    font-size: 14px;
    font-weight: 500;
}

/**
 * Portfolio Modal Password Form Styles
 */
.ssp-password-modal-form {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ssp-password-form-container {
    background: #fff;
    border-radius: 12px;
    padding: 50px 40px;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ssp-password-form-container h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.ssp-password-form-container > p {
    margin: 0 0 30px 0;
    font-size: 14px;
    color: #666;
}

.ssp-portfolio-password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ssp-portfolio-password-form input[type="password"] {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ssp-portfolio-password-form input[type="password"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ssp-portfolio-password-form button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ssp-portfolio-password-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ssp-portfolio-password-form button:active {
    transform: translateY(0);
}

@media screen and (max-width: 480px) {
    .ssp-password-form {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .ssp-password-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ssp-password-input {
        width: 100%;
    }
    
    .ssp-password-form h3 {
        font-size: 18px;
    }
}
