* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

:root {
    --navy: #2F4156;
    --teal: #567C8D;
    --sky-blue: #E3F2FD;
    --beige: #F9F7F5;
    --white: #FFFFFF;
    --card-shadow: 0 10px 20px rgba(47, 65, 86, 0.08);
    --hover-shadow: 0 15px 30px rgba(47, 65, 86, 0.15);
}

body {
    background-color: var(--beige);
    color: var(--navy);
}

.top-nav {
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-bottom: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.search-group {
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 15px;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--beige);
    border-radius: 50px;
    padding: 10px 20px;
    transition: box-shadow 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--teal);
    background: var(--white);
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    margin-left: 10px;
    outline: none;
    font-size: 1rem;
    color: var(--navy);
}

.filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-select {
    appearance: none;
    background: var(--navy);
    color: var(--white);
    padding: 10px 35px 10px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.filter-wrapper i {
    position: absolute;
    right: 15px;
    color: var(--white);
    pointer-events: none;
    font-size: 0.8rem;
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px 20px;
    background: var(--white);
    overflow-x: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pill {
    text-decoration: none;
    color: var(--navy);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pill:hover {
    background-color: var(--sky-blue);
    color: var(--teal);
}

.pill.active {
    background-color: var(--teal);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(86, 124, 141, 0.3);
}

.add-btn-nav {
    color: var(--teal);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.add-btn-nav:hover {
    color: var(--navy);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.hero-section {
    margin-bottom: 50px;
}

.hero-banner {
    width: 100%;
    height: 350px;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-shadow);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(47, 65, 86, 0.8), transparent);
    padding: 40px 30px;
}

.hero-overlay h1 {
    font-family: 'Fascinate', cursive;
    color: var(--white);
    font-size: 3rem;
    letter-spacing: 2px;
}

.gallery-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.handwritten-title {
    font-family: 'Fascinate', cursive;
    font-size: 2.2rem;
    color: var(--navy);
    white-space: nowrap;
}

.line-deco {
    height: 2px;
    background: var(--teal);
    width: 100%;
    opacity: 0.3;
    border-radius: 2px;
}

.card-grid,
.ArtistsStory-grid,
.ArtStory-grid,
.CountrysStory-grid,
.ColorsPallets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-meta {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.card-tags::-webkit-scrollbar {
    height: 4px;
}

.card-tags::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 4px;
}

.card-tags p {
    font-size: 0.75rem;
    background-color: var(--sky-blue);
    color: var(--navy);
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-actions {
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fa-heart {
    font-size: 1.2rem;
    color: #ccc;
    transition: color 0.2s;
    transition: all 0.3s ease;
}

.fa-heart:hover {
    transform: scale(1.2);
}

.fa-heart.liked {
    color: #ff6b6b;
}

.stars i {
    color: #ddd;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    ;
}

.stars i:hover {
    transform: scale(1.4);
}

.stars i.filled {
    color: #ffc107;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 65, 86, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    margin: 15px;
    padding: 20px;
    position: relative;
    border-radius: 20px;
    overflow-y: scroll;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    background: var(--white);
}

.modal-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.modal-header .card-actions {
    display: flex;
    gap: 30px;
    border-top: none;
}


.modal-content::-webkit-scrollbar {
    width: 0;
}

.modal-content img {
    width: 100%;
    border-radius: 15px;
}

.close-modal-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 4rem;
    color: var(--navy);
    cursor: pointer;
    transition: transform 0.2s;
}

.close-modal-btn:hover {
    color: var(--teal);
}

.footer {
    background-color: var(--navy);
    color: var(--white);
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .search-group {
        width: 100%;
    }

    .category-nav {
        display: none;
    }

    .hero-banner {
        height: 200px;
    }

    .hero-banner img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }

    .hero-overlay h1 {
        font-size: 1.2rem;
    }

    .handwritten-title {
        font-size: 1.8rem;
    }

    .card-grid,
    .ArtistsStory-grid,
    .ArtStory-grid,
    .CountrysStory-grid,
    .ColorsPallets-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 80vh;
    }

    .modal-header {
        flex-direction: column;
    }

    .modal-header .card-actions {
        margin-bottom: 15px;
    }

    .close-modal-btn {
        top: 30px;
        right: 45px;
        font-size: 2rem;
    }
}