/* Reset e variáveis */
:root {
    --color-bg: #F2F2F2;
    --color-primary: #7A65AA;
    --color-secondary: #F7ECD8;
    --color-accent: #EA4F6A;
    --color-dark: #432771;
    --color-text: #333;
    --color-text-light: #666;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding-bottom: 100px; /* Espaço para o rodapé fixo (reduzido) */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    color: white;
    padding: 80px 0 100px;
    text-align: center;
}

.hero-brand {
    margin-bottom: 16px;
}

.hero-logo {
    max-width: 340px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hero-logo-fallback {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
}

.program-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.info-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.info-item .icon {
    font-size: 1.5rem;
}

.cta-button {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(234, 79, 106, 0.3);
}

.cta-button:hover {
    background-color: #d43d5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 79, 106, 0.4);
}

/* Quem pode participar */
.who-can-participate {
    padding: 60px 0;
    background-color: var(--color-secondary);
}

.who-can-participate h2 {
    color: var(--color-dark);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.participant-info {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.participant-info ul {
    list-style: none;
    padding-left: 0;
}

.participant-info li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.participant-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Form Section */
.form-section {
    padding: 60px 0;
    background-color: white;
}

.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-top: 20px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: var(--color-bg);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-text {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    color: var(--color-dark);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.step-description {
    color: var(--color-text-light);
    margin-bottom: 30px;
    font-size: 1rem;
}

/* TCLE */
.tcle-content {
    margin-bottom: 30px;
}

.tcle-text {
    background: var(--color-bg);
    padding: 30px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
}

.download-tcle {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.download-tcle:hover {
    background-color: var(--color-primary);
    color: white;
}

.tcle-acceptance {
    margin: 30px 0;
    padding: 20px;
    background: var(--color-secondary);
    border-radius: 8px;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.welcome-message p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.encouragement {
    font-size: 1.3rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-top: 30px;
}

/* Form Groups */
.question-block {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--color-bg);
}

.question-block:last-child {
    border-bottom: none;
}

.question-block h3 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(122, 101, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background-color: var(--color-bg);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label span {
    font-weight: normal;
}

/* Questions Container */
.questions-container {
    margin-bottom: 30px;
}

.question-item {
    background: var(--color-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.question-item h4 {
    color: var(--color-dark);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:hover {
    background-color: rgba(122, 101, 170, 0.1);
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.radio-option label {
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    flex: 1;
}

/* Pause Message */
.pause-message {
    text-align: center;
    padding: 60px 20px;
}

.pause-message h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.pause-message p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.pause-emoji {
    font-size: 4rem;
    margin-top: 30px;
}

/* Puzzle */
.puzzle-container {
    text-align: center;
    padding: 40px 20px;
}

.puzzle-game {
    max-width: 400px;
    margin: 30px auto;
    padding: 30px;
    background: var(--color-secondary);
    border-radius: 12px;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.puzzle-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.puzzle-piece {
    aspect-ratio: 1;
    min-width: 70px;
    min-height: 70px;
    background: var(--color-primary);
    border: 2px solid white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    color: white;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.puzzle-piece:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.puzzle-piece:active {
    transform: scale(0.98);
}

.puzzle-piece.empty {
    background: transparent;
    border: 2px dashed #ddd;
    cursor: default;
    min-width: 70px;
    min-height: 70px;
}

.puzzle-piece.empty:hover,
.puzzle-piece.empty:active {
    transform: none;
}

.puzzle-success {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Normalization Message */
.normalization-message {
    background: var(--color-secondary);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.normalization-message h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.normalization-message p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

/* Encouragement message (substitui check-in) */
.encouragement-message {
    background: linear-gradient(135deg, var(--color-secondary), rgba(122, 101, 170, 0.1));
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.encouragement-message h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.encouragement-message p {
    font-size: 1.1rem;
    color: var(--color-text);
}

.puzzle-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.btn-puzzle-skip {
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary) !important;
}

.btn-puzzle-skip:hover {
    background-color: rgba(122, 101, 170, 0.1) !important;
}

/* Closing Warning */
.closing-warning {
    background: linear-gradient(135deg, var(--color-secondary), rgba(122, 101, 170, 0.1));
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.closing-warning h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.closing-warning p {
    font-size: 1.1rem;
    color: var(--color-text);
}

/* Buttons */
.btn-next,
.btn-submit {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-next:hover,
.btn-submit:hover {
    background-color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(122, 101, 170, 0.3);
}

.btn-next:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-submit {
    background-color: var(--color-accent);
    width: 100%;
    max-width: 300px;
}

.btn-submit:hover {
    background-color: #d43d5a;
}

/* Thank You Section */
.thank-you-section {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-dark));
    color: white;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thank-you-content h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.thank-you-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.thank-you-note {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 40px;
}

/* Footer - rodapé discreto */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.15);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-info {
    flex: 1;
    min-width: 200px;
}

.footer-info p {
    margin-bottom: 2px;
    font-size: 0.75rem;
    line-height: 1.4;
}

.footer-info a {
    color: var(--color-secondary);
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-logos {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    min-height: 36px;
}

.footer-logo {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
    opacity: 0.9;
}

.footer-logo:hover {
    opacity: 1;
}

/* PUC-Rio: logo preta em fundo claro -> inverter para branco no rodapé escuro */
.footer-logo-puc {
    filter: brightness(0) invert(1);
}

/* Fallback quando a imagem não carrega (arquivo ausente ou caminho errado) */
.footer-logo-fallback {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 260px;
    }

    .hero-logo-fallback {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .program-info {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px;
    }

    .form-step h2 {
        font-size: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .footer-info p {
        font-size: 0.7rem;
    }

    .footer-logos {
        justify-content: center;
    }

    .footer-logo {
        height: 30px;
    }

    .footer-logo-wrap {
        min-height: 30px;
    }

    .footer-logo-fallback {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .radio-group {
        gap: 8px;
    }

    .radio-option {
        padding: 10px;
    }

    .puzzle-grid {
        gap: 8px;
    }

    .puzzle-piece {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0 60px;
    }

    .hero-logo {
        max-width: 200px;
    }

    .hero-logo-fallback {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1rem;
    }

    .form-container {
        padding: 15px;
    }

    .tcle-text {
        padding: 20px;
        max-height: 400px;
    }

    .thank-you-content h1 {
        font-size: 1.8rem;
    }

    .thank-you-content p {
        font-size: 1rem;
    }
}
