/**
 * DeyWithMe Premium Lite Styles
 * Lightweight CSS optimized for performance
 */

/* ===========================
   Read Time Meta
   =========================== */
.dwm-read-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1.5em;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

.dwm-read-time svg {
    flex-shrink: 0;
}

.dwm-read-time-meta {
    display: inline-block;
    font-size: 0.9em;
    color: #666;
    margin: 0.5em 0 1em;
}

.dwm-clock-icon {
    margin-right: 4px;
}

/* ===========================
   Author Box
   =========================== */
.dwm-author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    margin: 40px 0;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.dwm-author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.dwm-author-info {
    flex: 1;
}

.dwm-author-name {
    margin: 0 0 10px;
    font-size: 1.3em;
}

.dwm-author-name a {
    color: #333;
    text-decoration: none;
}

.dwm-author-name a:hover {
    color: #0073aa;
}

.dwm-author-bio {
    margin: 0 0 12px;
    color: #666;
    line-height: 1.6;
}

.dwm-author-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
}

.dwm-author-link:hover {
    text-decoration: underline;
}

/* ===========================
   Date Box Enhancement
   =========================== */
.dwm-date-box-enabled .entry-date {
    display: inline-block;
    padding: 8px 12px;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
}

/* ===========================
   First Post Highlight
   =========================== */
.dwm-first-post-highlight {
    position: relative;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #fff 100%);
    border: 2px solid #0073aa;
    border-radius: 8px;
}

.dwm-first-post-highlight::before {
    content: "Featured";
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    background: #0073aa;
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
}

/* ===========================
   Read More Link
   =========================== */
.dwm-read-more {
    display: inline-block;
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.dwm-read-more:hover {
    color: #005a87;
}

/* ===========================
   Post Layouts
   =========================== */
.archive.dwm-grid-layout .site-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.archive.dwm-list-layout .entry {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.archive.dwm-list-layout .post-thumbnail {
    flex-shrink: 0;
    width: 200px;
}

/* ===========================
   Sticky Navigation
   =========================== */
.dwm-sticky-nav .site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

/* ===========================
   Site Layouts
   =========================== */
.dwm-full-width-layout .site-container {
    max-width: 100%;
    padding: 0;
}

.dwm-max-width-layout .site-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dwm-padded-layout .site-container {
    padding: 20px;
}

.dwm-fluid-layout .site-container {
    max-width: 95%;
    margin: 0 auto;
}

/* ===========================
   Secondary Navigation
   =========================== */
.dwm-secondary-navigation {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.dwm-secondary-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dwm-secondary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dwm-secondary-menu li {
    margin: 0;
}

.dwm-secondary-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s;
}

.dwm-secondary-menu a:hover {
    background: #e0e0e0;
}

/* ===========================
   Mobile Enhancements
   =========================== */
@media (max-width: 768px) {
    .dwm-mobile-enhanced .site-header {
        padding: 10px 0;
    }
    
    .dwm-mobile-enhanced .site-navigation {
        font-size: 0.9em;
    }
    
    .dwm-author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================
   Custom Blocks
   =========================== */
.dwm-block-author-bio {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.dwm-block-post-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.dwm-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.dwm-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dwm-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .dwm-block-post-grid {
        grid-template-columns: 1fr !important;
    }
}

.dwm-grid-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.dwm-grid-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dwm-grid-image img {
    width: 100%;
    height: auto;
    display: block;
}

.dwm-grid-content {
    padding: 20px;
}

.dwm-grid-title {
    margin: 0 0 10px;
    font-size: 1.2em;
}

.dwm-grid-title a {
    color: #333;
    text-decoration: none;
}

.dwm-grid-title a:hover {
    color: #0073aa;
}

.dwm-grid-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.dwm-grid-excerpt {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

/* ===========================
   Alert Block
   =========================== */
.dwm-block-alert {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    position: relative;
}

.dwm-alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.dwm-alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.dwm-alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}

.dwm-alert-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.dwm-alert-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.dwm-alert-content {
    flex: 1;
}

.dwm-alert-dismiss {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: currentColor;
    opacity: 0.6;
    padding: 0;
    line-height: 1;
}

.dwm-alert-dismiss:hover {
    opacity: 1;
}

/* ===========================
   Reading Progress Bar
   =========================== */
.dwm-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #0073aa;
    width: 0;
    z-index: 9999;
    transition: width 0.1s;
}

/* ===========================
   Shortcode Styles
   =========================== */
.dwm-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.dwm-button-primary {
    background: #0073aa;
    color: #fff;
}

.dwm-button-primary:hover {
    background: #005a87;
}

.dwm-button-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #ddd;
}

.dwm-button-secondary:hover {
    background: #e0e0e0;
}

.dwm-button-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.dwm-button-large {
    padding: 16px 32px;
    font-size: 1.1em;
}

.dwm-recent-posts {
    margin: 20px 0;
}

.dwm-recent-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.dwm-recent-post-item:last-child {
    border-bottom: none;
}

.dwm-recent-post-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.dwm-recent-post-content {
    flex: 1;
}

.dwm-recent-post-title {
    margin: 0 0 5px;
    font-size: 1em;
}

.dwm-recent-post-title a {
    color: #333;
    text-decoration: none;
}

.dwm-recent-post-title a:hover {
    color: #0073aa;
}

.dwm-recent-post-date {
    font-size: 0.85em;
    color: #999;
}

.dwm-recent-post-excerpt {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

.dwm-toc {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    margin: 25px 0;
}

.dwm-toc-title {
    margin: 0 0 15px;
    font-size: 1.2em;
}

.dwm-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dwm-toc-list li {
    margin: 8px 0;
}

.dwm-toc-level-3 {
    margin-left: 20px;
}

.dwm-toc-list a {
    color: #333;
    text-decoration: none;
}

.dwm-toc-list a:hover {
    color: #0073aa;
    text-decoration: underline;
}

.dwm-highlight {
    padding: 2px 6px;
    border-radius: 3px;
}

.dwm-highlight-yellow {
    background: #ffeb3b;
}

.dwm-highlight-green {
    background: #a5d6a7;
}

.dwm-highlight-blue {
    background: #90caf9;
}

.dwm-highlight-pink {
    background: #f48fb1;
}

.dwm-columns {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.dwm-column {
    flex: 1;
}

@media (max-width: 768px) {
    .dwm-columns {
        flex-direction: column;
    }
}

/* ===========================
   Utilities
   =========================== */
.dwm-text-center {
    text-align: center;
}

.dwm-mt-20 {
    margin-top: 20px;
}

.dwm-mb-20 {
    margin-bottom: 20px;
}
