html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: cursive;
    background-color: var(--sub-background-color);
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--font-color);
}

.header {
    font-family: Arial, Helvetica, sans-serif !important;
}

.button-container {
    align-items: center;
}

/* * Main layout */
.releases-layout {
    display: grid;
    grid-template-columns: 300px 1fr;  /* Sidebar width + content */
    grid-template-rows: auto 1fr;      /* Breadcrumb row + content row */
    column-gap: 24px;
    height: calc(100vh - 60px); /* Header height */
    background: var(--background-color);
    color: var(--font-color);
    min-height: 0;
}

/* Sidebar */
.releases-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 300px;
    background: var(--sub-background-color);
    border-right: 1px solid var(--accent-color);
    display: flex;
    padding-top: 16px;
    overflow-y: auto;
}

.sidebar-group {
    margin-bottom: 10px;
}

.versions-container {
    display: flex;
    flex-direction: column;
}

/* Sidebar group label */
.sidebar-group-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 20px 6px;
    font-family: monospace;
    text-transform: uppercase;
    color: var(--other-color);
}

/* Sidebar items */
.sidebar-item {
    font-family: "Gill Sans", sans-serif;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    color: var(--font-color);
    display: flex;
    align-items: center;
}

.sidebar-inner {
    width: 100%;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-item:hover {
    background: var(--secondary-accent-color);
}

/* Submenu container */
.sidebar-submenu {
    display: none;
    flex-direction: column;
    background: var(--sub-background-color);
}

/* Links inside submenu */
.sidebar-subitem {
    padding: 8px 40px;
    font-size: 15px;
    color: var(--font-color);
    text-decoration: none;
    font-family: "Gill Sans", sans-serif;
}

.sidebar-subitem:hover {
    background: var(--secondary-accent-color);
}

/* Arrow icon */
.sidebar-arrow {
    width: 12px;
    height: 12px;
    margin-right: 10px;
    background-image: url('/caddy/images/icons/arrow/right-arrow-light.png');
    background-size: cover;
    transition: transform 0.2s ease-in-out;
}

/* Arrow rotation when open */
.sidebar-arrow.open {
    transform: rotate(90deg);
}

/* button at top */
.sidebar-cta {
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    background-color: var(--secondary-color);
    border-radius: 10px;
}

.sidebar-cta:hover {
    cursor: pointer;
    background-color: var(--secondary-accent-color);
}

.sidebar-cta a {
    color: var(--font-color);
    font-family: "Gill Sans", sans-serif;
}

.release-nav {
    grid-column: 2;
    grid-row: 1;
    font-family: "Gill Sans", sans-serif;
    font-size: 16px;
    margin-top: 32px;
    margin-bottom: 15px;
    margin-left: 32px;
}

.release-nav a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 500;
}

.release-nav a:hover {
    text-decoration: underline;
}

.release-nav span {
    opacity: 0.7;
}

/* Content */
.feedback-content, .docs-content, .notes-content, .caddy-content, .lite-content {
    flex: 1;
    padding: 0 32px;
    overflow-y: auto;
    grid-column: 2;
    grid-row: 2;
}

.releases-content h1,
.notes-content h1,
.docs-content h1,
.feedback-content h1,
.caddy-content h1,
.lite-content h1 {
    font-family: "Gill Sans", sans-serif;
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    width: 500px;
}

.releases-content h2,
.notes-content h2,
.docs-content h2,
.feedback-content h2,
.caddy-content h2,
.lite-content h2 {
    font-family: "Gill Sans", sans-serif;
}

.releases-content h3,
.notes-content h3,
.docs-content h3,
.feedback-content h3,
.caddy-content h3,
.lite-content h3 {
    font-family: "Gill Sans", sans-serif;
}

li {
    margin-bottom: 10px;
}

/* Headings */
.releases-content h1 {
    font-size: 28px;
    margin-bottom: 16px;
}

.releases-content h2 {
    font-size: 22px;
}

.releases-content p {
    font-size: 15px;
    line-height: 1.5;
}

/* * Feedback Page */
.copy-box {
    position: relative;
    background: var(--sub-background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 12px 0 22px;
    overflow: hidden;
}

.email-box {
    width: 275px;
}

.text-box {
    width: 600px;
    height: 350px;
}

.copy-btn {
    position: absolute;
    top: 9px;
    right: 6px;
    font-size: 12px;
    color: var(--font-color);
    padding: 4px 8px;
    border-radius: 4px;
    border: 2px solid var(--background-color);
    background: var(--sub-background-color);
    cursor: pointer;
    transition: background 0.15s ease;
}

.copy-btn:hover {
    background: var(--bg-4);
}

.copy-content {
    padding: 14px;
    font-family: var(--mono, Consolas, monospace);
    font-size: 14px;
    background: transparent;
}

.textarea-content {
    width: 100%;
    height: 350px;
    border: none;
    resize: vertical;
    outline: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.feedback-template {
    width: 600px;
    max-height: 350px;
    min-height: 350px;
    height: 350px;
    padding: 16px;
    border-radius: 8px;
    border: none;
    background: var(--accent-color);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--font-color);
    white-space: pre-wrap;
    resize: vertical;
    cursor: text;
}

/* * Landing page */
/* --- LAYOUT WRAPPER --- */
.releases-content {
    grid-column: 2;
    grid-row: 2;
    padding: 32px;
    overflow-y: auto !important;
    margin: 0;
    color: var(--font-color);
}

/* --- CUSTOM SCROLLBAR FOR RELEASES CONTENT --- */
.releases-content, .caddy-content, .lite-content {
    scrollbar-width: thin;                  /* Firefox */
    scrollbar-color: var(--scroll-color) var(--accent-color);
}

/* Webkit browsers (Chrome/Edge/Safari) */
.releases-content::-webkit-scrollbar {
    width: 10px;
}

.releases-content::-webkit-scrollbar-track {
    background: var(--accent-color);
    border-radius: 10px;
}

.releases-content::-webkit-scrollbar-thumb {
    background: var(--scroll-color);
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

.releases-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-accent-color);
}

.release-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.release-left {
    flex: 1;
}

.release-right {
    flex: 1;
}

.upcoming-box ul {
    padding-left: 18px;
}

.release-card h2 a{
    color: var(--primary-color);
}

.release-card h2 a:hover {
    color: var(--primary-accent-color);
}

.grid-two {
    display: grid;
    margin-bottom: 24px;
}

.footer-card {
    font-size: 0.9rem;
}

/* --- PAGE HEADER --- */
.releases-content h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

/* --- SECTION CARD --- */
.release-card {
    background-color: var(--sub-background-color);
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 32px;
}

/* --- TITLES --- */
.release-card h2 {
    color: var(--font-color);
    margin-bottom: 0;
}

.release-card h3 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--font-color);
}

.release-card h4 {
    margin-top: 14px;
    margin-bottom: 6px;
    color: var(--font-color);
    font-weight: 500;
}

/* --- VERSION LINKS --- */
.version-list a {
    color: var(--primary-accent-color);
    font-weight: 500;
    transition: color 0.15s;
}

.link {
    color: var(--primary-color);
}
.link:hover {
    color: var(--primary-accent-color);
}

.version-list a:hover {
    color: var(--primary-accent-color);
    text-decoration: underline;
}

/* --- UL LISTS --- */
.release-card ul {
    margin-left: 18px;
    margin-top: 6px;
}

/* --- RESOURCE LIST, CONTACT SECTION --- */
.resource-list a {
    color: var(--primary-color);
    transition: color 0.15s;
}

.resource-list a:hover {
    color: var(--primary-accent-color);
}

/* --- TAG BADGE (VERSION) --- */
.version-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    margin-left: 6px;
    font-size: 0.85rem;
}

/* --- DATE TEXT --- */
.release-date {
    opacity: 0.8;
    font-size: 0.9rem;
}


/* Responsive */
@media (max-width: 900px) {
    .releases-sidebar {
        width: 220px;
    }
}

@media (max-width: 750px) {
    .releases-layout {
        flex-direction: column;
    }

    .releases-sidebar {
        width: 100%;
        max-height: 260px;
        border-right: none;
        border-bottom: 1px solid var(--accent-color);
        overflow-y: auto;
    }
}
