/* Modern Cards Component - Dashboard Main Options */

/* Modern Card Styling */
.modern-card {
    border-radius: 20px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.modern-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(40, 120, 235, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.modern-card:hover::before {
    left: 100%;
}

.modern-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(40, 120, 235, 0.25) !important;
}

/* Dashboard Main Icons (PNG) */
.dashboard-main-icon {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
    transition: all 0.4s ease;
    display: block;
    margin: 0px auto;
}

.modern-card:hover .dashboard-main-icon {
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 10px 25px rgba(40, 120, 235, 0.35));
}

/* Modern Buttons */
.modern-btn {
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.modern-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

.modern-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modern-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.modern-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Card Titles */
.modern-card h3 {
    font-family: "Jost", sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #120f2d 0%, #2878eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Card Body Padding */
.modern-card .card-body {
    padding-top: 1.5rem !important;
}

/* Hover Lift Effect for Main Option Cards */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Main Option Cards Icons - Legacy FA Icons (fallback) */
.hover-lift .card-body i.fa-clock,
.hover-lift .card-body i.fa-book-reader {
    transition: all 0.3s ease;
}

.hover-lift:hover .card-body i.fa-clock {
    transform: rotate(-10deg) scale(1.1);
}

.hover-lift:hover .card-body i.fa-book-reader {
    transform: scale(1.1);
}

/* Button Groups with Gaps */
.d-grid {
    display: grid;
}

.gap-3 {
    gap: 1rem;
}

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

/* Tablet and below (992px) */
@media (max-width: 992px) {

    /* Stack main option cards on tablet */
    .hover-lift .card-body {
        padding: 2.5rem !important;
    }
}

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

    /* Hide dashboard card icons on mobile to save space */
    .dashboard-main-icon {
        display: none !important;
    }

    /* Transform card body to use flexbox for reordering */
    .modern-card .card-body {
        display: flex;
        flex-direction: column;
        padding: 0 !important;
    }

    /* Move h3 title to top as card header - full width with no gaps */
    .modern-card .card-body h3 {
        order: -1;
        width: calc(100% + 3rem) !important;
        /* Extend beyond any card padding */
        margin: -1.5rem -1.5rem 0 -1.5rem !important;
        /* Negative margins to reach absolute card edges */
        padding: 1.25rem 1.5rem !important;
        font-size: 1.3rem !important;
        border-radius: 8px 8px 0 0;
        /* Match card border radius */
        /* Override desktop gradient background */
        background: transparent !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        background-clip: unset !important;
    }

    /* Color backgrounds for different card types */
    .modern-card:has(.simulation-btn) .card-body h3 {
        background-color: #2878eb !important;
        color: #ffffff !important;
    }

    .modern-card:has(.practice-btn) .card-body h3 {
        background-color: #28a745 !important;
        color: #ffffff !important;
    }

    /* Add padding back to content after title */
    .modern-card .card-body>p {
        padding: 0 !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Button container - remove bottom margin */
    .modern-card .card-body>.d-grid {
        padding: 0 !important;
        margin-top: 1rem !important;
        margin-bottom: 0 !important;
    }

    /* Remove mb-4 from icon div since it's now hidden */
    .modern-card .card-body>div:first-child {
        display: none;
    }

    /* Restore card body padding for content below title */
    .modern-card .card-body {
        padding: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Modern buttons on mobile */
    .modern-btn {
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem !important;
    }

    .hover-lift .card-body i.fa-clock,
    .hover-lift .card-body i.fa-book-reader {
        font-size: 3rem !important;
    }
}