/**
 * WEBGOD.RO Custom Styles
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --wg-primary: #2563eb;
    --wg-secondary: #1e293b;
    --wg-accent: #06b6d4;
    --wg-primary-hover: #1d4ed8;
    --wg-primary-subtle: rgba(37, 99, 235, 0.1);
    --wg-cyan-subtle: rgba(6, 182, 212, 0.1);
    --wg-purple-subtle: rgba(147, 51, 234, 0.1);
    --wg-success-subtle: rgba(34, 197, 94, 0.1);
    --wg-warning-subtle: rgba(245, 158, 11, 0.1);
    --wg-danger-subtle: rgba(239, 68, 68, 0.1);
    --wg-cyan: #06b6d4;
    --wg-purple: #9333ea;
    --wg-border-radius: 12px;
    --wg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wg-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wg-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--wg-secondary);
    background-color: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    transition: var(--wg-transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--wg-shadow);
}

.navbar-brand .brand-icon svg {
    display: block;
}

.navbar-brand .brand-text {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--wg-transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--wg-primary) !important;
    background-color: var(--wg-primary-subtle);
}

.nav-spacer {
    height: 80px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, var(--wg-primary-subtle) 0%, var(--wg-cyan-subtle) 100%);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 0.5;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-content .badge {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-content h1 {
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-content .lead {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-content .btn {
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: var(--wg-primary-subtle);
    top: -50px;
    right: 20%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: var(--wg-cyan-subtle);
    bottom: 20%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: var(--wg-purple-subtle);
    top: 30%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.code-block {
    background: #1e293b;
    border-radius: var(--wg-border-radius);
    padding: 1.5rem;
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    text-align: left;
    box-shadow: var(--wg-shadow-lg);
}

.code-keyword { color: #c084fc; }
.code-comment { color: #64748b; }
.code-variable { color: #38bdf8; }
.code-class { color: #f472b6; }
.code-function { color: #34d399; }
.code-string { color: #fbbf24; }

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ============================================
   Cards
   ============================================ */
.card {
    border-radius: var(--wg-border-radius);
    transition: var(--wg-transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--wg-shadow-lg);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card .card-body {
    padding: 2rem;
}

.service-icon .icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Product Cards
   ============================================ */
.product-card {
    overflow: hidden;
}

.product-image-wrapper {
    height: 200px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--wg-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   Statistics
   ============================================ */
.bg-primary {
    background-color: var(--wg-primary) !important;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--wg-primary) 0%, var(--wg-accent) 100%);
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    border-radius: var(--wg-border-radius);
}

.testimonial-card img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: #0f172a;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    transition: var(--wg-transition);
}

.footer-links a:hover {
    color: var(--wg-primary) !important;
    padding-left: 5px;
}

.social-link {
    transition: var(--wg-transition);
}

.social-link:hover {
    color: var(--wg-primary) !important;
    transform: translateY(-3px);
}

/* ============================================
   Back to Top Button
   ============================================ */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--wg-shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--wg-transition);
}

.btn-floating.visible {
    opacity: 1;
    visibility: visible;
}

.btn-floating:hover {
    transform: translateY(-5px);
}

/* ============================================
   Cookie Consent
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    padding: 1rem;
    display: none;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.cookie-consent.show {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-content {
    display: flex;
    align-items: center;
    color: white;
    font-size: 0.875rem;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   Forms
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--wg-primary);
    box-shadow: 0 0 0 0.25rem var(--wg-primary-subtle);
}

.input-group .btn {
    border-color: var(--wg-primary);
}

/* ============================================
   Badges
   ============================================ */
.badge.bg-primary-subtle {
    background-color: var(--wg-primary-subtle) !important;
    color: var(--wg-primary) !important;
}

.badge.bg-cyan-subtle {
    background-color: var(--wg-cyan-subtle) !important;
    color: var(--wg-cyan) !important;
}

.badge.bg-purple-subtle {
    background-color: var(--wg-purple-subtle) !important;
    color: var(--wg-purple) !important;
}

/* ============================================
   Newsletter Form
   ============================================ */
.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--wg-primary);
}

/* ============================================
   Features Visual
   ============================================ */
.features-visual {
    position: relative;
    height: 400px;
}

.feature-card {
    background: white;
    border-radius: var(--wg-border-radius);
    padding: 1rem;
    box-shadow: var(--wg-shadow);
    position: absolute;
    width: 280px;
}

.feature-card-1 {
    top: 0;
    left: 0;
    animation: float 5s ease-in-out infinite;
}

.feature-card-2 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 5s ease-in-out 1s infinite;
}

.feature-card-3 {
    bottom: 0;
    right: 0;
    animation: float 5s ease-in-out 2s infinite;
}

.feature-avatar img {
    width: 40px;
    height: 40px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero-bg {
        width: 100%;
        clip-path: none;
        opacity: 0.3;
    }

    .features-visual {
        display: none;
    }

    .nav-spacer {
        height: 70px;
    }
}

@media (max-width: 767.98px) {
    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .btn-floating {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .cookie-consent {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cookie-content {
        justify-content: center;
    }
}

/* ============================================
   Loading States
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-cyan { color: var(--wg-cyan); }
.text-purple { color: var(--wg-purple); }
.bg-cyan-subtle { background-color: var(--wg-cyan-subtle); }
.bg-purple-subtle { background-color: var(--wg-purple-subtle); }
.bg-success-subtle { background-color: var(--wg-success-subtle); }
.bg-warning-subtle { background-color: var(--wg-warning-subtle); }
.bg-danger-subtle { background-color: var(--wg-danger-subtle); }
.icon-box { flex-shrink: 0; }

/* Stretched link fix */
.stretched-link-x::after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    z-index: 1;
}

/* Image lazy loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([loading]) {
    opacity: 1;
}

/* Dark mode support */
.dark-bg-secondary {
    background-color: #1e293b !important;
}

.dark-bg-secondary .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.dark-bg-secondary .text-dark {
    color: rgba(255, 255, 255, 0.9) !important;
}