* {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    background-color: transparent;
}

@font-face {
    font-family: 'Annexxus';
    src: url('../fonts/Annexxus-Regular-edited.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
.uk-tooltip {
    background: white;
}

.uk-card-default {
    border-radius: 10px;
}

.uk-alert-primary {
    border-radius: 10px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div {
    font-family: 'Annexxus', sans-serif;
    color: #333;
}

html {
    -webkit-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

body {
    background: #edebe0;
}

body.no-scroll {
    overflow: hidden;
}

.uk-search-large .uk-search-input {
    height: 60px;
    font-size: 1.5rem;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 25px;
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
    background-color: white;
    text-transform: capitalize;
}

.uk-search-input:focus,
.uk-search-input:active {
    border-color: #666;
    background-color: white;
}

input::placeholder {
    font-size: 18px;
    color: #999;
}

.uk-button-secondary {
    padding: 0 15px;
    line-height: 38px;
    font-size: 0.9rem;
    border-radius: 10px;
    background-color: #391515 !important;
    color: #ffffff !important;
}

.uk-button-secondary:disabled,
.uk-button-secondary[disabled],
button#claimButton:disabled {
    background-color: #dcd8cf !important;
    color: #9c978f !important;
    border: 1px solid #c8c3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.75 !important;
}

button#claimButton:not(:disabled) {
    background-color: #391515 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    box-shadow: 0 3px 8px rgba(57, 21, 21, 0.25) !important;
}

.uk-button-default {
    background-color: transparent;
    color: #333;
    border: 2px solid rgb(57, 21, 24);
    padding: 0 20px;
    font-size: 1rem;
    border-radius: 10px;
}

.uk-button-primary {
    font-size: 1rem;
    border-radius: 10px;
}

.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.flex-grid>div {
    flex: 1 1 50%;
    box-sizing: border-box;
}

.flex-grid img {
    width: 100%;
    height: auto;
    display: block;
}

.uk-light {
    color: rgba(255, 255, 255, .9);
}

#image-scroll-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
    pointer-events: auto;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#scrollable-image-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 24px;
    box-sizing: border-box;
    overflow: auto;
}

#scrollable-image {
    max-width: 90vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-select: none;
    animation: zoomInImage 0.2s ease-out;
}

@keyframes zoomInImage {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#close-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #391515;
    border: 2px solid rgba(57, 21, 21, 0.25);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    height: 42px;
    width: 42px;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, background-color 0.15s ease;
    user-select: none;
}

#close-button:hover {
    background-color: #ffffff;
    transform: translateX(-50%) scale(1.1);
}

.gallery-image {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-image:hover {
    opacity: 0.92;
    transform: scale(1.02);
}

.gm-style iframe+div {
    border: none !important;
}

.uk-badge {
    width: 14px;
    height: 14px;
    padding: 0 4px;
    vertical-align: text-top;
    background: #391515;
}

.uk-link,
a {
    color: #391515;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.uk-link-toggle:hover .uk-link, .uk-link:hover, a:hover
 {
    color: #391515;
    text-decoration: none;
}

span#castle-community,
span#castle-province {
    color: #391515;
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: bold;
    display: block;
}

#historical-events-content .uk-icon,
#architecture-section .uk-icon,
#experience-section .uk-icon {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

span#castle-dir {
    color: #391515;
    font-size: 0.85rem;
    line-height: 1.35;
    display: inline-block;
    margin-top: 4px;
}

.audio-guide-prompt {
    width: 100%;
    max-width: 960px;
    margin: 25px auto 10px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.audio-guide-prompt p {
    margin: 0;
    text-align: center;
}

.audio-guide-prompt .chevron-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.audio-guide-prompt .chevron-indicator span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-tab-bar {
    background-color: white;
    padding: 8px 12px;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    box-sizing: border-box;
    z-index: 999;
}

.tab-bar-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #333;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.tab-item a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.tab-item-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.tab-label,
.tab-label a {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.2;
}

.play-button {
    background-color: #f7c299;
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    max-width: 58px;
    max-height: 58px;
    border-radius: 50% !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(57, 21, 21, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    outline: none;
    line-height: 1;
}

.play-button:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.play-button:active {
    transform: scale(0.95);
}

#playIcon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#playIcon svg {
    width: 32px !important;
    height: 32px !important;
}

.uk-icon {
    color: #391515;
}

.uk-h4,
h4 {
    font-size: 1.25rem;
    line-height: 1;
}

.yellowCard {
    margin: 20px 10px;
    border: 2px solid #391515;
    border-radius: 10px;
    padding: 20px;
    background-color: #f7c299;
}

.uk-text-success {
    color: #3c896c !important;
}

.uk-checkbox,
.uk-radio {
    border: 1px solid #343232;
}

.uk-checkbox:disabled,
.uk-radio:disabled {
    border-color: #343232;
    background-color: #f7c299;
}

.result {
    font-weight: bold;
}

.image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.long-answer {
    font-style: italic;
}

.error {
    font-size: 24px;
    color: red;
}

.timer {
    font-size: 20px;
}

.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.uk-progress {
    margin: 5px 0px;
    height: 5px;
}

#historical-events-content .uk-icon,
#architectural-highlights-content .uk-icon,
#nearby-attractions-content .uk-icon,
#coordinates-item .uk-icon,
#city-item .uk-icon,
#phone-item .uk-icon,
#website-item .uk-icon,
#parking-item .uk-icon,
#accessibility-item .uk-icon {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
}

/* ==========================================================================
   Monetization & Premium Paywall Styles
   ========================================================================== */

.premium-badge {
    background: linear-gradient(135deg, #d4af37, #aa7c11) !important;
    color: #2b1111 !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
    font-size: 11px !important;
    line-height: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(57, 21, 21, 0.4);
}

.premium-badge svg {
    width: 11px !important;
    height: 11px !important;
    color: #2b1111 !important;
}

/* Paywall Modal */
#premium-paywall-modal .uk-modal-dialog {
    background-color: #edebe0;
    border: 2px solid #391515;
    border-radius: 16px;
    padding: 16px 14px 12px 14px;
    max-width: 480px;
    max-height: 94vh;
    overflow-y: auto;
    color: #333;
}

.paywall-header {
    text-align: center;
    margin-bottom: 8px;
}

.paywall-header h2 {
    color: #391515;
    font-size: 1.35rem;
    font-weight: bold;
    margin: 4px 0 2px 0;
}

.paywall-header p {
    color: #666;
    font-size: 0.82rem;
    margin: 0;
}

/* Benefit Features List */
.paywall-features {
    background: #f7c299;
    border: 1.5px solid #391515;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 8px 0;
}

.paywall-feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
}

.paywall-feature-item:last-child {
    margin-bottom: 0;
}

.paywall-feature-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #391515;
}

.paywall-feature-icon svg {
    width: 17px !important;
    height: 17px !important;
    stroke: #391515 !important;
    color: #391515 !important;
}

.paywall-feature-text strong {
    color: #391515;
    font-size: 0.88rem;
    display: block;
}

.paywall-feature-text span {
    color: #555;
    font-size: 0.78rem;
    display: block;
    line-height: 1.15;
}

/* Tier Selection Cards */
.paywall-tiers {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
}

.paywall-tier-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 7px 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.paywall-tier-card:hover {
    border-color: #391515;
}

.paywall-tier-card.selected {
    border-color: #391515;
    background: #fffdf5;
    box-shadow: 0 0 0 1px #391515, 0 3px 8px rgba(57, 21, 21, 0.15);
}

.paywall-tier-info {
    flex-grow: 1;
}

.paywall-tier-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #391515;
    display: flex;
    align-items: center;
    gap: 6px;
}

.paywall-tier-desc {
    font-size: 0.75rem;
    color: #666;
    margin-top: 1px;
}

.paywall-tier-price {
    text-align: right;
    flex-shrink: 0;
    margin-left: 8px;
}

.paywall-tier-amount {
    font-size: 1.05rem;
    font-weight: bold;
    color: #391515;
}

.paywall-tier-period {
    font-size: 0.68rem;
    color: #777;
    display: block;
}

.paywall-save-pill {
    background: #3c896c;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
    text-transform: uppercase;
}

/* Paywall CTA Button */
.paywall-cta-btn {
    background: #391515 !important;
    color: #ffffff !important;
    font-weight: bold;
    font-size: 0.98rem;
    border-radius: 10px;
    padding: 10px;
    margin: 8px 0 6px 0;
    width: 100%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(57, 21, 21, 0.3);
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.paywall-cta-btn *,
.paywall-cta-btn span {
    color: #ffffff !important;
}

.paywall-cta-btn:active {
    transform: scale(0.98);
}

/* App Download CTA Button inside Modal */
.app-download-cta-btn {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    color: #391515 !important;
    padding: 14px 20px;
    border-radius: 16px;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(57, 21, 21, 0.14);
    border: 2px solid #391515 !important;
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.app-download-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(57, 21, 21, 0.22);
    background: #fffdf8 !important;
    color: #551d1d !important;
    border-color: #551d1d !important;
    text-decoration: none !important;
}

.app-download-cta-btn:active {
    transform: scale(0.98);
}

.paywall-footer-links {
    margin-top: 8px;
    text-align: center;
    font-size: 0.78rem;
}

.paywall-footer-links a {
    color: #391515;
    font-size: 0.78rem;
    text-decoration: underline;
    margin: 0 5px;
}

.paywall-disclaimer {
    font-size: 0.68rem;
    color: #888;
    line-height: 1.15;
    margin-top: 6px;
    text-align: center;
}

/* Locked Castle Teaser Overlay (for CastlePage.html) */
.castle-locked-overlay {
    position: relative;
    margin-top: 20px;
}

.castle-locked-blur {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    opacity: 0.55;
}

.castle-locked-card {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    background: #edebe0;
    border: 2px solid #391515;
    border-radius: 16px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(57, 21, 21, 0.35);
    z-index: 10;
}

/* Offcanvas Menu Highlighted Premium Item */
.menu-highlight-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 10px !important;
    padding: 12px 10px !important;
    font-weight: bold !important;
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-highlight-card:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.38) !important;
}

.menu-premium-icon {
    margin-bottom: 6px !important;
}

.menu-highlight-card,
.menu-highlight-card *,
.menu-highlight-card span,
.menu-highlight-card .uk-icon {
    color: rgba(255, 255, 255, 0.8) !important;
}

.menu-highlight-card:hover,
.menu-highlight-card:hover *,
.menu-highlight-card:hover span,
.menu-highlight-card:hover .uk-icon {
    color: #ffffff !important;
}

/* Success Modal */
#purchase-success-modal .uk-modal-dialog {
    background-color: #edebe0;
    border: 2px solid #391515;
    border-radius: 18px;
    padding: 26px 20px 22px 20px;
    max-width: 400px;
    width: 90%;
    margin: auto !important;
    text-align: center;
    color: #333;
    box-shadow: 0 14px 38px rgba(57, 21, 21, 0.4);
}

.success-modal-header {
    text-align: center;
    margin-bottom: 6px;
}

.success-modal-logo {
    max-height: 72px;
    margin-bottom: 14px;
}

.success-modal-title {
    color: #391515 !important;
    font-size: 1.7rem;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.success-modal-thanks {
    color: #391515 !important;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.45;
    margin: 0 0 12px 0;
}

#castle-title {
    color: #391515;
    font-size: 1.65rem;
    font-weight: bold;
    line-height: 1.25;
    margin: 6px 0 10px 0;
}

#castle-short {
    font-size: 1.0rem;
    line-height: 1.55;
    color: #444;
}

#castle-long {
    white-space: pre-line;
    display: inline-block;
    font-size: 1.0rem;
    line-height: 1.6;
    color: #333;
}

.castle-location-card {
    padding: 18px 14px;
}

.castle-escudo-wrapper #escudo-image {
    width: 80px;
    height: auto;
    object-fit: contain;
}

/* Collection View Enhancements */
.collection-close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 1000;
    width: 38px;
    height: 38px;
    background-color: #391515 !important;
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(57, 21, 21, 0.35);
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.collection-close-btn:active {
    transform: scale(0.92);
    background-color: #551d1d !important;
}

.collection-close-btn .uk-icon,
.collection-close-btn svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.collection-status-card {
    margin: 0 auto 20px auto;
    max-width: 900px;
    background: #fffdf5;
    border: 2px solid #391515;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(57, 21, 21, 0.1);
    text-align: left;
}

.collection-state-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(57, 21, 21, 0.25);
}

.collection-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.collection-icon-empty {
    background: #fce4d4;
    border: 2px solid #391515;
}

.collection-icon-claimed {
    background: #e2f0d9;
    border: 2px solid #2d662d;
}

.collection-state-text {
    flex: 1;
}

.collection-state-title {
    font-weight: 700;
    color: #391515;
    font-size: 1.05rem;
    line-height: 1.3;
}

.collection-title-claimed {
    color: #1e5a1e;
}

.collection-state-desc {
    font-size: 0.84rem;
    color: #665;
    margin-top: 3px;
    line-height: 1.35;
}

.collection-count-badge {
    background: #391515;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 4px 14px;
    border-radius: 20px;
    flex-shrink: 0;
}

.collection-rank-box {
    background: #f7c299;
    border: 2px solid #391515;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.collection-rank-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.collection-rank-emoji {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.collection-rank-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5a2a2a;
}

.collection-rank-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #391515;
    line-height: 1.25;
}

.collection-rank-pill {
    background: rgba(57, 21, 21, 0.08);
    border: 1px solid rgba(57, 21, 21, 0.22);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #391515;
}

.email-action-btn {
    background-color: #391515 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 22px;
    line-height: 38px;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(57, 21, 21, 0.25);
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.email-action-btn,
.email-action-btn:hover,
.email-action-btn:focus,
.email-action-btn:active,
.email-action-btn *,
.email-action-btn:hover *,
.email-action-btn:focus *,
.email-action-btn:active * {
    color: #ffffff !important;
    stroke: #ffffff !important;
    text-decoration: none !important;
}

.email-action-btn:active {
    transform: scale(0.96);
    background-color: #4a1c1c !important;
}

.app-text-close-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #391515 !important;
    font-size: 1.05rem !important;
    font-weight: bold !important;
    text-decoration: none !important;
    cursor: pointer;
    padding: 8px 18px !important;
    display: inline-block;
    border-radius: 8px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.app-text-close-btn:hover,
.app-text-close-btn:focus,
.app-text-close-btn:active {
    color: #391515 !important;
    background-color: rgba(57, 21, 21, 0.08) !important;
    text-decoration: none !important;
}

.castle-highlight-chip {
    background-color: #f7c299 !important;
    color: #391515 !important;
    border: 1.5px solid #391515 !important;
    border-radius: 18px !important;
    padding: 4px 12px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    display: inline-flex !important;
    align-items: center !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(57, 21, 21, 0.08) !important;
}

/* ==========================================================================
   Desafío Medieval / Quiz UI Enhancements
   ========================================================================== */

.quiz-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 10px 14px 40px 14px;
    box-sizing: border-box;
}

/* Welcome Hero Card */
.quiz-hero-card {
    background: #fffdf5;
    border: 2px solid #391515;
    border-radius: 14px;
    padding: 22px 18px;
    box-shadow: 0 4px 14px rgba(57, 21, 21, 0.08);
    text-align: center;
    margin-bottom: 18px;
}

.quiz-hero-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f7c299;
    border: 2px solid #391515;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    box-shadow: 0 3px 8px rgba(57, 21, 21, 0.15);
}

.quiz-hero-badge .uk-icon {
    color: #391515;
}

.quiz-hero-title {
    color: #391515;
    font-size: 1.45rem;
    font-weight: bold;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.quiz-hero-subtitle {
    color: #5a4638;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 0 12px 0;
}

/* Difficulty Buttons List */
.quiz-difficulty-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
}

.quiz-diff-card {
    background: #fffdf5;
    border: 2px solid #391515;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 3px 10px rgba(57, 21, 21, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    line-height: inherit;
    text-decoration: none !important;
}

.quiz-diff-card:active {
    transform: scale(0.98);
    background-color: #fce4d4;
}

.quiz-diff-card.completed {
    background: #eef7ed;
    border-color: #2d662d;
    cursor: default;
    opacity: 0.95;
    box-shadow: 0 2px 8px rgba(45, 102, 45, 0.12);
}

.quiz-diff-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
    border: 1.5px solid #391515;
    box-shadow: 0 2px 5px rgba(57, 21, 21, 0.1);
}

.quiz-diff-easy {
    background: #e2f0d9;
    color: #1e5a1e;
    border-color: #2d662d;
}

.quiz-diff-normal {
    background: #fce4d4;
    color: #8a3c00;
    border-color: #8a3c00;
}

.quiz-diff-hard {
    background: #f8d7da;
    color: #721c24;
    border-color: #721c24;
}

.quiz-diff-info {
    flex: 1;
    min-width: 0;
}

.quiz-diff-name {
    font-weight: bold;
    font-size: 1.05rem;
    color: #391515;
    line-height: 1.25;
}

.quiz-diff-completed-tag {
    font-size: 0.82rem;
    color: #28a745;
    font-weight: bold;
    margin: 3px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.quiz-diff-desc {
    font-size: 0.8rem;
    color: #665;
    margin-top: 3px;
    line-height: 1.35;
    text-transform: none;
}

.quiz-diff-completed-stats {
    font-size: 0.78rem;
    color: #666;
    margin-top: 2px;
}

.quiz-diff-points-box {
    text-align: right;
    flex-shrink: 0;
    margin-left: 8px;
}

.quiz-diff-points-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: #28a745;
    line-height: 1;
}

.quiz-diff-points-label {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: bold;
    margin-top: 2px;
}

/* In-Quiz Status Bar & Progress */
.quiz-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 0 4px;
}

.quiz-progress {
    height: 8px;
    background: #ded9cd;
    border-radius: 6px;
    margin: 4px 0 16px 0;
    border: 1px solid rgba(57, 21, 21, 0.2);
    overflow: hidden;
}

.quiz-progress::-webkit-progress-bar {
    background: #ded9cd;
    border-radius: 6px;
}

.quiz-progress::-webkit-progress-value {
    background: #391515;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.quiz-progress::-moz-progress-bar {
    background: #391515;
    border-radius: 6px;
}

/* Question Card */
.quiz-card {
    background: #fffdf5;
    border: 2px solid #391515;
    border-radius: 14px;
    padding: 20px 16px;
    box-shadow: 0 4px 14px rgba(57, 21, 21, 0.1);
    margin-bottom: 16px;
    text-align: center;
    box-sizing: border-box;
}

.quiz-question-text {
    color: #391515;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.35;
    margin: 0 0 16px 0;
    text-align: center;
}

.quiz-image-frame {
    margin: 0 auto 16px auto;
    text-align: center;
    width: 100%;
}

.quiz-image-frame .image {
    max-width: 320px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #391515;
    box-shadow: 0 4px 12px rgba(57, 21, 21, 0.2);
    display: inline-block;
    transition: max-width 0.2s ease;
}

/* Option Cards List */
.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.quiz-option-card {
    background: #edebe0;
    border: 2px solid #391515;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 5px rgba(57, 21, 21, 0.05);
}

.quiz-option-card:hover {
    background: #fce4d4;
}

.quiz-option-card:active {
    transform: scale(0.99);
}

.quiz-option-card.selected,
.quiz-option-card:has(input:checked) {
    background: #f7c299;
    box-shadow: 0 3px 8px rgba(57, 21, 21, 0.2);
    border-color: #391515;
}

.quiz-option-card.correct {
    background: #eef7ed !important;
    border-color: #2d662d !important;
}

.quiz-option-card.wrong {
    background: #fdf2e9 !important;
    border-color: #c0392b !important;
}

.quiz-option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #391515;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.quiz-option-card.selected .quiz-option-letter,
.quiz-option-card:has(input:checked) .quiz-option-letter {
    background: #5a1e1e;
}

.quiz-option-card.correct .quiz-option-letter {
    background: #2d662d !important;
}

.quiz-option-card.wrong .quiz-option-letter {
    background: #c0392b !important;
}

.quiz-option-text {
    color: #391515;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.quiz-radio-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

/* Feedback Cards */
.quiz-feedback-correct {
    background: #eef7ed;
    border: 1.5px solid #2d662d;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 16px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(45, 102, 45, 0.12);
}

.quiz-feedback-header-correct {
    font-weight: bold;
    color: #1e5a1e;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-feedback-header-correct .uk-icon svg {
    color: #1e5a1e;
    stroke: #1e5a1e;
}

.quiz-feedback-desc {
    color: #333;
    font-size: 0.88rem;
    line-height: 1.45;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(45, 102, 45, 0.3);
}

.quiz-feedback-wrong {
    background: #fdf2e9;
    border: 1.5px solid #c0392b;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 16px;
    text-align: center;
    font-weight: bold;
    color: #c0392b;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.12);
}

.quiz-feedback-wrong .uk-icon svg {
    color: #c0392b;
    stroke: #c0392b;
}

.quiz-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f7c299;
    border: 1.5px solid #391515;
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 0.88rem;
    font-weight: bold;
    color: #391515;
    margin-top: 12px;
    box-shadow: 0 2px 6px rgba(57, 21, 21, 0.12);
}

.quiz-timer-badge .uk-icon svg {
    color: #391515;
}

/* Quiz Action Buttons */
.quiz-submit-btn {
    background: #391515 !important;
    color: #ffffff !important;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 10px;
    padding: 0 32px;
    height: 44px;
    line-height: 44px;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(57, 21, 21, 0.25);
    transition: transform 0.15s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quiz-submit-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.quiz-submit-btn:disabled,
.quiz-submit-btn[disabled] {
    background-color: #dcd8cf !important;
    color: #9c978f !important;
    border: 1px solid #c8c3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.75 !important;
}

/* Quiz Result Screen */
.quiz-result-hero {
    text-align: center;
    margin-bottom: 12px;
}

.quiz-result-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fffdf5;
    border: 2.5px solid #391515;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    box-shadow: 0 4px 12px rgba(57, 21, 21, 0.15);
}

/* Castles Catalog Styles */
.catalog-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fffdf5;
    border: 2px solid #391515;
    border-radius: 12px;
    padding: 10px 14px;
    margin: 12px 0 16px 0;
    box-shadow: 0 2px 8px rgba(57, 21, 21, 0.08);
}

.catalog-page-btn {
    background: #391515;
    color: #fffdf5 !important;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: bold;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.catalog-page-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.catalog-page-btn:disabled {
    background: #dcd8cf !important;
    color: #9c978f !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.catalog-page-pills {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 12px 0 20px 0;
}

.catalog-pill-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1.5px solid #391515;
    background: #fffdf5;
    color: #391515;
    font-weight: bold;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.catalog-pill-btn.active {
    background: #391515 !important;
    color: #fffdf5 !important;
    border-color: #391515 !important;
    box-shadow: 0 2px 6px rgba(57, 21, 21, 0.25);
}

.catalog-pill-btn:active {
    transform: scale(0.95);
}

/* Castles Map Styles */
#map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 78px);
    height: calc(100dvh - 78px);
    background-color: #edebe0;
    overflow: hidden;
}

#map-container #map {
    width: 100%;
    height: 100%;
    background-color: #edebe0;
    z-index: 1;
}

.map-badge-counter {
    position: absolute;
    top: 12px;
    left: 14px;
    z-index: 500;
    background: #fffdf5;
    border: 2px solid #391515;
    border-radius: 20px;
    padding: 5px 14px;
    font-weight: bold;
    font-size: 0.82rem;
    color: #391515;
    box-shadow: 0 3px 10px rgba(57, 21, 21, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.map-floating-controls {
    position: absolute;
    bottom: max(72px, calc(env(safe-area-inset-bottom, 0px) + 60px));
    right: 16px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Adjust Leaflet zoom controls on mobile */
.leaflet-bottom.leaflet-left {
    bottom: max(64px, calc(env(safe-area-inset-bottom, 0px) + 52px)) !important;
    left: 12px !important;
}

/* Remove Leaflet branding / attribution */
.leaflet-control-attribution {
    display: none !important;
}

.map-fab-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fffdf5;
    border: 2px solid #391515;
    color: #391515;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(57, 21, 21, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.map-fab-btn:active {
    transform: scale(0.92);
    background: #f7c299;
}

/* Medieval Marker Clusters */
.medieval-cluster-wrapper {
    background: transparent !important;
    border: none !important;
}

.medieval-cluster-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #391515;
    border: 2px solid #fffdf5;
    box-shadow: 0 0 0 3px rgba(57, 21, 21, 0.22), 0 4px 10px rgba(57, 21, 21, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.medieval-cluster-badge span {
    color: #ffffff !important;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.medieval-cluster-badge.cluster-medium {
    width: 42px;
    height: 42px;
    font-size: 0.98rem;
    background: #4a1d1d;
    border: 2.5px solid #f7c299;
    box-shadow: 0 0 0 4px rgba(247, 194, 153, 0.28), 0 4px 12px rgba(57, 21, 21, 0.45);
}

.medieval-cluster-badge.cluster-large {
    width: 46px;
    height: 46px;
    font-size: 1.05rem;
    background: #2a0e0e;
    border: 2.5px solid #f7c299;
    box-shadow: 0 0 0 5px rgba(247, 194, 153, 0.35), 0 5px 14px rgba(57, 21, 21, 0.5);
}

.medieval-cluster-badge:hover,
.medieval-cluster-badge:active {
    transform: scale(1.1);
}

/* Medieval Map Pins */
.castle-map-pin {
    background: transparent !important;
    border: none !important;
}

.castle-pin-shape {
    width: 32px;
    height: 40px;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(57, 21, 21, 0.4));
    transition: transform 0.15s ease;
}

.castle-pin-shape:hover,
.castle-pin-shape:active {
    transform: scale(1.22);
}

/* Custom Medieval Popups */
.castle-map-popup .leaflet-popup-content-wrapper {
    background: #fffdf5 !important;
    border: 2px solid #391515 !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(57, 21, 21, 0.25) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.castle-map-popup .leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.35 !important;
    width: 220px !important;
}

.castle-map-popup .leaflet-popup-tip {
    background: #391515 !important;
}

.castle-map-popup a.leaflet-popup-close-button {
    top: 6px !important;
    right: 6px !important;
    color: #391515 !important;
    background: rgba(255, 253, 245, 0.9) !important;
    border: 1px solid #391515 !important;
    border-radius: 50% !important;
    width: 22px !important;
    height: 22px !important;
    line-height: 20px !important;
    font-size: 14px !important;
    text-align: center !important;
    padding: 0 !important;
    z-index: 10 !important;
}

/* User Location GPS Dot with Pulse */
.user-loc-dot-container {
    background: transparent !important;
    border: none !important;
}

.user-gps-pulse-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-gps-pulse-ring {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(25, 118, 210, 0.4);
    animation: userGpsPulse 2s infinite ease-out;
}

.user-gps-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1976d2;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

@keyframes userGpsPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.95;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* ==========================================================================
   Responsive Web Layout Architecture (Max-Width 1600px Container)
   ========================================================================== */

:root {
    --site-max-width: 1600px;
    --content-read-width: 1200px;
}

/* Global 1600px site container */
.site-main-container,
.site-wrapper {
    max-width: var(--site-max-width);
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Home hero slider responsive sizing */
.home-hero-wrapper {
    max-width: 1200px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative;
    box-sizing: border-box;
}

.home-hero-slider {
    max-width: 1200px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    max-height: 480px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 6px 20px rgba(57, 21, 21, 0.12);
}

.home-hero-slider img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

@media (max-width: 640px) {
    .home-hero-slider {
        max-height: 240px;
        border-radius: 0;
    }
    .home-hero-slider img {
        height: 240px;
    }
}

/* Home search & filters responsiveness */
.home-search-wrapper {
    max-width: 680px;
    margin: -32px auto 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.home-actions-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 16px auto 20px auto;
    max-width: 600px;
    padding: 0 14px;
}

.home-actions-wrapper .uk-button {
    min-width: 140px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-actions-wrapper .uk-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 21, 21, 0.2);
}

/* ==========================================================================
   Home Two-Part Section (1/3 Google Play App Card + 2/3 Website Overview)
   ========================================================================== */
.home-intro-section {
    max-width: 1500px;
    margin: 22px auto 26px auto;
    padding: 0 14px;
    box-sizing: border-box;
}

.app-invitation-card {
    background-color: #fffdf5;
    border: 2px solid #391515;
    border-radius: 18px;
    padding: 24px 20px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-shadow: 0 6px 18px rgba(57, 21, 21, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-invitation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(57, 21, 21, 0.16);
}

.app-logo-badge {
    margin-bottom: 12px;
}

.app-logo-img {
    max-height: 85px;
    width: auto;
    border-radius: 18px;
    object-fit: contain;
}

.app-card-title {
    color: #391515;
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.app-card-subtitle {
    color: #551d1d;
    font-size: 0.96rem;
    font-weight: 700;
    margin: 0 0 14px 0;
}

.app-features-box {
    background: rgba(247, 194, 153, 0.22);
    border: 1.5px dashed rgba(57, 21, 21, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    text-align: left;
}

.app-feature-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #391515;
    line-height: 1.35;
}

.app-feature-row:last-child {
    margin-bottom: 0;
}

.app-check-icon {
    color: #391515;
    flex-shrink: 0;
    margin-top: 2px;
}

.app-download-action {
    width: 100%;
}

.app-google-logo-wrapper {
    width: 100%;
    aspect-ratio: 3784 / 850;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0px 0 12px 0;
    box-sizing: border-box;
}

.app-google-logo-wrapper a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.app-google-logo-wrapper img {
    width: 60%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}


.google-play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #391515 !important;
    border: 2px solid #391515;
    border-radius: 12px;
    padding: 12px 18px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(57, 21, 21, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.google-play-button:hover {
    background-color: #fff9f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(57, 21, 21, 0.2);
}

.google-play-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.website-features-card {
    background-color: transparent;
    border: none !important;
    border-radius: 0;
    padding: 12px 18px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: none !important;
}

.website-features-card:hover {
    transform: none;
    box-shadow: none;
}

.features-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.features-header-icon {
    color: #391515;
    flex-shrink: 0;
}

.features-card-title {
    color: #391515;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.25;
}

.features-seo-text {
    color: #4a2828;
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 14px 0 16px 0;
}

.features-seo-text p {
    margin: 0 0 14px 0;
    color: #4a2828;
}

.features-seo-text p:last-child {
    margin-bottom: 0;
}

.features-seo-text strong {
    color: #391515;
}

.features-card-lead {
    color: #553322;
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0 0 18px 0;
}

.features-subgrid {
    margin: 0 -8px 16px -8px;
}

.feature-item-pill {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(57, 21, 21, 0.2);
    border-radius: 12px;
    padding: 14px 14px;
    height: 100%;
    box-sizing: border-box;
}

.feature-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #391515;
}

.feature-item-header h4 {
    color: #391515;
    font-size: 0.98rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.25;
}

.feature-item-pill p {
    color: #4a2828;
    font-size: 0.86rem;
    line-height: 1.4;
    margin: 0;
}

.features-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 14px;
    border-top: 1.5px dashed rgba(57, 21, 21, 0.25);
    margin-top: 10px;
}

.footer-prompt {
    font-size: 0.88rem;
    color: #553322;
    font-weight: 600;
}

.footer-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-actions-group .uk-button {
    border-radius: 20px;
    font-size: 0.84rem;
    padding: 0 16px;
    line-height: 30px;
    height: 30px;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.footer-actions-group .uk-button:hover {
    background-color: #391515 !important;
    color: #ffffff !important;
}

/* Home Action Cards Container */
.home-cards-grid {
    max-width: 1500px;
    margin: 10px auto 30px auto !important;
    padding: 0 10px;
}

.home-cards-grid .home-card-item {
    transition: transform 0.2s ease;
}

.home-cards-grid .home-card-item:hover {
    transform: translateY(-4px);
}

/* Responsive Catalog Grid */
#catalog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    #catalog-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (min-width: 1024px) {
    #catalog-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1400px) {
    #catalog-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 26px;
    }
}

#catalog-list .castle-card {
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#catalog-list .castle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(57, 21, 21, 0.18) !important;
}

/* Responsive Best Castles Grid */
#best-castles-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

@media (min-width: 640px) {
    #best-castles-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    #best-castles-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 26px;
    }
}

#best-castles-list .castle-card {
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#best-castles-list .castle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(57, 21, 21, 0.18) !important;
}

/* Responsive Castle View Layout */
.castle-page-container {
    max-width: 960px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-bottom: 20px;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    background-color: #edebe0;
}

.castle-page-container #castle-image {
    border-radius: 0 0 16px 16px;
    max-height: 520px;
    object-fit: cover;
}

@media (max-width: 640px) {
    .castle-page-container #castle-image {
        border-radius: 0;
        max-height: none;
    }
}

.castle-page-tab-dock {
    position: sticky !important;
    bottom: 0;
    width: 100%;
    max-width: 960px;
    margin: 0 auto !important;
    left: 0;
    right: 0;
    z-index: 999;
    border: 3px solid rgba(57, 21, 21, 0.9);
    background-color: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(57, 21, 21, 0.15);
}

/* Responsive Collection Grid */
@media (min-width: 640px) {
    #collection-grid .uk-inline {
        padding: 8px !important;
    }
}

/* Search Results and Accordions max-width */
.site-accordion-wrapper {
    max-width: 1100px;
    margin: 20px auto !important;
}

/* ==========================================================================
   Responsive Typography Scaling (Preserves phone viewport, scales on larger screens)
   ========================================================================== */

@media (min-width: 640px) {
    /* Castle Page Location Card & Crest */
    .castle-location-card {
        padding: 24px 28px !important;
        margin: 24px auto !important;
    }
    .castle-escudo-wrapper #escudo-image {
        width: 110px !important;
        max-width: 110px !important;
    }
    .castle-location-info {
        padding-left: 28px !important;
    }
    span#castle-community,
    span#castle-province {
        font-size: 1.7rem;
        line-height: 1.3;
    }
    span#castle-dir {
        font-size: 1.05rem;
        line-height: 1.45;
        margin-top: 6px;
    }

    /* Castle Page Titles & Content */
    #castle-title {
        font-size: 2.15rem;
        line-height: 1.25;
        margin: 12px 0 14px 0;
    }
    #castle-short {
        font-size: 1.15rem;
        line-height: 1.6;
    }
    #castle-long {
        font-size: 1.12rem;
        line-height: 1.7;
    }
    .yellowCard h3 {
        font-size: 1.55rem;
        margin-bottom: 14px;
    }
    .yellowCard {
        font-size: 1.06rem;
        padding: 24px 28px;
    }
    #period-style-info {
        font-size: 1.1rem;
    }
    #period-style-info .uk-text-bold {
        font-size: 1.15rem;
    }
    #directions {
        font-size: 1.02rem;
        line-height: 42px;
        padding: 0 22px;
        border-radius: 12px;
    }
    .custom-tab-bar .tab-label {
        font-size: 16px;
    }

    /* Home Page Controls & Card Labels */
    .uk-search-large .uk-search-input {
        height: 64px;
        font-size: 1.65rem;
    }
    .home-actions-wrapper .uk-button-secondary {
        font-size: 1.04rem;
        line-height: 44px;
        padding: 0 22px;
    }
    .home-cards-grid .home-card-item .uk-overlay p {
        font-size: 19px !important;
    }

    /* Catalog & Best Castles Cards */
    .castle-card .uk-card-title {
        font-size: 1.28rem !important;
        line-height: 1.3 !important;
    }
    .castle-card p {
        font-size: 0.96rem !important;
    }
    .castle-card .uk-text-small {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    .castle-card button.uk-button-small {
        font-size: 0.96rem !important;
        line-height: 38px !important;
    }

    /* Catalog Page Header */
    .catalog-page-header h1,
    h1[data-i18n="castles_catalog_title"],
    h1[data-i18n="best_castles_title"] {
        font-size: 1.8rem !important;
    }
    #catalog-header-sub,
    p[data-i18n="best_castles_subtitle"] {
        font-size: 1.02rem !important;
    }

    /* Collection Page */
    .collection-page-title,
    h2[data-i18n="collection_modal_title"] {
        font-size: 1.95rem !important;
    }
    p[data-i18n="collection_modal_promo"] {
        font-size: 1.12rem !important;
    }

    /* Paywall / App Download Modal */
    #premium-paywall-modal [data-i18n="official_app_name"] {
        font-size: 1.28rem !important;
    }
    #premium-paywall-modal #paywall-title-text {
        font-size: 1.7rem !important;
    }
    #premium-paywall-modal .paywall-feature-text strong {
        font-size: 1.04rem !important;
    }
    #premium-paywall-modal .paywall-feature-text span {
        font-size: 0.94rem !important;
    }
    #premium-paywall-modal #paywall-promo-text {
        font-size: 1.04rem !important;
    }

    /* Quiz Image Scaling for Bigger Screens */
    .quiz-container {
        max-width: 720px;
    }
    .quiz-image-frame .image {
        max-width: 600px;
        width: 100%;
        height: auto;
        border-radius: 14px;
    }
}

@media (min-width: 960px) {
    /* Castle Page Location Card & Crest */
    .castle-location-card {
        padding: 30px 38px !important;
        margin: 28px auto !important;
    }
    .castle-escudo-wrapper #escudo-image {
        width: 140px !important;
        max-width: 140px !important;
    }
    .castle-location-info {
        padding-left: 34px !important;
    }
    span#castle-community,
    span#castle-province {
        font-size: 2.15rem;
        line-height: 1.32;
    }
    span#castle-dir {
        font-size: 1.25rem;
        line-height: 1.5;
        margin-top: 8px;
    }

    /* Castle Page Titles & Content */
    #castle-title {
        font-size: 2.65rem;
        line-height: 1.25;
        margin: 16px 0 16px 0;
    }
    #castle-short {
        font-size: 1.28rem;
        line-height: 1.65;
    }
    #castle-long {
        font-size: 1.22rem;
        line-height: 1.75;
    }
    .yellowCard h3 {
        font-size: 1.8rem;
        margin-bottom: 18px;
    }
    .yellowCard {
        font-size: 1.14rem;
        padding: 28px 36px;
    }
    #period-style-info {
        font-size: 1.18rem;
    }
    #period-style-info .uk-text-bold {
        font-size: 1.24rem;
    }
    #directions {
        font-size: 1.12rem;
        line-height: 46px;
        padding: 0 26px;
        border-radius: 14px;
    }
    .custom-tab-bar .tab-label {
        font-size: 17px;
    }

    /* Home Page Controls & Card Labels */
    .uk-search-large .uk-search-input {
        height: 70px;
        font-size: 1.8rem;
    }
    .home-actions-wrapper .uk-button-secondary {
        font-size: 1.14rem;
        line-height: 48px;
        padding: 0 26px;
        border-radius: 12px;
    }
    .home-cards-grid .home-card-item .uk-overlay p {
        font-size: 22px !important;
    }

    /* Catalog & Best Castles Cards */
    .castle-card .uk-card-title {
        font-size: 1.38rem !important;
        line-height: 1.3 !important;
    }
    .castle-card p {
        font-size: 1.02rem !important;
    }
    .castle-card .uk-text-small {
        font-size: 1.0rem !important;
        line-height: 1.55 !important;
    }
    .castle-card button.uk-button-small {
        font-size: 1.02rem !important;
        line-height: 42px !important;
    }

    /* Catalog Page Header */
    .catalog-page-header h1,
    h1[data-i18n="castles_catalog_title"],
    h1[data-i18n="best_castles_title"] {
        font-size: 2.15rem !important;
    }
    #catalog-header-sub,
    p[data-i18n="best_castles_subtitle"] {
        font-size: 1.15rem !important;
    }

    /* Collection Page */
    .collection-page-title,
    h2[data-i18n="collection_modal_title"] {
        font-size: 2.3rem !important;
    }
    p[data-i18n="collection_modal_promo"] {
        font-size: 1.22rem !important;
    }

    /* Paywall / App Download Modal */
    #premium-paywall-modal [data-i18n="official_app_name"] {
        font-size: 1.38rem !important;
    }
    #premium-paywall-modal #paywall-title-text {
        font-size: 1.85rem !important;
    }
    #premium-paywall-modal .paywall-feature-text strong {
        font-size: 1.12rem !important;
    }
    #premium-paywall-modal .paywall-feature-text span {
        font-size: 1.0rem !important;
    }
    #premium-paywall-modal #paywall-promo-text {
        font-size: 1.1rem !important;
    }

    /* Website Features Card Responsive */
    .features-card-title {
        font-size: 1.6rem !important;
    }
    .features-seo-text {
        font-size: 1.05rem !important;
        line-height: 1.72 !important;
    }

    /* Quiz Desktop Sizing */
    .quiz-container {
        max-width: 780px;
    }
}

@media (min-width: 1280px) {
    /* Large Desktop Enhancements */
    .quiz-container {
        max-width: 820px;
    }
    .features-seo-text {
        font-size: 1.1rem !important;
        line-height: 1.76 !important;
    }
    .home-cards-grid .home-card-item .uk-overlay p {
        font-size: 24px !important;
    }
    .castle-location-card {
        padding: 34px 44px !important;
    }
    .castle-escudo-wrapper #escudo-image {
        width: 155px !important;
        max-width: 155px !important;
    }
    span#castle-community,
    span#castle-province {
        font-size: 2.35rem;
    }
    span#castle-dir {
        font-size: 1.32rem;
    }
    #castle-title {
        font-size: 2.85rem;
    }
}
