/**
 * Categories Grid Styling — Mobile-First
 * Location: /var/www/saafee/public/css/categories.css
 */

/* Categories Container */
.categories-container {
    margin: 20px 0;
}

.categories-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

/* Grid Layout - Mobile First */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

/* Tablet (768px) */
@media (min-width: 768px) {
    .categories-container {
        margin: 40px 0;
    }

    .categories-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
}

/* Desktop (1024px) */
@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 24px;
    }
}

/* Category Card */
.category-card {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-card:hover {
    border-color: #E44335;
    box-shadow: 0 4px 12px rgba(228, 67, 53, 0.2);
    transform: translateY(-4px);
}

.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    text-decoration: none;
    color: inherit;
    min-height: 140px;
}

/* Emoji */
.category-emoji {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

/* Category Name */
.category-name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin: 0;
    color: #333;
    word-break: break-word;
}

.category-card:hover .category-name {
    color: #E44335;
}

/* RTL Support */
[dir="rtl"] .category-link {
    direction: rtl;
}

/* Error & Info Messages */
.error-message,
.info-message {
    padding: 16px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: center;
}

.error-message {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.info-message {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* Header Section — mobile default */
.header-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.header-section h1 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    gap: 6px;
}

.btn-primary {
    background: #E44335;
    color: white;
}

.btn-primary:hover {
    background: #C53727;
}

.btn-secondary {
    background: #FFFFFF;
    color: #E44335;
    border: 1px solid #E44335;
}

.btn-secondary:hover {
    background: #FFF5F4;
}

/* Welcome Section — mobile default */
.welcome-section {
    text-align: center;
    padding: 30px 16px;
}

.welcome-section h1 {
    font-size: 28px;
    margin-bottom: 16px;
    color: #333;
}

.welcome-section p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.auth-links .btn {
    width: 100%;
    text-align: center;
}

/* Tablet+ (480px) */
@media (min-width: 480px) {
    .welcome-section {
        padding: 40px 20px;
    }

    .welcome-section h1 {
        font-size: 32px;
    }

    .welcome-section p {
        font-size: 17px;
    }

    .auth-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .auth-links .btn {
        width: auto;
    }
}

/* Tablet+ (768px) */
@media (min-width: 768px) {
    .header-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
    }

    .header-section h1 {
        font-size: 24px;
    }

    .welcome-section {
        padding: 60px 20px;
    }

    .welcome-section h1 {
        font-size: 36px;
    }

    .welcome-section p {
        font-size: 18px;
    }
}
