﻿/* Use same structure as login.css but for home page */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* Language Toggle Button - Identical to Login */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: var(--font-medium);
    transition: var(--transition);
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .language-toggle:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

/* Logout Button - Same style as back button in login page */
.logout-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: var(--font-medium);
    transition: var(--transition);
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .logout-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

/* Home Container - Responsive width sizing */
.home-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 500px; /* Default for mobile/tablet */
    padding: 40px 30px;
    transition: var(--transition);
    margin: 0 auto;
    display: block;
    position: relative;
}

    .home-container:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

/* Large Desktop Screens (1440px and above) */
@media (min-width: 1440px) {
    .home-container {
        max-width: 1080px;
        padding: 60px 80px;
    }

    .quick-actions {
        margin-bottom: 40px;
        gap: 30px;
    }

    .quick-actions-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
        .action-card {
            margin-bottom: 0;
            padding: 30px;
        }

    .nav-actions {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
}

/* Desktop Screens (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .home-container {
        max-width: 900px;
        padding: 50px 60px;
    }

    .quick-actions {
/*        display: grid;
        grid-template-columns: 1fr 1fr;*/
        gap: 25px;
        margin-bottom: 35px;
    }

    .action-card {
        margin-bottom: 0;
        padding: 25px;
    }

    .nav-actions {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
}

/* Large Laptop Screens (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .home-container {
        max-width: 750px;
        padding: 45px 50px;
    }

    .quick-actions {
/*        display: grid;
        grid-template-columns: 1fr 1fr;*/
        gap: 20px;
        margin-bottom: 30px;
    }

    .action-card {
        margin-bottom: 0;
        padding: 22px;
    }
}

/* Standard Laptop Screens (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .home-container {
        max-width: 650px;
        padding: 40px 40px;
    }

    .quick-actions {
/*        display: grid;
        grid-template-columns: 1fr 1fr;*/
        gap: 15px;
        margin-bottom: 25px;
    }

    .action-card {
        margin-bottom: 0;
        padding: 20px;
    }
}

@media (min-width: 430px) and (max-width: 767px) {
    .home-container {
        max-width: 402px;
        padding: 40px 40px;
    }

    .quick-actions {
/*        display: grid;
        grid-template-columns: 1fr 1fr;*/
        gap: 15px;
        margin-bottom: 25px;
    }

    .action-card {
        margin-bottom: 0;
        padding: 20px;
    }
}


.home-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Logo Section - Identical to Login */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

    .logo i {
        font-size: 35px;
        color: var(--primary-dark);
    }

    .logo img {
        width: 60px;
        height: 60px;
        object-fit: contain;
    }

.parent-center {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-word {
    width: 120px;
    height: auto;
    align-items: center;
    display: block;
    justify-content: center;
}

    .logo-word img {
        width: 120px;
        height: auto;
        object-fit: contain;
    }

/* Enhanced Typography for Large Screens */
@media (min-width: 1200px) {
    .app-title {
        font-size: 32px;
    }

    .app-subtitle {
        font-size: 18px;
        margin-bottom: 35px;
    }

    .action-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .action-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .action-description {
        font-size: 16px;
        margin-bottom: 15px;
        line-height: 1.5;
    }

    .action-stats {
        font-size: 14px;
    }

    .verified-badge {
        padding: 6px 14px;
        font-size: 14px;
    }

    .btn {
        padding: 18px;
        font-size: 18px;
    }

    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

        .logo img {
            width: 75px;
            height: 75px;
        }

    .logo-word img {
        width: 150px;
    }
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 25px;
}

.action-card {
    background: var(--light-grey);
    border: 2px solid var(--light-grey);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

    .action-card:hover {
        border-color: var(--primary-light);
        background: rgba(52, 139, 165, 0.05);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(52, 139, 165, 0.2);
    }

    .action-card:focus {
        outline: 2px solid var(--primary-light);
        outline-offset: 2px;
    }

.action-icon {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.action-title {
    font-size: 18px;
    font-weight: var(--font-bold);
    color: var(--dark-grey);
    margin-bottom: 8px;
}

.action-description {
    font-size: 14px;
    color: var(--grey-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.action-stats {
    font-size: 24px;
    color: var(--primary-dark);
    font-weight: var(--font-medium);
}

    .action-stats strong {
        font-weight: var(--font-bold);
        color: var(--secondary-dark);
        font-size:24px;
    }

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--success);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: var(--font-medium);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    color: var(--white);
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(16, 104, 133, 0.3);
    }

.btn-secondary {
    background: transparent;
    color: var(--grey-color);
    border: 2px solid var(--light-grey);
}

    .btn-secondary:hover {
        background: var(--light-grey);
        color: var(--dark-grey);
        transform: translateY(-1px);
    }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:active {
    transform: translateY(0);
}

/* Message Styles - Same as Login */
.error-message, .success-message, .info-message {
    font-size: 12px;
    margin-top: 5px;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
}

.error-message {
    color: var(--danger);
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.success-message {
    color: var(--success);
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.info-message {
    color: var(--info);
    background-color: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.2);
}

/* RTL Support */
.rtl {
    direction: rtl;
    font-family: var(--font-arabic);
}

    .rtl .language-toggle {
        right: auto;
        left: 20px;
    }

    .rtl .logout-btn {
        left: auto;
        right: 20px;
    }

        .rtl .logout-btn i {
            transform: scaleX(-1); /* Flip arrow for RTL if needed */
        }

    .rtl .action-card {
        text-align: right;
    }

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .home-container {
        padding: 30px 20px;
        max-width: 100%;
    }

    .language-toggle {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 14px;
    }

    .logout-btn {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 14px;
    }

    .rtl .language-toggle {
        right: auto;
        left: 10px;
    }

    .rtl .logout-btn {
        left: auto;
        right: 10px;
    }

    .app-title {
        font-size: 20px;
    }

    .action-card {
        padding: 15px;
    }

    .action-icon {
        font-size: 1.5rem;
    }

    .action-title {
        font-size: 16px;
    }

    .btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top: 2px solid var(--white);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Focus States for Accessibility */
.btn:focus,
.action-card:focus,
.language-toggle:focus,
.logout-btn:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Smooth Transitions */
.action-card,
.btn,
.language-toggle,
.logout-btn {
    transition: all 0.3s ease;
}

/* Print Styles */
@media print {
    .language-toggle,
    .logout-btn,
    .nav-actions {
        display: none;
    }

    body {
        background: var(--white);
    }

    .home-container {
        box-shadow: none;
        border: 1px solid var(--light-grey);
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .action-card {
        border-width: 3px;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later if needed */
}
