/**
 * CPT DIY Plugin Styles
 * 
 * Minimal, clean styling for custom post type templates
 */

/* ==========================================================================
   Base Container
   ========================================================================== */

.cpt-diy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==========================================================================
   Single Post Templates
   ========================================================================== */

/* Default Template */
.cpt-diy-single {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.cpt-diy-header {
    padding: 0 30px 20px 0;
    border-bottom: 1px solid #eee;
}

.cpt-diy-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 15px;
    color: #333;
    line-height: 1.2;
}

.cpt-diy-breadcrumb {
    margin-top: 15px;
}

.cpt-diy-back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.cpt-diy-back-link:hover {
    color: #0073aa;
}

.cpt-diy-content {
    padding: 30px;
}

.cpt-diy-featured-image {
    margin-bottom: 30px;
}

.cpt-diy-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.cpt-diy-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 40px;
}

.cpt-diy-fields {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.cpt-diy-fields-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 25px;
    color: #333;
}

.cpt-diy-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.cpt-diy-field {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.cpt-diy-field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.cpt-diy-field-value {
    color: #555;
    line-height: 1.5;
}

.cpt-diy-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.cpt-diy-file-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0073aa;
    text-decoration: none;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cpt-diy-file-download:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.cpt-diy-textarea-content {
    white-space: pre-line;
}

.cpt-diy-number-value {
    font-weight: 600;
    font-size: 1.1em;
}

.cpt-diy-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.cpt-diy-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.cpt-diy-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cpt-diy-nav-previous,
.cpt-diy-nav-next {
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cpt-diy-nav-next {
    text-align: right;
}

.cpt-diy-nav-previous:hover,
.cpt-diy-nav-next:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.1);
}

.cpt-diy-nav-previous a,
.cpt-diy-nav-next a {
    text-decoration: none;
    color: #333;
    display: block;
}

.cpt-diy-nav-label {
    font-size: 0.8em;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.cpt-diy-nav-title {
    font-weight: 600;
}

/* ==========================================================================
   Archive Template
   ========================================================================== */

.cpt-diy-archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.cpt-diy-archive-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 15px;
    color: #333;
}

/* .cpt-diy-archive-description {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 15px;
} */

.cpt-diy-archive-count {
    font-size: 0.9em;
    color: #888;
}

.cpt-diy-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 55px;
    margin-bottom: 40px;
}

.cpt-diy-archive-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cpt-diy-archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.cpt-diy-item-image {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.cpt-diy-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin-top: 35px;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.cpt-diy-archive-item:hover .cpt-diy-item-image img {
    transform: scale(1.05);
}

.cpt-diy-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
}

.cpt-diy-item-content {
    padding: 25px;
}

.cpt-diy-item-title {
    font-size: 1.3em;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 0 25px 0;
}

.cpt-diy-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cpt-diy-item-title a:hover {
    color: #0073aa;
}

.cpt-diy-item-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.cpt-diy-item-fields {
    margin-bottom: 15px;
}

.cpt-diy-item-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
}

.cpt-diy-item-field:last-child {
    border-bottom: none;
    gap: 20px;
    padding: 20px 0 30px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cpt-diy-field-label {
    font-weight: 600;
    color: #555;
}

.cpt-diy-field-value {
    color: #777;
}

.cpt-diy-has-image,
.cpt-diy-has-file {
    font-size: 1.2em;
}

.cpt-diy-item-meta {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
}

.cpt-diy-item-actions {
    text-align: center;
    padding: 20px 0;
}

/*.cpt-diy-read-more {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.cpt-diy-read-more:hover {
    color: #005a87;
} */

.cpt-diy-read-more.read-more-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    background: #0073aa;
    border: 1px solid #0073aa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cpt-diy-read-more.read-more-button:hover {
    background: #005a87;
    color: #fff;
    border-color: #005a87;
}

.cpt-diy-no-posts {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.cpt-diy-no-posts h2 {
    color: #666;
    margin-bottom: 15px;
}

.cpt-diy-add-new {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.cpt-diy-add-new:hover {
    background: #005a87;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.cpt-diy-pagination {
    margin-top: 40px;
    text-align: center;
}

.cpt-diy-pagination-list {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.cpt-diy-pagination-item a,
.cpt-diy-pagination-item span {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cpt-diy-pagination-item a:hover,
.cpt-diy-pagination-item .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ==========================================================================
   Template 01 - Minimal Layout
   ========================================================================== */

.cpt-diy-template01 .cpt-diy-layout-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 50px 60px 30px 30px;
}

.cpt-diy-template01 .cpt-diy-main-content {
    background: #fff;
    padding: 0 30px 30px 30px;
    border-radius: 8px;
}

.cpt-diy-template01 .cpt-diy-sidebar {
    background: #eaecf0;
    padding: 30px;
    border-radius: 8px;
    height: fit-content;
}

.cpt-diy-info-box {
    margin-bottom: 30px;
}

.cpt-diy-info-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.cpt-diy-info-list {
    margin: 0;
}

.cpt-diy-info-list dt {
    font-weight: 600;
    color: #555;
    margin: 15px 0 5px;
    font-size: 0.9em;
}

.cpt-diy-info-list dt:first-child {
    margin-top: 0;
}

.cpt-diy-info-list dd {
    margin: 0 0 10px;
    color: #666;
    line-height: 1.4;
}

.cpt-diy-sidebar-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.cpt-diy-sidebar-file {
    color: #0073aa;
    text-decoration: none;
}

.cpt-diy-sidebar-textarea {
    white-space: pre-line;
    font-size: 0.95em;
}

.cpt-diy-back-link-box {
    text-align: center;
}

.cpt-diy-back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.cpt-diy-back-button:hover {
    background: #005a87;
    color: #fff;
}

/* ==========================================================================
   Template 02 - Card Layout
   ========================================================================== */

.cpt-diy-template02 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 80vh;
    padding: 40px 20px;
}

.cpt-diy-card {
    max-width: 800px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.cpt-diy-card-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.cpt-diy-card-content {
    padding: 40px;
}

.cpt-diy-card-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cpt-diy-card-title {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 15px;
    color: #333;
}

.cpt-diy-card-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9em;
    color: #666;
}

.cpt-diy-card-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
    text-align: center;
}

.cpt-diy-card-fields {
    display: grid;
    gap: 25px;
}

.cpt-diy-card-field {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.cpt-diy-card-field-label {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
}

.cpt-diy-card-field-value {
    color: #555;
    line-height: 1.5;
}

.cpt-diy-card-image-field img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.cpt-diy-card-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0073aa;
    text-decoration: none;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cpt-diy-card-download:hover {
    background: #0073aa;
    color: #fff;
}

.cpt-diy-card-textarea {
    white-space: pre-line;
}

.cpt-diy-card-number {
    font-size: 1.3em;
    font-weight: 700;
    color: #0073aa;
}

.cpt-diy-card-footer {
    padding: 30px 40px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.cpt-diy-card-back {
    display: inline-block;
    color: #666;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.cpt-diy-card-back:hover {
    color: #0073aa;
}

.cpt-diy-card-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cpt-diy-card-nav {
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: block;
}

.cpt-diy-card-nav:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.cpt-diy-card-next {
    text-align: right;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .cpt-diy-container {
        padding: 15px;
    }
    
    .cpt-diy-title {
        font-size: 2em;
    }
    
    .cpt-diy-content {
        padding: 20px;
    }
    
    .cpt-diy-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .cpt-diy-archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cpt-diy-navigation {
        grid-template-columns: 1fr;
    }
    
    .cpt-diy-template01 .cpt-diy-layout-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cpt-diy-template01 .cpt-diy-main-content,
    .cpt-diy-template01 .cpt-diy-sidebar {
        padding: 20px;
    }
    
    .cpt-diy-card-content {
        padding: 25px;
    }
    
    .cpt-diy-card-footer {
        padding: 20px 25px;
    }
    
    .cpt-diy-card-navigation {
        grid-template-columns: 1fr;
    }
    
    .cpt-diy-card-next {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .cpt-diy-title {
        font-size: 1.6em;
    }
    
    .cpt-diy-card-title {
        font-size: 1.8em;
    }
    
    .cpt-diy-item-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cpt-diy-pagination-list {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* @media (max-width: 768px) {
  .cpt-diy-template-quadri .cpt-diy-layout-wrapper {
    flex-direction: column !important;
    gap: 1rem;
  }
  
  .cpt-diy-template-quadri .cpt-diy-image-column,
  .cpt-diy-template-quadri .cpt-diy-content-column {
    width: 100% !important;
    max-width: 100%;
  }
  
  .cpt-diy-template-quadri .cpt-diy-featured-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
  }
  
  .cpt-diy-template-quadri .cpt-diy-title {
    font-size: 1.5rem;
  }
  
  .cpt-diy-template-quadri .cpt-diy-info-list {
    font-size: 0.9rem;
    margin: 0;
  }
  
  .cpt-diy-template-quadri .cpt-diy-back-button {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }
}
*/