/* ============================================
   Dashboard Day 9 - Card Grid Layout
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #22c55e;
    --primary-hover: #16a34a;
    --primary-light: #dcfce7;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    /* Nền trang màu xanh mint nhạt */
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1000px; /* Suitable size for 2 cards side-by-side */
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    position: relative;
}

.back-link {
    position: absolute;
    top: 0;
    left: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Cards Grid - 2 columns for 4 cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    align-items: stretch;
}

/* Card Link Wrapper */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    cursor: pointer;
}

/* Hover effect */
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Featured Card styles for slightly stronger shadow */
.card.featured {
    box-shadow: var(--shadow-md);
}

.card.featured:hover {
    box-shadow: 0 15px 50px rgba(34, 197, 94, 0.2);
}

/* Card Header */
.card-header {
    padding: 36px 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.slogan {
    font-style: italic;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Card Body */
.card-body {
    padding: 24px;
    flex: 1;
}

/* Feature List */
.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.925rem;
    color: var(--text-gray);
    line-height: 1.5;
    border-bottom: 1px dashed rgba(229, 231, 235, 0.6);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
}

/* Card Footer */
.card-footer {
    padding: 20px 24px 28px;
    margin-top: auto;
}

/* Button */
.btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition);
}

.btn-featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, #16a34a 100%);
    color: var(--bg-white);
    border: none;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.card:hover .btn-featured {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: var(--bg-white);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablets & Mobile */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .back-link {
        position: static;
        display: inline-block;
        margin-bottom: 20px;
    }
}

/* Touch Devices Hover Reset */
@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    .card.featured:hover {
        box-shadow: var(--shadow-md);
    }
}
