/* AlpicNode Storefront Stylesheet */
/* Theme: WHMCS AlpicNode - Blue #2563eb, White, Dark Gray #111827 */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --error: #ef4444;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand a {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.nav-brand a:hover {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-cta .btn {
    padding: 10px 20px;
}

.nav-cta .btn-outline {
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.nav-cta .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: transparent;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-600);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--gray-600);
}

/* Features Section */
.features {
    background-color: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* VPS/Pricing Section */
.vps-section {
    background-color: var(--white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pricing-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
}

.pricing-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.price {
    margin-bottom: 8px;
}

.price .currency {
    font-size: 20px;
    font-weight: 500;
    color: var(--gray-600);
    vertical-align: top;
}

.price .amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--gray-900);
}

.price .period {
    font-size: 16px;
    color: var(--gray-500);
}

.pricing-desc {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 24px;
}

.pricing-features li {
    font-size: 14px;
    color: var(--gray-700);
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-card .btn {
    width: 100%;
}

/* Addons Section */
.addons-section {
    background-color: var(--gray-50);
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.addon-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.addon-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.addon-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.addon-card p {
    font-size: 14px;
    color: var(--gray-600);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta-section .btn {
    background-color: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.cta-section .btn:hover {
    background-color: var(--gray-100);
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: 64px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--gray-400);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--gray-800);
}

.footer-bottom p {
    font-size: 14px;
    color: var(--gray-500);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .addons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .addons-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 48px 0;
    }

    .section-header h2 {
        font-size: 28px;
    }
}

/* Error Handling Styles */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.notification-error {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.notification-info {
    background-color: #eff6ff;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.notification-warning {
    background-color: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.notification-icon {
    margin-right: 8px;
    font-size: 16px;
}

.notification-message {
    flex: 1;
}

.api-error-notification {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    border-left: 4px solid #ef4444;
    animation: slideInFromRight 0.3s ease;
}

.pricing-notification {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
    animation: slideInFromRight 0.3s ease;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading state for pricing */
.pricing-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pricing-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fallback indicator */
.pricing-card.fallback {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.pricing-card.fallback::before {
    content: 'Standard Pricing';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Error banner */
.error-banner {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.error-banner.visible {
    display: block;
}

.error-banner a {
    color: #dc2626;
    text-decoration: underline;
}

/* News Section Styles */
.news-section {
    padding: 80px 0;
    background-color: var(--white);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.rss-subscribe {
    display: flex;
    gap: 16px;
}

.rss-subscribe .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.news-loading {
    text-align: center;
    padding: 48px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.news-error {
    text-align: center;
    padding: 48px 0;
    background-color: var(--gray-50);
    border-radius: 12px;
}

.news-error p {
    color: var(--gray-600);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.news-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 32px;
    transition: box-shadow 0.2s ease;
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-date {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.news-item h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.news-item h2 a {
    color: inherit;
}

.news-item h2 a:hover {
    color: var(--primary);
}

.news-content {
    font-size: 16px;
    color: var(--gray-700);
    line-height: 1.7;
}

.news-content p {
    margin-bottom: 16px;
}

.news-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 24px 0 12px;
}

.news-content ul,
.news-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.news-content li {
    margin-bottom: 8px;
}

.news-content pre {
    background-color: var(--gray-900);
    color: var(--gray-100);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    margin: 16px 0;
}

.news-fallback {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Page Hero for inner pages */
.page-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    text-align: center;
}

.page-hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 18px;
    color: var(--gray-600);
}

/* Legal content */
.legal-content {
    padding: 60px 0;
    background-color: var(--white);
}

.legal-document {
    max-width: 800px;
    margin: 0 auto;
}

.legal-document .last-updated {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-document h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 32px 0 16px;
}

.legal-document h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 24px 0 12px;
}

.legal-document p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.legal-document ul,
.legal-document ol {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-document li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--gray-800);
    color: var(--gray-400);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background-color: var(--primary);
    color: var(--white);
}
