/* ==========================================================================
   RESPONSIVE DESIGN - THAISPLICANDO
   Arquivo dedicado para responsividade e adaptações mobile
   ========================================================================== */

/* ==========================================================================
   1. RESET E MELHORIAS GERAIS
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Garantir que imagens sejam responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Links de blog cards */
a.blog-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   2. TIPOGRAFIA MELHORADA
   ========================================================================== */

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ==========================================================================
   3. ESTILOS PARA O CONTEÚDO DO BLOG (MARKDOWN)
   ========================================================================== */

.post-article {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.post-meta-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta-info i {
    color: #e8b116;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.post-category {
    background: #e8b116;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: #1a1a1a;
    font-weight: 700;
}

.post-content h2 {
    font-size: 2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8b116;
}

.post-content h3 {
    font-size: 1.5rem;
    color: #333;
}

.post-content p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.post-content ul,
.post-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.post-content li {
    margin-bottom: 0.75em;
    line-height: 1.8;
}

.post-content ul li {
    list-style-type: disc;
}

.post-content ol li {
    list-style-type: decimal;
}

.post-content a {
    color: #e8b116;
    text-decoration: none;
    border-bottom: 1px solid #e8b116;
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: #d4a00f;
    border-bottom-color: #d4a00f;
}

.post-content strong {
    font-weight: 700;
    color: #1a1a1a;
}

.post-content em {
    font-style: italic;
}

.post-content img.post-image {
    max-width: 100%;
    height: auto;
    margin: 2em auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.post-content .code-block,
.post-content .inline-code {
    font-family: 'Courier New', Courier, monospace;
    background: #f5f5f5;
    border-radius: 4px;
}

.post-content .inline-code {
    padding: 2px 6px;
    font-size: 0.9em;
    color: #e83e8c;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.post-content blockquote.post-quote {
    border-left: 4px solid #e8b116;
    padding: 15px 20px;
    margin: 2em 0;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
}

.post-content hr.post-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 3em 0;
}

.post-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.post-tags h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-cloud a {
    background: #f0f0f0;
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tags-cloud a:hover {
    background: #e8b116;
    color: #fff;
}

/* ==========================================================================
   4. LOADING SPINNER
   ========================================================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 400px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e8b116;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.error-message {
    text-align: center;
    padding: 60px 20px;
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message .button {
    margin-top: 20px;
}

/* ==========================================================================
   5. NAVEGAÇÃO MELHORADA
   ========================================================================== */

#nav-main ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav-main ul li {
    margin: 0 15px;
}

#nav-main ul li a {
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

#nav-main ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e8b116;
    transition: width 0.3s ease;
}

#nav-main ul li a:hover::after,
#nav-main ul li a.active::after {
    width: 100%;
}

/* ==========================================================================
   6. BOTÕES MELHORADOS
   ========================================================================== */

.button {
    display: inline-block;
    padding: 12px 30px;
    background: #e8b116;
    color: #fff !important;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #e8b116;
}

.button:hover {
    background: transparent;
    color: #e8b116 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(232, 177, 22, 0.3);
}

.button i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.button:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   7. RESPONSIVIDADE - TABLETS (max-width: 992px)
   ========================================================================== */

@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .post-title {
        font-size: 2rem;
    }

    .post-article {
        padding: 30px 20px;
    }

    .col-lg-8,
    .col-lg-4 {
        width: 100%;
        padding: 0 15px;
    }

    .col-lg-4 {
        margin-top: 40px;
    }

    #banner-content {
        height: auto !important;
        padding: 80px 20px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    #nav-main {
        display: none;
    }

    #nav-trigger {
        display: block;
    }
}

/* ==========================================================================
   8. RESPONSIVIDADE - MOBILE (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .post-title {
        font-size: 1.75rem;
    }

    .post-article {
        padding: 20px 15px;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-meta-info {
        flex-direction: column;
        gap: 10px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-heading h1 {
        font-size: 2rem;
    }

    .section-heading h2 {
        font-size: 1.5rem;
    }

    #banner-content {
        padding: 60px 15px;
    }

    .col-3,
    .col-2-3,
    .col-2 {
        width: 100% !important;
        margin-bottom: 30px;
    }

    aside .social-icons {
        justify-content: center;
        margin-top: 20px;
    }

    .button {
        display: block;
        text-align: center;
        width: 100%;
        max-width: 300px;
        margin: 20px auto;
    }
}

/* ==========================================================================
   9. RESPONSIVIDADE - MOBILE PEQUENO (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }

    .post-title {
        font-size: 1.5rem;
    }

    .post-article {
        padding: 15px 10px;
    }

    .post-content {
        font-size: 0.95rem;
    }

    .page-border > .top-border,
    .page-border > .right-border,
    .page-border > .bottom-border,
    .page-border > .left-border {
        padding: 5px;
    }

    .blog-card-title {
        font-size: 1.1rem;
    }

    .section-heading h1 {
        font-size: 1.75rem;
    }

    .footer-social li {
        margin: 10px;
    }
}

/* ==========================================================================
   10. MELHORIAS DE ACESSIBILIDADE
   ========================================================================== */

/* Foco visível para navegação por teclado */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #e8b116;
    outline-offset: 2px;
}

/* Melhor contraste para texto */
.post-content {
    color: #1a1a1a;
}

/* Links com contraste adequado */
.post-content a {
    color: #c79800;
    /* margin: 10px; */
}

.post-content a:hover {
    color: #a67f00;
}

/* ==========================================================================
   11. PRINT STYLES
   ========================================================================== */

@media print {
    .page-border,
    #header,
    #nav-main,
    #nav-mobile,
    #nav-trigger,
    .sidebar,
    footer,
    .social-icons,
    .button {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    .post-article {
        box-shadow: none;
        padding: 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   12. ANIMAÇÕES SUAVES
   ========================================================================== */

.blog-card,
.button,
a,
#nav-main ul li a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animação de entrada suave para o conteúdo */
.post-article {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   13. SCROLL PERSONALIZADO (WEBKIT)
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #e8b116;
    border-radius: 5px;
}

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