/* ===================================
   CALCULADORA DE POTÊNCIA ELÉTRICA - ENGENHARIA ELÉTRICA
   ================================== */

/* Variáveis CSS - Engenharia Elétrica */
: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);
}

/* ===================================
   SEÇÃO DA CALCULADORA POTÊNCIA ELÉTRICA
   ================================== */
.potencia-eletrica-calculator-section {
    margin-bottom: 3rem;
}

.potencia-eletrica-header {
    text-align: center;
    margin-bottom: 2rem;
}

.potencia-eletrica-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    background: var(--eletrica-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.potencia-eletrica-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.potencia-eletrica-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   DADOS BÁSICOS
   ================================== */
.potencia-eletrica-dados-basicos {
    background: var(--eletrica-light);
    border: 2px solid var(--eletrica-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.potencia-eletrica-dados-basicos h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.potencia-eletrica-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.potencia-eletrica-input-group {
    flex: 1;
    min-width: 200px;
}

.potencia-eletrica-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--eletrica-primary);
    font-size: 1rem;
}

.potencia-eletrica-input-group input,
.potencia-eletrica-input-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.potencia-eletrica-input-group input:focus,
.potencia-eletrica-input-group select:focus {
    outline: none;
    border-color: var(--eletrica-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.potencia-eletrica-input-group input.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

/* ===================================
   BOTÕES
   ================================== */
.potencia-eletrica-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.potencia-eletrica-calc-btn {
    background: var(--eletrica-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.potencia-eletrica-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.potencia-eletrica-clear-btn {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.potencia-eletrica-clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

/* ===================================
   EXEMPLOS
   ================================== */
.potencia-eletrica-examples {
    margin-top: 2rem;
    text-align: center;
}

.potencia-eletrica-examples p {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
}

.example-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.example-btn {
    background: linear-gradient(135deg, var(--eletrica-secondary), var(--eletrica-primary));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.example-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ===================================
   HELP E INSTRUÇÕES
   ================================== */
.potencia-eletrica-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.potencia-eletrica-help p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================
   RESULTADO
   ================================== */
.potencia-eletrica-resultado {
    background: var(--eletrica-light);
    border: 2px solid var(--eletrica-accent);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    animation: slideInUp 0.7s ease;
}

.potencia-eletrica-resultado h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.potencia-eletrica-resultado h3:before {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--eletrica-accent);
    transition: width 0.5s ease;
}

.potencia-eletrica-resultado h3.highlight:before {
    width: 100%;
}

.potencia-eletrica-resultado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.potencia-eletrica-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;
}

.potencia-eletrica-resultado-label {
    color: #5a6c7d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.potencia-eletrica-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--eletrica-primary);
    margin-bottom: 0.3rem;
}

.potencia-eletrica-unit {
    color: var(--eletrica-secondary);
    font-size: 1rem;
    font-weight: 600;
}

/* ===================================
   EXPLICAÇÃO DO CÁLCULO
   ================================== */
.potencia-eletrica-explicacao {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid var(--eletrica-primary);
    animation: fadeIn 0.8s ease;
}

.potencia-eletrica-explicacao h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.potencia-eletrica-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;
}

.potencia-eletrica-calculo-detalhe p {
    color: var(--eletrica-dark);
    font-size: 0.9rem;
    margin: 0.4rem 0;
    line-height: 1.5;
}

.potencia-eletrica-calculo-detalhe p:first-child {
    font-weight: bold;
    color: var(--eletrica-primary);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-family: inherit;
}

/* ===================================
   FUNDAMENTAÇÃO TEÓRICA - ESTILIZADA
   ================================== */
.potencia-eletrica-fundamentacao-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0 2rem 0; /* Margem maior acima para separar do card anterior */
    border: 2px solid var(--eletrica-primary);
    animation: fadeIn 0.8s ease;
    position: relative;
    overflow: hidden;
}

.potencia-eletrica-fundamentacao-container:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--eletrica-gradient);
}

.potencia-eletrica-fundamentacao-container h3 {
    color: var(--eletrica-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fundamentacao-content {
    position: relative;
    z-index: 1;
}

.fundamentacao-content p {
    color: #2c3e50;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.fundamentacao-content strong {
    color: var(--eletrica-primary);
    font-weight: 600;
}

.fundamentacao-content code {
    background: white;
    color: var(--eletrica-dark);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    border: 1px solid var(--eletrica-accent);
    font-weight: bold;
}

/* Destaque da Lei de Ohm */
.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;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.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);
    transition: all 0.3s ease;
}

.formula-fund:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.4);
    background: var(--eletrica-accent);
    color: #2c3e50;
}

/* ===================================
   CONTEÚDO EDUCACIONAL - OBRIGATÓRIO
   ================================== */
.educational-content {
    margin-top: 3rem;
}

.educational-content h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--eletrica-primary);
    padding-bottom: 1rem;
    background: var(--eletrica-gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

/* 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;
}

/* ===================================
   FÓRMULAS - Visual destacado obrigatório
   ================================== */
.formula-highlight {
    background: linear-gradient(135deg, var(--eletrica-light) 0%, rgba(255,255,255,0.9) 100%);
    border: 2px solid var(--eletrica-primary);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}

.formula-main {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--eletrica-primary);
    font-family: 'Courier New', monospace;
}

/* 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;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.formula-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.15);
    border-color: var(--eletrica-primary);
}

.formula-item:before {
    content: "⚡";
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--eletrica-accent);
    font-size: 1.2rem;
}

.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: var(--eletrica-dark);
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 0;
    border: 1px solid var(--eletrica-accent);
}

/* ===================================
   EXEMPLOS PRÁTICOS - VISUAL
   ================================== */
.example-item {
    background: var(--eletrica-light);
    border-left: 4px solid var(--eletrica-primary);
    border-radius: 0 10px 10px 0;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.example-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.15);
    background: white;
}

.example-item h4 {
    color: var(--eletrica-primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.example-calculation {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid var(--eletrica-accent);
    border-left: 3px solid var(--eletrica-primary);
}

.example-calculation p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2c3e50;
}

.example-calculation p strong {
    color: var(--eletrica-primary);
}

/* ===================================
   INTERPRETAÇÃO E DICAS AVANÇADAS
   ================================== */
.interpretation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.interpretation-card {
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.interpretation-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--eletrica-primary);
    transition: all 0.3s ease;
}

.interpretation-card:hover {
    border-color: var(--eletrica-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.2);
}

.interpretation-card:hover:before {
    width: 100%;
    background: linear-gradient(135deg, var(--eletrica-light), rgba(30, 58, 138, 0.05));
}

.interpretation-card h5 {
    color: var(--eletrica-primary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.interpretation-card p {
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ===================================
   DICAS - Lista estilizada obrigatória
   ================================== */
.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    background: var(--eletrica-light);
    border-left: 4px solid var(--eletrica-primary);
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 0.8rem 0.8rem 2rem;
    margin: 0.5rem 0 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.tips-list li:hover {
    background: white;
    border-left-color: var(--eletrica-accent);
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.1);
}

.tips-list li strong {
    color: var(--eletrica-primary);
}

.tips-list li:before {
    content: "⚡";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--eletrica-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* ===================================
   APLICAÇÕES - Grid responsivo
   ================================== */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.application-item {
    background: var(--eletrica-light);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    border-left: 4px solid var(--eletrica-accent);
    padding: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.application-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.15);
    border-color: var(--eletrica-primary);
    background: white;
}

.application-item h4 {
    color: var(--eletrica-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.application-item p {
    color: #2c3e50;
    line-height: 1.6;
}

/* ===================================
   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;
}

/* ===================================
   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;
}

/* ===================================
   ANIMAÇÕES
   ================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===================================
   RESPONSIVIDADE OBRIGATÓRIA
   ================================== */
@media (max-width: 768px) {
    .potencia-eletrica-header h1 {
        font-size: 2rem;
    }
    
    .potencia-eletrica-container {
        padding: 1.5rem;
    }
    
    .potencia-eletrica-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .potencia-eletrica-input-group {
        min-width: 100%;
    }
    
    .potencia-eletrica-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .example-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .example-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .potencia-eletrica-resultado-grid {
        grid-template-columns: 1fr;
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    .interpretation-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .formulas-fundamentacao {
        flex-direction: column;
        align-items: center;
    }
    
    .formula-fund {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .potencia-eletrica-header h1 {
        font-size: 1.8rem;
    }
    
    .potencia-eletrica-container {
        padding: 1rem;
    }
    
    .potencia-eletrica-dados-basicos {
        padding: 1rem;
    }
    
    .content-block {
        padding: 1.5rem;
    }
    
    .formula-main {
        font-size: 1.2rem;
    }
    
    .potencia-eletrica-value {
        font-size: 1.5rem;
    }
    
    .potencia-eletrica-fundamentacao {
        padding: 1rem;
    }
    
    .potencia-eletrica-fundamentacao-container {
        padding: 1.5rem;
    }
    
    .lei-ohm-destaque {
        padding: 1rem;
    }
    
    .formulas-fundamentacao {
        gap: 0.5rem;
    }
}