/**
 * DTP Elementor Widgets Styles
 * Matches the Debauched Tea Party theme styling
 */

/* DTP Header Widget */
.dtp-header {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: white;
    margin: 0;
    padding: 0;
    font-weight: 600;
    line-height: 1.2;
}

/* Header sizes based on tag */
.dtp-header h1,
h1.dtp-header {
    font-size: 2.5rem;
}

.dtp-header h2,
h2.dtp-header {
    font-size: 2rem;
}

.dtp-header h3,
h3.dtp-header {
    font-size: 1.75rem;
}

.dtp-header h4,
h4.dtp-header {
    font-size: 1.5rem;
}

.dtp-header h5,
h5.dtp-header {
    font-size: 1.25rem;
}

.dtp-header h6,
h6.dtp-header {
    font-size: 1rem;
}

/* Gradient Header Style */
.dtp-header-gradient {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* DTP Textbox Widget */
.dtp-textbox {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: white;
    line-height: 1.6;
    position: relative;
    font-size: 1rem;
}

.dtp-textbox p {
    margin: 0 0 1em 0;
}

.dtp-textbox p:last-child {
    margin-bottom: 0;
}

/* DTP Button Widget */
.dtp-button-wrapper {
    display: inline-block;
}

.dtp-button {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background-color: rgba(59, 130, 246, 0.2);
    color: white;
    border-radius: 8px;
    padding: 8px 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dtp-button:hover {
    background-color: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
    text-decoration: none;
}

.dtp-button:active {
    transform: translateY(0) scale(0.98);
}

.dtp-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dtp-header {
        font-size: 1.75rem;
    }
    
    .dtp-textbox {
        font-size: 0.95rem;
    }
    
    .dtp-button {
        font-size: 0.9rem;
        padding: 8px 20px;
    }
    
    .dtp-read-more {
        font-size: 0.9rem;
        padding: 8px 20px;
    }
}


/* DTP Posts Widget */
.dtp-posts-wrapper {
    position: relative;
    z-index: 2;
}

.dtp-posts-grid {
    display: grid;
    gap: 24px;
}

.dtp-posts-grid.dtp-posts-grid-1 {
    grid-template-columns: 1fr;
}

.dtp-posts-grid.dtp-posts-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.dtp-posts-grid.dtp-posts-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dtp-posts-grid.dtp-posts-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .dtp-posts-grid.dtp-posts-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dtp-posts-grid.dtp-posts-grid-3,
    .dtp-posts-grid.dtp-posts-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dtp-posts-grid {
        grid-template-columns: 1fr !important;
    }
}

.dtp-post-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.dtp-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.dtp-post-image {
    width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.dtp-post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.dtp-post-card:hover .dtp-post-image img {
    transform: scale(1.05);
}

.dtp-post-image a {
    display: block;
    text-decoration: none;
}

.dtp-post-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding: 0 0.5rem;
    line-height: 1.3;
}

.dtp-post-title a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dtp-post-title a:hover {
    color: rgba(59, 130, 246, 1);
}

/* Gradient Post Title Style */
.dtp-post-title-gradient a {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

.dtp-post-title-gradient a:hover {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.dtp-post-excerpt {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0 0 1rem 0;
    padding: 0 0.5rem;
    flex-grow: 1;
}

.dtp-post-footer {
    margin-top: auto;
    padding: 1rem 0.5rem 0;
}

.dtp-read-more {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background-color: rgba(59, 130, 246, 0.2);
    color: white;
    border-radius: 8px;
    padding: 10px 28px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dtp-read-more:hover {
    background-color: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
    text-decoration: none;
}

.dtp-read-more:active {
    transform: translateY(0) scale(0.98);
}

.dtp-read-more:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Ensure proper z-index in Elementor */
.elementor-widget-dtp_header,
.elementor-widget-dtp_textbox,
.elementor-widget-dtp_button,
.elementor-widget-dtp_posts {
    position: relative;
    z-index: 2;
}
