/* Guestbook Styles */
.guestbook {
    width: 100%;
}

.guestbook-entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.guestbook-instructions {
    background-color: #fff;
    border: 3px solid #006bb6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.guestbook-instructions h3 {
    color: #006bb6;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.guestbook-instructions ol {
    margin-left: 1.5rem;
}

.guestbook-instructions ol li {
    margin-bottom: 0.5rem;
}

.guestbook-instructions a {
    color: #c8102e;
    text-decoration: none;
    font-weight: bold;
}

.guestbook-instructions a:hover {
    text-decoration: underline;
}

.guestbook-loading,
.guestbook-error,
.guestbook-empty {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #666;
    margin-bottom: 2rem;
}

.guestbook-error {
    border-color: #c8102e;
    color: #c8102e;
}

.guestbook-setup {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.guestbook-setup h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.guestbook-setup ol {
    margin-left: 1.5rem;
}

.guestbook-entry {
    background-color: #fff;
    border: 2px solid #006bb6;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 3px 10px rgba(0, 107, 182, 0.15);
    position: relative;
    transform: rotate(-0.5deg);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    width: 100%;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.guestbook-entry:nth-child(even) {
    transform: rotate(0.5deg);
}

.guestbook-entry:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 107, 182, 0.2);
}

.guestbook-entry::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    border-left: 14px solid transparent;
    border-top: 14px solid rgba(255, 255, 255, 0.8);
}

.entry-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #006bb6;
}

.author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.author-name {
    color: #006bb6;
    font-size: 0.9rem;
    font-weight: bold;
}

.author-handle {
    color: #666;
    font-size: 0.75rem;
}

.entry-date {
    color: #999;
    font-size: 0.7rem;
    white-space: nowrap;
}

.entry-text {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #333;
    font-size: 0.9rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Courier New", monospace;
}

body {
    background-color: #f5f5f5;
    color: #333;
    /* Grid background like sticker paper */
    background-image:
        linear-gradient(rgba(200, 200, 200, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 200, 200, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: -1px -1px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    background-color: #006bb6; /* Eagles blue */
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Liberty Bell silhouette in background */
header::before {
    content: "";
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='rgba(255,255,255,0.1)'%3E%3Cpath d='M38,95 h24 v-5 h-24 v5 M38,90 h24 v-5 c0,0 6,-3 6,-15 c0,-12 -6,-60 -6,-60 h-24 c0,0 -6,48 -6,60 c0,12 6,15 6,15 v5 M80,28 c0,0 -30,-8 -60,0 M38,25 h24 M38,40 h24 M45,25 v-10 h10 v10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: -2px;
    text-shadow: 3px 3px 0 #000;
    transform: rotate(-2deg);
    display: inline-block;
    position: relative;
}

/* Adding a keystone shape behind logo to represent Pennsylvania */
.logo::before {
    content: "";
    position: absolute;
    width: 110%;
    height: 120%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: -1;
    left: -5%;
    top: -10%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transform: rotate(2deg);
}

.logo::after {
    content: "PHILLY";
    font-size: 1rem;
    position: relative;
    top: -15px;
    right: -5px;
    background: #000000;
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    transform: rotate(3deg);
    display: inline-block;
    border: 1px dotted #e31837; /* Phillies red border */
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.3rem 0.7rem;
    border: 2px dashed black;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

nav a:hover {
    background-color: black;
    transform: translateY(-2px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

/* Main content area */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

/* Filter section */
.filters {
    background-color: #333;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.filters h2 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* Tag container setup for counters */
.tag-container,
.sticker-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

/* Tag rotation styles */
sw-tag {
    transform: rotate(-3deg);
    transition: transform 0.2s;
}

/* Base tag rotations */
sw-tag:nth-child(3n) {
    transform: rotate(2deg);
}

sw-tag:nth-child(3n + 1) {
    transform: rotate(-1.5deg);
}

sw-tag:nth-child(3n + 2) {
    transform: rotate(0.5deg);
}

/* Additional rotations based on parent card */
.sticker-card:nth-child(2n) sw-tag:nth-child(3n) {
    transform: rotate(-2deg);
}

.sticker-card:nth-child(2n) sw-tag:nth-child(3n + 1) {
    transform: rotate(1.5deg);
}

.sticker-card:nth-child(2n) sw-tag:nth-child(3n + 2) {
    transform: rotate(-0.5deg);
}

.sticker-card:nth-child(3n) sw-tag:nth-child(3n) {
    transform: rotate(1deg);
}

.sticker-card:nth-child(3n) sw-tag:nth-child(3n + 1) {
    transform: rotate(-2.5deg);
}

.sticker-card:nth-child(3n) sw-tag:nth-child(3n + 2) {
    transform: rotate(2.5deg);
}

sw-tag:nth-child(5n) {
    transform: rotate(3deg);
}

sw-tag:nth-child(7n) {
    transform: rotate(-2deg);
}

sw-tag:nth-child(11n) {
    transform: rotate(1deg);
}

sw-tag::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    pointer-events: none;
}

sw-tag:hover {
    transform: scale(1.05) rotate(0deg);
}

.search-box {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 3px;
    background-color: #444;
    color: white;
}

.search-box button {
    background-color: #a5acaf; /* Eagles silver */
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
}
.sticker-grid-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}
/* Sticker grid */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    gap: 2rem;
    margin: 0;
}

.sticker-card {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    position: relative;
    min-width: 280px;
    width: 100%;
}

/*
.sticker-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background:  rgba(0, 0, 0, 0.2);
}*/

.sticker-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid #333;
}

.sticker-thumbnail {
    width: 100%;
    height: 250px;
    display: block;
    overflow: hidden;
    border-bottom: 3px solid #333;
}

.sticker-thumbnail picture {
    width: 100%;
    height: 250px;
    display: block;
}

.sticker-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.no-image-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 1rem;
}

.sticker-info {
    padding: 1rem;
}

.sticker-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.sticker-artist {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-style: italic;
    color: black;
}
.sticker-artist a {
    text-decoration: none;
    color: black;
}
.sticker-artist a:hover {
    text-decoration: underline;
}
.sticker-meta {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.sticker-location,
.sticker-date,
.sticker-series {
    background-color: #333;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
}
a.sticker-location {
    text-decoration: none;
}

.sticker-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

sw-tag {
    display: inline-block;
}
sw-tag:hover {
    transform: scale(1.05) rotate(0deg) !important;
}
/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(
        90deg,
        #006bb6 0%,
        /* Eagles blue */ #a5acaf 25%,
        /* Eagles silver */ #e31837 50%,
        /* Phillies/Sixers red */ #ce1126 75%,
        /* Flyers red */ #000000 100%
    ); /* Philly black */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #ffdd00;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Submit button */
.submit-sticker {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #e31837; /* Phillies red */
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: rotate(-5deg);
    z-index: 100;
    transition: all 0.3s;
}
.submit-sticker {
    display: none !important;
}

.submit-sticker:hover {
    transform: scale(1.1) rotate(0deg);
}

/* For the gritty counter-culture feels */
.torn-edge {
    position: relative;
}

.torn-edge::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    height: 10px;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 L10,10 L20,0 L30,10 L40,0 L50,10 L60,0 L70,10 L80,0 L90,10 L100,0 L100,10 L0,10 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
}

/* Section title and links */
.section-title {
    font-size: 1.8rem;
    margin: 2rem 0 1.2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.3rem;
    width: fit-content;
    border-bottom: 3px solid #e31837; /* Phillies red */
}

.view-all-container {
    text-align: center;
    margin: 2rem 0;
}

.view-all-link {
    display: inline-block;
    background-color: #006bb6; /* Eagles blue */
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px dashed black;
    transition: all 0.2s;
}

.view-all-link:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

.sticker-title a {
    color: inherit;
    text-decoration: none;
}

.sticker-title a:hover {
    text-decoration: underline;
}

/* Pagination styles */
.pagination {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-previous,
.pagination-next {
    padding: 0.5rem 0.8rem;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.pagination-previous:hover,
.pagination-next:hover {
    background-color: #444;
}

.pagination-disabled {
    background-color: #eaeaea;
    color: #aaa;
    cursor: not-allowed;
}

.pagination-page {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.2s;
}

.pagination-page:hover {
    background-color: #ddd;
}

.pagination-current {
    background-color: #333;
    color: white;
    font-weight: bold;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sticker-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    main {
        padding: 0 1rem;
    }

    .sticker-grid-container {
        width: 95%;
    }
}

@media (min-width: 769px) and (max-width: 1000px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
