/* Portfolio Device Showcase - Universal Styles */

/* Container */
.pds-showcase-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Device Container */
.pds-device-container {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pds-device-container.pds-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Device Frame */
.pds-device-frame {
    position: relative;
    display: inline-block;
}

.pds-device-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Screen Content Area */
.pds-screen-content {
    position: absolute;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
}

/* Device-specific positioning */
.pds-device-laptop .pds-screen-content {
    top: 5%;
    left: 12%;
    width: 76%;
    height: 68%;
}

.pds-device-tablet .pds-screen-content {
    top: 8%;
    left: 10%;
    width: 80%;
    height: 84%;
}

.pds-device-mobile .pds-screen-content {
    top: 8%;
    left: 12%;
    width: 76%;
    height: 84%;
}

/* Iframe Styles */
.pds-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    transform-origin: top left;
}

/* Screenshot Styles */
.pds-screenshot-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: hidden;
    overflow-x: hidden;
}

.pds-screenshot {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Loading State */
.pds-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
}

.pds-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: pds-spin 0.8s linear infinite;
}

@keyframes pds-spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.pds-error {
    color: #d63638;
    text-align: center;
    padding: 20px;
}

/* Placeholder */
.pds-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f9f9f9;
    color: #666;
    text-align: center;
    padding: 20px;
}

.pds-placeholder p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.pds-visit-link {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.3s ease;
}

.pds-visit-link:hover {
    background: #005a87;
}

/* Device Info */
.pds-device-info {
    text-align: center;
    margin-top: 15px;
}

.pds-website-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

.pds-website-link:hover {
    background: #0073aa;
    color: #fff;
}

/* Responsive Sizes */
.pds-device-laptop {
    max-width: 800px;
}

.pds-device-tablet {
    max-width: 400px;
}

.pds-device-mobile {
    max-width: 280px;
}

/* Hover Effects */
.pds-device-container:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.pds-device-container:hover .pds-device-image {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

/* Responsive Layout */
@media screen and (max-width: 1200px) {
    .pds-showcase-wrapper {
        gap: 30px;
    }

    .pds-device-laptop {
        max-width: 600px;
    }
}

@media screen and (max-width: 768px) {
    .pds-showcase-wrapper {
        gap: 40px;
        padding: 30px 15px;
    }

    .pds-device-laptop {
        max-width: 100%;
    }

    .pds-device-tablet {
        max-width: 350px;
    }

    .pds-device-mobile {
        max-width: 240px;
    }
}

@media screen and (max-width: 480px) {
    .pds-showcase-wrapper {
        gap: 30px;
    }

    .pds-device-tablet {
        max-width: 280px;
    }

    .pds-device-mobile {
        max-width: 200px;
    }
}

/* Accessibility */
.pds-device-container:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 4px;
}

/* Print Styles */
@media print {
    .pds-showcase-wrapper {
        display: block;
    }

    .pds-device-container {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .pds-iframe {
        display: none;
    }
}
