File size: 11,383 Bytes
474dc40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
beb7e3a
 
 
 
 
 
 
474dc40
 
 
 
 
 
 
 
 
 
 
beb7e3a
 
474dc40
 
beb7e3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474dc40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
beb7e3a
 
 
 
 
 
 
 
 
 
 
 
474dc40
 
 
beb7e3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474dc40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
// Shared JavaScript across all pages
console.log('BlockCrafters Haven - Minecraft Hosting App loaded');

// Pricing plans data
const pricingPlans = [
    {
        name: "ATOM",
        image: "https://hosting-minecraft.eu/images/game-play/1.png",
        monthly: "1.60 EUR",
        monthlyDiscounted: "1.52 EUR",
        quarterly: "1.36 EUR",
        yearly: "1.28 EUR",
        biennial: "1.12 EUR",
        features: [
            "No player limit",
            "CPU: 2 x 4300 MHz",
            "RAM: 2 GB DDR4 2666MHz",
            "Disk: 40 GB NVMe SSD",
            "Free MySQL DB: 5 included",
            "Free Backups: 3 included",
            "Port Allocations: 10 included",
            "ANY CORE AND VERSION",
            "104,000 MODPACKS AND PLUGINS IN THE PANEL",
            "Free domains for the server"
        ],
        orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/minecraft/atom&language=english"
    },
    {
        name: "NANO",
        image: "https://hosting-minecraft.eu/images/game-play/2.png",
        monthly: "2.60 EUR",
        monthlyDiscounted: "2.47 EUR",
        quarterly: "2.21 EUR",
        yearly: "2.08 EUR",
        biennial: "1.82 EUR",
        features: [
            "No player limit",
            "CPU: 2 x 4300 MHz",
            "RAM: 3 GB DDR4 2666MHz",
            "Disk: 50 GB NVMe SSD",
            "Free MySQL DB: 5 included",
            "Free Backups: 3 included",
            "Port Allocations: 10 included",
            "ANY CORE AND VERSION",
            "104,000 MODPACKS AND PLUGINS IN THE PANEL",
            "Free domains for the server"
        ],
        orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/minecraft/nano&language=english"
    },
    {
        name: "STEEL",
        image: "https://hosting-minecraft.eu/images/game-play/5.png",
        monthly: "3.80 EUR",
        monthlyDiscounted: "3.61 EUR",
        quarterly: "3.23 EUR",
        yearly: "3.04 EUR",
        biennial: "2.66 EUR",
        category: "PERFORMANCE",
        features: [
            "No player limit",
            "CPU: 2 x 5700 MHz ⚡",
            "RAM: 3 GB DDR5 3600MHz",
            "Disk: 30 GB NVMe SSD",
            "Free MySQL DB: 5 included",
            "Free Backups: 3 included",
            "Port Allocations: 10 included",
            "ANY CORE AND VERSION",
            "104,000 MODPACKS AND PLUGINS IN THE PANEL",
            "Free domains for the server"
        ],
        orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/hosting-minecraft-performance/steel&language=english"
    },
    {
        name: "MICRO",
        image: "https://hosting-minecraft.eu/images/game-play/3.png",
        monthly: "3.80 EUR",
        monthlyDiscounted: "3.61 EUR",
        quarterly: "3.23 EUR",
        yearly: "3.04 EUR",
        biennial: "2.66 EUR",
        category: "Featured",
        features: [
            "No player limit",
            "CPU: 2 x 4300 MHz",
            "RAM: 4 GB DDR4 2666MHz",
            "Disk: 60 GB NVMe SSD",
            "Free MySQL DB: 5 included",
            "Free Backups: 3 included",
            "Port Allocations: 10 included",
            "ANY CORE AND VERSION",
            "104,000 MODPACKS AND PLUGINS IN THE PANEL",
            "Free domains for the server"
        ],
        orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/minecraft/micro&language=english"
    }
];

// FAQ data
const faqData = [
    {
        question: "Can I install mods/modpacks?",
        answer: "Yes. You can upload ABSOLUTELY ANY modpacks and mods to your server, either with one click from the control panel or via SFTP."
    },
    {
        question: "How quickly will I receive the server after purchase?",
        answer: "In most cases, you receive the server instantly. However, there may sometimes be delays of a few hours in activation due to a high queue."
    },
    {
        question: "If I don't like the service, can I get my money back?",
        answer: "A refund is possible only if there were errors on our part, such as prolonged technical work."
    },
    {
        question: "I can't start my server, what should I do?",
        answer: "Don't panic 🙂 Remember, if your server doesn't start, it means you've configured it incorrectly."
    }
];

// Locations data
const locationsData = [
    {
        name: "Warsaw, Poland",
        image: "https://hosting-minecraft.eu/images/maps/poland.svg"
    },
    {
        name: "Falkenstein, Germany",
        image: "https://hosting-minecraft.eu/images/maps/germany.svg"
    },
    {
        name: "Helsinki, Finland",
        image: "https://hosting-minecraft.eu/images/maps/finland.svg"
    },
    {
        name: "Strasbourg, France",
        image: "https://hosting-minecraft.eu/images/maps/france.svg"
    },
    {
        name: "Washington, D.C - USA",
        image: "https://hosting-minecraft.eu/images/maps/usa.svg"
    }
];

// Initialize the application
document.addEventListener('DOMContentLoaded', function() {
    initializePricingCards();
    initializeFAQ();
    initializeLocations();
    initializeAnimations();
});
// Initialize pricing cards
function initializePricingCards() {
    const pricingGrid = document.getElementById('pricing-grid');
    if (!pricingGrid) return;

    pricingPlans.forEach(plan => {
        const card = createPricingCard(plan);
        pricingGrid.appendChild(card);
    });

    // Re-initialize feather icons after cards are created
    setTimeout(() => {
        if (typeof feather !== 'undefined') {
            feather.replace();
        }
    }, 100);
}

// Create individual pricing card
function createPricingCard(plan) {
    const card = document.createElement('div');
    card.className = 'pricing-card bg-gray-900/50 p-6 rounded-xl border border-gray-700 hover:border-primary transition-all duration-300';
    card.innerHTML = `
        ${plan.category ? `<div class="bg-accent text-white px-3 py-1 rounded-full text-sm font-semibold mb-4 inline-block">${plan.category}</div>` : ''}
        <img src="${plan.image}" alt="${plan.name}" class="w-24 h-24 mx-auto mb-4 rounded-lg">
        <h3 class="text-2xl font-bold text-white text-center mb-4">${plan.name}</h3>
        <div class="text-center mb-6">
            <div class="text-gray-400 text-sm line-through mb-1">${plan.monthly}/month</div>
            <div class="text-secondary text-xl font-bold mb-4">${plan.monthlyDiscounted}/month</div>
            <div class="grid grid-cols-2 gap-2 text-sm mb-6">
                <div class="text-gray-400">3 Months</div>
                <div class="text-white font-semibold">${plan.quarterly}/month</div>
                <div class="text-gray-400">1 Year</div>
                <div class="text-white font-semibold">${plan.yearly}/month</div>
                <div class="text-gray-400">2 Years</div>
                <div class="text-white font-semibold">${plan.biennial}/month</div>
            </div>
            <ul class="space-y-2 mb-6">
                ${plan.features.slice(0, 3).map(feature => `
                <li class="flex items-center gap-2 text-gray-300">
                    <i data-feather="check" class="w-4 h-4 text-secondary"></i>
                    <span class="text-sm">${feature}</span>
                </li>
                `).join('')}
            </ul>
            <a href="${plan.orderLink}" 
               class="bg-primary hover:bg-indigo-700 text-white px-4 py-3 rounded-lg font-semibold transition-all duration-300 block w-full text-center">
                ORDER NOW
            </a>
        `;
    return card;
}
// Initialize FAQ section
function initializeFAQ() {
    const faqGrid = document.getElementById('faq-grid');
    if (!faqGrid) return;

    faqData.forEach(faq => {
        const faqItem = document.createElement('div');
        faqItem.className = 'bg-gray-900/50 p-6 rounded-xl border border-gray-700">
        faqItem.innerHTML = `
            <h4 class="text-lg font-semibold text-white mb-3">${faq.question}</h4>
            <p class="text-gray-400">${faq.answer}</p>
        `;
        faqGrid.appendChild(faqItem);
    });
}

// Initialize locations section
function initializeLocations() {
    const locationsGrid = document.getElementById('locations-grid');
    if (!locationsGrid) return;

    locationsData.forEach(location => {
        const locationCard = document.createElement('div');
        locationCard.className = 'bg-gray-900/50 p-6 rounded-xl border border-gray-700 text-center">
        locationCard.innerHTML = `
            <img src="${location.image}" alt="${location.name}" class="w-16 h-16 mx-auto mb-4">
            <h4 class="text-lg font-semibold text-white">${location.name}</h4>
        `;
        locationsGrid.appendChild(locationCard);
    });
}

// Initialize animations and interactions
function initializeAnimations() {
    // Intersection Observer for scroll animations
    const observerOptions = {
        threshold: 0.1,
        rootMargin: '0px 0px -50px 0px'
    };

    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.classList.add('animate-fade-in');
            }
        }, observerOptions);

    // Observe all pricing cards and other elements
    document.querySelectorAll('.pricing-card').forEach(card => {
        observer.observe(card);
    });
}

// Handle currency selection
function handleCurrencyChange(currency) {
    console.log('Currency changed to:', currency);
    // In a real implementation, this would update prices across the site
}

// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
    anchor.addEventListener('click', function (e) {
        e.preventDefault();
        const target = document.querySelector(this.getAttribute('href'));
        if (target) {
            target.scrollIntoView({
                behavior: 'smooth'
            });
        }
    });
});
// Mobile menu toggle
function toggleMobileMenu(button) {
    const nav = button.parentElement;
    const navLinks = nav.querySelector('.nav-links');
    const navActions = nav.querySelector('.nav-actions');
    
    if (navLinks) {
        navLinks.classList.toggle('show');
    }
    
    if (navActions) {
        navActions.classList.toggle('show');
    }
}

// Force re-render of pricing cards on page load
document.addEventListener('DOMContentLoaded', function() {
    // Initialize all components
    initializePricingCards();
    initializeFAQ();
    initializeLocations();
    initializeAnimations();
    
    // Force re-initialization of feather icons
    if (typeof feather !== 'undefined') {
        feather.replace();
    }
    
    // Add a small delay to ensure everything is rendered
    setTimeout(() => {
        if (typeof feather !== 'undefined') {
            feather.replace();
        }
    }, 500);
}
// Initialize tooltips for icons
function initializeTooltips() {
    const tooltipElements = document.querySelectorAll('[data-tooltip]');
    tooltipElements.forEach(element => {
        element.addEventListener('mouseenter', showTooltip);
        element.addEventListener('mouseleave', hideTooltip);
    });
}

function showTooltip(e) {
    // Tooltip implementation
}

function hideTooltip(e) {
    // Hide tooltip implementation
}