/* Consistent spacing between cards/modules */
#TopPane,
#RowOne_Grid3_Pane,
#RowOne_Grid9_Pane,
#ContentPane {
    margin-bottom: 16px;
}

/* Grey cards */
.pasto-box,
.pasto-intro,
.DnnModule-OPENSearchModule,
.DnnModule-OPENExtendedSearchModule,
.DnnModule-Authentication,
.DnnModule-OPENPatronAccountModule,
.DnnModule-OPENHtml5ContentModule,
.DnnModule-OPENCarouselModule,
[class*="OPENHtml5Content"],
[class*="OPENCarousel"] {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}

/* Headings */
.pasto-box h2,
.pasto-intro h2,
.DnnModule h2 {
    margin-top: 0;
    color: #4a9b22;
}

/* Simple DINX-like search */
.start-search {
    display: flex;
    width: 100%;
    gap: 4px;
    margin: 18px 0 0 0;
}

.start-search input {
    flex: 1;
}

.start-search button {
    padding: 2px 8px;
}

/* Welcome block */
.pasto-intro {
    display: block;
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

.pasto-intro-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 15px;
}

.pasto-text {
    flex: 1;
}

.pasto-image {
    flex: 1.3;
}

.pasto-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Opening hours */
.pasto-opening-box {
    min-height: 100%;
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

.openings-table {
    width: 100%;
}

.openings-table td {
    padding: 2px 0px;
}

.openings-table td:first-child {
    color: #666;
    font-weight: 600;
    width: 105px;
    padding-right: 14px;
}

.openings-table td:nth-child(2) {
    text-align: left;
    white-space: nowrap;
}

/* OPEN search module whitespace fix */
.DnnModule-OPENSearchModule .oclc-searchmodule {
    min-height: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .pasto-intro {
        flex-direction: column;
    }

    .start-search {
        flex-direction: column;
    }
}

.pasto-welcome-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 16px;
    margin-bottom: 16px !important;
    overflow: hidden;
    align-items: stretch;
}

.pasto-welcome-grid > div {
    border-radius: 6px !important;
    overflow: hidden !important;
}

.pasto-welcome-grid::after {
    content: "";
    display: block;
    clear: both;
}

.pasto-welcome-grid .pasto-box,
.pasto-welcome-grid .pasto-intro {
    height: 100%;
    border-radius: 6px !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .pasto-welcome-grid {
        grid-template-columns: 1fr;
    }
}

.pasto-new-title {
    background: #f5f5f5;
    padding: 16px 16px 0 16px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0 !important;
    clear: both;
    margin-top: 16px !important;
}

.pasto-new-title h2 {
    color: #4a9b22;
    margin: 0;
    white-space: nowrap;
}

.DnnModule-OPENHtml5ContentModule,
.DnnModule-OPENCarouselModule,
[class*="OPENHtml5Content"],
[class*="OPENCarousel"] {
    background: #f5f5f5;
    padding: 0px 0px 0px 0px;
    border-radius: 0 0 6px 6px;
    margin-top: -10px !important;
    margin-bottom: -10px !important;
    
}

.pasto-medienlisten {
    max-width: 650px;
    margin: 0 auto;
}

.pasto-list-link {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f5f5f5;
    padding: 14px 18px;
    border-radius: 6px;
    border: 1px solid #e3e3e3;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}

.pasto-list-link:hover {
    background: #eeeeee;
    text-decoration: none;
}

.pasto-list-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4a9b22;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.pasto-list-link strong {
    display: block;
    color: #4a9b22;
    font-size: 18px;
}

.pasto-list-link small {
    display: block;
    color: #666;
    margin-top: 3px;
}

.pasto-contact-text {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.pasto-contact-text h2,
.pasto-contact-text h3 {
    color: #4a9b22;
    margin-top: 0;
}

.pasto-map {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin: 12px 0;
}

.pasto-map iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.DnnModule-OPENFeedbackModule {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 6px;
}

#dnn_ctr378_ContentPane {
    font-size: 0;
}

#dnn_ctr378_ContentPane > .DNNModuleContent {
    font-size: 14px;
}

#dnn_ctr378_ContentPane::before {
    content: "Kontaktaufnahme";
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #4a9b22;
    margin-bottom: -10px;
}



/* Mobile-only fixes */
@media (max-width: 768px) {

    /* Willkommen: image above text, no narrow text column */
    .pasto-intro-content {
        flex-direction: column-reverse;
        gap: 14px;
    }

    .pasto-text,
    .pasto-image {
        width: 100%;
        flex: none;
    }

    .pasto-image img {
        width: 100%;
        max-width: 100%;
    }

    /* Less huge text spacing on mobile */
    .pasto-text p {
        line-height: 1.45;
        margin-bottom: 12px;
    }

    /* Öffnungszeiten slightly cleaner */
    .openings-table td:first-child {
        width: 120px;
    }

    /* Undo desktop negative carousel trick on mobile */
    .pasto-new-title {
        padding: 16px 16px 8px 16px !important;
        margin-top: 16px !important;
    }

    .DnnModule-OPENHtml5ContentModule,
    [class*="OPENHtml5Content"] {
        padding: 12px 16px 16px 16px !important;
        margin-top: 0 !important;
    }

    /* Prevent carousel/title overlap */
    .pasto-new-title h2 {
        font-size: 28px;
        line-height: 1.2;
    }
}

