/* =========================================================
   COMMENTS LIVE
   Main Stylesheet
   ========================================================= */


/* ---------------------------------------------------------
   RESET / BASE
   --------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f7f7f5;
    color: #34373d;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: #376f7d;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.site-header {
    background:
        linear-gradient(
            135deg,
            #244c5a 0%,
            #4f8191 55%,
            #a7c9cf 100%
        );
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.header-inner {
    width: min(1400px, 94%);
    margin: 0 auto;
    padding: 26px 0;
}

.site-brand {
    display: inline-flex;
    flex-direction: column;
    color: #fff;
    text-decoration: none;
}

.site-name {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.site-tagline {
    margin-top: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    opacity: 0.9;
}


/* ---------------------------------------------------------
   PAGE LAYOUT
   --------------------------------------------------------- */

.site-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 30px;

    width: min(1400px, 94%);
    margin: 32px auto 50px;
}


/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.sidebar {
    align-self: start;
}

.sidebar-nav,
.sidebar-section {
    margin-bottom: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5ed;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.sidebar h2 {
    margin: 0;
    padding: 14px 18px;

    background: #244c5a;
    color: #fff;

    font-size: 1rem;
    font-weight: 700;
}

.sidebar ul {
    margin: 0;
    padding: 8px 0;
    list-style: none;
}

.sidebar li {
    margin: 0;
}

.sidebar a {
    display: block;
    padding: 10px 18px;

    color: #3f4a4e;
    text-decoration: none;

    border-left: 3px solid transparent;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.sidebar a:hover {
    background: #edf5f6;
    color: #244c5a;
    border-left-color: #6f9eaa;
}


/* ---------------------------------------------------------
   MAIN CONTENT
   --------------------------------------------------------- */

.main-content {
    min-width: 0;
}

.welcome {
    margin-bottom: 32px;
    padding: clamp(24px, 4vw, 42px);

    background: #fff;
    border: 1px solid #e7e7ee;
    border-radius: 18px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.welcome h1 {
    margin: 0 0 12px;

    color: #244c5a;

    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.2;
}

.intro {
    max-width: 760px;
    margin: 0;

    color: #666;
    font-size: 1.08rem;
}


/* ---------------------------------------------------------
   HOME SECTIONS
   --------------------------------------------------------- */

.home-section {
    margin-top: 30px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;

    color: #3f3f49;

    font-size: 1.55rem;
}

.section-heading p {
    margin: 4px 0 0;
    color: #777;
}


/* ---------------------------------------------------------
   CATEGORY GRID
   --------------------------------------------------------- */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(200px, 1fr));

    gap: 18px;
}

.category-card {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    min-height: 155px;
    padding: 22px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f0f6f7 100%
        );

    color: #34373d;
    text-decoration: none;

    border: 1px solid #dce7e9;
    border-radius: 16px;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.category-card::before {
    content: "";

    position: absolute;
    top: -45px;
    right: -45px;

    width: 120px;
    height: 120px;

    background: rgba(79, 129, 145, 0.11);

    border-radius: 50%;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #7fa8b2;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.category-name {
    position: relative;
    z-index: 1;

    display: block;

    color: #244c5a;

    font-size: 1.3rem;
    font-weight: 750;
}

.category-link {
    position: relative;
    z-index: 1;

    display: block;
    margin-top: 5px;

    color: #527f8b;

    font-size: 0.88rem;
    font-weight: 600;
}

/* ---------------------------------------------------------
   GRAPHICS GRID
   --------------------------------------------------------- */

.graphics-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.graphic-card {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;
    padding: 14px;

    background: #fff;

    border: 1px solid #dce7e9;
    border-radius: 14px;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.graphic-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.08);
}

.graphic-image-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    text-decoration: none;
}

.graphic-card img {
    display: block;

    max-width: 100%;
    height: auto;

    object-fit: contain;
}

.graphic-title {
    display: block;

    width: 100%;
    margin-top: 12px;

    color: #244c5a;

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}

.graphic-title:hover {
    color: #4f8191;
    text-decoration: underline;
}

/* ---------------------------------------------------------
   EMPTY CATEGORY
   --------------------------------------------------------- */

.empty-message {
    padding: 30px;

    background: #fff;

    border: 1px solid #dce7e9;
    border-radius: 14px;

    text-align: center;
    color: #666;
}

/* ---------------------------------------------------------
   BREADCRUMBS
   --------------------------------------------------------- */

.breadcrumbs {
    margin-bottom: 18px;

    color: #68787d;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #376f7d;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 6px;
}


/* ---------------------------------------------------------
   INDIVIDUAL GRAPHIC PAGE
   --------------------------------------------------------- */
   
.graphic-view {
    padding: clamp(24px, 4vw, 42px);

    background: #fff;

    border: 1px solid #e1e7e8;
    border-radius: 18px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);

    text-align: center;
}

.graphic-view h1 {
    margin: 0 0 25px;

    color: #244c5a;

    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.2;
}

.graphic-view-image {
    display: flex;
    justify-content: center;
}

.graphic-view-image img {
    display: block;

    max-width: 100%;
    height: auto;

    border-radius: 8px;
}


.back-category {
    margin: 25px 0 0;
}

.back-category a {
    color: #376f7d;
    font-weight: 600;
    text-decoration: none;
}

.back-category a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
   SOCIAL SHARING
   --------------------------------------------------------- */

.share-section {
    max-width: 650px;
    margin: 28px auto 0;
    padding-top: 24px;

    border-top: 1px solid #e1e7e8;
}

.share-section h2 {
    margin: 0 0 16px;

    color: #244c5a;

    font-size: 1.2rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.share-button {
    display: inline-block;

    padding: 9px 16px;

    background: #244c5a;
    color: #fff;

    border-radius: 7px;

    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.share-button:hover {
    background: #4f8191;
    color: #fff;

    transform: translateY(-1px);
}


/* ---------------------------------------------------------
   SHARE URL
   --------------------------------------------------------- */

.share-url {
    max-width: 560px;
    margin: 22px auto 0;

    text-align: left;
}

.share-url label {
    display: block;
    margin-bottom: 6px;

    color: #44565c;

    font-size: 0.9rem;
    font-weight: 600;
}

.share-url-row {
    display: flex;
    gap: 8px;
}

.share-url input {
    min-width: 0;
    flex: 1;

    padding: 10px 12px;

    background: #f7f9f9;
    color: #45555a;

    border: 1px solid #ccdadd;
    border-radius: 7px;

    font: inherit;
    font-size: 0.88rem;
}

.copy-button {
    padding: 10px 16px;

    background: #4f8191;
    color: #fff;

    border: 0;
    border-radius: 7px;

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

.copy-button:hover {
    background: #376f7d;
}

.copy-message {
    display: block;
    min-height: 1.4em;
    margin-top: 5px;

    color: #527f8b;

    font-size: 0.85rem;
}


/* ---------------------------------------------------------
   MOBILE SHARE CONTROLS
   --------------------------------------------------------- */

@media (max-width: 500px) {

    .share-button {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }

    .share-url-row {
        flex-direction: column;
    }

    .copy-button {
        width: 100%;
    }

}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.site-footer {
    background: #243c43;
    color: #dce5e7;
}

.footer-inner {
    width: min(1400px, 94%);
    margin: 0 auto;
    padding: 28px 0;

    text-align: center;
}

.footer-inner p {
    margin: 3px 0;
}

.footer-tagline {
    color: #aebfc3;
    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 850px) {

    .site-layout {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 20px;
    }

}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 650px) {

    .header-inner {
        text-align: center;
    }

    .site-brand {
        align-items: center;
    }

    .site-layout {
        display: flex;
        flex-direction: column;

        width: min(94%, 700px);
        margin-top: 20px;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        padding: 8px;
        gap: 5px;
    }

    .sidebar-nav a {
    padding: 9px 12px;

    background: #f3f7f7;
    border: 0;
    border-radius: 8px;

    text-align: center;
}

	.sidebar-nav a:hover {
		background: #edf5f6;
		border: 0;
	}

    .sidebar-section {
        display: none;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 115px;
    }

}

/* =========================================================
   IMAGE SEARCH
   ========================================================= */

.image-search-form {
    display: flex;
    max-width: 650px;
    margin: 24px 0 32px;
    gap: 10px;
}

.image-search-form input {
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
    background: #fff;
    color: #34474d;
    border: 1px solid #ccdadd;
    border-radius: 8px;
    font: inherit;
}

.image-search-form input:focus {
    outline: 2px solid #a7c9cf;
    outline-offset: 1px;
    border-color: #4f8191;
}

.image-search-form button {
    padding: 12px 20px;
    background: #244c5a;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.image-search-form button:hover {
    background: #4f8191;
}

.search-results-heading {
    margin: 0 0 22px;
    color: #244c5a;
    font-size: 1.25rem;
}

.no-search-results {
    padding: 25px;
    background: #fff;
    border: 1px solid #e1e7e8;
    border-radius: 12px;
}


/* =========================================================
   FOOTER IMAGE SEARCH
   ========================================================= */

.footer-search {
    padding: 22px 25px;
    background: #edf5f6;
    border-top: 1px solid #d9e5e7;
}

.footer-search-form {
    max-width: 650px;
    margin: 0 auto;
}

.footer-search-form label {
    display: block;
    margin-bottom: 8px;
    color: #244c5a;
    font-weight: 600;
    text-align: center;
}

.footer-search-row {
    display: flex;
    gap: 8px;
}

.footer-search-row input {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
    background: #fff;
    color: #34474d;
    border: 1px solid #ccdadd;
    border-radius: 7px;
    font: inherit;
}

.footer-search-row input:focus {
    outline: 2px solid #a7c9cf;
    outline-offset: 1px;
    border-color: #4f8191;
}

.footer-search-row button {
    padding: 10px 18px;
    background: #244c5a;
    color: #fff;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.footer-search-row button:hover {
    background: #4f8191;
}


/* Accessible hidden labels */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


@media (max-width: 500px) {

    .image-search-form {
        flex-direction: column;
    }

    .image-search-form button {
        width: 100%;
    }

    .footer-search-row {
        flex-direction: column;
    }

    .footer-search-row button {
        width: 100%;
    }

}