/**
 * Frontend Box Styles
 */

.llb-boxes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px 0;
}

.llb-box-wrapper {
    position: relative;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

.llb-box {
    position: relative;
    width: 250px;
    height: 250px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.llb-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.llb-box iframe.llb-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.llb-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
    z-index: 1;
}

.llb-loading p {
    margin: 10px 0 0 0;
    font-size: 14px;
}

.llb-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: llb-spin 1s linear infinite;
}

@keyframes llb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.llb-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    text-align: center;
    z-index: 2;
}

.llb-error p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.llb-error a {
    color: #2271b1;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #2271b1;
    padding: 5px 15px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.llb-error a:hover {
    background: #2271b1;
    color: #fff;
}

.llb-box-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
    text-align: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.llb-box:hover .llb-box-title {
    opacity: 1;
}

.llb-no-links {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .llb-boxes-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .llb-box-wrapper {
        max-width: 100%;
    }
    
    .llb-box {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .llb-boxes-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .llb-box {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
}

/* Print Styles */
@media print {
    .llb-boxes-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .llb-box {
        break-inside: avoid;
    }
}

/* Archive Page Styles - Posts Layout */
.llb-archive-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.llb-archive-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.llb-archive-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.llb-archive-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.llb-posts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 30px 0;
}

.llb-link-post {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.llb-link-post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.llb-post-content {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: flex-start;
}

.llb-post-box {
    flex-shrink: 0;
}

.llb-post-meta {
    flex: 1;
    min-width: 0;
}

.llb-post-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.llb-post-title a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.llb-post-title a:hover {
    color: #135e96;
}

.llb-post-url {
    margin-top: 10px;
    font-size: 14px;
}

.llb-post-url a {
    color: #666;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s ease;
}

.llb-post-url a:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* Pagination Styles */
.llb-pagination {
    margin: 40px 0;
    text-align: center;
}

.llb-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #2271b1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.llb-pagination .page-numbers:hover,
.llb-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.llb-pagination .page-numbers.current {
    font-weight: 600;
}

/* Responsive Archive Layout */
@media (max-width: 768px) {
    .llb-archive-page {
        padding: 15px;
    }
    
    .llb-archive-title {
        font-size: 28px;
    }
    
    .llb-post-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .llb-post-box {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .llb-link-post {
        padding: 20px;
    }
    
    .llb-post-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .llb-archive-page {
        padding: 10px;
    }
    
    .llb-archive-title {
        font-size: 24px;
    }
    
    .llb-link-post {
        padding: 15px;
    }
    
    .llb-post-title {
        font-size: 18px;
    }
}

