/* ================================================================
   A Rádio — Educadora FM | style.css (Formulário Público)
   ================================================================ */

/* ── Variáveis ── */
:root {
    --primaria:     #00C853;
    --primaria-dark:#007A32;
    --primaria-light:#00E676;
    --fundo:        #0D0D0D;
    --fundo-card:   #141918;
    --texto:        #F0F0F0;
    --texto-suave:  #7A8A7A;
    --sucesso:      #00C853;
    --sucesso-bg:   rgba(0,200,83,0.12);
    --erro:         #FF5252;
    --erro-bg:      rgba(255,82,82,0.10);
    --borda:        rgba(0,200,83,0.18);
    --borda-focus:  #00C853;
    --sombra:       0 8px 40px rgba(0,0,0,0.6);
    --radius:       14px;
    --radius-sm:    8px;
    --trans:        .22s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Sora', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    background: var(--fundo);
    color: var(--texto);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ── Ondas decorativas ── */
.wave-top {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 80px;
    z-index: 0;
    pointer-events: none;
}
.wave-top svg { width: 100%; height: 100%; display: block; }

.wave-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    z-index: 0;
    pointer-events: none;
    transform: scaleX(-1);
}
.wave-bottom svg { width: 100%; height: 100%; display: block; }

/* ── Container principal ── */
.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 90px 20px 100px;
    gap: 20px;
}

/* ── Header / Logo ── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    background: #0A0E0A;
    border: 1px solid rgba(0,200,83,0.25);
    border-radius: var(--radius);
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0,200,83,0.2);
    animation: slideDown .5s ease both;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
}

/* manter compatibilidade caso usado sem imagem */
.logo-icon {
    font-size: 2rem;
    line-height: 1;
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 1rem; font-weight: 700; }
.logo-sub   { font-size: .75rem; opacity: .85; }

/* Barrinhas de sinal de rádio */
.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 28px;
}
.signal-bars span {
    display: block;
    width: 5px;
    background: rgba(255,255,255,0.7);
    border-radius: 3px;
    animation: pulse-bar 1.2s ease-in-out infinite alternate;
}
.signal-bars span:nth-child(1) { height: 8px; animation-delay: 0s; }
.signal-bars span:nth-child(2) { height: 14px; animation-delay: .15s; }
.signal-bars span:nth-child(3) { height: 20px; animation-delay: .3s; }
.signal-bars span:nth-child(4) { height: 26px; animation-delay: .45s; }

@keyframes pulse-bar {
    from { opacity: .4; transform: scaleY(0.7); }
    to   { opacity: 1;  transform: scaleY(1); }
}

/* ── Destaque escola ── */
.escola-destaque {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, var(--primaria), var(--primaria-dark));
    color: white;
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,200,83,0.2);
    animation: fadeIn .6s ease both;
}

.escola-label {
    font-size: .8rem;
    opacity: .85;
    white-space: nowrap;
}

.escola-nome {
    font-size: .95rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Card do formulário ── */
.form-card {
    width: 100%;
    max-width: 480px;
    background: var(--fundo-card);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    padding: 32px 28px;
    animation: fadeUp .5s ease .1s both;
}

.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.form-header h1 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--texto);
    margin-bottom: 6px;
    line-height: 1.2;
}

.form-header p {
    font-size: .95rem;
    color: var(--texto-suave);
    font-weight: 400;
}

/* ── Campos ── */
.campo-grupo {
    margin-bottom: 20px;
}

.campo-grupo label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: 6px;
    letter-spacing: .01em;
}

.campo-grupo input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--borda);
    border-radius: var(--radius-sm);
    background: #1A211A;
    color: var(--texto);
    transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
    outline: none;
    -webkit-appearance: none;
}

.campo-grupo input:focus {
    border-color: var(--borda-focus);
    background: #1E2A1E;
    box-shadow: 0 0 0 3px rgba(0,200,83,0.15);
}

.campo-grupo input[readonly] {
    background: #0F150F;
    color: var(--texto-suave);
    cursor: not-allowed;
    opacity: .7;
}

.campo-grupo input.invalido {
    border-color: var(--erro);
    box-shadow: 0 0 0 3px rgba(255,82,82,0.15);
}

.campo-grupo input.valido {
    border-color: var(--sucesso);
}

.campo-erro {
    display: block;
    font-size: .8rem;
    color: var(--erro);
    margin-top: 5px;
    font-weight: 600;
    min-height: 1.2em;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity var(--trans), transform var(--trans);
}

.campo-erro.visivel {
    opacity: 1;
    transform: translateY(0);
}

/* ── Botão CTA ── */
.btn-cta {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primaria-light), var(--primaria-dark));
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: .04em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    transition: transform var(--trans), box-shadow var(--trans), opacity var(--trans);
    box-shadow: 0 4px 20px rgba(0,200,83,0.4);
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    transform: translateX(-100%);
    transition: transform .4s ease;
}

.btn-cta:hover::before { transform: translateX(0); }

.btn-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,200,83,0.5);
}

.btn-cta:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(0,200,83,0.4);
}

.btn-cta:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* ── Spinner ── */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Mensagem global ── */
.msg-global {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    animation: fadeIn .3s ease;
}

.msg-global.sucesso {
    background: var(--sucesso-bg);
    color: var(--sucesso);
    border: 1px solid rgba(0,200,83,0.3);
}

.msg-global.erro {
    background: var(--erro-bg);
    color: var(--erro);
    border: 1px solid rgba(255,82,82,0.3);
}

/* ── Footer ── */
.form-footer {
    width: 100%;
    max-width: 480px;
    text-align: center;
    color: var(--texto-suave);
    font-size: .78rem;
    line-height: 1.5;
    padding: 0 10px;
}

/* ── Animações ── */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Responsividade ── */
@media (max-width: 480px) {
    .form-card { padding: 24px 20px; border-radius: var(--radius-sm); }
    .form-header h1 { font-size: 1.2rem; }
    .campo-grupo input { font-size: 1rem; padding: 13px 14px; }
    .btn-cta { font-size: 1rem; padding: 16px; }
    .wave-top, .wave-bottom { height: 50px; }
    .main-container { padding: 70px 14px 80px; }
}

@media (min-width: 768px) {
    .form-card { padding: 40px 36px; }
}
