/*
Theme Name: Fast Locker Pro
Author: You
Description: Premium flattened design. Optimized for Inline Styles.
Version: 8.2
*/

/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    --primary: #2563eb;       
    --primary-dark: #1d4ed8;
    --bg-body: #f8fafc;       
    --bg-card: #ffffff;
    --text-main: #0f172a;     /* Deep dark blue/black */
    --text-muted: #64748b;    
    --border: #e2e8f0;
    --radius: 16px;           
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --container-width: 700px; 
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; border: 2px solid #f1f5f9; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Selection Color */
::selection { background: rgba(37, 99, 235, 0.2); color: var(--primary-dark); }


/* =========================================
   2. LAYOUT
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 40px auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    overflow: hidden;
    min-height: 80vh;
}

@media (max-width: 768px) {
    .container { margin: 0; border-radius: 0; min-height: 100vh; }
}


/* =========================================
   3. HEADER (Layout Only)
   ========================================= */
/* NOTE: Typography for .site-title is now handled 
   via INLINE STYLES in header.php to prevent browser conflicts.
*/
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Optional hover opacity for the logo */
header a:hover {
    opacity: 0.7;
    transition: opacity 0.2s;
}


/* =========================================
   4. ARTICLE & TYPOGRAPHY
   ========================================= */
article { padding: 40px; }
@media (max-width: 600px) { article { padding: 25px 20px; } }

/* Article Title (The Post Headline) */
h1.entry-title {
    font-size: 2rem; 
    font-weight: 800; 
    line-height: 1.15;
    margin: 0 0 0.5rem 0; 
    letter-spacing: -1px;
    color: #0f172a;
}

.meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; display: block; font-weight: 500; }

article p { margin-bottom: 1.5rem; font-size: 1.05rem; color: #334155; }

/* Animated Links only inside Article text */
article p a {
    color: var(--primary);
    text-decoration: none;
    background-image: linear-gradient(var(--primary), var(--primary));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size .3s;
}
article p a:hover { background-size: 100% 2px; }

article h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; color: #0f172a; font-weight: 700; letter-spacing: -0.5px; }
article ul { margin-bottom: 1.5rem; padding-left: 20px; }
article li { margin-bottom: 0.5rem; }


/* =========================================
   5. LOCKER COMPONENTS
   ========================================= */
.locker-wrapper {
    position: relative; margin: 40px 0; width: 100%;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; 
}

/* Teaser Content */
.blurred-secret {
    padding: 30px;
    filter: blur(8px); opacity: 0.6;
    pointer-events: none; user-select: none; background: #fff;
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    max-height: 250px;
}

/* Button Overlay */
.mostra-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(4px); z-index: 10;
}

.btn-mostra {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; font-size: 1rem; font-weight: 600; padding: 14px 32px;
    border-radius: 50px; border: none; cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all 0.3s; display: flex; align-items: center; gap: 8px;
    animation: pulse-blue 2s infinite;
}
.btn-mostra:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5); }
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Locker Box */
.locker-box { display: none; width: 100%; background: #fff; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.locker-header { background: #f8fafc; padding: 20px; text-align: center; border-bottom: 1px solid var(--border); }
.locker-header h3 { margin: 0 0 4px 0; color: var(--text-main); font-size: 1.1rem; }
.locker-header p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
#offer-list { padding: 15px; background: #fff; }

.offer-card {
    display: flex; align-items: center; padding: 12px; margin-bottom: 8px;
    background: #fff; border: 1px solid var(--border); border-radius: 12px; 
    text-decoration: none !important; cursor: pointer; transition: all 0.2s;
}
.offer-card:hover { transform: translateY(-1px); border-color: #cbd5e1; background: #fdfdfd; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.offer-icon img { width: 42px; height: 42px; border-radius: 10px; }
.offer-details { flex: 1; padding: 0 15px; display: flex; flex-direction: column; justify-content: center; }
.offer-title { font-weight: 600; color: var(--text-main); font-size: 0.95rem; }
.offer-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; }
.offer-action .btn {
    background: #f1f5f9; color: var(--primary); padding: 6px 12px;
    border-radius: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.offer-card:hover .offer-action .btn { background: var(--primary); color: #fff; }

.locker-loading { padding: 40px 20px; text-align: center; }
.spinner {
    margin: 15px auto; width: 28px; height: 28px;
    border: 3px solid #e2e8f0; border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s infinite linear;
}
@keyframes spin { to { transform: rotate(360deg); } }
.secret-revealed h3 { background: #ecfdf5; color: #059669; margin: 0; padding: 15px; text-align: center; font-size: 1.1rem; border-bottom: 1px solid #d1fae5; }
.secret-content-body { padding: 25px; background: #fff; color: #334155; }
footer { text-align: center; padding: 30px; border-top: 1px solid var(--border); color: #94a3b8; font-size: 0.85rem; }


/* =========================================
   6. IMAGES
   ========================================= */
article img, .entry-content img, .wp-block-image img {
    max-width: 100%; height: auto; display: block; margin: 20px auto;
    border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
    .alignleft, .alignright { float: none; margin: 0 auto 20px auto; display: block; }
}


/* =========================================
   7. PAGINATION
   ========================================= */
.pagination-wrapper { margin-top: 40px; margin-bottom: 20px; text-align: center; }
.pagination-wrapper .screen-reader-text { display: none; }
.pagination-wrapper .nav-links { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination-wrapper .page-numbers {
    display: inline-block; padding: 8px 16px; background: #fff; color: var(--text-main);
    border: 1px solid var(--border); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.95rem;
    transition: all 0.2s ease; box-shadow: var(--shadow);
}
.pagination-wrapper .page-numbers:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }
.pagination-wrapper .page-numbers.current {
    background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.pagination-wrapper .dots { border: none; background: transparent; box-shadow: none; }


/* =========================================
   8. RELATED POSTS
   ========================================= */
.related-posts { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); }
.related-posts h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 25px; color: var(--text-main); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.related-card {
    display: block; background: #fff; border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; box-shadow: var(--shadow);
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-color: #cbd5e1; }
.related-thumb img { width: 100%; height: 140px; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.related-info { padding: 15px; }
.related-info h4 { margin: 0 0 10px 0; font-size: 1rem; line-height: 1.4; color: var(--text-main); font-weight: 600; }
.related-info .read-more { font-size: 0.85rem; color: var(--primary); font-weight: 700; }


/* =========================================
   9. HOMEPAGE LIST
   ========================================= */
.home-container { padding: 30px; max-width: 700px; margin: 0 auto; }
.home-container h2 { margin-bottom: 30px; font-size: 1.5rem; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; }
.home-post-card { display: flex; gap: 20px; margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.home-post-card:last-child { border-bottom: none; }
.home-post-thumb { flex-shrink: 0; width: 140px; }
.home-post-thumb img { width: 100%; height: 100px; object-fit: cover; border-radius: 12px; margin: 0; box-shadow: var(--shadow); transition: transform 0.2s; }
.home-post-thumb a:hover img { transform: scale(1.02); }
.home-post-content { flex-grow: 1; }
.home-post-title { margin: 0 0 8px 0; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.home-post-title a { text-decoration: none; color: var(--text-main); transition: color 0.2s; }
.home-post-title a:hover { color: var(--primary); }
.home-post-excerpt { font-size: 0.95rem; color: var(--text-muted); margin: 0 0 12px 0; line-height: 1.5; }
.home-read-more { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; }
.home-read-more:hover { color: var(--primary-dark); }
@media (max-width: 600px) {
    .home-post-card { flex-direction: column; }
    .home-post-thumb { width: 100%; margin-bottom: 10px; }
    .home-post-thumb img { height: 160px; width: 100%; }
}


/* =========================================
   10. COOKIE BANNER
   ========================================= */
.cookie-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 150%);
    width: 90%; max-width: 600px; background: #fff; padding: 20px 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border-radius: 16px; border: 1px solid var(--border);
    z-index: 9999; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.cookie-banner.show { transform: translate(-50%, 0); }
.cookie-content p { margin: 0; font-size: 0.9rem; color: var(--text-main); line-height: 1.5; }
.cookie-content a { color: var(--primary); font-weight: 700; text-decoration: none; }
.cookie-actions .btn-accept {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; border: none; padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; white-space: nowrap; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); transition: transform 0.2s;
}
.cookie-actions .btn-accept:hover { transform: scale(1.05); }
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column; text-align: center; bottom: 0; left: 0; width: 100%;
        border-radius: 20px 20px 0 0; transform: translateY(100%);
    }
    .cookie-banner.show { transform: translateY(0); }
    .cookie-actions, .cookie-actions .btn-accept { width: 100%; }
}


/* =========================================
   11. LIVE SEARCH STYLES
   ========================================= */
.live-search-wrapper { position: relative; margin-bottom: 40px; max-width: 100%; }
#live-search-input {
    width: 100%; padding: 18px 25px; border: 2px solid #e2e8f0; border-radius: 50px;
    font-size: 1.1rem; outline: none; background: #fff; box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#live-search-input:focus { border-color: var(--primary); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15); transform: translateY(-2px); }
.live-search-dropdown {
    position: absolute; top: 105%; left: 0; width: 100%; background: #fff;
    border: 1px solid var(--border); border-radius: 16px; padding: 10px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); z-index: 999; display: none; max-height: 400px; overflow-y: auto;
}
.search-result-card {
    display: flex; align-items: center; gap: 15px; padding: 12px; text-decoration: none !important;
    border-radius: 12px; transition: background 0.2s ease; border-bottom: 1px solid transparent;
}
.search-result-card:hover { background: #f8fafc; }
.search-result-thumb { width: 80px; height: 60px; flex-shrink: 0; }
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid #f1f5f9; }
.search-result-content { display: flex; flex-direction: column; }
.search-result-title { margin: 0 0 4px 0; font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.search-result-excerpt { margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.no-results, .search-loading { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.95rem; }