/* Introduction text */
.intro-text {
    max-width: 600px;
    text-align: left;
    margin: 0 0 2rem;
}

/* Spacer */
.spacer {
    height: 30px;
    width: 100%;
}

/* Portfolio items */
.portfolio-item {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

/* Portfolio links */
.portfolio-link {
    text-decoration: none;
    color: inherit;
}

/* Image container */
.image-container {
    position: relative;
    display: inline-block;
    width: 600px;
    line-height: 0;
    margin: 0 auto;
}

.image-container.small {
    width: 400px;
}

/* Portfolio images */
.portfolio-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    vertical-align: top;
}

/* Glow overlay */
.glow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* Video wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Button styles */
.wp-element-caption span:first-child {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.wp-element-caption span:first-child .button-glow-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    pointer-events: none;
    z-index: 1;
}

.wp-element-caption span:first-child .button-internal-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.glow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-container,
    .image-container.small {
        width: 100%;
    }
    
    .portfolio-item {
        padding: 0 1rem;
    }
}
/* Portfolio-specific styles that complement WordPress theme */
.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Reset any WordPress margins/paddings */
.wp-block-image {
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-image figure {
    margin: 0 !important;
    padding: 0 !important;
}

/* Image container with proper positioning */
.image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 600px;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
}

/* Ensure images maintain aspect ratio */
.image-container img {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Added transition */
}

/* Hover effect - swap images */
.image-container .hover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Added transition */
}

/* Fix: Make sure the hover image fully appears while hiding the default image */
.image-container:hover .hover-image {
    opacity: 1;
    visibility: visible;
}

.image-container:hover .default-image {
    opacity: 0;
    visibility: hidden;
}

/* Ensure second image does not become transparent */
.image-container .hover-image {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Added transition */
}

.image-container:hover .hover-image {
    opacity: 1 !important; /* Ensure it fully appears */
    visibility: visible !important;
}

/* Only apply border to first two images */
.wp-block-image:nth-child(-n+3) .image-container img {
    border: 2px solid #1F1F1F;
}

/* Glow overlay with precise positioning */
.glow-overlay {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    pointer-events: none;
    z-index: 1;
    margin: 0 !important;
    padding: 0 !important;
}

/* Canvas positioning */
.glow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

/* Caption styling */
.wp-element-caption {
    margin-top: 1rem;
    text-align: center;
    color: #cecece;
}
