/* 
 * Custom CSS for Company Website
 * Using Bootstrap 5 + Tailwind CSS + Custom Styles
 */

/* Root Variables */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #6366f1;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 800;
}

p {
    margin-bottom: 1rem;
}

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

/* Navigation Styles */
.navbar {
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    padding: 0.75rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(59, 130, 246, 0.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-slide {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .lead {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
}

/* Swiper Customization */
.swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    background-color: white;
    transform: scale(1.2);
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background-color: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: var(--transition);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
}

/* Buttons */
.btn {
    font-weight: 600;
    text-transform: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.rounded-pill {
    border-radius: 50px !important;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

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

.card-img-top {
    transition: var(--transition);
    height: 250px;
    object-fit: cover;
}

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

/* Service Cards */
.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: var(--transition);
}

.service-icon i {
    color: white;
}

.card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Portfolio */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    height: 300px;
}

.portfolio-item img {
    transition: var(--transition);
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    transition: var(--transition);
}

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

.portfolio-item:hover .portfolio-overlay {
    opacity: 1 !important;
}

/* Blog Cards */
article.card {
    height: 100%;
}

.card-body {
    padding: 1.5rem;
}

/* Gradient Backgrounds */
.bg-gradient-to-r {
    background: linear-gradient(to right, var(--bg-color-1, #3b82f6), var(--bg-color-2, #6366f1));
}

.from-blue-600 {
    --bg-color-1: #2563eb;
}

.to-indigo-600 {
    --bg-color-2: #5b21b6;
}

/* Sections */
section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.transition-all {
    transition: var(--transition) !important;
}

/* Form Styles */
.form-control {
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9fafb;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    background-color: white;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937, #111827);
}

footer h5, footer h6 {
    color: white;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Admin Specific Styles */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dashboard Cards */
.stat-card {
    background: linear-gradient(135deg, white, #f8fafc);
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Data Tables */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}

/* Form Enhancements */
.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

.input-group {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.input-group-text {
    background: var(--bg-light);
    border: 2px solid #e5e7eb;
    color: var(--text-dark);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    background: #f9fafb;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #059669;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(8, 145, 178, 0.1));
    color: #0891b2;
    border-left: 4px solid #06b6d4;
}

/* Pagination */
.pagination .page-link {
    border: 2px solid #e5e7eb;
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-light);
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

/* Tooltips & Popovers */
.tooltip-inner {
    background: var(--text-dark);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.popover {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.popover-header {
    background: var(--primary-color);
    color: white;
    border-bottom: none;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .portfolio-item {
        height: 250px;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .swiper-pagination,
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 4px;
}

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

/* Focus Styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}