/* Color system */
:root {
    --cp-bg: #f8f9fb;
    --cp-surface: #ffffff;
    --cp-text: #212529;
    --cp-muted: #6c757d;
    --cp-primary: #6f42c1; /* purple accent */
    --cp-primary-600: #5b36a0;
    --cp-ring: rgba(111, 66, 193, 0.35);
    --cp-border: #e7e9ee;
    --cp-shadow: 0 6px 20px rgba(33, 37, 41, 0.08);
}

/* Base */
html, body {
    background: url("../images/background.webp") no-repeat center center fixed;
    background-size: cover;
    color: var(--cp-text);
}

.main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    row-gap: 30px;
}

/* Smooth container spacing */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header */
header {
    background: var(--cp-surface);
    box-shadow: 0 1px 0 var(--cp-border);
}

.logo__name {
    font-weight: 700;
    letter-spacing: 0.2px;
    background: linear-gradient(90deg, var(--cp-primary) 0%, #d63384 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent; /* Safari support */
}

/* Search */
.search-images .form-control {
    border-radius: 999px;
    border-color: var(--cp-border);
    background-color: #fff;
    transition: box-shadow 200ms ease, border-color 200ms ease;
}

.search-images .form-control:focus {
    border-color: var(--cp-primary);
    box-shadow: 0 0 0 0.2rem var(--cp-ring);
}

/* Nav links */
.nav .nav-link {
    color: var(--cp-text);
    transition: color 150ms ease, background-color 150ms ease;
}

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

/* Cards (categories, items) */
.card {
    border: 1px solid var(--cp-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--cp-shadow);
    border-color: rgba(111, 66, 193, 0.25);
}

.card .card-body {
    background: var(--cp-surface);
}

.card .card-text {
    font-weight: 600;
    text-align: center;
}

/* Breadcrumb (component) */
.breadcrumb {
    --bs-breadcrumb-divider-color: var(--cp-muted);
}

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

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

/* Footer */
.footer {
    background: var(--cp-surface);
    border-radius: 1rem;
    box-shadow: var(--cp-shadow);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-block: 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.footer__logo {
    border-radius: 0.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.footer__content {
    flex: 1;
}

.footer__image {
    max-width: 200px;
    height: auto;
    float: left;
    margin: 0 20px 20px 0;
}

.footer__content h5 {
    color: var(--cp-primary);
    font-weight: 700;
}

.footer__info {
    width: 260px;
}

.footer__logo {
    width: 100%;
    height: auto;
}

.text-body-secondary {
    color: var(--cp-muted) !important;
}

/* Utilities */
.shadow-soft {
    box-shadow: var(--cp-shadow) !important;
}

.rounded-xl {
    border-radius: 1rem !important;
}

.modal.bottom-right .modal-dialog {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    margin: 0;
    max-width: 350px;
}

nav[aria-label="breadcrumb"] {
    --bs-breadcrumb-divider: '>';
}

@media (max-width: 995px) {
    .footer {
        display: block;
    }
}

/* Responsive tweaks */
@media (max-width: 576px) {
    html, body {
        background: var(--cp-bg) !important;
    }

    header {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .logo__name {
        margin-bottom: 10px;
    }

    .footer__image {
        max-width: 100px;
    }
}
