/* Examples Page Specific Styles */

/* Lightbox Container */
#lightbox.lightbox {
    /* Reset positioning and sizing */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important; /* Ensure it's on top of EVERYTHING */
    
    /* Flex layout for centering */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    
    /* Visuals */
    background-color: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(5px);
    
    /* Transitions */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Active state - overrides display:none */
#lightbox.lightbox.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Lightbox Content Wrapper */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Image styling */
.lightbox-image {
    max-width: 90vw !important;
    max-height: 80vh !important;
    object-fit: contain !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: transparent;
}

#lightbox.lightbox.active .lightbox-image {
    transform: scale(1);
}

/* Caption */
.lightbox-caption {
    color: white !important;
    margin-top: 1rem;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-weight: 500;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white !important;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, color 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
}

.lightbox-close:hover {
    transform: scale(1.1);
    color: #3b82f6 !important;
}

/* Zoom cursor for trigger images */
.example-image-container img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.example-image-container:hover img {
    transform: scale(1.05);
}

/* Ensure label doesn't block clicks */
.image-label {
    pointer-events: none;
}

/* ===== EXAMPLES PAGE ===== */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.example-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.example-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #f0f0f0;
}

.example-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: white;
}

.example-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.example-image-container:hover img {
    transform: scale(1.05);
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    text-align: center;
}

.example-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.example-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #111827;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.example-description {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.example-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.download-btn.contours {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.2);
}

.download-btn.contours:hover {
    background-color: #3498db;
    color: white;
}

.download-btn.cloud {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.download-btn.cloud:hover {
    background-color: #2ecc71;
    color: white;
}

.download-btn.svg {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.2);
}

.download-btn.svg:hover {
    background-color: #9b59b6;
    color: white;
}

@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 3rem;
    }
}

/* ===== EXAMPLES PAGE ===== */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.example-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.example-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #f0f0f0;
}

.example-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: white;
}

.example-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.example-image-container:hover img {
    transform: scale(1.05);
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    text-align: center;
}

.example-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.example-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #111827;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.example-description {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.example-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.download-btn.contours {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.2);
}

.download-btn.contours:hover {
    background-color: #3498db;
    color: white;
}

.download-btn.cloud {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.download-btn.cloud:hover {
    background-color: #2ecc71;
    color: white;
}

.download-btn.svg {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.2);
}

.download-btn.svg:hover {
    background-color: #9b59b6;
    color: white;
}

@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 3rem;
    }
}

.feature-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.feature-link:hover {
    gap: 0.75rem;
}

