/* Estilos Personalizados */

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Classes de animação */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #facc15, #eab308);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #eab308, #ca8a04);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-4xl {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .text-6xl {
        font-size: 3rem;
        line-height: 1.1;
    }
    
    .text-7xl {
        font-size: 3.5rem;
        line-height: 1.1;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.focus-visible:focus {
    outline: 2px solid #facc15;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-gradient-to-r {
        background: #000 !important;
    }
    
    .text-slate-600 {
        color: #000 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Lazy loading placeholder */
.lazy-load {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Error states */
.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Custom checkbox/radio styles */
.custom-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background: linear-gradient(to right, #facc15, #eab308);
    border-color: #eab308;
}

.custom-checkbox:checked::after {
    content: '✓';
    display: block;
    text-align: center;
    color: white;
    font-weight: bold;
    line-height: 1.25rem;
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Responsive typography */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 1280px) {
    html {
        font-size: 18px;
    }
}

/* Prose styles para manter formatação do editor no blog */
.prose {
    color: #374151;
    line-height: 1.75;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.7;
}

.prose.max-w-none {
    max-width: none;
}

.prose h1 {
    font-size: 2.25em;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.25;
    margin: 0 0 0.8888889em 0;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: #1f2937;
    line-height: 1.3;
    border-bottom: 3px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #1f2937;
    line-height: 1.3;
    position: relative;
}

.prose h3::before {
    content: '▶';
    color: #3b82f6;
    margin-right: 0.5rem;
    font-size: 0.9em;
}

.prose h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem 0;
    color: #374151;
    line-height: 1.3;
}

.prose h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #374151;
    line-height: 1.3;
}

.prose h6 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #4b5563;
    line-height: 1.3;
}

.prose p {
    margin: 1.25em 0;
    line-height: 1.75;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose strong {
    font-weight: 600;
    color: #1f2937;
}

.prose em {
    font-style: italic;
}

.prose ul {
    margin: 1.25em 0;
    padding-left: 1.625em;
    list-style: none;
}

.prose ul li {
    margin: 0.5em 0;
    padding-left: 1.5rem;
    position: relative;
}

.prose ul li::before {
    content: '●';
    color: #3b82f6;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
}

.prose ol {
    margin: 1.25em 0;
    padding-left: 1.625em;
    counter-reset: list-counter;
    list-style: none;
}

.prose ol li {
    margin: 0.5em 0;
    padding-left: 2rem;
    position: relative;
    counter-increment: list-counter;
}

.prose ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #3b82f6;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left: 0.25rem solid #e5e7eb;
    quotes: "\201C""\201D""\2018""\2019";
    margin: 1.6em 0;
    padding-left: 1em;
    font-size: 1.1em;
    position: relative;
}

.prose blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #3b82f6;
    position: absolute;
    left: -1rem;
    top: -1rem;
    line-height: 1;
    opacity: 0.3;
}

.prose img {
    margin: 2em 0;
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prose img:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.25rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
}

.prose pre {
    color: #e5e7eb;
    background-color: #374151;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7142857;
    margin: 1.7142857em 0;
    border-radius: 0.375rem;
    padding: 0.8571429em 1.1428571em;
    position: relative;
}

.prose pre::before {
    content: 'Código';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.75rem;
    color: #10b981;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: 400;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin: 2em 0;
    font-size: 0.875em;
    line-height: 1.7142857;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
}

.prose thead {
    color: #111827;
    font-weight: 600;
    border-bottom: 1px solid #d1d5db;
}

.prose thead th {
    vertical-align: bottom;
    padding: 0.75rem;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    text-align: left;
}

.prose tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:last-child {
    border-bottom-width: 0;
}

.prose tbody td {
    vertical-align: top;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
}

.prose hr {
    border-color: #e5e7eb;
    border-top-width: 1px;
    margin: 3em 0;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
}

.prose figure {
    margin: 2em 0;
}

.prose figcaption {
    color: #6b7280;
    font-size: 0.875em;
    line-height: 1.4285714;
    margin-top: 0.8571429em;
    text-align: center;
    font-style: italic;
}

/* YouTube embed container styles */
.prose .youtube-embed-container {
    position: relative;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.prose .youtube-embed-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff4444);
    border-radius: 14px;
    z-index: -1;
}

.prose .youtube-embed-container iframe {
    transition: transform 0.3s ease;
    width: 100%;
    aspect-ratio: 16/9;
}

.prose .youtube-embed-container:hover iframe {
    transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .prose {
        font-size: 0.95rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
        margin-top: 1.25rem;
    }
    
    .prose .youtube-embed-container {
        margin: 1.5rem 0;
    }
    
    .prose blockquote::before {
        font-size: 2.5rem;
        left: -0.5rem;
        top: -0.5rem;
    }
}