/* ============================================
   FeastHost Custom Homepage Styles
   Light + Dark Mode
   ============================================ */

/* --- Minecraft Hero Banner --- */
.fh-mc-banner {
    position: relative;
    overflow: hidden;
    background: url('/templates/lagom2/assets/img/mc-banner.png') center center / cover no-repeat !important;
}
.fh-mc-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}
.fh-mc-banner .banner-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.fh-mc-banner .banner-title {
    color: #fff !important;
}
.fh-mc-banner .banner-subtitle {
    color: rgba(255,255,255,0.9) !important;
}
.fh-mc-banner .btn-primary-outline {
    color: #fff !important;
    border-color: rgba(255,255,255,0.5) !important;
}
.fh-mc-banner .btn-primary-outline:hover {
    background: rgba(255,255,255,0.15) !important;
    border-color: #fff !important;
}
.fh-mc-bg {
    overflow: hidden;
}

/* Floating Minecraft items */
.fh-float {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.12;
    color: #5bf;
    fill: currentColor;
    image-rendering: pixelated;
}
/* Sword - large, right side */
.fh-float-1 {
    width: 80px; height: 80px;
    right: 8%; top: 18%;
    color: #7dd3fc;
    animation: fhFloat1 8s ease-in-out infinite;
}
/* Diamond - medium, left-center */
.fh-float-2 {
    width: 50px; height: 50px;
    left: 8%; top: 22%;
    color: #67e8f9;
    opacity: 0.15;
    animation: fhFloat2 10s ease-in-out infinite;
}
/* Pickaxe - medium, right-center */
.fh-float-3 {
    width: 60px; height: 60px;
    right: 28%; top: 14%;
    color: #a78bfa;
    opacity: 0.1;
    animation: fhFloat3 12s ease-in-out infinite;
}
/* Heart - small, left */
.fh-float-4 {
    width: 36px; height: 36px;
    left: 22%; top: 12%;
    color: #f87171;
    opacity: 0.14;
    animation: fhFloat4 9s ease-in-out infinite;
}
/* Block - medium, right-bottom area */
.fh-float-5 {
    width: 40px; height: 40px;
    right: 16%; top: 35%;
    color: #86efac;
    opacity: 0.08;
    animation: fhFloat5 11s ease-in-out infinite;
}
/* Creeper - small, left-bottom */
.fh-float-6 {
    width: 32px; height: 32px;
    left: 14%; top: 40%;
    color: #4ade80;
    opacity: 0.1;
    animation: fhFloat6 7s ease-in-out infinite;
}

@keyframes fhFloat1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-14px) rotate(4deg); }
    75% { transform: translateY(-20px) rotate(-2deg); }
}
@keyframes fhFloat2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-6deg); }
}
@keyframes fhFloat3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(10px, -12px); }
    66% { transform: translate(-6px, -16px); }
}
@keyframes fhFloat4 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-16px) scale(1.15); }
}
@keyframes fhFloat5 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes fhFloat6 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(6px, -12px); }
}

@media (max-width: 991px) {
    .fh-float-3, .fh-float-5, .fh-float-6 { display: none; }
    .fh-float-1 { width: 60px; height: 60px; }
    .fh-float-2 { width: 40px; height: 40px; }
}
@media (max-width: 575px) {
    .fh-float { display: none; }
}

/* --- Supported Games Grid --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}
.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    border-radius: var(--border-radius-lg, 12px);
    background: var(--gray-faded, #f8f9fa);
    border: 1px solid var(--gray-lighter-4, #e9ecef);
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--gray-base, inherit);
    cursor: pointer;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--brand-primary, #4e73df);
    text-decoration: none;
    color: var(--gray-darker, inherit);
}
.game-card .game-icon {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--brand-primary, #4e73df);
}
.game-card .game-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}
.game-card.game-card-featured {
    border-color: var(--brand-primary, #4e73df);
}
.game-card.game-card-featured .game-icon {
    color: var(--brand-primary, #4e73df);
}

/* --- How it Works / Steps --- */
.steps-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.step-item {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    text-align: center;
    padding: 30px 20px;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-primary, #4e73df);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
}
.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--gray-darker, #333);
}
.step-desc {
    font-size: 14px;
    color: var(--gray-lighter, #666);
    line-height: 1.6;
}

/* --- Additional Products Grid --- */
.extra-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.extra-product-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    border-radius: var(--border-radius-lg, 12px);
    background: var(--gray-faded, #f8f9fa);
    border: 1px solid var(--gray-lighter-4, #e9ecef);
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--gray-base, inherit);
}
.extra-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--gray-base, inherit);
}
.extra-product-card .ep-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.extra-product-card .ep-icon svg {
    width: 48px;
    height: 48px;
}
.extra-product-card .ep-content {
    flex: 1;
}
.extra-product-card .ep-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gray-darker, #333);
}
.extra-product-card .ep-desc {
    font-size: 13px;
    color: var(--gray-lighter, #666);
    line-height: 1.5;
    margin-bottom: 8px;
}
.extra-product-card .ep-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-primary, #4e73df);
}

/* --- FAQ Section --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid var(--gray-lighter-4, #e9ecef);
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    user-select: none;
    gap: 16px;
    color: var(--gray-base, #333);
}
.faq-question:hover {
    color: var(--brand-primary, #4e73df);
}
.faq-question .faq-toggle {
    flex-shrink: 0;
    font-size: 20px;
    transition: transform 0.25s ease;
    opacity: 0.5;
}
.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}
.faq-answer {
    display: none;
    padding: 0 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-lighter, #666);
}
.faq-item.active .faq-answer {
    display: block;
}

/* --- Stats Bar --- */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--brand-primary, #4e73df);
    line-height: 1.2;
}
.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-lighter-2, #999);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .game-card {
        padding: 16px 10px;
    }
    .game-card .game-icon {
        font-size: 28px;
    }
    .game-card .game-name {
        font-size: 11px;
    }
    .stats-bar {
        gap: 24px;
    }
    .stat-number {
        font-size: 24px;
    }
    .steps-row {
        gap: 10px;
    }
    .extra-products-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DARK MODE OVERRIDES (.lagom-dark-mode)
   ============================================ */

/* --- Navigation: no layout overrides, theme handles it --- */

/* --- Game Cards dark mode --- */
html.lagom-dark-mode .game-card,
html.lagom-dark-mode .games-grid .game-card {
    background: linear-gradient(180deg, rgba(75, 120, 210, 0.16) 0%, rgba(41, 82, 163, 0.16) 100%) !important;
    border-color: rgba(178, 204, 255, 0.12) !important;
    color: #D9D9D9 !important;
}
.lagom-dark-mode .game-card:hover {
    background: linear-gradient(180deg, rgba(75, 120, 210, 0.28) 0%, rgba(41, 82, 163, 0.28) 100%) !important;
    border-color: var(--brand-primary, #1062fe) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    color: var(--gray-darker) !important;
}
.lagom-dark-mode .game-card .game-icon {
    color: var(--brand-primary-lighter, #009AFF) !important;
}
.lagom-dark-mode .game-card.game-card-featured {
    border-color: var(--brand-primary, #1062fe) !important;
    background: linear-gradient(180deg, rgba(16, 98, 254, 0.2) 0%, rgba(0, 60, 178, 0.2) 100%) !important;
}

/* --- Extra Product Cards dark mode --- */
html.lagom-dark-mode .extra-product-card,
html.lagom-dark-mode .extra-products-grid .extra-product-card {
    background: linear-gradient(180deg, rgba(75, 120, 210, 0.16) 0%, rgba(41, 82, 163, 0.16) 100%) !important;
    border-color: rgba(178, 204, 255, 0.12) !important;
    color: #D9D9D9 !important;
}
.lagom-dark-mode .extra-product-card:hover {
    background: linear-gradient(180deg, rgba(75, 120, 210, 0.28) 0%, rgba(41, 82, 163, 0.28) 100%) !important;
    border-color: rgba(178, 204, 255, 0.2) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
    color: var(--gray-base) !important;
}
.lagom-dark-mode .extra-product-card .ep-title {
    color: var(--gray-darker, #fff) !important;
}
.lagom-dark-mode .extra-product-card .ep-desc {
    color: var(--gray-lighter) !important;
}
.lagom-dark-mode .extra-product-card .ep-link {
    color: var(--brand-primary-lighter, #009AFF) !important;
}

/* --- Steps dark mode --- */
.lagom-dark-mode .step-number {
    box-shadow: 0 4px 16px rgba(16, 98, 254, 0.4);
}
.lagom-dark-mode .step-title {
    color: var(--gray-darker, #fff);
}
.lagom-dark-mode .step-desc {
    color: var(--gray-lighter);
}

/* --- FAQ dark mode --- */
.lagom-dark-mode .faq-item {
    border-color: rgba(178, 204, 255, 0.12);
}
.lagom-dark-mode .faq-question {
    color: var(--gray-base);
}
.lagom-dark-mode .faq-question:hover {
    color: var(--brand-primary-lighter, #009AFF);
}
.lagom-dark-mode .faq-answer {
    color: var(--gray-lighter);
}

/* --- Stats dark mode --- */
.lagom-dark-mode .stat-number {
    color: var(--brand-primary-lighter, #009AFF);
}
.lagom-dark-mode .stat-label {
    color: var(--gray-lighter-2);
}

/* --- Footer Legal Links --- */
.footer-legal-links {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}
.footer-legal-links a {
    color: var(--gray-lighter-2, #999);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-legal-links a:hover {
    color: var(--brand-primary, #4e73df);
    text-decoration: underline;
}
.footer-legal-sep {
    margin: 0 8px;
    color: var(--gray-lighter-3, #ccc);
}

/* --- Legal Page Content --- */
.legal-page-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray-base, #333);
}
.legal-page-content h2,
.legal-page-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

/* --- Checkout Legal Checkboxes --- */
.fh-legal-checkbox {
    margin-bottom: 8px;
}
.fh-legal-checkbox label {
    font-size: 13px;
    line-height: 1.5;
}
.fh-legal-checkbox a {
    font-weight: 600;
    text-decoration: underline;
}

/* --- Server Location Map Section --- */
.fh-server-map-card {
    border-radius: var(--border-radius-lg, 12px);
    background: var(--gray-faded, #f8f9fa);
    border: 1px solid var(--gray-lighter-4, #e9ecef);
    overflow: hidden;
}
.fh-map-wrapper {
    position: relative;
}
#fh-server-map {
    width: 100%;
    height: 380px;
    border-radius: var(--border-radius-lg, 12px) var(--border-radius-lg, 12px) 0 0;
    z-index: 1;
}
/* Leaflet pulsing marker */
.fh-leaflet-pulse {
    background: none !important;
    border: none !important;
}
.fh-pulse-dot {
    width: 14px; height: 14px;
    background: #1062fe;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16,98,254,0.6);
    position: absolute;
    top: 0; left: 0;
}
.fh-pulse-ring {
    position: absolute;
    top: -10px; left: -10px;
    width: 34px; height: 34px;
    border: 2px solid rgba(16,98,254,0.5);
    border-radius: 50%;
    animation: fhPulse 2s ease-out infinite;
}
@keyframes fhPulse {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}
@media (max-width: 575px) {
    #fh-server-map { height: 250px; }
}

.fh-server-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--gray-lighter-4, #e9ecef);
}
.fh-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-right: 1px solid var(--gray-lighter-4, #e9ecef);
}
.fh-info-card:last-child {
    border-right: none;
}
.fh-info-icon {
    flex-shrink: 0;
    color: var(--brand-primary, #1062fe);
    opacity: 0.7;
}
.fh-info-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-darker, #222);
    line-height: 1.2;
}
.fh-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-lighter-2, #999);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fh-ping-good { color: #22c55e !important; }
.fh-ping-ok { color: #f59e0b !important; }
.fh-ping-high { color: #ef4444 !important; }

@media (max-width: 991px) {
    .fh-server-info {
        grid-template-columns: repeat(2, 1fr);
    }
    .fh-info-card:nth-child(2) {
        border-right: none;
    }
    .fh-info-card:nth-child(1),
    .fh-info-card:nth-child(2) {
        border-bottom: 1px solid var(--gray-lighter-4, #e9ecef);
    }
}
@media (max-width: 575px) {
    .fh-server-info {
        grid-template-columns: 1fr;
    }
    .fh-info-card {
        border-right: none;
        border-bottom: 1px solid var(--gray-lighter-4, #e9ecef);
        padding: 14px 20px;
    }
    .fh-info-card:last-child {
        border-bottom: none;
    }
}

/* --- Server Map dark mode --- */
.lagom-dark-mode .fh-server-map-card {
    background: linear-gradient(180deg, rgba(10, 25, 60, 0.6) 0%, rgba(5, 15, 40, 0.8) 100%) !important;
    border-color: rgba(178, 204, 255, 0.12) !important;
}
/* Leaflet map inherits dark tiles via JS */
.lagom-dark-mode .fh-server-info {
    border-color: rgba(178, 204, 255, 0.1);
}
.lagom-dark-mode .fh-info-card {
    border-color: rgba(178, 204, 255, 0.1);
}
.lagom-dark-mode .fh-info-value {
    color: #fff;
}
.lagom-dark-mode .fh-info-label {
    color: rgba(255, 255, 255, 0.5);
}
.lagom-dark-mode .fh-info-icon {
    color: var(--brand-primary-lighter, #009AFF);
}

/* --- Footer Legal dark mode --- */
.lagom-dark-mode .footer-legal-links a {
    color: var(--gray-lighter-2, #aaa);
}
.lagom-dark-mode .footer-legal-links a:hover {
    color: var(--brand-primary-lighter, #009AFF);
}
.lagom-dark-mode .footer-legal-sep {
    color: rgba(178, 204, 255, 0.2);
}
