/* ========================= */
/*       CUSTOM SETTINGS     */
/* ========================= */

/* BACKGROUND & FONT */
body {
    background-color: #3d1a78; /* Site background */
    margin: 0;
    font-family: 'DM Serif Text', serif;
    color: white; /* default text color */
}

/* HEADINGS */
h1, h2 {
    color: #ffffff;
    margin-top: 0;
}

p {
    color: #dddddd;
    margin-top: 0;
    margin-bottom: 10px;
}

a {
    color: #66ccff;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

/* BOX STYLING */
.title-bar,
.main-box,
.side-box,
.main-top-box {
    border: 4px solid #26ceaa;
    background-color: #5049cc;
    box-sizing: border-box;
}

.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin: 20px auto;
    width: 80%;
}

.title-bar h1 {
    margin: 0;
    text-align: center;
    flex: 1;
}

.title-img {
    height: 60px;
    width: auto;
}

.layout {
    display: flex;
    justify-content: center;
    gap: 11px;
    width: 90%;
    margin: 0 auto 40px auto;
    flex-wrap: wrap;
}

.side-box {
    width: 20%;
    padding: 15px;
}

.main-box {
    width: 40%;
    padding: 15px;
    position: relative;
}

.main-top-box {
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
}

.main-content {
    padding: 10px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}

.photo-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

/* ========================= */
/*       TOP NAVIGATION      */
/* ========================= */
.top-nav {
    text-align: center;
    margin: 15px 0 25px 0;
    padding: 10px 0;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
}

.top-nav a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    margin: 0 20px;
    transition: 0.2s ease;
}

.top-nav a:hover {
    text-decoration: underline;
    opacity: 0.7;
}

/* ========================= */
/*     COLLECTIONS PAGE      */
/* ========================= */
.collections-header {
    text-align: center;
    margin-top: 40px;
}

.collections-header h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.collections-header hr {
    width: 80%;
    margin: 0 auto 40px auto;
    border: 0;
    border-top: 1px solid white;
}

.collections-list {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.collections-list a {
    font-size: 28px;
    text-decoration: none;
    color: white;
    transition: 0.2s ease;
}

.collections-list a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.back-home {
    text-align: center;
    margin: 40px 0;
}

/* ========================= */
/*        COIN PAGES         */
/* ========================= */
.coin-page {
    text-align: center;
    font-family: 'DM Serif Text', serif;
    color: white;               /* text color */
    background-color: #3d1a78;  /* blue background */
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.coin-page h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.coin-page hr {
    width: 80%;
    margin: 0 auto 40px auto;
    border: 0;
    border-top: 1px solid white;
}

.coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.coin-item {
    text-align: center;
}

.coin-item img {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.coin-item p {
    margin-top: 10px;
    font-size: 14px;
}

.back-link {
    margin: 50px 0;
}

.back-link a {
    display: inline-block;
    text-decoration: none;
    color: #66ccff;
    font-weight: bold;
}

.back-link a:hover {
    color: #ffffff;
}

/* ========================= */
/*       RESPONSIVE CSS      */
/* ========================= */

/* Small tablets & phones */
@media (max-width: 992px) {
    .title-bar {
        flex-direction: column;
        text-align: center;
    }

    .layout {
        flex-direction: column;
        gap: 20px;
        width: 95%;
    }

    .side-box,
    .main-box {
        width: 100%;
        padding: 10px;
    }

    .top-nav a {
        display: block;
        margin: 10px 0;
        font-size: 16px;
    }

    .collections-header h1,
    .coin-page h1 {
        font-size: 36px;
    }

    .collections-list a {
        font-size: 22px;
    }

    .coin-item img {
        width: 120px;
        height: auto;
    }
}

/* Extra small phones */
@media (max-width: 600px) {
    .title-bar,
    .layout {
        padding: 10px;
    }

    .title-bar h1 {
        font-size: 24px;
    }

    .top-nav a {
        font-size: 14px;
    }

    .collections-header h1,
    .coin-page h1 {
        font-size: 28px;
    }

    .collections-list a {
        font-size: 20px;
    }

    .coin-item img {
        width: 100px;
        height: auto;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .coin-grid {
        gap: 20px;
    }
}

/* Desktop images larger for all collection pages */
@media (min-width: 1000px) {
    .collection-page img {
        max-width: 90%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
}