/*
 * Holyday Directory Search
 *
 * Main frontend styles.
 */


/* ---------------------------------------------------------
   Directory wrapper
--------------------------------------------------------- */

.hds-directory {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */

.hds-directory__header {
    margin-bottom: 30px;
}

.hds-directory__title {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}


/* ---------------------------------------------------------
   Main layout
--------------------------------------------------------- */

.hds-directory__layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 35px;
    align-items: start;
}

.hds-directory__sidebar {
    width: 100%;
    min-width: 0;
    position: sticky;
    top: 20px;
    align-self: start;
}

.hds-directory__results {
    width: 100%;
    min-width: 0;
}


/* ---------------------------------------------------------
   Sidebar / Filters
--------------------------------------------------------- */

.hds-filters {
    width: 100%;
    padding: 22px;
    background: #CBBD7C;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-sizing: border-box;
}

.hds-filters__title {
    margin: 0 0 22px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}


/* ---------------------------------------------------------
   Filter groups
--------------------------------------------------------- */

.hds-filter-group {
    width: 100%;
    margin: 0 0 25px;
    padding: 0 0 20px;
    border-bottom: 1px solid #eeeeee;
    box-sizing: border-box;
}

.hds-filter-group:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.hds-filter-group__title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
}


/* ---------------------------------------------------------
   Filter options
--------------------------------------------------------- */

.hds-filter-option {
    display: flex !important;
    align-items: flex-start;
    gap: 9px;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 8px !important;
    padding: 3px 0 !important;
    font-size: 15px;
    line-height: 1.45;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
}

.hds-filter-option:last-child {
    margin-bottom: 0 !important;
}

.hds-filter-option input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    cursor: pointer;
    box-sizing: border-box;
}

.hds-filter-option span {
    display: block !important;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0 !important;
    padding: 0 !important;
}


/* ---------------------------------------------------------
   Area hierarchy
--------------------------------------------------------- */

.hds-directory .hds-filter-option--depth-0 {
    padding-left: 0 !important;
    margin-left: 0 !important;
    font-weight: 600;
}

.hds-directory .hds-filter-option--depth-1 {
    padding-left: 18px !important;
    margin-left: 0 !important;
    font-size: 14.5px;
}

.hds-directory .hds-filter-option--depth-2 {
    padding-left: 36px !important;
    margin-left: 0 !important;
    font-size: 14px;
}

.hds-directory .hds-filter-option--depth-3 {
    padding-left: 54px !important;
    margin-left: 0 !important;
    font-size: 13.5px;
}

.hds-directory .hds-filter-option--depth-4 {
    padding-left: 72px !important;
    margin-left: 0 !important;
    font-size: 13px;
}


/* ---------------------------------------------------------
   Collapsible area filters
--------------------------------------------------------- */

.hds-directory .hds-filter-option.hds-area-hidden {
    display: none !important;
}


/* ---------------------------------------------------------
   Area toggle button
--------------------------------------------------------- */

.hds-directory .hds-area-toggle {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    margin: 1px 5px 0 0;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #f7f7f7;
    color: #444;
    font-size: 12px;
    line-height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 18px;
}

.hds-directory .hds-area-toggle:hover {
    background: #eeeeee;
}

.hds-directory .hds-area-toggle span {
    font-size: 12px;
    line-height: 1;
}


/* ---------------------------------------------------------
   Filter actions
--------------------------------------------------------- */

.hds-filters__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.hds-filters__submit {
    display: block;
    width: 100%;
    padding: 11px 16px;
    border: 0;
    border-radius: 7px;
    background: #222222;
    color: #ffffff;
    font-size: 20px !important;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.hds-filters__submit:hover {
    opacity: 0.85;
}

.hds-filters__reset {
    display: block;
    width: 100%;
    padding: 9px 16px;
    color: #555555;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.hds-filters__reset:hover {
    color: #111111;
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Results
--------------------------------------------------------- */

.hds-results {
    width: 100%;
}

.hds-results__count {
    margin: 0 0 20px;
    color: #666666;
    font-size: 14px;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   Results list
--------------------------------------------------------- */

.hds-results__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}


/* ---------------------------------------------------------
   Profile cards
--------------------------------------------------------- */

.hds-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #749383;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.hds-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}


/* ---------------------------------------------------------
   Card image
--------------------------------------------------------- */

.hds-card__image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #eeeeee;
}

.hds-card__image-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.hds-card__img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.hds-card:hover .hds-card__img {
    transform: scale(1.04);
}

.hds-card__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.18) 100%
    );
    pointer-events: none;
}

.hds-card__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: #eeeeee;
    color: #777777;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   Card content
--------------------------------------------------------- */

.hds-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    box-sizing: border-box;
}

.hds-card__content-inner {
    flex: 1 1 auto;
    min-width: 0;
}


/* ---------------------------------------------------------
   Card category
--------------------------------------------------------- */

.hds-card__category {
    display: inline-block;
    width: fit-content;
    margin: 0 0 10px;
    padding: 5px 9px;
    background: #444444;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    border-radius: 4px;
}


/* ---------------------------------------------------------
   Card title
--------------------------------------------------------- */

.hds-card__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
}

.hds-card__title a {
    color: #ffffff !important;
    text-decoration: none;
}

.hds-card__title a:hover {
    color: #ffffff !important;
    text-decoration: none;
}


/* ---------------------------------------------------------
   Card areas
--------------------------------------------------------- */

.hds-card__areas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    color: #cbbd7c !important;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.hds-card__areas-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin: 0;
    color: #cbbd7c !important;
    font-size: 8px;
    line-height: 1;
}

.hds-card__areas-text {
    display: block;
    min-width: 0;
    flex: 0 1 auto;
    text-align: center;
}

/* ---------------------------------------------------------
   Card action
--------------------------------------------------------- */

.hds-card__action {
    width: 100%;
    margin-top: 20px;
}

.hds-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 7px;
    background: #222222;
    color: #ffffff !important;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.hds-card__button:hover {
    background: #CBBD7C;
    color: #000000 !important;
    opacity: 1;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.hds-card__button-text {
    display: block;
}


/* ---------------------------------------------------------
   Empty results
--------------------------------------------------------- */

.hds-results__empty {
    padding: 40px 25px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    text-align: center;
}

.hds-results__empty h2 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
}

.hds-results__empty p {
    margin: 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   Responsive: tablet
--------------------------------------------------------- */

@media (max-width: 1100px) {

    .hds-directory__layout {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 25px;
    }

    .hds-results__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .hds-card__image {
        height: 210px;
    }
}


/* ---------------------------------------------------------
   Responsive: mobile
--------------------------------------------------------- */

@media (max-width: 767px) {

    .hds-directory {
        padding: 20px 15px;
    }

    .hds-directory__header {
        margin-bottom: 22px;
    }

    .hds-directory__title {
        font-size: 26px;
    }

    .hds-directory__layout {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .hds-directory__sidebar {
        width: 100%;
    }

    .hds-directory__results {
        width: 100%;
    }

    .hds-filters {
        padding: 18px;
    }

    .hds-results__list {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hds-directory .hds-filter-option--depth-1 {
        padding-left: 14px !important;
    }

    .hds-directory .hds-filter-option--depth-2 {
        padding-left: 28px !important;
    }

    .hds-directory .hds-filter-option--depth-3 {
        padding-left: 42px !important;
    }

    .hds-directory .hds-filter-option--depth-4 {
        padding-left: 56px !important;
    }

    .hds-card__image {
        height: 230px;
    }

    .hds-card__content {
        padding: 18px;
    }

    .hds-card__title {
        font-size: 20px;
    }
}


/* ---------------------------------------------------------
   Prevent theme interference
--------------------------------------------------------- */

.hds-directory,
.hds-directory *,
.hds-directory *::before,
.hds-directory *::after {
    box-sizing: border-box;
}

.hds-directory img {
    max-width: 100%;
    height: auto;
}

.hds-directory button,
.hds-directory input {
    font-family: inherit;
}
