/* /css/contador-de-dias.css - Versão Atualizada (Layout Unificado + Compatibilidade Intervalo + Fix Dark Mode) */

/* --- ESTILOS GERAIS DA PÁGINA --- */
.section-title-modern {
    grid-column: 1 / -1;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.4em;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-separator {
    grid-column: 1 / -1;
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 35px 0;
}

/* --- GRIDS DE LAYOUT PRINCIPAL (Civil Grid) --- */
.civil-calculator-grid {
    display: grid;
    grid-template-columns: 320px 1fr; /* Calendário | Inputs */
    gap: 30px;
    align-items: start;
    grid-column: 1 / -1;
}

.civil-calendar-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.civil-inputs-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

/* Ajustes de espaçamento dentro da coluna de inputs */
.civil-inputs-column .form-group {
    margin-bottom: 0 !important;
}

/* Botões de Ação na Coluna da Direita (Layout Original Restaurado) */
.civil-inputs-column .action-buttons-row {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-bottom: -5px;
    display: flex;
    gap: 10px;
}

.action-buttons-row .btn {
    flex: 1; /* Ocupam o mesmo espaço */
    margin-top: 0 !important;
}

/* COMPATIBILIDADE: Classe global para botões full-width (usada em dias-entre-datas) */
.form-group-full-width {
    width: 100%;
    margin-top: 15px;
}

/* Scoped para a coluna civil manter o estilo específico */
.civil-inputs-column .form-group-full-width {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-bottom: -5px;
}

/* Responsividade do Grid Civil */
@media (max-width: 850px) {
    .civil-calculator-grid {
        grid-template-columns: 1fr;
    }
    .civil-calendar-column {
        order: -1; /* Calendário no topo em mobile */
    }
    .civil-inputs-column .action-buttons-row,
    .civil-inputs-column .form-group-full-width {
        margin-top: 15px;
        padding-top: 0;
        border-top: none;
        margin-bottom: 0;
    }
}

/* --- COMPONENTES DE FORMULÁRIO --- */

.input-with-button {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.input-with-button .input-icon-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
}

/* Botão "Hoje" */
.btn-today {
    padding: 12px 15px;
    font-size: 0.9em;
    width: auto;
    flex-shrink: 0;
    background-color: var(--btn-light-bg);
    color: var(--btn-light-text);
    border: 1px solid var(--btn-light-border);
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.btn-today:hover {
     background-color: var(--btn-light-hover-bg);
}

body.dark-mode .btn-today {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    color: #e0e0e0;
}
body.dark-mode .btn-today:hover {
    background-color: #3a3a3c;
}

/* --- BOTÕES DE ATALHO (PRESETS) - QUADRADOS E ROUNDED --- */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.btn-preset {
    width: 50px;
    height: 50px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0;
    border-radius: 12px; /* Rounded */
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    text-align: center;
}

.btn-preset:hover {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

body.dark-mode .btn-preset:hover {
    background-color: #1a3b5c;
}

/* --- NOVOS RADIO CARDS (Seleção Tipo de Contagem) --- */
.radio-group-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 5px;
}

.radio-option {
    position: relative;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background-color: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
}

/* Estado Selecionado */
.radio-option input[type="radio"]:checked + .radio-card {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.2);
}

/* Estado Hover */
.radio-option:hover .radio-card {
    border-color: var(--primary-color);
}

/* --- CHECKBOXES ESTILIZADOS E LAYOUT INLINE --- */
.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.checkbox-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.checkbox-separator {
    width: 1px;
    height: 15px;
    background-color: var(--border-color);
    display: inline-block;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    color: var(--text-color);
}

.checkbox-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* --- COMPATIBILIDADE: CHECKBOXES LEGADOS --- */
.checkbox-group-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    cursor: pointer;
}

.form-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 15px 0;
    width: 100%;
}

/* --- GRUPO DE BOTÕES DE AÇÃO --- */
.button-group {
    display: flex;
    gap: 10px;
    grid-column: 1 / -1;
}

.button-group .btn {
    flex-grow: 1;
}

.button-group .btn-light {
    flex-grow: 0;
    width: auto;
}

@media (max-width: 500px) {
    .button-group {
        flex-direction: column-reverse;
    }
}

/* --- LAYOUT DO CALENDÁRIO INTERATIVO (INPUTS) --- */
.interval-grid-container {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
    margin-bottom: 20px;
}

.interval-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Container do Calendário */
.interactive-calendar-container {
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    width: 100%;
    box-sizing: border-box;
    max-width: 100%; 
}

body.dark-mode .interactive-calendar-container {
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-color: #333;
    background-color: #1c1c1e;
}

.interactive-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.interactive-calendar-header .cal-nav-btn {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    color: var(--text-color);
}

.interactive-calendar-header .cal-nav-btn:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

body.dark-mode .interactive-calendar-header .cal-nav-btn {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    color: #e0e0e0;
}
body.dark-mode .interactive-calendar-header .cal-nav-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.interactive-calendar-header .month-year-display {
    font-weight: 600;
    font-size: 1.1em;
    text-transform: capitalize;
    color: var(--text-color);
}

.interactive-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.interactive-calendar-grid .weekday {
    font-weight: 500;
    font-size: 0.85em;
    color: var(--secondary-color);
    padding-bottom: 8px;
}

.weekday.weekend-label {
    color: #ff6b6b;
    font-weight: 700;
}

.interactive-calendar-grid .day-btn {
    background: none;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    font-family: var(--font-family-base);
    font-size: 0.9em;
    color: var(--text-color);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    outline: none;
}

.interactive-calendar-grid .day-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.interactive-calendar-grid .day-btn:not(:disabled):hover {
    background-color: var(--btn-light-bg);
}

.interactive-calendar-grid .day-btn.weekend:not(.other-month) {
    background-color: #f9f9f9;
    color: #777;
}

.interactive-calendar-grid .day-btn.holiday {
    color: #dc3545;
    font-weight: bold;
    background-color: #fff5f5;
    position: relative;
}

.interactive-calendar-grid .day-btn.in-range {
    background-color: rgba(0, 113, 227, 0.15);
    border-radius: 0;
    color: var(--text-color);
}

.interactive-calendar-grid .day-btn.start-date,
.interactive-calendar-grid .day-btn.end-date {
    background-color: var(--primary-color) !important;
    color: var(--white-color) !important;
    font-weight: bold;
    opacity: 1;
}

.interactive-calendar-grid .day-btn.start-date {
    border-top-left-radius: 50%;
    border-bottom-left-radius: 50%;
}

.interactive-calendar-grid .day-btn.end-date {
    border-top-right-radius: 50%;
    border-bottom-right-radius: 50%;
}

.interactive-calendar-grid .day-btn.start-date.end-date {
    border-radius: 50%;
}

.interactive-calendar-grid .day-btn.today {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    font-weight: bold;
}

/* --- AJUSTES DARK MODE --- */
body.dark-mode .interactive-calendar-grid .day-btn.weekend:not(.other-month) {
    background-color: #2a2a2a; 
    color: #98989d;
}

body.dark-mode .interactive-calendar-grid .day-btn.holiday {
    background-color: #3e2020; 
    color: #ff6b6b;
}

body.dark-mode .interactive-calendar-grid .day-btn.in-range {
    background-color: rgba(64, 156, 255, 0.25);
    color: #ffffff;
}

body.dark-mode .interactive-calendar-grid .day-btn:not(:disabled):hover:not(.start-date):not(.end-date) {
    background-color: #3a3a3c;
}

/* --- LISTA DE FERIADOS NO RODAPÉ --- */
.calendar-footer-separator {
    height: 1px;
    background-color: #eee;
    margin: 15px 0 10px 0;
}

.calendar-footer-holidays {
    list-style: none;
    padding: 0 5px;
    margin: 0;
    text-align: left;
    font-size: 0.85rem;
    color: #666;
}

.calendar-footer-holidays li {
    margin-bottom: 4px;
    line-height: 1.3;
}

.calendar-footer-holidays li strong {
    color: #333;
    margin-right: 5px;
}

body.dark-mode .calendar-footer-separator {
    background-color: #444;
}

body.dark-mode .calendar-footer-holidays {
    color: #aaa;
}

body.dark-mode .calendar-footer-holidays li strong {
    color: #ddd;
}

/* --- PAINEL DE RESULTADOS (MODERN - SINGLE CARD LAYOUT) --- */
.result-container-modern {
    margin-top: 25px; 
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--light-bg);
    animation: fadeIn 0.5s;
    scroll-margin-top: 80px;
    border-left: 4px solid var(--primary-color);
}

body.dark-mode .result-container-modern {
    background-color: var(--content-bg);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* Título de Projeção Elegante */
.result-title-constrained {
    margin: 0;
    font-size: 1.1em; /* Menor como solicitado */
    font-weight: 500;
    color: var(--text-color);
    max-width: 65%; 
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.3px;
}

/* CLASSE NOVA SOLICITADA PARA O SUBTÍTULO DO RESULTADO */
.result-subtitle-discrete {
    display: block;
    font-size: 0.65em; /* Pequena */
    font-weight: 400; /* Discreta */
    color: var(--secondary-color);
    white-space: nowrap; /* Linha única obrigatória */
    overflow: hidden; /* Limite na margem */
    text-overflow: ellipsis; /* Reticências se estourar */
    max-width: 100%;
    margin-top: 2px;
}

.result-title-constrained strong {
    color: var(--primary-color);
    font-weight: 700;
}

.result-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .result-title-constrained {
        max-width: 100%;
    }
    .result-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }
    .result-actions .btn {
        flex: 1;
        padding: 10px 5px;
        font-size: 0.85em;
        justify-content: center;
        text-align: center;
    }
}

/* NOVO LAYOUT DE GRID PARA RESULTADO (CARD + CALENDÁRIO) */
.result-main-panel {
    display: grid;
    grid-template-columns: 1fr 320px; /* Card expande, Calendário fixo */
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
}

/* CARD ÚNICO DE RESULTADO */
.result-summary-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #90caf9;
    box-shadow: 0 4px 6px rgba(33, 150, 243, 0.1);
    height: 100%;
    box-sizing: border-box;
}

.result-summary-block p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-summary-block .label {
    font-size: 1.1em;
    color: #1565c0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-value-refactored {
    font-size: 2.8em;
    font-weight: 800;
    color: #0d47a1;
    line-height: 1.1;
}

.weekday-small {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #1976d2;
    text-transform: capitalize;
    margin-top: 5px;
}

body.dark-mode .result-summary-block {
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
    border-color: #30475e;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}
body.dark-mode .result-summary-block .label { color: #a0c4ff; }
body.dark-mode .highlight-value-refactored { color: #ffffff; }
body.dark-mode .weekday-small { color: #8ecae6; }

/* LEGADO (Mantido para compatibilidade) */
.result-numbers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.result-box {
    background-color: var(--content-bg);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}
.result-value {
    display: block;
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary-color);
}
.result-label {
    display: block;
    font-size: 1em;
    font-weight: 500;
    color: var(--secondary-color);
    margin-top: 5px;
    text-transform: capitalize;
}
.result-label .label-detail {
    font-size: 0.8em;
}

.result-mode-indicator {
    font-size: 0.8em;
    font-weight: 500;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.result-options-footer {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* --- MINI CALENDÁRIO NO RESULTADO (ESTILO /CALCULADORA) --- */
.mini-calendar-wrapper {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--content-bg);
}

.mini-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    min-height: 30px;
}

.mini-calendar-header {
    text-align: center;
    font-weight: 600;
    text-transform: capitalize;
    flex-grow: 1;
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.mini-calendar-grid .weekday {
    font-size: 0.8em;
    font-weight: 500;
    color: var(--secondary-color);
}

.mini-calendar-grid .day {
    padding: 5px 0;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    position: relative;
    cursor: default;
}

/* CORES DE ESTADO DO CALENDÁRIO DE RESULTADO */
.mini-calendar-grid .day.is-weekend {
    background-color: #f0f0f0;
    color: #777;
}

.mini-calendar-grid .day.is-business {
    background-color: #e3f2fd;
    color: #1565c0;
}

.mini-calendar-grid .day.is-skipped {
    background-color: #ffebee;
    color: #c62828;
    font-weight: 700;
}

.mini-calendar-grid .day.start-date {
    background-color: var(--primary-color);
    color: var(--white-color);
    font-weight: bold;
    border-radius: 4px;
}

.mini-calendar-grid .day.end-date {
    background-color: #388e3c; /* Verde para data final */
    color: var(--white-color);
    font-weight: bold;
    border-radius: 4px;
}

/* DARK MODE CALENDAR RESULT */
body.dark-mode .mini-calendar-grid .day.is-weekend { background-color: #2c2c2e; color: #8e8e93; }
body.dark-mode .mini-calendar-grid .day.is-business { background-color: #1a3b5c; color: #82b1ff; }
body.dark-mode .mini-calendar-grid .day.is-skipped { background-color: #3e2020; color: #ff8a80; }
body.dark-mode .mini-calendar-grid .day.end-date { background-color: #30d158; color: #000; }

/* --- CARDS DE INSIGHTS --- */
.result-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.insight-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--content-bg);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.insight-card ion-icon {
    font-size: 1.8em;
    color: var(--primary-color);
}

.insight-content {
    display: flex;
    flex-direction: column;
}

.insight-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    display: block;
}

.insight-label {
    font-size: 0.85em;
    color: var(--secondary-color);
    display: block;
    line-height: 1.2;
}

/* --- SISTEMA DE ABAS (TABS) --- */
.tabs-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-family: var(--font-family-base);
    font-size: 1em;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background-color: rgba(0, 113, 227, 0.05);
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.calculator-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.calculator-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- BOX PROMOCIONAL --- */
.countdown-promo-box {
    background-color: #f0f7ff;
    border: 1px solid #cce5ff;
    border-left: 5px solid #0071e3;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: background-color 0.3s, border-color 0.3s;
}

.countdown-promo-content {
    flex: 1;
    min-width: 250px;
}

.countdown-promo-title {
    color: #004085;
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.countdown-promo-text {
    color: #555;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.countdown-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #0071e3;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,113,227,0.3);
}

.countdown-promo-btn:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

.countdown-promo-btn-wrapper {
    flex-shrink: 0;
}

body.dark-mode .countdown-promo-box {
    background-color: #1c2b36;
    border-color: #2c4a63;
    border-left-color: #0071e3;
}

body.dark-mode .countdown-promo-title {
    color: #60a5fa;
}

body.dark-mode .countdown-promo-text {
    color: #d1d5db;
}

/* --- CARDS DE EXEMPLOS PRÁTICOS (DARK MODE FIX) --- */
.example-card {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

body.dark-mode .example-card {
    background-color: #1c1c1e;
    border-color: #38383a;
    color: #d1d5db;
}

body.dark-mode .example-card strong {
    color: #60a5fa; /* Azul claro para destaque no dark mode */
}

/* --- FERRAMENTAS RELACIONADAS --- */
.related-tools-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.related-tools-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.4em;
    font-weight: 600;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--content-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    color: inherit;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.tool-card.featured-card {
    background-color: rgba(0, 113, 227, 0.05);
    border-color: rgba(0, 113, 227, 0.2);
}

.tool-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.tool-info {
    display: flex;
    flex-direction: column;
}

.tool-title {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.tool-desc {
    font-size: 0.9em;
    color: var(--secondary-color);
    line-height: 1.4;
}

/* Responsividade Global */
@media (max-width: 768px) {
    .interval-grid-container {
        grid-template-columns: 1fr;
    }
    .result-main-panel {
        grid-template-columns: 1fr;
    }
    .result-summary-block {
        padding: 20px;
    }
    .interactive-calendar-container {
        max-width: 100%;
        margin-top: 15px;
    }
    .tabs-navigation {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    .tab-btn {
        flex-shrink: 0;
        padding: 10px 15px;
        font-size: 0.9em;
    }
    /* FIX: Permitir quebra de linha no subtítulo do resultado em mobile */
    .result-subtitle-discrete {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.3; /* Melhorar legibilidade quando quebrar */
    }
}