/* Button Styles */

.btn {
    font-family: 'Jost', sans-serif;
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 28px;
    height: 28px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

/* Brand Button Colors */
.btn-purple {
    background-color: #A359FF;
    border-color: #A359FF;
    color: white !important;
}

.btn-purple:hover {
    background-color: #8E36FF;
    border-color: #8E36FF;
    color: white !important;
}

/* Gold Premium Button */
.btn-gold {
    background: linear-gradient(45deg, #FFD700 0%, #FFB900 50%, #FFA500 100%);
    border: none;
    color: #120F2D !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.25);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-gold::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(30deg);
    transition: all 0.5s ease;
    animation: goldShimmer 3s infinite;
}

@keyframes goldShimmer {
    0% {
        left: -60%;
        opacity: 0;
    }

    50% {
        left: 120%;
        opacity: 1;
    }

    100% {
        left: 120%;
        opacity: 0;
    }
}

.btn-gold:hover {
    background: linear-gradient(45deg, #FFB900 0%, #FFA500 50%, #FF8C00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
    color: #000 !important;
}

.btn-gold:active {
    transform: translateY(0);
}

/* Green Glossa Button */
.btn-green {
    background: linear-gradient(45deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    border: none;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.25);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-green::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(30deg);
    transition: all 0.5s ease;
    animation: goldShimmer 3s infinite;
}

.btn-green:hover {
    background: linear-gradient(45deg, #218838 0%, #1ba382 50%, #138496 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: #fff !important;
}

.btn-green:active {
    transform: translateY(0);
}

/* Blue Math Button */
.btn-blue {
    background: linear-gradient(45deg, #2878EB 0%, #0056b3 50%, #004085 100%);
    border: none;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(40, 120, 235, 0.25);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-blue::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(30deg);
    transition: all 0.5s ease;
    animation: goldShimmer 3s infinite;
}

.btn-blue:hover {
    background: linear-gradient(45deg, #1e5bb8 0%, #004494 50%, #003366 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 120, 235, 0.4);
    color: #fff !important;
}

.btn-blue:active {
    transform: translateY(0);
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.btn-icon {
    width: 77px;
    height: 77px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/**
 * Navigation Buttons Component
 * Reusable prev/next navigation buttons for exams, practice mode, and other pages
 * 
 * Usage:
 * <div class="question-navigation">
 *   <button class="btn btn-outline-primary">Προηγούμενη</button>
 *   <button class="btn btn-primary">Επόμενη</button>
 * </div>
 */

/* Question Navigation Container */
.question-navigation {
    margin-top: 2rem;
}

/* Navigation Buttons */
.question-navigation .btn {
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 15px;
    padding: 15px 25px;
    background: white;
    color: var(--primary);
    transition: all 0.3s ease;
}

.question-navigation .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 120, 235, 0.2);
}

.question-navigation .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Button (Next) */
.question-navigation .btn-primary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

/* .question-navigation .btn-primary:hover:not(:disabled) {
    background: #1e5bb8;
    border-color: #1e5bb8;
} */

/* Outline Button (Previous) */
.question-navigation .btn-outline-primary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

/* .question-navigation .btn-outline-primary:hover:not(:disabled) {
    background: var(--primary);
    color: white;
} */

/* ========================================
   BACK TO DASHBOARD BUTTON
   Used in dashboard subpages (test-history, stats, achievements)
   Simple link button to navigate back to main dashboard
   ======================================== */

.back-to-dashboard-btn {
    display: none;
    /* Hidden by default on desktop */
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #ffffff;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.back-to-dashboard-btn:hover {
    color: var(--primary);
    background: #ffffff;
    border-color: var(--primary);
    text-decoration: none;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(40, 120, 235, 0.12);
}

.back-to-dashboard-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.back-to-dashboard-btn:hover i {
    transform: translateX(-2px);
}

.back-to-dashboard-btn:active {
    transform: translateX(-4px);
}

/* ========================================
   CHECK ANSWER BUTTON
   Used in practice-mode and study-view
   ======================================== */

.check-answer-btn {
    /* background: linear-gradient(135deg, #28a745 0%, #218838 100%); */
    background: #52b788;
    color: #fff;
    border: 2px solid transparent;
    padding: 10px 44px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.5rem;
}

.check-answer-btn:hover {
    /* background: linear-gradient(135deg, #218838 0%, #1e7e34 100%); */
    /* box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4); */
    border-color: #40916c;
    transform: translateY(-2px);
}

.check-answer-btn:active {
    transform: translateY(0);
}

.check-answer-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.check-answer-btn i {
    font-size: 1.2rem;
}

/* ========================================
   HERO / HEADER CTA BUTTONS
   Used in index.html hero section
   ======================================== */

.btn-header-primary {
    position: relative;
    overflow: hidden;
    background: #2878eb;
    color: white !important;
    border: 3px solid #ffffff4d;
    border-radius: 9999px;
    padding: 14px 45px;
    font-size: 1.3rem;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 20px rgba(40, 120, 235, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-header-primary:hover {
    transform: scale(1.05);
    border-color: #fff9;
    background: #1e5bb8;
    color: white !important;
    box-shadow: 0px 15px 25px rgba(40, 120, 235, 0.3);
    text-decoration: none;
}

.btn-header-orange {
    position: relative;
    overflow: hidden;
    background: #F14D5D;
    color: white !important;
    border: 3px solid #ffffff4d;
    border-radius: 9999px;
    padding: 14px 45px;
    font-size: 1.3rem;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 20px rgba(241, 77, 93, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-header-orange:hover {
    transform: scale(1.05);
    border-color: #fff9;
    background: #d43d4c;
    color: white !important;
    box-shadow: 0px 15px 25px rgba(241, 77, 93, 0.3);
    text-decoration: none;
}

.btn-header-secondary {
    position: relative;
    overflow: hidden;
    background: white;
    color: #2878eb !important;
    border: 3px solid #2878eb4d;
    border-radius: 9999px;
    padding: 16px 45px;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-header-secondary:hover {
    transform: scale(1.05);
    border-color: #2878eb80;
    background: #f8f9fa;
    color: #1e5bb8 !important;
    box-shadow: 0px 15px 25px rgba(40, 120, 235, 0.1);
    text-decoration: none;
}

.btn-nav-login {
    position: relative;
    overflow: hidden;
    background: #2878eb;
    color: white !important;
    border: 3px solid #ffffff4d;
    border-radius: 9999px;
    padding: 10px 30px;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 4px 12px rgba(40, 120, 235, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-nav-login:hover {
    transform: scale(1.05);
    border-color: #fff9;
    background: #1e5bb8;
    color: white !important;
    box-shadow: 0px 8px 15px rgba(40, 120, 235, 0.3);
    text-decoration: none;
}

/* login-style generic class for purchase buttons */
.btn-login-style {
    position: relative;
    overflow: hidden;
    color: white !important;
    border: 3px solid #ffffff4d;
    border-radius: 9999px;
    padding: 12px 30px;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.05rem;
}

.btn-login-style:hover {
    transform: scale(1.05);
    border-color: #fff9;
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white !important;
}

/* Brand Button Color Overrides for login-style */
.btn-success.btn-login-style {
    background: #28a745;
    box-shadow: 0px 4px 12px rgba(40, 167, 69, 0.25);
}

.btn-success.btn-login-style:hover {
    background: #218838;
}

.btn-purple.btn-login-style {
    background: #a359ff;
    box-shadow: 0px 4px 12px rgba(163, 89, 255, 0.25);
}

.btn-purple.btn-login-style:hover {
    background: #8e36ff;
}

.btn-primary.btn-login-style {
    background: #2878eb;
    box-shadow: 0px 4px 12px rgba(40, 120, 235, 0.25);
}

.btn-primary.btn-login-style:hover {
    background: #1e5bb8;
}

/* Shine Animation Elements */
.btn-header-primary::before,
.btn-header-orange::before,
.btn-header-secondary::before,
.btn-login-style::before,
.btn-nav-login::before {
    content: "";
    position: absolute;
    width: 60px;
    height: 100%;
    background-image: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 30%,
            rgba(255, 255, 255, 0.8),
            rgba(255, 255, 255, 0) 70%);
    top: 0;
    left: -100px;
    opacity: 0.6;
    pointer-events: none;
}

.btn-header-primary:hover::before,
.btn-header-orange:hover::before,
.btn-header-secondary:hover::before,
.btn-login-style:hover::before,
.btn-nav-login:hover::before {
    animation: shine 1.5s ease-out infinite;
}

@keyframes shine {
    0% {
        left: -100px;
    }

    60% {
        left: 100%;
    }

    to {
        left: 100%;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Tablet and Mobile (992px and below) */
@media (max-width: 992px) {
    .back-to-dashboard-btn {
        display: inline-flex;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {

    /* Navigation Container */
    .question-navigation {
        padding: 8px 0;
        margin-top: 1.5rem;
    }

    /* Navigation Buttons - Compact mobile design */
    .question-navigation .btn {
        font-size: 0.7rem;
        border-radius: 8px;
        padding: 10px 5px;
        transition: none;
    }

    /* Disable hover effects on mobile */
    .question-navigation .btn:hover:not(:disabled) {
        transform: none;
        box-shadow: none;
    }

    /* Check Answer Button (using in practice-mode page)*/
    .check-answer-btn {
        padding: 5px 20px;
        font-size: 0.95rem;
        margin-top: 0px;
        margin-bottom: 0px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
    }

    .check-answer-btn i {
        font-size: 0.95rem;
    }
}

/* Extra Small Mobile (576px and below) */
@media (max-width: 576px) {

    /* Add horizontal margin from device edges */
    .question-navigation {
        padding-left: 5px;
        padding-right: 5px;
    }

    /* Check Answer Button - Ultra compact spacing */
    .check-answer-btn {
        margin-top: 5px;
        margin-bottom: 5px;
        padding: 5px 16px;
    }

    /* Back to Dashboard Button - Slightly smaller on very small screens */
    .back-to-dashboard-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    /* Header CTA Buttons - Full width on mobile */
    .btn-header-primary,
    .btn-header-secondary,
    .btn-header-orange {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 15px;
        padding: 15px 30px;
        font-size: 1rem;
    }
}