/*==================== GOOGLE FONTS ====================*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/*==================== VARIABLES CSS ====================*/
:root {
    --header-height: 3rem;

    /*========== Colors ==========*/
    --hue-color: 142; /* Green */
    --primary-color: hsl(var(--hue-color), 69%, 61%);
    --primary-color-alt: hsl(var(--hue-color), 57%, 53%);
    --title-color: hsl(var(--hue-color), 8%, 95%);
    --text-color: hsl(var(--hue-color), 8%, 75%);
    --text-color-light: hsl(var(--hue-color), 8%, 65%);
    --input-color: hsl(var(--hue-color), 29%, 16%);
    --body-color: hsl(var(--hue-color), 28%, 12%);
    --container-color: hsl(var(--hue-color), 29%, 16%);
    --black-color: #000;

    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;

    /*========== Margins Bottom ==========*/
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;

    /*========== Hover overlay ==========*/
    --hover-overlay: linear-gradient(hsl(var(--hue-color), 56%, 12%), hsla(var(--hue-color), 56%, 12%, 0.1));
}

/* Responsive typography */
@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 3rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*==================== BASE ====================*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body,
button,
input,
textarea {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    margin: var(--header-height) 0 0 0;
}

h1, h2, h3 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/*==================== REUSABLE CSS CLASSES ====================*/
.section {
    padding: 4.5rem 0 2rem;
}

.section__title {
    font-size: var(--h1-font-size);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--mb-2);
}

.section__subtitle {
    display: block;
    text-align: center;
    font-size: var(--small-font-size);
    margin-bottom: 30px;
    color: var(--text-color-light);
}

.container {
    max-width: 968px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
}

.main {
    overflow-x: hidden;
}

/*==================== HEADER ====================*/
.header {
    width: 100%;
    background-color: var(--body-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    transition: .5s;
    border-bottom: 1px solid var(--primary-color-alt);
}

/*==================== NAV ====================*/
.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo,
.nav__toggle {
    color: var(--title-color);
    font-weight: var(--font-medium);
}

.nav__logo {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav__toggle {
    font-size: 1.25rem;
    cursor: pointer;
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 1.5rem;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    transition: .3s;
}

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

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}


/*==================== HOME ====================*/
.home__container {
    gap: 1rem;
}

.home__content {
    grid-template-columns: .5fr 3fr;
    padding-top: 3.5rem;
    align-items: center;
}

.home__social {
    display: grid;
    grid-template-columns: max-content;
    row-gap: 1rem;
}

.home__social-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.home__social-icon:hover {
    color: var(--primary-color-alt);
}

.home__blob {
    width: 200px;
    fill: var(--primary-color);
}

.home__blob-img {
    width: 170px;
}

.home__data {
    grid-column: 1/3;
}

.home__title {
    font-size: var(--h1-font-size);
}

.home__subtitle {
    font-size: var(--h3-font-size);
    color: var(--text-color);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-0-75);
}

.home__description {
    margin-bottom: var(--mb-2);
}

.home__scroll {
    display: none;
}

.home__scroll-button {
    color: var(--primary-color);
    transition: .3s;
}

.home__scroll-button:hover {
    transform: translateY(.25rem);
}

.home__scroll-mouse {
    font-size: 2rem;
}

.home__scroll-name {
    font-size: var(--small-font-size);
    color: var(--text-color);
    font-weight: var(--font-medium);
    margin-right: var(--mb-0-25);
}

.home__scroll-arrow {
    font-size: 1.25rem;
}

/*==================== BUTTONS ====================*/
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--black-color);
    padding: 1rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    transition: .3s;
}

.button:hover {
    background-color: var(--primary-color-alt);
}

.button--flex {
    display: inline-flex;
    align-items: center;
}

.button--small {
    padding: .75rem 1rem;
}

.button--link {
    padding: 0;
    background-color: transparent;
    color: var(--primary-color);
}

.button--link:hover {
    background-color: transparent;
    color: var(--primary-color-alt);
}

/*==================== GALLERY ====================*/
.gallery__container {
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
}

.gallery__card {
    background-color: var(--container-color);
    border-radius: .5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px hsla(var(--hue-color), 28%, 12%, .3);
    transition: transform .3s;
}

.gallery__card:hover {
    transform: translateY(-.5rem);
}

.gallery__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery__data {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--hover-overlay);
    padding: 1rem;
    border-radius: 0 0 .5rem .5rem;
    backdrop-filter: blur(4px);
    color: var(--title-color);
    transform: translateY(100%);
    transition: transform .3s;
    transition: ease-in-out 0.3s;
}

.gallery__card:hover .gallery__data {
    transform: translateY(0);
    transition: ease-in-out 0.3s;
}

.gallery__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-25);
}

.gallery__artist {
    font-size: var(--small-font-size);
    display: block;
}
/* Adds spacing to the category text on art cards */
.art-display__category {
    margin-bottom: 1.5rem; /* You can change this value if you want more/less space */
}
/*==================== ART DISPLAY ====================*/
.art-display__filters {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: .75rem;
    margin-bottom: var(--mb-2);
}

.art-display__item {
    cursor: pointer;
    color: var(--title-color);
    padding: .25rem .75rem;
    font-weight: var(--font-medium);
    border-radius: .5rem;
    transition: background-color 0.3s, color 0.3s;
}

.art-display__item:hover {
    background-color: var(--primary-color);
    color: var(--black-color);
}

.active-work {
    background-color: var(--primary-color);
    color: var(--black-color);
}

/* This is the container for the gallery cards */
.art-display__container {
    padding-top: 2rem;
    display: flex;          /* CHANGED: From 'grid' to 'flex' */
    flex-wrap: wrap;        /* NEW: Allows items to wrap to the next line */
    justify-content: center;/* NEW: Centers the cards in the container */
    margin: -1rem;          /* NEW: Negative margin to counteract card margins */
}

/* This is the main card element */
.art-display__card {
    background-color: var(--container-color);
    border-radius: .75rem;
    box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-grow: 1;           /* NEW: Allows card to grow */
    flex-basis: 280px;      /* NEW: Each card will be at least 320px wide */
    margin: 1rem;           /* NEW: This creates the space between cards */
    max-width: 280px;       /* NEW: Prevents cards from getting too wide on some screens */
}

.art-display__card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease-in-out;
}

.art-display__img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* This container holds the text and button */
.art-display__data {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    text-align: center;
}

.art-display__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
}

/*==================== INDIVIDUAL ART PAGES ====================*/
.art-piece__container {
    gap: 2rem;
}

.art-piece__img {
    width: 100%;
    border-radius: .5rem;
    margin-bottom: var(--mb-2);
    box-shadow: 0 8px 16px hsla(var(--hue-color), 28%, 12%, .4);
}

.art-piece__data {
    padding: 1.5rem;
    background-color: var(--container-color);
    border-radius: .5rem;
}

.art-piece__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-0-5);
}

.art-piece__artist {
    font-size: var(--h2-font-size);
    color: var(--text-color);
    margin-bottom: var(--mb-0-5);
}

.art-piece__year {
    font-size: var(--h3-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-1-5);
}

.art-piece__description {
    line-height: 1.6;
    margin-bottom: var(--mb-2);
}

.similar-art__title {
    font-size: var(--h2-font-size);
    margin-top: 2rem;
    margin-bottom: var(--mb-1-5);
    text-align: center;
}

/*==================== LOGIN / SIGNUP ====================*/
.login {
    display: grid;
    place-items: center;
    height: 100vh;
}

.login__form {
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 16px hsla(var(--hue-color), 28%, 12%, .4);
}

.login__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: var(--mb-2);
}

.login__content {
    display: grid;
    gap: 1.5rem;
    margin-bottom: var(--mb-1-5);
}

.login__box {
    display: grid;
    gap: .25rem;
}

.login__label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.login__input {
    width: 100%;
    padding: 1rem;
    border-radius: .5rem;
    background-color: var(--input-color);
    border: 2px solid transparent;
    color: var(--title-color);
    transition: .3s;
}

.login__input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login__button {
    width: 100%;
}

.login__signup {
    margin-top: 15px;
    text-align: center;
    font-size: var(--small-font-size);
}

.login__signup a {
    color: var(--primary-color);
}

/*==================== FOOTER ====================*/
.footer {
    padding-top: 2rem;
    background-color: var(--container-color);
}

.footer__container {
    row-gap: 3.5rem;
}

.footer__bg {
    background-color: var(--container-color);
    padding: 2rem 0 3rem;
}

.footer__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-0-25);
}

.footer__subtitle {
    font-size: var(--small-font-size);
}

.footer__links {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
}

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

.footer__link {
    color: var(--text-color); /* This sets the default color */
    transition: .3s; /* This makes the hover effect smooth */
}

.footer__social {
    color: var(--text-color); /* Sets the default icon color */
    font-size: 1.25rem;
    margin-right: var(--mb-1-5);
    transition: .3s; /* Smooths the hover effect */
}

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

.footer__copy {
    font-size: var(--smaller-font-size);
    text-align: center;
    color: var(--text-color-light);
    margin-top: var(--mb-2);
}

/*==================== MEDIA QUERIES ====================*/
/* For small devices */
@media screen and (max-width: 350px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }
    .nav__menu {
        padding: 2rem .25rem 4rem;
    }
    .nav__list {
        column-gap: 0;
    }
    .home__content {
        grid-template-columns: .25fr 3fr;
    }
    .home__blob {
        width: 180px;
    }
    .gallery__container {
        grid-template-columns: 1fr;
    }
}

/* For medium devices */
@media screen and (min-width: 568px) {
    .home__content {
        grid-template-columns: max-content 1fr 1fr;
    }
    .home__data {
        grid-column: initial;
    }
    .home__img {
        order: 1;
        justify-self: center;
    }
    .gallery__container {
        grid-template-columns: repeat(2, 1fr);
    }
    .art-display__container {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
    body {
        margin: 0;
    }
    .section {
        padding: 6rem 0 2rem;
    }
    .header {
        top: 0;
        bottom: initial;
    }
    .header,
    .main,
    .footer__container {
        padding: 0 1rem;
    }
    .nav {
        height: calc(var(--header-height) + 1.5rem);
        column-gap: 1rem;
    }
    .nav__toggle,
    .nav__close {
        display: none;
    }
    .nav__list {
        display: flex;
        flex-direction: row;
        column-gap: 2rem;
    }
    .home__container {
        row-gap: 5rem;
    }
    .home__content {
        padding-top: 5.5rem;
        column-gap: 2rem;
    }
    .home__blob {
        width: 270px;
    }
    .home__scroll {
        display: block;
    }
    .home__scroll-button {
        margin-left: 3rem;
    }
    .gallery__container {
        grid-template-columns: repeat(3, 228px);
        justify-content: center;
    }
    .art-display__container {
        grid-template-columns: repeat(3, 1fr);
    }
    .art-piece__container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    .art-piece__img {
        width: 100%;
    }
    .footer__container {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer__bg {
        padding: 3rem 0 3.5rem;
    }
    .footer__links {
        flex-direction: row;
        column-gap: 2rem;
    }
    .footer__socials {
        justify-self: flex-end;
    }
    .footer__copy {
        margin-top: 4.5rem;
    }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .header,
    .main,
    .footer__container {
        padding: 0;
    }
    .home__blob {
        width: 320px;
    }
    .home__social {
        transform: translateX(-6rem);
    }
    .gallery__container {
        grid-template-columns: repeat(3, 238px);
    }
}
/*==================== MODAL STYLES ====================*/
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: hsla(var(--hue-color), 28%, 12%, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--container-color);
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid var(--primary-color-alt);
    border-radius: .75rem;
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 30px hsla(0, 0%, 0%, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
    color: var(--text-color-light);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

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

#modal-title {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#modal-description {
    line-height: 1.6;
}

/*==================== MIXITUP FAIL MESSAGE ====================*/
.mixitup-fail {
    text-align: center;
    width: 100%;
    padding: 2rem;
    color: var(--text-color-light);
}