/* Custom CSS for improvements */

/* Accessibility improvements */
:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Image accessibility */
img:not([alt]) {
    border: 2px solid #ff0000;
}

/* Lazy loading placeholder */
img[data-src] {
    background: #f5f5f5;
    min-height: 200px;
    display: block;
}

/* Dark base so there's nothing to flash before Three.js loads */
#page-wraper {
    background: #0a0f14 !important;
}

/* Three.js canvas starts invisible and fades in */
#containerjs {
    opacity: 0;
    transition: opacity 1.4s ease;
}

/* Fix overlapping portfolio cards */
.isotope-box {
    overflow: hidden;
    clear: both;
}

.isotope-item {
    margin-bottom: 30px;
    display: block;
    float: none;
}

figure.snip1321 {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: auto !important;
}

/* Blog styles */
.blog-post {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.blog-post h3 {
    margin-bottom: 15px;
}

.blog-post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-post-content {
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.read-more:hover {
    background: #0056b3;
}

/* Portfolio demo badge */
.demo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #000;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 10;
}

/* Iframe portfolio items */
.isotope-item iframe {
    width: 100%;
    height: 340px;
    border: none;
    display: block;
    margin: 0 auto;
}

/* Fixed image height so Isotope can measure cards before images load */
.isotope-item img {
    height: 260px;
    object-fit: cover;
    object-position: center top;
}

/* Transparent overlay to block scroll capture on iframe cards */
.scroll-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Fix for overlapping cards */
.isotope-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Clearfix for isotope container */
.isotope-box::after {
    content: "";
    display: table;
    clear: both;
}

/* Blog styles */
.blog-post {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.blog-post h3 {
    margin-bottom: 15px;
}

.blog-post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-post-content {
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.read-more:hover {
    background: #0056b3;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .section-heading h2 {
        font-size: 28px;
    }
    
    .service-item {
        margin-bottom: 30px;
    }
}

/* Animation performance */
* {
    will-change: auto;
}

/* Print styles */
@media print {
    .responsive-nav, .social-network, .copyright-text {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}