/* Core Reset & Global Layout */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --brand-blue: #091F54;
    --brand-accent: #4163ff;
    --sport-volt: #d4ff13;
    --sport-red: #ff1e27;
    --sport-cyan: #8da1ff;
    --bg-badge: #d6e0ff;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    width: 100%;
}

/* Header Component */
.app-header {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    width: 105px;
    height: auto;
}

/* Header Contact Banner */
.app-header-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--brand-blue);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    width: 100%;
}

@media (max-width: 615px) {

    .app-header-contact,
    .profile-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        align-items: center;
        padding: 10px 10px;
    }

    .social-actions {
        align-items: center;
    }
}

.social-actions {
    align-items: flex-end;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-img {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
}

.contact-name {
    margin: 0;
    line-height: 1.3;
    text-decoration: none;

}

.contact-name a {
    text-decoration: none;
    color: white;
    font-weight: 600;
}

.contact-name span {
    opacity: 0.8;
    font-size: 0.9rem;
}

.social-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.social-link {
    width: 30px;
    height: 30px;
    background-color: #47577f;
    padding: 5px;
    border-radius: 5px;
    color: #ffffff;
    display: inline-block;
    transition: transform 0.2s ease;
}

.social-link:hover {
    transform: scale(1.1);
}

/* Main Grid Layout Container */
.container {
    padding: 1rem 1.5rem 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Anchor Wrap Reset */
.card-link,
.card-link:visited,
.card-link:hover,
.card-link:active {
    text-decoration: none;
    color: inherit;
    outline: none;
}

/* Polished Item Cards */
.card {
    background: var(--bg-card);
    border: 2px solid #edf5ff;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-link:hover .card {
    transform: translateY(-4px);
    border-color: var(--sport-cyan);
    box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.25);
}

/* Image Wrapper */
.image-container {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
    overflow: hidden;
    isolation: isolate;
}

/* Shading Overlay Gradient layer */
.image-container::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.card-link:hover .image-container::after {
    opacity: 1;
}

/* Inner Background Image Layer */
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card-link:hover .image-container img {
    transform: scale(1.05);
}

/* Content Text Overlays */
.content {
    padding: 1.5rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.category {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sport-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.title {
    margin: 0.25rem 0 0 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.location {
    margin: 0.15rem 0 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Details Section Layout */
.details-container {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaving-date {
    color: var(--brand-blue);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.stay-details {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-blue);
}

.stay-badge {
    font-size: 0.875rem;
    font-weight: 600;
}

.stay-divider {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Compass Badging */
.visit-type {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background-color: var(--bg-badge);
    color: var(--brand-blue);
    width: fit-content;
    margin-top: 2px;
}

.visit-text {
    font-weight: 600;
    font-size: 0.75rem;
}

/* Visual Separation Line */
.card-divider {
    height: 1px;
    margin: 0.5rem 0;
    background-color: #e2e8f0;
}

/* Footer & Dynamic Pricing Layout */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-container {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.price-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 2px 0;
}

.amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.currency {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.tax-info,
.occupancy-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Action CTA Element */
.action-btn-wrapper {
    display: flex;
    align-items: flex-end;
}

.action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--brand-accent);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.card-link:hover .action-btn {
    transform: translateX(3px);
    background-color: var(--brand-blue);
}

footer div span p {
    color: #b6b6b6;
    font-size: 12px;
    font-weight: 500;
}

footer div span p {
    color: #cccccc;
    font-size: 12px;
    font-weight: 500;
}

footer div a {
    color: #ececec;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

footer {
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
}

footer div {
    background-color: #1b2d71;
}

@media (min-width: 1199px) {
    footer div {
        border-radius: 10px 10px 0px 0px;
    }
}

.error-fallback-message {
    background-color: rgb(165, 193, 226);
    border-radius: 8px;
    padding: 10px;
}