/* ERPLY Development OÜ - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-family-sans-serif: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--dark-color);
    padding-top: 76px; /* Account for fixed navbar */
}

.container {
    max-width: 1200px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    z-index: 9999;
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-banner p {
    margin-bottom: 0;
}

.cookie-banner a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.cookie-banner a:hover {
    color: white;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(13, 110, 253, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 110, 253, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.navbar-brand:hover::before {
    left: 100%;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 0.2rem;
    border-radius: 6px;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat;
    opacity: 0.1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-stats {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Enhanced Hero Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: floatUpDown 6s ease-in-out infinite;
}

.floating-element.element-1 {
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation-delay: 0s;
}

.floating-element.element-2 {
    top: 60%;
    left: 15%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation-delay: 2s;
}

.floating-element.element-3 {
    top: 30%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation-delay: 4s;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* Hero Image */
.hero-image-container {
    position: relative;
    z-index: 2;
}

.hero-image-container img {
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.hero-image-container img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* Service Card Images */
.service-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

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

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

/* Service Detail Cards */
.service-detail-card .service-image {
    height: 250px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.service-detail-card .card-content {
    padding: 2rem;
}

.service-detail-card .card-icon {
    margin-bottom: 1.5rem;
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>') repeat;
    opacity: 0.1;
}

.services-header {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.contact-header {
    background: linear-gradient(135deg, #fd7e14 0%, #e85d04 100%);
}

.legal-header {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-color);
}

.service-detail-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.service-detail-card .card-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.service-detail-card h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li:before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--success-color);
    position: absolute;
    left: 0;
    top: 0.5rem;
}

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

/* Expertise Cards */
.expertise-card {
    transition: all 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-5px);
}

/* Process Steps */
.process-step {
    position: relative;
    padding: 2rem 1rem;
}

.step-number {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Tech Items */
.tech-item {
    padding: 1rem;
    transition: all 0.3s ease;
}

.tech-item:hover {
    transform: scale(1.1);
}

.tech-item p {
    margin: 0;
    font-weight: 500;
    color: var(--dark-color);
}

/* Contact Form */
.contact-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-info-wrapper {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--border-radius);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-details h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-details p {
    margin-bottom: 0.25rem;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.business-hours {
    border-left: 4px solid var(--primary-color);
}

/* Form Styling */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.was-validated .form-control:valid {
    border-color: var(--success-color);
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color);
}

/* Legal Content */
.legal-content {
    font-size: 1rem;
    line-height: 1.7;
}

.legal-content h2 {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.legal-content h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin-top: 1.5rem;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.contact-details {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

footer::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23fff'%3E%3C/path%3E%3C/svg%3E") no-repeat;
    background-size: cover;
}

.footer-content {
    position: relative;
    z-index: 2;
    padding-top: 2rem;
}

.footer-brand {
    position: relative;
}

.footer-brand h5 {
    background: linear-gradient(135deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(13, 110, 253, 0.8);
    border-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

.footer-links h6 {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.footer-links a:hover::before {
    opacity: 1;
    left: -20px;
}

.contact-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.contact-info h6 {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-info h6 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.contact-info i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    margin-right: 0.7rem;
    font-size: 0.9rem;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transform: translateX(-50%);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
}

/* Animated background elements */
.footer-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.footer-bg-elements::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.footer-bg-elements::after {
    content: '';
    position: absolute;
    bottom: 30%;
    left: 15%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

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

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-width: 2px;
}

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

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

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    
    .hero .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .page-header {
        padding: 4rem 0 2rem;
    }
    
    .contact-info-wrapper {
        position: static;
        margin-top: 2rem;
    }
    
    .cookie-banner .text-end {
        text-align: left !important;
        margin-top: 1rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .service-detail-card {
        margin-bottom: 2rem;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    .tech-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .service-detail-card {
        padding: 1.5rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .contact-info-wrapper {
        padding: 1.5rem;
    }
    
    .cookie-banner {
        padding: 0.75rem 0;
    }
    
    .cookie-banner .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cookie-banner,
    .btn,
    footer {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .page-header {
        background: none !important;
        color: black !important;
    }
    
    .page-header h1,
    .page-header p {
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: none !important;
    }
    
    .legal-content {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card,
    .service-detail-card,
    .contact-form-wrapper,
    .contact-info-wrapper {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border-width: 3px;
    }
}

/* Focus indicators for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}
