/* Directorily Custom CSS */

/* General styles for all pages */
.dr-page {
    font-family: 'Roboto', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.875rem 0.9375rem; /* 30px 15px */
    background-color: #f9fafb;
}

/* Heading styles */
.dr-page h1 {
    color: #1a2b49;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.9375rem; /* 15px */
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 1.875rem; /* 30px */
    letter-spacing: 0.5px;
}

/* Hotel cards container */
.dr-hotel-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* 20px */
    margin-top: 1.875rem; /* 30px */
}

/* Shared styles for cards (hotels, cities, counties) */
.dr-hotel-card,
.directorily-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.25rem; /* 20px */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dr-hotel-card:hover,
.directorily-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Individual hotel card */
.dr-hotel-card {
    display: flex;
    flex-direction: row;
    gap: 1rem; /* 16px */
    align-items: flex-start;
}

/* Hotel image */
.dr-hotel-image {
    flex-shrink: 0;
    width: 180px; /* Slightly wider for better balance */
    height: 120px; /* Adjusted height for better aesthetics */
    overflow: hidden;
    border-radius: 8px;
    background-color: #f1f5f9; /* Fallback background if image fails to load */
    border: 1px solid #e5e7eb; /* Subtle border for better definition */
    display: flex;
    align-items: center;
    justify-content: center;
}

.dr-hotel-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed to 'contain' to preserve aspect ratio without cropping */
    display: block;
    padding: 5px; /* Slight padding to prevent edge clipping */
}

/* Hotel content (text and buttons) */
.dr-hotel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 12px */
}

/* Hotel name */
.dr-hotel-name {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #1a2b49;
    line-height: 1.3;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem; /* 8px */
}

/* Hotel price */
.dr-hotel-price {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
    color: #2d3748; /* Dark slate for prominence */
    line-height: 1.2;
    padding: 0.5rem 0.75rem; /* 8px 12px */
    border-radius: 6px;
    border-left: 4px solid #007bff; /* Blue accent border */
}

/* Hotel address */
.dr-hotel-address {
    margin: 0;
    font-size: 0.95em;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem; /* 6px */
    font-style: italic;
}

.dr-hotel-address::before {
    content: '📍';
    font-size: 1em;
    color: #007bff;
}

/* Hotel rating */
.dr-hotel-rating {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem; /* 10px */
    vertical-align: middle;
}

.dr-hotel-rating .stars {
    display: inline-block;
    font-size: 1.1em;
    line-height: 1;
    background: linear-gradient(
        to right,
        #f1c40f var(--rating-percentage, 0%),
        #e5e7eb var(--rating-percentage, 0%)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dr-hotel-rating a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    line-height: 1;
}

.dr-hotel-rating a:hover,
.dr-hotel-rating a:focus {
    text-decoration: underline;
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Hotel description */
.dr-hotel-description {
    margin: 0;
    font-size: 1em;
    color: #4b5563;
    line-height: 1.6;
    background: #f9fafb;
    padding: 0.625rem; /* 10px */
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

/* Hotel amenities */
.dr-hotel-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* 8px */
    margin-top: 0.5rem; /* 8px */
}

.dr-amenity-button {
    display: inline-block;
    padding: 0.375rem 0.75rem; /* 6px 12px */
    background: #e0f2fe; /* Light blue background for amenities */
    color: #1e40af; /* Darker blue text */
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 15px;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease;
    flex: 0 0 calc(25% - 0.375rem); /* 25% width for 4 per row, accounting for gap */
    box-sizing: border-box;
}

.dr-amenity-button:hover {
    background: #bae6fd; /* Slightly darker blue on hover */
    transform: scale(1.05);
}

/* Custom fields container */
.dr-hotel-custom-fields {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.625rem; /* 10px */
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* 8px */
}

/* Custom field buttons */
.dr-custom-field-button {
    display: inline-block;
    padding: 0.375rem 0.75rem; /* 6px 12px */
    background: #e5e7eb;
    color: #1a2b49;
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 15px;
    text-align: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.dr-custom-field-button:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

/* Check Availability button */
.dr-hotel-button,
.dr-more-link {
    display: inline-block;
    padding: 0.75rem 1.5rem; /* 12px 24px */
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95em;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.dr-hotel-button:hover,
.dr-hotel-button:focus,
.dr-more-link:hover,
.dr-more-link:focus {
    background: linear-gradient(135deg, #0056b3, #003d82);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.dr-hotel-button:focus,
.dr-more-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3);
}

.dr-hotel-button {
    align-self: flex-start;
}

.dr-more-link {
    margin-top: 1.875rem; /* 30px */
}

/* FAQ styling */
.dr-faq {
    margin-top: 2.5rem; /* 40px */
    padding: 1.25rem; /* 20px */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dr-faq h3 {
    color: #007bff;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 0.9375rem; /* 15px */
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem; /* 8px */
}

.dr-faq p {
    line-height: 1.7;
    margin-bottom: 1.25rem; /* 20px */
    background: #f8f9fa;
    padding: 0.9375rem; /* 15px */
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
    font-size: 0.95em;
}

.dr-faq p:last-child {
    margin-bottom: 0;
}

/* Shared styles for city and county cards */
.directorily-card {
    text-align: center;
}

.directorily-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.directorily-card-name {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #1a2b49;
    line-height: 1.3;
}

.directorily-hotel-count {
    margin: 0.5rem 0 0; /* 8px 0 0 */
    font-size: 0.95em;
    color: #6b7280;
    font-weight: 500;
}

/* Cities list shortcode container */
.directorily-cities-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 0; /* 20px 0 */
}

/* Cities row (3 columns) */
.directorily-cities-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; /* 20px */
}

/* Individual city card */
.directorily-city-card {
    /* Inherits styles from .directorily-card */
}

/* Counties list shortcode container */
.directorily-counties-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 0; /* 20px 0 */
}

/* Counties row (3 columns) */
.directorily-counties-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; /* 20px */
}

/* Responsive design */
@media (max-width: 1024px) {
    .directorily-cities-row,
    .directorily-counties-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dr-hotel-card,
    .directorily-card {
        padding: 0.9375rem; /* 15px */
    }
    .dr-amenity-button {
        flex: 0 0 calc(25% - 0.375rem); /* Maintain 4 per row */
    }
}

@media (max-width: 768px) {
    .dr-page {
        padding: 1.25rem 0.625rem; /* 20px 10px */
    }
    .dr-page h1 {
        font-size: 1.8em;
    }
    .dr-hotel-card,
    .directorily-card {
        padding: 0.75rem; /* 12px */
    }
    .dr-hotel-card {
        flex-direction: column; /* Stack image and content on smaller screens */
        align-items: center;
    }
    .dr-hotel-image {
        width: 100%; /* Full width on mobile */
        max-width: 250px; /* Adjusted max width for mobile */
        height: 150px; /* Adjusted height for better mobile display */
        margin-bottom: 0.75rem; /* Space below image */
    }
    .dr-hotel-content {
        width: 100%; /* Ensure content takes full width */
    }
    .dr-hotel-name,
    .directorily-card-name {
        font-size: 1.2em;
    }
    .dr-hotel-address,
    .dr-hotel-description,
    .directorily-hotel-count {
        font-size: 0.9em;
    }
    .dr-hotel-price {
        font-size: 1.2em; /* Slightly smaller on mobile */
        padding: 0.375rem 0.625rem; /* 6px 10px */
        border-radius: 6px;
        border-left: 4px solid #007bff; /* Blue accent border */
    }
    .dr-amenity-button {
        flex: 0 0 calc(50% - 0.25rem); /* 2 per row on mobile */
    }
    .dr-hotel-button {
        width: 100%;
        text-align: center;
    }
    .directorily-cities-row,
    .directorily-counties-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dr-page h1 {
        font-size: 1.5em;
    }
    .dr-hotel-card,
    .directorily-card {
        padding: 0.625rem; /* 10px */
    }
    .dr-hotel-image {
        max-width: 200px; /* Smaller max width on very small screens */
        height: 120px; /* Consistent with desktop height for uniformity */
    }
    .dr-hotel-price {
        font-size: 1.1em; /* Even smaller on very small screens */
        padding: 0.25rem 0.5rem; /* 4px 8px */
        border-radius: 6px;
        border-left: 4px solid #007bff; /* Blue accent border */
    }
    .dr-amenity-button {
        flex: 0 0 calc(50% - 0.25rem); /* Maintain 2 per row */
        font-size: 0.8em; /* Smaller text for very small screens */
        padding: 0.25rem 0.5rem; /* 4px 8px */
    }
    .dr-hotel-button,
    .dr-more-link {
        padding: 0.625rem 1.25rem; /* 10px 20px */
        font-size: 0.9em;
    }
}

/* Search container */
.directorily-search-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 0; /* 20px 0 */
}

/* Search form */
.directorily-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem; /* 10px */
    align-items: center;
    margin-bottom: 1.25rem; /* 20px */
}

/* Search input wrapper */
.directorily-search-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    max-width: 600px;
}

/* Search input */
.directorily-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem; /* 12px 40px 12px 12px */
    font-size: 1em;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Roboto', Arial, sans-serif;
}

.directorily-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* Search button */
.directorily-search-button {
    position: absolute;
    right: 0.625rem; /* 10px */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem; /* 8px */
    cursor: pointer;
    color: #007bff;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.directorily-search-button:hover,
.directorily-search-button:focus {
    color: #0056b3;
}

.directorily-search-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Clear search link */
.directorily-clear-search {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.directorily-clear-search:hover,
.directorily-clear-search:focus {
    color: #0056b3;
    text-decoration: underline;
}

.directorily-clear-search:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Search results */
.directorily-search-results h2 {
    color: #1a2b49;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 1.25rem; /* 20px */
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.625rem; /* 10px */
}

/* Hotel location in search results */
.dr-hotel-location {
    margin: 0;
    font-size: 0.95em;
    color: #6b7280;
    font-style: italic;
}

/* Responsive design for search */
@media (max-width: 768px) {
    .directorily-search-input-wrapper {
        max-width: 100%;
    }
    .directorily-search-input {
        padding: 0.625rem 2.25rem 0.625rem 0.625rem; /* 10px 36px 10px 10px */
        font-size: 0.95em;
    }
    .directorily-search-button {
        right: 0.5rem; /* 8px */
        padding: 0.375rem; /* 6px */
        font-size: 1.1em;
    }
    .directorily-search-results h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .directorily-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    .directorily-clear-search {
        text-align: center;
        margin-top: 0.625rem; /* 10px */
    }
}

/* Autocomplete suggestions */
.directorily-autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 600px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin: 0;
    padding: 0;
    list-style: none;
}

.directorily-autocomplete-suggestion {
    padding: 0.625rem 0.9375rem; /* 10px 15px */
    font-size: 0.95em;
    color: #1a2b49;
    cursor: pointer;
    transition: background 0.2s ease;
}

.directorily-autocomplete-suggestion:hover,
.directorily-autocomplete-suggestion.selected {
    background: #f1f5f9;
}

.directorily-autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.directorily-autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.directorily-autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f5f9;
}

/* Adjust search input wrapper for autocomplete positioning */
.directorily-search-input-wrapper {
    position: relative;
}

/* Responsive design for autocomplete */
@media (max-width: 768px) {
    .directorily-autocomplete-suggestions {
        max-width: 100%;
    }
}