/* ========================================
   Demo Website Collection — Public Styles
   Light, minimal, professional design
   ======================================== */

/* ---- CSS Custom Properties ---- */
:root {
    --color-bg: #F5F7FA;
    --color-surface: #FFFFFF;
    --color-surface-hover: #F0F4F8;
    --color-primary: #4A90D9;
    --color-primary-dark: #357ABD;
    --color-primary-light: #E8F0FE;
    --color-secondary: #6C5CE7;
    --color-accent: #00B894;
    --color-text: #2D3436;
    --color-text-secondary: #636E72;
    --color-text-muted: #B2BEC3;
    --color-border: #E1E8ED;
    --color-border-light: #F0F2F5;
    --color-danger: #E74C3C;
    --color-warning: #F39C12;
    --color-success: #27AE60;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Navbar ---- */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light);
    padding: 0.75rem 0;
    transition: var(--transition);
    z-index: 1000;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.brand-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.brand-highlight {
    color: var(--color-primary);
}

.nav-link {
    color: var(--color-text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--color-primary) !important;
    background: var(--color-primary-light);
}

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section h1 {
    color: white;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.hero-section p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Breadcrumb ---- */
.breadcrumb-section {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    padding: 0.75rem 0;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--color-text-secondary);
}

/* ---- Page Header ---- */
.page-header {
    padding: 2rem 0 1rem;
}

.page-header h2 {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ---- Category / Item Cards ---- */
.category-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    color: var(--color-text);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.category-card .item-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Icon color variants */
.icon-blue { background: #E8F0FE; color: #4A90D9; }
.icon-purple { background: #F0E6FF; color: #6C5CE7; }
.icon-green { background: #E6F9F1; color: #00B894; }
.icon-orange { background: #FFF3E0; color: #F39C12; }
.icon-red { background: #FDEDEC; color: #E74C3C; }
.icon-teal { background: #E0F7FA; color: #00ACC1; }
.icon-pink { background: #FCE4EC; color: #E91E63; }
.icon-indigo { background: #E8EAF6; color: #3F51B5; }

/* ---- Demo Cards (Thumbnail Grid) ---- */
.demo-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.demo-card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 16:10 aspect ratio */
    overflow: hidden;
    background: var(--color-bg);
}

.demo-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-card:hover .demo-card-thumbnail img {
    transform: scale(1.05);
}

.demo-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6) 100%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
}

.demo-card:hover .demo-card-overlay {
    opacity: 1;
}

.demo-card-overlay .btn {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.demo-card:hover .demo-card-overlay .btn {
    transform: translateY(0);
}

.demo-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.demo-card-body h6 {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--color-text);
    line-height: 1.3;
}

.demo-card-body .demo-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--color-text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.footer-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--color-primary);
}

/* ---- Utility Classes ---- */
.section-spacing {
    padding: 2rem 0;
}

.fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children animation */
.stagger-grid > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-grid > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-grid > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-grid > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-grid > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-grid > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-grid > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-grid > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-grid > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-grid > *:nth-child(n+9) { animation-delay: 0.45s; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-stats {
        gap: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    .hero-section h1 {
        font-size: 1.6rem;
    }
    .hero-stats {
        gap: 1rem;
    }
    .hero-stat-number {
        font-size: 1.4rem;
    }
    .page-header h2 {
        font-size: 1.4rem;
    }
    .category-card {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}
