/* =============================================
   CNH do Brasil - Estilo Principal
   Baseado no design gov.br
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --verde-brasil: #009739;
    --amarelo-brasil: #FEDD00;
    --azul-brasil: #1351B4;
    --azul-escuro: #071D41;
    --branco: #FFFFFF;
    --preto: #000000;
    --cinza-escuro: #333333;
    --cinza-medio: #666666;
    --cinza-claro: #F5F5F5;
    --verde-check: #10b981;
    --vermelho: #dc2626;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Rawline', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--cinza-escuro);
    background-color: var(--branco);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   HEADER GOV.BR
   ============================================= */
.gov-header {
    background-color: var(--branco);
    position: sticky;
    top: 0;
    z-index: 100;
}

.gov-header-top {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-header-left {
    display: flex;
    align-items: center;
}

.gov-logo {
    width: 70px;
    height: 24px;
    margin-right: 32px;
}

.gov-menu-btn {
    border: none;
    color: var(--azul-brasil);
    font-size: 14px;
    margin-left: 32px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.gov-divider {
    border-left: 1px solid #ccc;
    height: 24px;
    margin: 0 16px;
}

.gov-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gov-icon-btn {
    border: none;
    color: var(--azul-brasil);
    cursor: pointer;
    background: none;
    padding: 0;
    font-size: 16px;
}

.gov-btn-entrar {
    background-color: var(--azul-brasil);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    gap: 8px;
}

.gov-nav {
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
}

.gov-nav-btn {
    border: none;
    color: var(--azul-brasil);
    display: flex;
    align-items: center;
    cursor: pointer;
    background: none;
    padding: 0;
    gap: 10px;
}

.gov-nav-btn span {
    color: var(--cinza-medio);
    font-size: 0.95rem;
    font-weight: 300;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb-container {
    padding: 10px 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--cinza-medio);
    flex-wrap: wrap;
    gap: 6px;
}

.breadcrumb-icon {
    color: var(--azul-brasil);
    font-size: 0.75rem;
}

.breadcrumb-sep {
    color: #9ca3af;
    font-size: 0.55rem;
}

.breadcrumb-link {
    color: var(--azul-brasil);
    cursor: pointer;
}

.breadcrumb-current {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--cinza-escuro);
}

.breadcrumb-border {
    border-bottom: 1px solid #e5e7eb;
}

/* =============================================
   ARTICLE HEADER
   ============================================= */
.article-header {
    padding: 28px 0 20px;
    border-bottom: 1px solid #e0e0e0;
}

.category-badge {
    display: inline-block;
    color: var(--verde-brasil);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--cinza-escuro);
}

.article-intro {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--cinza-medio);
}

.article-intro strong {
    color: var(--verde-brasil);
    font-weight: 600;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    color: var(--cinza-medio);
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    font-size: 14px;
}

.share-btn:hover {
    background-color: #ddd;
    transform: translateY(-1px);
}

.publish-date {
    font-size: 0.8rem;
    color: var(--cinza-medio);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    padding: 24px 0 40px;
}

/* =============================================
   BANNER SECTION
   ============================================= */
.banner-section {
    margin-bottom: 32px;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* =============================================
   SOCIAL PROOF
   ============================================= */
.social-proof-section {
    margin-bottom: 32px;
}

.social-proof-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.social-proof-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.social-proof-content {
    padding: 20px;
}

.social-proof-quote {
    font-size: 1rem;
    font-style: italic;
    color: #166534;
    line-height: 1.6;
    margin-bottom: 12px;
}

.social-proof-quote::before {
    content: '\201C';
    font-size: 1.5rem;
    margin-right: 2px;
}

.social-proof-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.social-proof-author strong {
    color: #15803d;
    font-size: 0.9rem;
}

.social-proof-author span {
    color: #22c55e;
    font-size: 0.8rem;
}

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section {
    padding: 24px 0;
    margin-bottom: 16px;
}

.cta-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--cinza-escuro);
    margin-bottom: 24px;
    text-align: justify;
}

.drop-cap {
    float: left;
    font-size: 4rem;
    line-height: 0.75;
    color: var(--azul-brasil);
    font-weight: 700;
    margin-right: 8px;
    margin-top: 6px;
    font-family: 'Open Sans', serif;
}

.cta-center {
    text-align: center;
}

.cta-button {
    background-color: var(--azul-brasil);
    color: var(--branco);
    border: none;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    -webkit-appearance: none;
    appearance: none;
}

.cta-button:hover {
    background-color: #0f4190;
    box-shadow: 0 4px 12px rgba(19, 81, 180, 0.3);
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-urgency {
    color: var(--vermelho);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* =============================================
   INFO SECTIONS
   ============================================= */
.info-section {
    margin-bottom: 40px;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cinza-escuro);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--verde-brasil);
}

.section-intro {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--cinza-medio);
    margin-bottom: 20px;
}

/* Info Cards */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--cinza-claro);
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.info-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--azul-brasil);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.info-card strong {
    display: block;
    font-size: 0.95rem;
    color: var(--cinza-escuro);
    margin-bottom: 4px;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--cinza-medio);
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.step-card {
    background: var(--cinza-claro);
    padding: 20px 16px;
    border-radius: 8px;
    text-align: center;
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--azul-brasil);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 auto 10px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--cinza-escuro);
    line-height: 1.5;
}

/* =============================================
   URGENCY BOX
   ============================================= */
.urgency-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--vermelho);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.urgency-icon {
    color: var(--vermelho);
    font-size: 20px;
    min-width: 24px;
    margin-top: 2px;
}

.urgency-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 8px;
}

.urgency-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #7f1d1d;
}

/* =============================================
   LEGAL SECTION
   ============================================= */
.legal-list {
    list-style: none;
    padding: 0;
}

.legal-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    color: var(--cinza-escuro);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-list li i {
    color: var(--azul-brasil);
    font-size: 14px;
    min-width: 16px;
}

/* =============================================
   FOOTER GOV.BR
   ============================================= */
.gov-footer {
    background-color: var(--azul-escuro);
    color: white;
    padding-bottom: calc(80px + var(--safe-bottom));
}

.gov-footer-content {
    padding: 32px 24px;
}

.gov-footer-logo {
    font-size: 1.75rem;
    font-weight: 700;
    font-style: italic;
    display: block;
    margin-bottom: 24px;
}

.gov-footer-links {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 16px;
}

.gov-footer-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.gov-footer-link-item i {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.gov-footer-cookies {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    cursor: pointer;
}

.gov-footer-social {
    margin-top: 24px;
}

.gov-footer-social-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.gov-footer-social-icons {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

.gov-footer-social-icons i {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gov-footer-social-icons i:hover {
    opacity: 1;
}

/* =============================================
   MOBILE CTA BAR
   ============================================= */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--safe-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 99;
    text-align: center;
}

.cta-button-mobile {
    width: 100%;
    max-width: 400px;
    padding: 14px 20px;
    font-size: 0.95rem;
}

/* =============================================
   LOGIN MODAL
   ============================================= */
.login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.login-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 28px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.login-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.login-logo {
    height: 56px;
    object-fit: contain;
}

.login-close {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-title {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--cinza-escuro);
}

.login-cpf-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 12px;
}

.login-cpf-icon {
    width: 20px;
    height: 20px;
}

.login-cpf-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--azul-brasil);
}

.login-description {
    font-size: 0.85rem;
    color: var(--cinza-medio);
    margin-bottom: 14px;
    line-height: 1.5;
}

.login-description strong {
    font-weight: 600;
    color: var(--cinza-escuro);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cinza-escuro);
    margin-bottom: 4px;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px; /* Previne zoom no iOS */
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.login-input:focus {
    outline: none;
    border-color: var(--azul-brasil);
    box-shadow: 0 0 0 2px rgba(19, 81, 180, 0.15);
}

.login-button {
    width: 100%;
    padding: 12px;
    border-radius: 9999px;
    font-weight: 600;
    color: white;
    background-color: var(--azul-brasil);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

.login-button:hover:not(:disabled) {
    background-color: #0f4190;
}

.login-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =============================================
   RESPONSIVE - TABLET
   ============================================= */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 1.3rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .social-proof-img {
        height: 160px;
    }

    /* Mostrar CTA fixo no mobile */
    .mobile-cta-bar {
        display: block;
    }

    .gov-footer {
        padding-bottom: calc(80px + var(--safe-bottom));
    }
}

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .gov-header-top {
        padding: 8px 12px;
    }

    .gov-nav {
        padding: 10px 14px;
    }

    .gov-nav-btn span {
        font-size: 0.85rem;
    }

    .gov-divider,
    .gov-menu-btn {
        display: none;
    }

    .breadcrumb-container {
        padding: 8px 12px;
    }

    .breadcrumb-current {
        display: none;
    }

    .article-header {
        padding: 20px 0 16px;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .article-intro {
        font-size: 0.9rem;
    }

    .drop-cap {
        font-size: 3rem;
    }

    .cta-text {
        font-size: 0.9rem;
    }

    .info-card {
        padding: 12px;
    }

    .info-card-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 14px;
    }

    .info-card strong {
        font-size: 0.9rem;
    }

    .info-card p {
        font-size: 0.85rem;
    }

    .step-card {
        padding: 16px 12px;
    }

    .urgency-box {
        padding: 16px;
    }

    .urgency-title {
        font-size: 1rem;
    }

    .urgency-text {
        font-size: 0.9rem;
    }

    .social-proof-img {
        height: 140px;
    }

    .social-proof-content {
        padding: 16px;
    }

    .social-proof-quote {
        font-size: 0.9rem;
    }

    .login-modal-content {
        padding: 20px 16px;
        margin: 8px;
        border-radius: 10px;
    }
}

/* =============================================
   RESPONSIVE - SMALL PHONES (iPhone SE, etc)
   ============================================= */
@media (max-width: 360px) {
    .article-title {
        font-size: 1.15rem;
    }

    .section-heading {
        font-size: 1.1rem;
    }

    .drop-cap {
        font-size: 2.5rem;
    }

    .cta-button-mobile {
        font-size: 0.85rem;
        padding: 12px 16px;
    }

    .info-card {
        gap: 10px;
        padding: 10px;
    }

    .social-proof-img {
        height: 120px;
    }

    .login-modal-content {
        padding: 16px 12px;
    }

    .login-title {
        font-size: 0.95rem;
    }

    .login-input {
        padding: 10px 12px;
    }
}

/* =============================================
   iOS SAFE AREA
   ============================================= */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-cta-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .gov-footer {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* =============================================
   SOCIAL PROOF NOTIFICATION
   ============================================= */
.social-notification {
    position: fixed;
    bottom: 80px;
    left: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--verde-check);
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 98;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    animation: slideInLeft 0.4s ease-out;
}

.social-notification .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--verde-check);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* Ajuste para não sobrepor CTA mobile */
@media (max-width: 768px) {
    .social-notification {
        bottom: 90px;
        left: 12px;
        right: 12px;
        max-width: none;
    }
}
