/* Additional Styles for IKPLUS Online */

/* ==================== ALERTS/MESSAGES ==================== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--info);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* ==================== WHATSAPP FLOAT BUTTON ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: all var(--transition-base);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* ==================== BACK TO TOP BUTTON ==================== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    transition: all var(--transition-base);
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: var(--primary-orange-dark);
    transform: translateY(-3px);
}

/* ==================== DROPDOWN MENU ==================== */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.dropdown-toggle i {
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 280px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: var(--dark-gray);
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--light-gray);
    color: var(--primary-orange);
    padding-left: 2rem;
}

/* ==================== MOBILE MENU ==================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-gray);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        text-align: left;
    }
}

/* ==================== FOOTER STYLES ==================== */
.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--primary-orange);
    width: 20px;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-md);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
}

/* ==================== COURSE CARD ENHANCEMENTS ==================== */
.course-card {
    position: relative;
    overflow: hidden;
}

.course-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.course-badge.free {
    background: var(--success);
}

.course-badge.new {
    background: var(--info);
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    color: var(--medium-gray);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--medium-gray);
}

.breadcrumb a:hover {
    color: var(--primary-orange);
}

.breadcrumb-separator {
    color: var(--border-gray);
}

/* ==================== BADGE ==================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-orange);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

/* ==================== RESPONSIVE UTILITIES ==================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .messages-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {

    .header,
    .footer,
    .whatsapp-float,
    .back-to-top,
    .messages-container {
        display: none !important;
    }
}