/* Custom CSS for IT ProLab OÜ */

/* Root Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-color: #333;
    --border-color: #dee2e6;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 76px; /* Account for fixed navbar */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 700;
}

.display-5 {
    font-weight: 600;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: var(--primary-color) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

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

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

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 6rem 0 4rem;
    margin-top: -76px;
    padding-top: 8rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-img-top {
    border-radius: 8px 8px 0 0;
    height: 200px;
    object-fit: cover;
}

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

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

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

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

/* Forms */
.form-control {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-select {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Feature Icons */
.feature-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    border-radius: 50%;
    color: white;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 2rem;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 1rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cookie-consent.hidden {
    display: none;
}

.cookie-consent a {
    color: #3498db;
    text-decoration: none;
}

.cookie-consent a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-gray) !important;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

/* Responsive Images */
.img-fluid {
    border-radius: 8px;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-primary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--secondary-color) !important;
}

/* Custom Spacing */
.py-6 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Table Responsive */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--light-gray);
    border-color: var(--border-color);
    font-weight: 600;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Message */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    border-radius: 6px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    border-radius: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-section .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .cookie-consent .col-md-4 {
        text-align: center;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .page-header {
        padding: 4rem 0 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cookie-consent,
    footer {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    .page-header {
        background: none;
        color: black;
        padding: 1rem 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-color);
    }
    
    .btn-outline-primary {
        border-width: 2px;
    }
}

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