/**
 * Homepage Styles - BEM Convention
 * 
 * ============================================================================
 * FILE LOCATION: /includes/css/homepage.css
 * CREATED: January 4, 2026
 * ============================================================================
 * 
 * Styles for index.php homepage
 * 
 * FOLLOWS:
 * - BEM (Block Element Modifier) naming convention
 * - ToyBin design system
 * - Retro-professional aesthetic
 * 
 * @package ToyBin
 * @subpackage Styles
 */

/* ============================================================================
   BODY BACKGROUND (Collector's Shelf)
   ============================================================================ */

body.home-page {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    
    /* Collector's Shelf Background - Same as auth pages */
    background-image: 
        linear-gradient(
            135deg,
            rgba(26, 26, 26, 0.85) 0%,
            rgba(139, 111, 71, 0.75) 50%,
            rgba(26, 26, 26, 0.85) 100%
        ),
        url('/assets/images/backgrounds/collectors-shelf.jpg');
    
    /* Fallback solid color if image doesn't load */
    background-color: #1a1a1a;
    
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Make content boxes stand out against background */
body.home-page .container {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   HERO SECTION (Guest View)
   ============================================================================ */

.home-hero {
    background-image:
        linear-gradient(rgba(10, 15, 30, 0.72), rgba(10, 15, 30, 0.72)),
        url('/assets/images/hero/toybin-hero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.home-hero__container {
    text-align: center;
    color: #fff;
}

.home-hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.home-hero__subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.home-hero__description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.home-hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.home-hero__btn--primary {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.home-hero__btn--secondary {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid #fff;
}

/* Responsive hero */
@media (max-width: 768px) {
    .home-hero__title {
        font-size: 2.5rem;
    }
    
    .home-hero__subtitle {
        font-size: 1.25rem;
    }
    
    .home-hero__description {
        font-size: 1rem;
    }
}

/* ============================================================================
   DASHBOARD (Logged-In View)
   ============================================================================ */

.home-dashboard {
    padding-top: 2rem;
}

.home-dashboard__welcome {
    margin-bottom: 2rem;
}

.home-dashboard__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.home-dashboard__subtitle {
    font-size: 1.25rem;
    color: #666;
}

.home-dashboard__cards {
    margin-top: 2rem;
}

/* ============================================================================
   DASHBOARD CARDS
   ============================================================================ */

.dashboard-card {
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: #0d6efd;
}

.dashboard-card__body {
    padding: 1.5rem;
}

.dashboard-card__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.dashboard-card__description {
    color: #666;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.dashboard-card__action {
    width: 100%;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
}

/* Card icons (optional - if you add them later) */
.dashboard-card__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #0d6efd;
}

/* ============================================================================
   FEATURES SECTION (Guest View)
   ============================================================================ */

.home-features {
    padding: 3rem 0;
}

.home-feature {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.home-feature__icon {
    font-size: 3rem;
    color: #0d6efd;
    margin-bottom: 1rem;
}

.home-feature__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.home-feature__description {
    color: #111;
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================================================
   ROLE ALERTS (Admin/Contributor)
   ============================================================================ */

.home-role-alert {
    margin-top: 2rem;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.home-role-alert--admin {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.home-role-alert--contributor {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.home-role-alert__label {
    font-weight: 600;
}

.home-role-alert__link {
    color: #0c5460;
    text-decoration: underline;
    font-weight: 500;
}

.home-role-alert__link:hover {
    color: #062c33;
}

/* ============================================================================
   FLASH MESSAGES CONTAINER
   ============================================================================ */

.home-flash {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 992px) {
    .home-dashboard__title {
        font-size: 2rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .home-hero__actions {
        flex-direction: column;
    }
    
    .home-hero__btn--primary,
    .home-hero__btn--secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .home-dashboard__title {
        font-size: 1.75rem;
    }
    
    .dashboard-card__title {
        font-size: 1.25rem;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero,
.home-dashboard,
.home-features {
    animation: fadeIn 0.6s ease-out;
}

.dashboard-card {
    animation: fadeIn 0.8s ease-out;
}

.dashboard-card:nth-child(1) {
    animation-delay: 0.1s;
}

.dashboard-card:nth-child(2) {
    animation-delay: 0.2s;
}

.dashboard-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.home-spacer--sm {
    margin-top: 1rem;
}

.home-spacer--md {
    margin-top: 2rem;
}

.home-spacer--lg {
    margin-top: 3rem;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .home-hero,
    .home-role-alert,
    .home-flash {
        display: none;
    }
    
    .dashboard-card {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}
