/**
 * Amoos Portfolio Showcase Styles
 * Modern, responsive design with smooth animations
 */

/* Portfolio Container */
.amoos-portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Portfolio Grid */
.amoos-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 20px;
}

/* Portfolio Item */
.amoos-portfolio-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.amoos-portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Portfolio Card Layout */
.amoos-portfolio-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.amoos-portfolio-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.amoos-portfolio-main-image {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.amoos-portfolio-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.amoos-portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.amoos-portfolio-main-image:hover .amoos-portfolio-overlay {
    opacity: 1;
}

.amoos-portfolio-main-image:hover img {
    transform: scale(1.05);
}

.amoos-portfolio-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.amoos-preview-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amoos-preview-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.amoos-preview-btn i {
    font-size: 16px;
}

.amoos-portfolio-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.amoos-portfolio-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* Read More Button */
.amoos-read-more-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amoos-read-more-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.amoos-read-more-btn:active {
    transform: translateY(0);
}

.amoos-portfolio-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.amoos-portfolio-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.amoos-read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.amoos-read-more:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Portfolio Click Hint */
.amoos-portfolio-click-hint {
    text-align: center;
    margin: 15px 0 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.amoos-portfolio-click-hint p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.amoos-portfolio-click-hint em {
    color: #3498db;
    font-weight: 500;
}

/* Portfolio Previews */
.amoos-portfolio-previews {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.amoos-preview-item {
    flex: 1;
    min-width: 140px;
}

.amoos-preview-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.amoos-preview-image:hover {
    transform: scale(1.02);
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.amoos-preview-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.amoos-preview-image:hover img {
    opacity: 0.9;
}

/* Preview Overlay */
.amoos-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9) 0%, rgba(41, 128, 185, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
    padding: 15px;
}

.amoos-preview-image:hover .amoos-preview-overlay {
    opacity: 1;
}

.amoos-preview-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.amoos-preview-overlay .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Desktop Preview Specific */
.amoos-desktop-preview .amoos-preview-image {
    aspect-ratio: 16/10;
}

.amoos-desktop-preview .amoos-preview-image img {
    object-fit: cover;
    height: 100%;
}

/* Mobile Preview Specific */
.amoos-mobile-preview .amoos-preview-image {
    aspect-ratio: 9/16;
    max-width: 120px;
    margin: 0 auto;
}

.amoos-mobile-preview .amoos-preview-image img {
    object-fit: cover;
    height: 100%;
}

/* Modal Styles */
.amoos-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

/* Preview Modal Specific Styles */
.amoos-preview-modal-content {
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    padding: 0;
    margin: 2.5% auto;
}

.amoos-preview-modal-content .amoos-modal-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.amoos-preview-modal-content .amoos-modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.amoos-preview-modal-content .amoos-modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.amoos-preview-modal-content .amoos-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.amoos-preview-modal-content .amoos-modal-iframe-container {
    padding: 0;
    margin: 0;
    min-height: calc(90vh - 65px);
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amoos-preview-modal-content .amoos-device-frame {
    margin: 0;
}

/* Mobile Modal - Mobile Size */
.amoos-preview-modal-content.mobile-modal {
    width: 350px;
    max-width: 350px;
    height: 600px;
    max-height: 600px;
    margin: 5% auto;
}

.amoos-preview-modal-content.mobile-modal .amoos-modal-header {
    border-radius: 25px 25px 0 0;
    padding: 12px 15px;
}

.amoos-preview-modal-content.mobile-modal .amoos-modal-title {
    font-size: 1rem;
}

.amoos-preview-modal-content.mobile-modal .amoos-modal-close {
    width: 30px;
    height: 30px;
    font-size: 18px;
}

.amoos-preview-modal-content.mobile-modal .amoos-modal-iframe-container {
    min-height: calc(600px - 65px);
    height: calc(600px - 65px);
    border-radius: 0 0 25px 25px;
    background: #2c3e50;
    padding: 20px 15px;
}

.amoos-preview-modal-content.mobile-modal .amoos-device-frame {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    padding: 0;
    background: #2c3e50;
}

.amoos-preview-modal-content.mobile-modal .amoos-device-screen {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* Desktop Modal - Full Width */
.amoos-preview-modal-content.desktop-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.amoos-preview-modal-content.desktop-modal .amoos-modal-header {
    border-radius: 0;
    padding: 15px 20px;
    position: relative;
    z-index: 10001;
}

.amoos-preview-modal-content.desktop-modal .amoos-modal-title {
    font-size: 1.3rem;
}

.amoos-preview-modal-content.desktop-modal .amoos-modal-close {
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.amoos-preview-modal-content.desktop-modal .amoos-modal-iframe-container {
    min-height: calc(100vh - 65px);
    height: calc(100vh - 65px);
    border-radius: 0;
    background: #2c3e50;
    padding: 0;
    margin: 0;
}

.amoos-preview-modal-content.desktop-modal .amoos-device-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0;
    background: #2c3e50;
}

.amoos-preview-modal-content.desktop-modal .amoos-device-screen {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.amoos-preview-modal-content.desktop-modal .amoos-portfolio-iframe {
    width: 100%;
    height: 100%;
    border-radius: 0;
}


/* Description Modal Specific Styles */
.amoos-description-modal-content {
    max-width: 800px;
    width: 90%;
}

.amoos-description-modal-content .amoos-modal-description {
    line-height: 1.6;
    color: #333;
}

.amoos-description-modal-content .amoos-modal-description h1,
.amoos-description-modal-content .amoos-modal-description h2,
.amoos-description-modal-content .amoos-modal-description h3,
.amoos-description-modal-content .amoos-modal-description h4,
.amoos-description-modal-content .amoos-modal-description h5,
.amoos-description-modal-content .amoos-modal-description h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #2c3e50;
}

.amoos-description-modal-content .amoos-modal-description h1 {
    font-size: 1.8rem;
}

.amoos-description-modal-content .amoos-modal-description h2 {
    font-size: 1.5rem;
}

.amoos-description-modal-content .amoos-modal-description h3 {
    font-size: 1.3rem;
}

.amoos-description-modal-content .amoos-modal-description p {
    margin-bottom: 1em;
}

.amoos-description-modal-content .amoos-modal-description ul,
.amoos-description-modal-content .amoos-modal-description ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.amoos-description-modal-content .amoos-modal-description li {
    margin-bottom: 0.5em;
}

.amoos-description-modal-content .amoos-modal-description strong,
.amoos-description-modal-content .amoos-modal-description b {
    font-weight: 600;
    color: #2c3e50;
}

.amoos-description-modal-content .amoos-modal-description em,
.amoos-description-modal-content .amoos-modal-description i {
    font-style: italic;
}

.amoos-description-modal-content .amoos-modal-description a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.amoos-description-modal-content .amoos-modal-description a:hover {
    border-bottom-color: #3498db;
}

.amoos-description-modal-content .amoos-modal-description blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    font-style: italic;
    color: #666;
}

.amoos-description-modal-content .amoos-modal-description img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1em 0;
}

.amoos-description-modal-content .amoos-modal-description code {
    background: #f1f2f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.amoos-description-modal-content .amoos-modal-description pre {
    background: #f8f9fa;
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
}

.amoos-description-modal-content .amoos-modal-description pre code {
    background: none;
    padding: 0;
    color: #333;
}

.amoos-modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.amoos-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.amoos-modal-close:hover,
.amoos-modal-close:focus {
    color: #000;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Modal Header */
.amoos-modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.amoos-modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

/* Modal Body */
.amoos-modal-body {
    padding: 25px 30px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.amoos-modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Device Frame Container */
.amoos-modal-iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

/* Device Frame */
.amoos-device-frame {
    position: relative;
    background: #2c3e50;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Desktop Frame */
.amoos-device-frame.desktop {
    width: 100%;
    border-radius: 12px;
    padding: 20px;
}

.amoos-device-frame.desktop::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #34495e;
    border-radius: 2px;
}

/* Mobile Frame */
.amoos-device-frame.mobile {
    width: 300px;
    border-radius: 25px;
    padding: 20px 15px;
}

.amoos-device-frame.mobile::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #34495e;
    border-radius: 2px;
}

.amoos-device-frame.mobile::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: #34495e;
    border-radius: 50%;
}

/* Device Screen */
.amoos-device-screen {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px #e5e5e5;
}

.amoos-device-frame.desktop .amoos-device-screen {
    aspect-ratio: 16/10;
}

.amoos-device-frame.mobile .amoos-device-screen {
    aspect-ratio: 9/16;
}

/* Portfolio Iframe */
.amoos-portfolio-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

/* Loading State */
.amoos-portfolio-iframe.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .amoos-portfolio-container {
        padding: 15px;
    }
    
    .amoos-portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .amoos-portfolio-image-container {
        height: 200px;
    }
    
    .amoos-portfolio-content {
        padding: 20px;
    }
    
    .amoos-portfolio-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .amoos-preview-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .amoos-portfolio-title {
        font-size: 1.3rem;
    }
    
    .amoos-portfolio-previews {
        flex-direction: column;
        gap: 15px;
    }
    
    .amoos-preview-item {
        min-width: auto;
    }
    
    .amoos-mobile-preview .amoos-preview-image {
        max-width: 100px;
    }
    
    .amoos-portfolio-click-hint {
        margin: 10px 0 15px 0;
        padding: 8px;
    }
    
    .amoos-portfolio-click-hint p {
        font-size: 0.85rem;
    }
    
    .amoos-modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .amoos-preview-modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 98vh;
    }
    
    .amoos-preview-modal-content .amoos-modal-iframe-container {
        min-height: 95vh;
    }
    
    /* Mobile Modal on Mobile Devices */
    .amoos-preview-modal-content.mobile-modal {
        width: 90%;
        max-width: 350px;
        height: 80vh;
        max-height: 600px;
        margin: 10% auto;
    }
    
    .amoos-preview-modal-content.mobile-modal .amoos-modal-header {
        padding: 10px 12px;
    }
    
    .amoos-preview-modal-content.mobile-modal .amoos-modal-title {
        font-size: 0.9rem;
    }
    
    .amoos-preview-modal-content.mobile-modal .amoos-modal-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .amoos-preview-modal-content.mobile-modal .amoos-modal-iframe-container {
        min-height: calc(80vh - 60px);
        height: calc(80vh - 60px);
        padding: 15px 10px;
    }
    
    /* Desktop Modal on Mobile Devices */
    .amoos-preview-modal-content.desktop-modal {
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
    }
    
    .amoos-preview-modal-content.desktop-modal .amoos-modal-header {
        padding: 12px 15px;
    }
    
    .amoos-preview-modal-content.desktop-modal .amoos-modal-title {
        font-size: 1.1rem;
    }
    
    .amoos-preview-modal-content.desktop-modal .amoos-modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .amoos-preview-modal-content.desktop-modal .amoos-modal-iframe-container {
        min-height: calc(100vh - 60px);
        height: calc(100vh - 60px);
        padding: 0;
    }
    
    .amoos-modal-header {
        padding: 20px 20px 15px;
    }
    
    .amoos-modal-title {
        font-size: 1.5rem;
    }
    
    .amoos-modal-body {
        padding: 20px;
    }
    
    .amoos-modal-iframe-container {
        min-height: 400px;
        padding: 15px;
    }
    
    .amoos-device-frame.mobile {
        width: 250px;
    }
    
    .amoos-device-frame.desktop {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .amoos-portfolio-container {
        padding: 10px;
    }
    
    .amoos-portfolio-content {
        padding: 15px;
    }
    
    .amoos-portfolio-title {
        font-size: 1.2rem;
    }
    
    .amoos-modal-header {
        padding: 15px 15px 10px;
    }
    
    .amoos-modal-title {
        font-size: 1.3rem;
    }
    
    .amoos-modal-body {
        padding: 15px;
    }
    
    .amoos-modal-iframe-container {
        min-height: 350px;
        padding: 10px;
    }
    
    .amoos-device-frame.mobile {
        width: 200px;
        padding: 15px 10px;
    }
    
    .amoos-device-frame.desktop {
        padding: 15px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .amoos-portfolio-item {
        background: #2c3e50;
        border-color: #34495e;
    }
    
    .amoos-portfolio-title {
        color: #ecf0f1;
    }
    
    .amoos-portfolio-excerpt {
        color: #bdc3c7;
    }
    
    .amoos-modal-content {
        background-color: #2c3e50;
    }
    
    .amoos-modal-header {
        background: #34495e;
        border-bottom-color: #4a5f7a;
    }
    
    .amoos-modal-title {
        color: #ecf0f1;
    }
    
    .amoos-modal-description {
        color: #bdc3c7;
    }
    
    .amoos-modal-iframe-container {
        background: #34495e;
    }
    
    .amoos-device-screen {
        background: #ffffff;
    }
}

/* Print Styles */
@media print {
    .amoos-modal {
        display: none !important;
    }
    
    .amoos-preview-image {
        cursor: default;
    }
    
    .amoos-preview-overlay {
        display: none;
    }
}
