html, body {
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    scroll-behavior: smooth;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgM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after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Home hero styles */
.full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.home-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky; /* keep visible but not full-viewport */
    top: 0;
    z-index: 1030;
}

.home-header > .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1rem; /* slightly taller header */
    padding-bottom: 1rem;
}

.logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #2f6dfb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.site-title {
    font-weight: 800;
    color: #183153;
    font-size: 1.3rem;
}

.site-subtitle {
    color: #2f6dfb;
    font-size: 1rem;
}

.header-brand .d-flex.flex-column { gap: 0; }

.header-banner-img {
    height: 60px; /* Adjust height as needed */
    max-width: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.header-banner-img:hover {
    opacity: 0.9;
}

.home-header .btn.btn-lg {
    padding: 0.55rem 1.05rem;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/images/hero.jpg') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 37, 76, 0.55);
}

.hero-content {
    position: relative;
    color: #fff;
}

.hero-title {
    font-weight: 800;
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    opacity: 0.95;
    max-width: 60ch;
    margin: 0 auto 2rem auto;
}

.hero-cta {
    padding: 0.75rem 1.5rem;
}

.features .card-title {
    font-weight: 700;
}

/* Search & Filters section (full-bleed, light blue background) */
.search-filters-section {
    background: #eff6ff; /* light blue */
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

.filters-title {
    color: #173a64;
    font-weight: 800;
}

.filters-subtitle {
    color: #2b63a3;
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

.filters-search {
    max-width: 720px;
    margin: 1.25rem auto 2.25rem auto;
}

.filters-search input[type="search"] {
    border: 1px solid rgba(23, 58, 100, 0.18);
    border-radius: 10px;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    width: 100%;
    background-color: #ffffff;
}

.filters-search .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #2b63a3;
    pointer-events: none;
}

.filters-group-title {
    font-weight: 700;
    color: #173a64;
}

.filter-chip {
    display: inline-block;
    border: 1px solid #94b5ff;
    color: #1f4fd6;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    margin: 0.35rem 0.4rem 0 0;
    font-weight: 600;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 60ms ease;
}

.filter-chip:hover {
    background: #dbeafe;
    border-color: #6291ff;
    color: #173a64;
}

.filter-chip:active {
    transform: translateY(1px);
}

.filter-chip.selected {
    background: #1f4fd6;
    border-color: #1f4fd6;
    color: #ffffff;
}

.filter-chip.selected:hover {
    background: #173a64;
    border-color: #173a64;
    color: #ffffff;
}

/* Propuestas section */
.propuestas-section-bg {
    background: #ffffff;
}

.propuestas-title {
    color: #173a64;
    font-weight: 800;
}

.propuestas-subtitle {
    color: #2b63a3;
    max-width: 85ch;
    margin-left: auto;
    margin-right: auto;
}

.propuesta-card .propuesta-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 999px;
    background: #e7f0ff;
    color: #1f4fd6;
    font-weight: 700;
}

.propuesta-summary {
    min-height: 64px;
    color: #2f3d53;
}

.propuesta-meta li + li {
    margin-top: 0.25rem;
}

/* Full page propuesta rows */
.propuesta-row {
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 120ms ease;
}
.propuesta-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08) !important;
}

/* Carousel layout */
.propuestas-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.propuestas-track {
    overflow-x: hidden; /* hide scrollbar; arrows control */
    scroll-snap-type: x proximity;
    display: grid;
    grid-auto-flow: column;
    /* Wider default cards but still capped to viewport */
    grid-auto-columns: minmax(320px, min(520px, 92vw));
    gap: 1rem;
    padding: 0.25rem 0.25rem 0.5rem 0.25rem;
    scrollbar-width: none; /* Firefox */
}
.propuestas-track::-webkit-scrollbar { display: none; }

.propuesta-card-outer {
    scroll-snap-align: start;
}

.carousel-arrow {
    border: none;
    background: #2f6dfb;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.carousel-arrow[disabled] { display: none; }

/* Make single card centered and full-width on small screens */
@media (max-width: 576px) {
    .propuestas-track {
        grid-auto-columns: 92vw; /* one nearly full card */
        padding-left: 4vw;
        padding-right: 4vw;
        scroll-padding-left: 4vw;
        scroll-padding-right: 4vw;
    }
    .carousel-arrow { display: none; }
}

/* Do not expand cards beyond a comfortable desktop width; center visible set */
@media (min-width: 992px) {
    .propuestas-track {
        justify-content: start; /* natural grid flow */
        grid-auto-columns: 420px; /* fixed card width on large screens */
    }
}

/* Ensure header and filters have side padding on narrow widths */
.home-header > .container {
    padding-left: clamp(12px, 3vw, 24px);
    padding-right: clamp(12px, 3vw, 24px);
}

.search-filters-section > section.container {
    padding-left: clamp(12px, 3vw, 24px);
    padding-right: clamp(12px, 3vw, 24px);
}

/* Footer styles */
.site-footer {
    background: #252529;
    color: #ffffff;
}

.site-footer .footer-logo {
    max-height: 80px;
    width: auto;
}

.site-footer .footer-contact {
    text-align: center;
}

.site-footer .contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.site-footer .contact-icon-svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    filter: brightness(0) invert(1); /* Makes SVG white */
}

.site-footer .footer-map-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-footer .footer-map-logo {
    max-height: 60px;
    width: auto;
    opacity: 0.7;
}

.site-footer .footer-divider {
    border-color: rgba(255,255,255,0.2);
    margin: 1rem 0 0.5rem 0;
}

.site-footer .footer-version {
    color: #ffffff;
    font-size: 0.7rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.site-footer .footer-copyright {
    color: #ffffff;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .site-footer .contact-item {
        font-size: 0.8rem;
        flex-direction: column;
        text-align: center;
    }
    
    .site-footer .contact-icon-svg {
        margin-right: 0;
        margin-bottom: 4px;
        width: 14px;
        height: 14px;
    }
    
    .site-footer .footer-logo {
        max-height: 60px;
    }
    
    .site-footer .footer-map-logo {
        max-height: 50px;
    }
}

/* Propuesta detail page */
.propuesta-body {
    position: relative;
}

.propuesta-body.collapsed {
    max-height: 33vh; /* about one-third of the viewport height */
    overflow: hidden;
}

.propuesta-body .propuesta-body-content {
    white-space: pre-wrap; /* respect line breaks in mocked long text */
}

.propuesta-fade-out {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
}

.propuesta-comments .comment-row {
    padding: 0.85rem 0.25rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.propuesta-comments .comment-row:first-child {
    border-top: none;
}

.propuesta-comments .comment-row.alt {
    background: #eff6ff; /* light blue alternating rows */
}

.propuesta-comments .comment-text {
    color: #2f3d53;
}

/* Propuesta detail card look & spacing */
.propuesta-detail-card {
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 0.35rem 0.9rem rgba(0,0,0,0.08); /* subtle 3D */
}

.propuesta-detail-card .card-body {
    padding: 1.25rem 1.25rem; /* comfortable inner padding */
}

.propuesta-summary-detail {
    font-weight: 700; /* emphasize summary */
    color: #173a64;
    margin-bottom: 0.75rem;
}

.propuesta-body .propuesta-body-content {
    font-family: Georgia, "Times New Roman", Times, serif; /* nicer reading font */
    line-height: 1.6;
    font-size: 1.03rem;
}

/* Toast notification styles */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: 100%;
}

@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

.toast-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    animation: toast-slide-in 0.3s ease-out;
    transform-origin: bottom right;
}

.toast-item.toast-exito {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 4px solid #047857;
}

.toast-item.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 4px solid #b91c1c;
}

.toast-item.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-left: 4px solid #1d4ed8;
}

.toast-item.toast-advertencia {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-left: 4px solid #b45309;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    color: white;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: toast-progress-exito 5s linear;
}

.toast-item.toast-error .toast-progress {
    animation: toast-progress-error 8s linear;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toast-progress-exito {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

@keyframes toast-progress-error {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Icon alignment styles */
.icon-inline {
    vertical-align: middle;
    display: inline-block;
}

.icon-inline-baseline {
    vertical-align: baseline;
    display: inline-block;
}

/* Specific styles for eye icons */
.eye-icon {
    vertical-align: middle;
    display: inline-block;
    margin-top: -2px; /* Fine adjustment to perfectly center with text */
}