/* PrettyBird Posts Plugin Styles */

.prettybird-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
    padding: 0;
}

.prettybird-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.prettybird-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.prettybird-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.prettybird-post-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
}

.prettybird-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.prettybird-post-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.prettybird-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.prettybird-post-card:hover .prettybird-post-media img {
    transform: scale(1.05);
}

.prettybird-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.prettybird-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 40px 20px 20px;
    color: white;
    z-index: 2; /* Fica sobre o vídeo */
}

.prettybird-post-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prettybird-post-title a {
    color: white;
    text-decoration: none;
    font-family: 'Urbanist', sans-serif;
    transition: color 0.3s ease;
}

.prettybird-post-title a:hover {
    color: #fff;
    cursor: pointer;
}

.prettybird-post-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Painel Deslizante */
.prettybird-slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.prettybird-slide-panel.active {
    right: 0;
}

.prettybird-panel-content {
    height: 100%;
    overflow-y: auto;
    position: relative;
    padding: 0;
}

.prettybird-close-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.prettybird-close-panel:hover {
    background: rgba(0, 0, 0, 0.9);
}

.prettybird-panel-header {
    padding: 60px 40px 40px;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    color: #000;
    text-align: center;
}

.elementor embed, .elementor iframe, .elementor object, .elementor video {
    border: none;
    line-height: 1;
    margin: 0;
    max-width: 100%;
    width: 100%;
    border-radius: none;
}

.prettybird-panel-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.prettybird-panel-subtitle {
    font-size: 18px;
    margin: 0 0 30px 0;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prettybird-panel-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.prettybird-meta-item {
    text-align: center;
}

.prettybird-meta-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.prettybird-meta-value {
    font-size: 16px;
    font-weight: 600;
}

.prettybird-panel-image {
    text-align: center;
    margin-bottom: 0;
}

.prettybird-panel-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.prettybird-panel-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 0;
}

.prettybird-panel-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.prettybird-panel-content {
    padding: 40px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.prettybird-panel-content h2,
.prettybird-panel-content h3,
.prettybird-panel-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.prettybird-panel-content p {
    margin-bottom: 20px;
}

.prettybird-external-link {
    display: inline-block;
    background: #333;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.prettybird-external-link:hover {
    background: #555;
    color: white;
}

.prettybird-panel-footer {
    padding: 20px 40px 40px;
    border-top: 1px solid #eee;
}

.prettybird-categories,
.prettybird-tags {
    margin-bottom: 15px;
}

.prettybird-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Overlay de fundo */
.prettybird-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prettybird-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loading state */
.prettybird-panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 18px;
    color: #666;
}

.prettybird-panel-loading:before {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: prettybird-spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes prettybird-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .prettybird-grid,
    .prettybird-grid-staggered {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 10px;
    }
    
    .prettybird-grid[data-columns="2"],
    .prettybird-grid[data-columns="3"],
    .prettybird-grid[data-columns="4"],
    .prettybird-grid-staggered[data-columns="auto"],
    .prettybird-grid-staggered[data-columns="2"],
    .prettybird-grid-staggered[data-columns="3"],
    .prettybird-grid-staggered[data-columns="4"] {
        grid-template-columns: 1fr !important;
    }
    
    .prettybird-post-card {
        margin-bottom: 20px !important;
        transform: none !important;
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .prettybird-post-title {
        font-size: 20px;
    }
    
    .prettybird-post-subtitle {
        font-size: 12px;
    }
    
    .prettybird-slide-panel {
        max-width: 100%;
    }
    
    .prettybird-panel-header {
        padding: 40px 20px 30px;
    }
    
    .prettybird-panel-title {
        font-size: 28px;
    }
    
    .prettybird-panel-subtitle {
        font-size: 16px;
    }
    
    .prettybird-panel-meta {
        gap: 20px;
    }
    
    .prettybird-panel-content {
        padding: 30px 20px;
        font-size: 15px;
    }
    
    .prettybird-panel-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .prettybird-post-overlay {
        padding: 30px 15px 15px;
    }
    
    .prettybird-post-title {
        font-size: 18px;
    }
    
    .prettybird-panel-header {
        padding: 30px 15px 20px;
    }
    
    .prettybird-panel-title {
        font-size: 24px;
    }
    
    .prettybird-panel-content {
        padding: 20px 15px;
    }
    
    .prettybird-close-panel {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Animações suaves */
.prettybird-post-card {
    opacity: 0;
    transform: translateY(30px);
    animation: prettybird-fadeInUp 0.6s ease forwards;
}

.prettybird-post-card:nth-child(1) { animation-delay: 0.1s; }
.prettybird-post-card:nth-child(2) { animation-delay: 0.2s; }
.prettybird-post-card:nth-child(3) { animation-delay: 0.3s; }
.prettybird-post-card:nth-child(4) { animation-delay: 0.4s; }
.prettybird-post-card:nth-child(5) { animation-delay: 0.5s; }
.prettybird-post-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes prettybird-fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.prettybird-featured-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Permite cliques através do vídeo */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1; /* Fica atrás do overlay */
}

/* Suporte para iframe (YouTube, Vimeo) */
.prettybird-featured-video iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
}

/* Suporte para vídeo HTML5 (MP4 hospedado) */
.prettybird-featured-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.prettybird-featured-video[data-portrait="true"] {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    z-index: 1;
}

.prettybird-featured-video[data-portrait="true"] video,
.prettybird-featured-video[data-portrait="true"] iframe {
    height: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    max-height: 100%;
    max-width: 100%;
}


/* Ajustes para dispositivos móveis */
@media (max-width: 768px) {
    .prettybird-featured-video[data-portrait="true"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .prettybird-featured-video[data-portrait="true"] video,
    .prettybird-featured-video[data-portrait="true"] iframe {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
        object-fit: cover;
    }
}

/* Vídeo landscape (formato padrão 16:9) */
.prettybird-featured-video[data-portrait="false"],
.prettybird-featured-video:not([data-portrait]) {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 0;
}

.prettybird-featured-video[data-portrait="false"] iframe,
.prettybird-featured-video[data-portrait="false"] video,
.prettybird-featured-video:not([data-portrait]) iframe,
.prettybird-featured-video:not([data-portrait]) video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* Ocultar controles de vídeo HTML5 */
.prettybird-featured-video video::-webkit-media-controls {
    display: none !important;
}

.prettybird-featured-video video::-webkit-media-controls-panel {
    display: none !important;
}

.prettybird-featured-video video::-webkit-media-controls-play-button {
    display: none !important;
}

.prettybird-featured-video video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.prettybird-featured-video video {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}


