/* =================================== */
/*        ESTUDOS PAGE SPECIFIC        */
/* =================================== */

body.page-estudos {
    display: block;
    min-height: 100vh;
    align-items: stretch;
    justify-content: flex-start;
}

.page-estudos #page-content {
    width: 100%;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    display: block;
    margin-top: var(--header-height);
    padding-top: var(--estudos-gap-top);
    padding-bottom: calc(0.75rem + var(--estudos-gap-bottom));
}

.page-estudos .study-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(1.75rem + var(--estudos-gap-top)) clamp(1.25rem, 4vw, 2.25rem) calc(1.1rem + var(--estudos-gap-bottom));
    width: 100%;
    min-height: auto;
}

.page-estudos .study-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #fafafa;
    animation: neon 3s ease-in-out infinite alternate;
    text-shadow: 0 0 6px rgba(255, 255, 255, .5), 0 0 15px rgba(0, 255, 255, .6);
}

.page-estudos .study-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 4rem;
    font-weight: 300;
}

.page-estudos .study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.page-estudos .study-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.page-estudos .study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #00b4d8, #0096c7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.page-estudos .study-card:hover::before {
    transform: scaleX(1);
}

.page-estudos .study-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 180, 216, 0.2);
}

.page-estudos .card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00b4d8;
    text-align: center;
}

.page-estudos .study-card h3 {
    font-size: 1.5rem;
    color: #fafafa;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

.page-estudos .study-card p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

.page-estudos .card-badge {
    display: inline-block;
    background: rgba(0, 180, 216, 0.2);
    color: #00b4d8;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-estudos .card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.page-estudos .disabled-card {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.page-estudos .disabled-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.page-estudos .disabled-card::before {
    background: linear-gradient(90deg, #666, #888);
}

.page-estudos .disabled-card .card-icon {
    color: #888;
}

.page-estudos .corner-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.page-estudos .new-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: subtle-glow 3s ease-in-out infinite;
}

@keyframes subtle-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
        opacity: 0.9;
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.6),
                    0 0 15px rgba(255, 215, 0, 0.3);
        opacity: 1;
    }
}

.page-estudos .coming-soon-badge {
    background: #666;
    color: #fff;
}

/* =================================== */
/*        CONTATO PAGE SPECIFIC        */
/* =================================== */

body.page-contato {
    display: block;
    min-height: 100vh;
    align-items: stretch;
    justify-content: flex-start;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body.page-contato * {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.page-contato #page-content {
    width: 100%;
    min-height: auto;
    display: block;
    padding-top: calc(var(--header-height) + 0.75rem);
    padding-bottom: 3rem;
}

.page-contato .content-wrapper {
    width: 100%;
    min-height: auto;
    display: block;
    padding-bottom: calc(var(--footer-height) + 1rem);
}

@media (max-width: 768px) {
    .page-estudos .study-grid {
        grid-template-columns: 1fr;
    }

    .page-estudos .study-container {
        padding: calc(1.3rem + var(--estudos-gap-top) * 0.7) 1rem calc(1rem + var(--estudos-gap-bottom) * 0.8);
    }

    .page-estudos #page-content {
        min-height: calc(100vh - var(--header-height) - var(--footer-height));
        margin-top: var(--header-height);
        padding-top: calc(var(--estudos-gap-top) * 0.85);
        padding-bottom: calc(0.5rem + var(--estudos-gap-bottom) * 0.75);
    }

    .page-contato #page-content {
        padding-top: calc(var(--header-height) + 0.25rem);
        padding-bottom: 2rem;
    }
}

@media (max-width: 600px) {
    .page-estudos .study-container {
        padding: calc(1.1rem + var(--estudos-gap-top) * 0.55) 1.25rem calc(0.8rem + var(--estudos-gap-bottom) * 0.65);
    }

    .page-estudos .study-card {
        padding: 1.5rem;
    }

    .page-flashcards .flashcard-container {
        height: auto;
        min-height: 320px;
        padding: 1rem;
    }

    .page-flashcards .flashcard-face {
        padding: 1.5rem;
    }

    .page-flashcards .controls {
        gap: 1rem;
    }

    .page-quiz .quiz-container {
        padding: 1.5rem;
    }

    .page-quiz .quiz-meta {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .page-contato .content-wrapper {
        padding-bottom: calc(var(--footer-height) + 0.5rem);
    }
}


/* =================================== */
/*      FLASHCARDS PAGE SPECIFIC       */
/* =================================== */

.page-flashcards .flashcard-container {
    perspective: 1000px;
    width: 100%;
    max-width: 600px;
    height: 400px;
    margin: 2rem auto;
    cursor: pointer;
}

.page-flashcards .flashcard {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 16px;
}

.page-flashcards .flashcard.flipped {
    transform: rotateY(180deg);
}

.page-flashcards .flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.page-flashcards .flashcard-front p,
.page-flashcards .flashcard-back p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #fafafa;
}

.page-flashcards .flashcard-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, rgba(0, 53, 102, 0.9), rgba(0, 29, 61, 0.9));
    border-color: rgba(0, 180, 216, 0.3);
}

.page-flashcards .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    flex-wrap: wrap;
}

.page-flashcards .control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-flashcards .control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.page-flashcards .control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-flashcards .back-link {
    align-self: flex-start;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.page-flashcards .back-link:hover {
    color: var(--text-primary);
}

.page-flashcards .hint-text {
    position: absolute;
    bottom: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.page-flashcards #deck-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-flashcards #progress-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* =================================== */
/*        QUIZ PAGE SPECIFIC          */
/* =================================== */

.page-quiz .quiz-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.page-quiz .quiz-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.page-quiz .quiz-progress {
    margin-bottom: 2rem;
}

.page-quiz #quiz-progress-bar {
    width: 0%;
}

.page-quiz .question-text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #fafafa;
    font-weight: 600;
}

.page-quiz .options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-quiz .option-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.page-quiz .option-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.page-quiz .option-item.selected {
    background: rgba(0, 180, 216, 0.2);
    border-color: #00b4d8;
    color: #fff;
}

.page-quiz .option-item.correct {
    background: rgba(46, 196, 182, 0.2);
    border-color: #2ec4b6;
    color: #fff;
}

.page-quiz .option-item.wrong {
    background: rgba(231, 29, 54, 0.2);
    border-color: #e71d36;
    color: #fff;
}

.page-quiz .quiz-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.page-quiz #feedback-msg {
    font-weight: 600;
}

.page-quiz .btn-primary {
    background: linear-gradient(130deg, #00b4d8, #0077b6);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.page-quiz .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-quiz #next-question-btn {
    display: none;
}

.page-quiz .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 1rem;
}

.page-quiz .score-container {
    text-align: center;
    display: none;
}

.page-quiz .score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid #00b4d8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 600;
    margin: 0 auto 2rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.5);
}

.page-quiz .results-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.page-quiz #final-message {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.page-quiz .back-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.page-quiz .back-link:hover {
    color: var(--text-primary);
}
