/* ===============================================
   CALCULADORA DE QUEDA DE TENSÃO - CSS
   Área: Elétrica/Eletrônica | Cores: Azul Elétrico
   =============================================== */

/* ===== VARIÁVEIS DE COR - ÁREA ELÉTRICA (COPIADAS DA POTÊNCIA) ===== */
:root {
    --eletrica-primary: #1e3a8a;       /* Azul elétrico forte */
    --eletrica-secondary: #3b82f6;     /* Azul energia */
    --eletrica-accent: #fbbf24;        /* Amarelo voltagem */
    --eletrica-light: #dbeafe;         /* Fundo azul claro */
    --eletrica-dark: #1e40af;          /* Azul escuro */
    --eletrica-gradient: linear-gradient(135deg, #1e3a8a, #fbbf24);
}

.content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
}

#ads-sidebar-container {
    order: 3;
}

#sidebar-container {
    order: 1;
}

.content {
    order: 2;
}

h2 {
  padding: 1rem;
  margin-left: 1rem;
}

/* ===== CONTAINER PRINCIPAL ===== */
.queda-tensao-calculator-section {
    background: white;
    padding: 0;
}

.queda-tensao-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--eletrica-gradient);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.queda-tensao-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.queda-tensao-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    line-height: 1.5;
    margin: 0;
}

.queda-tensao-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== DADOS BÁSICOS ===== */
.queda-tensao-dados-basicos {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--eletrica-primary);
    margin-bottom: 2rem;
}

/* ===== GRUPOS DE INPUT ===== */
.queda-tensao-dados-basicos h3 {
    color: var(--eletrica-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--eletrica-accent);
    padding-bottom: 0.5rem;
}

.queda-tensao-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.queda-tensao-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 250px;
    position: relative;
}

.queda-tensao-input-group label {
    font-weight: 600;
    color: var(--eletrica-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.queda-tensao-input,
.queda-tensao-select {
    padding: 1rem 1.2rem;
    border: 2px solid var(--eletrica-accent);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbff;
}

.queda-tensao-input:focus,
.queda-tensao-select:focus {
    outline: none;
    border-color: var(--eletrica-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.queda-tensao-unit {
    position: absolute;
    right: 15px;
    top: 35px;
    color: var(--eletrica-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    background: var(--eletrica-light);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

/* ===== BOTÕES ===== */
.queda-tensao-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0 1.5rem 0;
    flex-wrap: wrap;
}

.queda-tensao-btn-primary,
.queda-tensao-btn-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queda-tensao-btn-primary {
    background: var(--eletrica-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.queda-tensao-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
}

.queda-tensao-btn-secondary {
    background: transparent;
    color: var(--eletrica-primary);
    border: 2px solid var(--eletrica-primary);
}

.queda-tensao-btn-secondary:hover {
    background: var(--eletrica-primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== EXEMPLOS RÁPIDOS ===== */
.example-buttons {
    text-align: center;
    margin: 2rem 0;
}

.example-buttons h4 {
    color: var(--eletrica-primary);
    margin-bottom: 1rem;
}

.example-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
    margin: 3rem 0;
}

.example-buttons > :not(h4) {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.example-btn {
    padding: 0.8rem 1.5rem;
    background: white;
    border: 2px solid var(--eletrica-primary);
    border-radius: 10px;
    color: var(--eletrica-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: var(--eletrica-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* ===== HELP BOX ===== */
.queda-tensao-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    animation: fadeIn 0.5s ease;
}

.queda-tensao-help p {
    margin: 0.5rem 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== ÁREA DE RESULTADOS ===== */
.queda-tensao-resultado {
    background: var(--eletrica-light);
    border: 2px solid var(--eletrica-accent);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    animation: slideInUp 0.7s ease;
}

.queda-tensao-resultado h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    text-align: center;
}

.queda-tensao-resultado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.queda-tensao-resultado-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
}

.queda-tensao-resultado-item h4 {
    color: #5a6c7d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.queda-tensao-resultado-valor {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--eletrica-primary);
    margin-bottom: 0.3rem;
}

/* ===== CARDS DE EXPLICAÇÃO ===== */
.queda-tensao-explicacao,
.queda-tensao-fundamentacao-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid var(--eletrica-primary);
    animation: fadeIn 0.8s ease;
}

.queda-tensao-explicacao h3,
.queda-tensao-fundamentacao-container h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.queda-tensao-calculo-detalhe {
    background: var(--eletrica-light);
    border: 1px solid var(--eletrica-accent);
    border-radius: 10px;
    padding: 1.2rem;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
}

.queda-tensao-calculo-detalhe p {
    color: var(--eletrica-dark);
    font-size: 0.9rem;
    margin: 0.4rem 0;
    line-height: 1.5;
}

/* ===== FUNDAMENTAÇÃO TEÓRICA ===== */
.queda-tensao-fundamentacao-content {
    position: relative;
    z-index: 1;
}

.queda-tensao-fundamentacao-content p {
    color: #2c3e50;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.queda-tensao-fundamentacao-content strong {
    color: var(--eletrica-primary);
    font-weight: 600;
}

.lei-ohm-destaque {
    background: white;
    border: 2px solid var(--eletrica-accent);
    border-radius: 10px;
    padding: 1.2rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.1);
}

.lei-ohm-destaque h5 {
    color: var(--eletrica-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.formulas-fundamentacao {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.formula-fund {
    background: var(--eletrica-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.3);
}

/* ===== CONTEÚDO EDUCACIONAL ===== */
.formula-highlight {
    background: var(--eletrica-primary);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.formula-main {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Grid de fórmulas */
.formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.formula-item {
    background: var(--eletrica-light);
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.formula-item h4 {
    color: var(--eletrica-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 0;
}

.queda-tensao-list {
    list-style: none;
    padding: 0;
}

.queda-tensao-list li {
    background: var(--eletrica-light);
    margin: 0.8rem 0;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--eletrica-primary);
    transition: transform 0.2s ease;
}

.queda-tensao-list li:hover {
    transform: translateX(5px);
}

/* ===== CARDS DE SISTEMAS ===== */
.queda-tensao-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.queda-tensao-system-card {
    background: white;
    border: 2px solid var(--eletrica-primary);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.queda-tensao-system-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.queda-tensao-system-card h4 {
    color: var(--eletrica-primary);
    margin-bottom: 1rem;
}

/* ===== TABELA DE LIMITES ===== */
.queda-tensao-limits-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 1.5rem 0;
}

.queda-tensao-limit-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--eletrica-light);
}

.queda-tensao-limit-row:nth-child(even) {
    background: var(--eletrica-light);
}

.limit-type {
    font-weight: 500;
    color: var(--eletrica-dark);
}

.limit-value {
    font-weight: bold;
    color: var(--eletrica-primary);
    font-size: 1.1rem;
}

/* ===== DICAS E EXEMPLOS ===== */
.queda-tensao-tips {
    list-style: none;
    padding: 0;
}

.queda-tensao-tips li {
    background: linear-gradient(45deg, var(--eletrica-light), white);
    margin: 1rem 0;
    padding: 1.2rem;
    border-radius: 10px;
    border-left: 5px solid var(--eletrica-primary);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.queda-tensao-tips li:hover {
    transform: translateX(8px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.15);
}

.queda-tensao-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.queda-tensao-example-case {
    background: white;
    border: 2px solid var(--eletrica-accent);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.queda-tensao-example-case:hover {
    border-color: var(--eletrica-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.queda-tensao-example-case h4 {
    color: var(--eletrica-primary);
    margin-bottom: 1rem;
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.highlight {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0%, 100% { background: transparent; }
    50% { background: rgba(37, 99, 235, 0.1); }
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {

    #ads-sidebar-container {
        order: 3;
    }
    
    #sidebar-container {
        order: 1;
    }
    
    .content {
        order: 2;
    }
    
    .queda-tensao-header h1 {
        font-size: 2.2rem;
    }
    
    .queda-tensao-dados-basicos {
        padding: 1.5rem;
    }
    
    .queda-tensao-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .queda-tensao-input-group {
        min-width: 100%;
    }
    
    .queda-tensao-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .example-buttons > :not(h4) {
        flex-direction: column;
        align-items: center;
    }
    
    .example-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .queda-tensao-resultado-grid {
        grid-template-columns: 1fr;
    }
    
    .queda-tensao-systems-grid,
    .queda-tensao-examples-grid {
        grid-template-columns: 1fr;
    }
    
    .formulas-fundamentacao {
        flex-direction: column;
        gap: 1rem;
    }
}


/* Cards educacionais - ESSENCIAL para visual bonito */
.content-block {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
    border-left: 4px solid var(--eletrica-primary);
    transition: all 0.3s ease;
}

.content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-left-color: var(--eletrica-accent);
}

.content-block h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-block h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.content-block p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1rem;
}


/* ===================================
   REFERÊNCIAS
   ================================== */
.references-list {
    list-style: none;
    padding: 0;
}

.references-list li {
    background: #f8f9fa;
    border-left: 3px solid var(--eletrica-accent);
    padding: 0.8rem 0.8rem 0.8rem 2rem;
    margin: 0.5rem 0 0.5rem 1rem;
    border-radius: 0 5px 5px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    position: relative;
}

.references-list li:hover {
    background: var(--eletrica-light);
    border-left-color: var(--eletrica-primary);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
}

.references-list li em {
    color: var(--eletrica-primary);
    font-style: italic;
}

.references-list li:before {
    content: "📚";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--eletrica-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}


/* ===================================
   AVISOS E NOTAS ESPECIAIS
   ================================== */
.accuracy-note {
    background: linear-gradient(135deg, #fff3cd, #fef9e7);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.accuracy-note:before {
    content: "⚠️";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffc107;
    color: #856404;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accuracy-note h5 {
    color: #856404;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accuracy-note p {
    color: #856404;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}
