/* ==========================================================================
   JULES BRETON - ULTRA PREMIUM GLOBAL STYLES (FINAL VERSION)
   ========================================================================== */

/* 1. Main Titles and Headers */

.jules-art-card, .jules-post-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    transition: all 0.3s ease;
    text-align: center;
}

.jules-art-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.art-title {
    font-size: 16px !important;
    font-style: italic;
    color: #333;
    margin: 10px 0 !important;
}

.art-meta-data {
    border-top: 1px solid #f5f5f5;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: bold;
    color: #777;
}

.year-label { color: #b5a46d; } 
/* Year Auto-detect styles */
.jules-year.auto-detected {
    background: #e8f0fe;
    border-left: 3px solid #4a90e2;
}

.year-auto-detected {
    position: relative;
}

.year-auto-detected::after {
    content: '🔄';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    opacity: 0.6;
}

/* Search loading indicator */
.search-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* No image fallback */
.jules-no-image-fallback {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
    font-size: 14px;
    border: 1px dashed #ccc;
}

/* Category item hover effect */
.jules-category-post-item.hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Search stats styling */
.jules-search-stats {
    margin-bottom: 20px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.jules-search-stats strong {
    font-size: 18px;
    margin: 0 3px;
}

/* Tooltip for auto-detected items */
.jules-post-item[title] {
    cursor: help;
}

/* Responsive improvements */
@media (max-width: 640px) {
    .jules-search-stats {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .year-auto-detected::after {
        font-size: 12px;
        top: 5px;
        right: 5px;
    }
}
.catalog-main-title, 
.cat-page-title { 
    font-size: 48px !important; 
    font-family: "Playfair Display", serif; 
    font-style: italic; 
    text-align: center; 
    margin-bottom: 20px !important; 
    color: #111; 
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
}

.catalog-main-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #d4af37;
    margin: 15px auto;
}

.cat-page-header { 
    margin-bottom: 50px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 30px; 
}

.back-link { 
    color: #b58d3d; 
    font-weight: bold; 
    text-decoration: none; 
    text-transform: uppercase; 
    font-size: 13px; 
    letter-spacing: 1px; 
}

/* 2. Grid Systems */
.jules-premium-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 35px !important;
    padding: 40px 0 !important;
    width: 100% !important;
}

.jules-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.jules-modern-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 40px; 
    padding: 30px 0; 
}

/* 3. Card Designs */
.jules-art-card {
    background: #ffffff !important;
    border: 1px solid #eaeaea !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
    border-radius: 4px;
}

.jules-art-card:hover { 
    transform: translateY(-8px) !important; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.08) !important; 
    border-color: #b58d3d !important; 
}

.art-img-box {
    width: 100% !important;
    height: 320px !important;
    background: #fdfdfd !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px !important;
    border-bottom: 1px solid #f5f5f5;
}

.art-img-box img { 
    max-width: 100% !important; 
    max-height: 100% !important; 
    object-fit: contain !important; 
    transition: transform 0.6s ease !important; 
}

.jules-art-card:hover .art-img-box img { 
    transform: scale(1.04); 
}

.art-content { 
    padding: 15px 15px !important;
    text-align: center !important; 
}

.card-meta { 
    font-size: 12px; 
    color: #b58d3d; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    font-weight: 700; 
}

/* 4. Main Category Cards */
.jules-main-card {
    position: relative;
    display: block;
    height: 450px; 
    overflow: hidden;
    background: #000;
    text-decoration: none !important;
    border-radius: 4px;
}

.main-card-img-wrap {
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jules-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.main-card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 40px;
    transition: background 0.4s ease;
    text-align: center;
    color: #fff;
}

.overlay-content h2 {
    color: #fff !important;
    font-size: 26px;
    font-family: 'Playfair Display', serif;
    margin: 0 0 10px 0;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.view-collection {
    color: #d4af37;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    display: block;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.jules-main-card:hover .main-card-img-wrap { transform: scale(1.1); }
.jules-main-card:hover img { opacity: 0.6; }
.jules-main-card:hover .main-card-overlay { background: rgba(0,0,0,0.4); }
.jules-main-card:hover h2 { transform: translateY(0); }
.jules-main-card:hover .view-collection { opacity: 1; transform: translateY(0); }

/* 5. Password Protection Form */
.jules-pass-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 80px 20px;
    text-align: center;
}

.jules-pass-wrapper p {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 22px;
    color: #333;
    margin-bottom: 30px;
}

.jules-pass-wrapper input[type="password"] {
    width: 100%;
    max-width: 440px;
    height: 50px;
    border: 1px solid #d4af37;
    border-radius: 50px;
    padding: 0 25px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.jules-pass-wrapper input[type="password"]:focus {
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
    border-color: #b58d3d;
}

.jules-pass-wrapper input[type="submit"] {
    background: #111;
    color: #fff;
    border: none;
    padding: 14px 50px;
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.4s;
    text-transform: uppercase;
}

.jules-pass-wrapper input[type="submit"]:hover {
    background: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ============================================
   SEARCH FORM STYLES (jules-search-form)
============================================ */
#jules-search-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

#jules-search-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 1100px;
    margin: 40px auto;
}

#jules-search-form input[type="text"] {
    flex: 2;
    min-width: 250px;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: auto;
}

#jules-search-form input[type="text"]:focus {
    outline: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: scale(1.02);
}

#jules-search-form select {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    height: auto;
}

#jules-search-form select:focus {
    outline: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

#jules-search-btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #ffd700;
    color: #333;
    box-shadow: 0 5px 15px rgba(255,215,0,0.3);
}

#jules-search-btn:hover {
    background: #ffed4a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,215,0,0.4);
}

#jules-reset-btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

#jules-reset-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

#jules-loading {
    padding: 15px 25px;
    color: white;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#jules-loading span {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 7. Search Results Grid */
.jules-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.jules-post-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.jules-post-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.jules-post-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.jules-thumbnail {
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.jules-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jules-post-item:hover .jules-thumbnail::after {
    opacity: 1;
}

.jules-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.jules-post-item:hover .jules-thumbnail img {
    transform: scale(1.1);
}

.jules-no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.jules-content {
    padding: 25px 20px;
    background: white;
    position: relative;
}

.jules-content h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #2d3748;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 10px;
}

.jules-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.jules-post-item:hover .jules-content h2::after {
    width: 80px;
}

.jules-uid {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.jules-year {
    display: block;
    font-size: 15px;
    color: #718096;
    margin-top: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.jules-year::before {
    content: '📅';
    font-size: 14px;
    opacity: 0.7;
}

/* 8. Suggested Posts & Slick Slider */
.suggested-posts-grid h5 {
    font-family: "Playfair Display", serif !important;
    font-size: 18px !important;
    font-style: italic !important;
    color: #b58d3d !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.grid-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

.grid-card {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    padding: 8px !important;
    flex: 1 1 calc(32.33% - 15px);
    max-width: calc(32.33% - 15px);
    box-sizing: border-box !important;
    transition: 0.3s ease;
}

.slick-initialized .grid-card {
    max-width: 100% !important;
    flex: none !important;
    margin: 0 5px !important;
}

.slick-prev:before, 
.slick-next:before { 
    color: #b58d3d !important; 
    font-size: 22px !important; 
}

.slick-dots { 
    bottom: -30px !important; 
}

.slick-dots li button:before { 
    color: #b58d3d !important; 
    font-size: 10px !important; 
}

.slick-dots li.slick-active button:before { 
    color: #111 !important; 
}

/* 9. Single Post Container */
.jules-advance-container { 
    max-width: 1400px; 
    margin: 60px auto; 
    padding: 0 40px; 
    animation: fadeIn 0.8s ease-in-out; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.jules-main-content { 
    display: flex; 
    gap: 60px; 
    align-items: flex-start; 
}

.jules-visual-side { 
    flex: 1.2; 
    position: sticky; 
    top: 40px; 
}

.jules-frame { 
    background: #fff; 
    padding: 20px; 
    border: 1px solid #ddd; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.1); 
    transition: 0.5s; 
}

.jules-frame img { 
    width: 100%; 
    height: auto; 
    max-height: 700px; 
    object-fit: contain; 
    display: block; 
}

.jules-info-side {
    flex: 0.8; 
    min-width: 0;
}

.jules-title-h1 {
    font-size: 46px !important;
    font-family: "Playfair Display", serif;
    margin: 10px 0 20px 0;
}

.jules-ref-tag {
    font-size: 14px;
    color: #b58d3d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 500;
}

.jules-description {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.jules-description p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* 10. No Results */
.jules-no-results {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    border-radius: 30px;
    color: #4a5568;
    font-size: 18px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.jules-no-results h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #2d3748;
    font-weight: 600;
}

.jules-error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: #c53030;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid #fc8181;
}

/* 11. Back Action */
.jules-back-action { 
    display: inline-block; 
    padding: 12px 35px; 
    background: #111; 
    color: #fff !important; 
    text-decoration: none; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-size: 12px;
    letter-spacing: 1.5px; 
    transition: 0.4s; 
    border-radius: 4px;
    margin-top: 20px;
}

.jules-back-action:hover { 
    background: #b58d3d; 
}

.jules-copyright-tag { 
    font-size: 10px; 
    color: #aaa; 
    margin-top: 40px; 
    text-align: center; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
}

/* 12. Responsive Design */
@media (max-width: 1024px) {
    .jules-main-content { 
        flex-direction: column; 
        gap: 40px; 
    }
    .jules-visual-side { 
        position: relative; 
        top: 0; 
        width: 100%; 
    }
    .jules-info-side { 
        width: 100%; 
    }
    .jules-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 900px) {
    #jules-search-form { 
        flex-direction: column; 
        border-radius: 20px; 
        padding: 20px;
    }
    #jules-search-form input,
    #jules-search-form select,
    #jules-search-form button { 
        width: 100% !important; 
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .jules-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .jules-content h2 {
        font-size: 18px;
    }
    .jules-thumbnail {
        height: 200px;
    }
    .jules-premium-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .jules-main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .jules-main-grid { 
        grid-template-columns: 1fr; 
    }
    .jules-main-card { 
        height: 350px; 
    }
    .jules-premium-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    #jules-search-wrapper {
        padding: 15px;
    }
    .jules-posts-grid {
        grid-template-columns: 1fr;
    }
    .jules-title-h1 {
        font-size: 32px !important;
    }
}

/* Search Results Summary */
.jules-results-summary {
     display: none;
    margin-bottom: 25px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.jules-results-summary strong {
    font-size: 18px;
    margin: 0 3px;
}

/* Meta Info Display */
.jules-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.jules-uid {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.jules-year {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* No Results */
.jules-no-results {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.jules-no-results h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 22px;
}

.jules-no-results p {
    margin: 0;
    color: #666;
    font-size: 16px;
}
