body {
    font-family: "Open Sans", Arial, sans-serif;
    color: #2e44cc;
    background-color: #f5f5f5;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    /*gap: 40px;*/
}



.resources {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    margin-top: 20px;
}

.searchfilter {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.searchcontainer {
    flex: 1;
    min-width: 250px;
}

.searchform {
    display: flex;
    gap: 10px;
    align-items: center;
}

.searchinput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #d0d4ff;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.searchinput:focus {
    outline: none;
    border-color: #2e44cc;
}

.categorydropdown {
    flex: 0 0 200px;
}

.categoryselect {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d0d4ff;
    border-radius: 5px;
    font-size: 1em;
    background-color: white;
    cursor: pointer;
    box-sizing: border-box;
}

.categoryselect:focus {
    outline: none;
    border-color: #2e44cc;
}

.examplegrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .examplegrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.exampleboxes {
    background-color: #e1e4e8;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    width: 100%;
    min-height: 280px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 6px 18px rgba(138, 201, 38, 0.25);
}


.resource-card {
    position: relative;
}

.exampleboxes:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.15),
        0 8px 22px rgba(138, 201, 38, 0.3);
}

.resource-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex: 1;
    min-height: 0;
}

.resource-card-link .exampleboxes {
    padding-bottom: 50px;
}

.edit-resource-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #2e44cc;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2e44cc;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.2s ease;
}

.edit-resource-btn:hover {
    background: #2e44cc;
    color: #ffffff;
}

.exampleboxes h3 {
    color: #2e44cc;
    font-size: 1.5em;
}

.resource-card-link .exampleboxes h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exampleboxes h4 {
    color: #2e44cc;
    margin: 8px 0;
    font-size: 1.1em;
    min-height: 24px;
}

.exampleboxes h6 {
    color: #2e44cc;
    margin: 4px 0;
    font-size: 0.9em;
    min-height: 20px;
}

.exampleboxes p {
    color: #333;
    margin-bottom: 10px;
}

.exampleboxes ul {
    text-align: center;
    margin-top: 15px;
    padding-left: 0;
    list-style-position: inside;
}

.exampleboxes ul li {
    margin: 8px 0;
    color: #444;
}

.resourcelink {
    color: #2e44cc;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    display: inline-block;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.resource-card-link .resourcelink {
    margin-top: auto;
    margin-bottom: 24px;
}

.resourcelink:hover {
    color: #8ac926;
    text-decoration: underline;
}

.uploadbutton {
    text-align: center;
    margin-bottom: 20px;
}

.uploadresourcebtn {
    background-color: #2e44cc;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.uploadresourcebtn:hover {
    background-color: #1e34aa;
}

#uploadModal,
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modalcontent {
    background-color: white;
    margin: 0;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.modalheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modalclose {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}

.modalclose:hover {
    color: #2e44cc;
}

.modaltitle {
    color: #2e44cc;
    margin: 0;
}

.modallabel {
    display: block;
    margin-bottom: 3px;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.modalform input,
.modalform textarea,
.modalform select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #d0d4ff;
    border-radius: 5px;
    box-sizing: border-box;
}

.modalform input:focus,
.modalform textarea:focus,
.modalform select:focus {
    outline: none;
    border-color: #2e44cc;
}

.modalform textarea {
    font-family: inherit;
    resize: vertical;
}

.modalformactions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.modalbtncancel {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #e1e4e8;
}

.modalbtncancel:hover {
    background-color: #d0d4ff;
}

.modalbtnsubmit {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #2e44cc;
    color: white;
}

.modalbtnsubmit:hover {
    background-color: #1e34aa;
}

.modalbtndelete {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #cc2e2e;
    color: white;
}

.modalbtndelete:hover {
    background-color: #a02121;
}

.resource-info-modal {
    max-width: 560px;
}

.resource-info-body {
    color: #333;
    line-height: 1.45;
}

.resource-info-section {
    border: 1px solid #e6e9ff;
    background: #fbfcff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.resource-info-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: start;
}

.resource-info-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2e44cc;
}

.resource-info-value {
    font-size: 0.95rem;
    color: #333;
    word-break: break-word;
}

.resource-info-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2e44cc;
    margin-bottom: 8px;
}

.resource-info-contact-line {
    font-size: 0.95rem;
    color: #333;
    margin: 2px 0;
    word-break: break-word;
}

.resource-info-contact-empty {
    font-size: 0.95rem;
    color: #777;
}

.resource-info-actions {
    margin-top: 6px;
}

.resource-info-primary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-resource-table {
    border: 1px solid #d9defa;
    border-radius: 8px;
    overflow: hidden;
}

.admin-resource-table thead th {
    background-color: #f0f3ff;
    color: #2e44cc;
    border-bottom: 2px solid #d9defa;
}

.admin-resource-table td {
    vertical-align: middle;
}

.edit-resource-btn-inline {
    background-color: #2e44cc;
    color: #fff;
    border: none;
}

.edit-resource-btn-inline:hover {
    background-color: #1e34aa;
    color: #fff;
}