/**
 * Portal do Rap Nacional - Custom Styles
 * Additional customizations can be added here
 */

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Hover effect for post cards */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn-primary:hover::after {
    width: 200%;
    height: 200%;
}

/* Loading animation for images */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading] {
    opacity: 0;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .ad-space,
    .share-buttons,
    .comments-section,
    .post-sidebar {
        display: none !important;
    }
    
    .post-hero {
        height: auto !important;
        background: none !important;
    }
    
    .post-hero-image {
        position: relative !important;
        height: 200px !important;
    }
    
    .post-hero-overlay,
    .back-button {
        display: none !important;
    }
    
    .post-hero-content {
        position: relative !important;
        padding: 1rem 0 !important;
    }
    
    .post-hero-title {
        color: #000 !important;
        font-size: 1.5rem !important;
    }
    
    .post-hero-meta {
        color: #666 !important;
    }
    
    .post-content-area {
        width: 100% !important;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card,
.most-read-card,
.release-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Stagger animation for grids */
.posts-grid .post-card:nth-child(1) { animation-delay: 0.1s; }
.posts-grid .post-card:nth-child(2) { animation-delay: 0.2s; }
.posts-grid .post-card:nth-child(3) { animation-delay: 0.3s; }
.posts-grid .post-card:nth-child(4) { animation-delay: 0.4s; }
.posts-grid .post-card:nth-child(5) { animation-delay: 0.5s; }
.posts-grid .post-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive video embeds */
.wp-block-embed__wrapper,
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.wp-block-embed__wrapper::before,
.embed-responsive::before {
    display: block;
    content: "";
    padding-top: 56.25%;
}

.wp-block-embed__wrapper iframe,
.wp-block-embed__wrapper video,
.embed-responsive iframe,
.embed-responsive video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Gallery styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    border-radius: 0.5rem;
    width: 100%;
    height: auto;
}

/* Caption styles */
.wp-caption {
    max-width: 100%;
    margin: 1.5rem 0;
}

.wp-caption img {
    border-radius: 0.5rem;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    padding: 0.5rem;
    background-color: #f3f4f6;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: -0.5rem;
}

/* Blockquote styles */
blockquote {
    border-left: 4px solid #f97316;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4b5563;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* Code styles */
code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875em;
}

pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Alert/Notice styles */
.notice {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.notice-info {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.notice-success {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notice-warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.notice-error {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* Pagination hover effect */
.pagination a:hover {
    background-color: #f97316;
    border-color: #f97316;
    color: #000;
}

/* Widget styles */
.widget {
    margin-bottom: 1.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.widget li:last-child {
    border-bottom: none;
}

/* Calendar widget */
.widget_calendar table {
    width: 100%;
}

.widget_calendar caption {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.widget_calendar th,
.widget_calendar td {
    text-align: center;
    padding: 0.5rem;
}

/* Tag cloud */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tagcloud a {
    padding: 0.375rem 0.75rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.875rem !important;
    transition: all 0.3s ease;
}

.tagcloud a:hover {
    background-color: #f97316;
    color: #000;
}

/* Search widget */
.widget_search .search-form {
    display: flex;
}

.widget_search input[type="search"] {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem 0 0 0.5rem;
}

.widget_search button {
    padding: 0.5rem 1rem;
    background-color: #f97316;
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #000;
    cursor: pointer;
}

/* Recent comments widget */
.widget_recent_comments li {
    font-size: 0.875rem;
}

.widget_recent_comments .comment-author-link {
    font-weight: 600;
}

/* RSS widget */
.widget_rss li {
    margin-bottom: 1rem;
}

.widget_rss .rsswidget {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.widget_rss .rss-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.widget_rss .rssSummary {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Accessibility - Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f97316;
    color: #000;
    padding: 8px 16px;
    z-index: 100000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .post-card,
    .widget,
    .comment {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
