/* ========================================
   KINGWORK - Common Styles
   Bridge Bearings & Expansion Joints
   Modern & Professional Design
   ======================================== */

/* CSS Variables - Enhanced Color Palette */
:root {
    /* Primary Colors */
    --primary-color: #0d4f6e;
    --primary-dark: #083a52;
    --primary-light: #1a7aa8;
    --primary-gradient: linear-gradient(135deg, #0d4f6e 0%, #1a7aa8 100%);
    
    /* Secondary Colors */
    --secondary-color: #f39c12;
    --secondary-dark: #d68910;
    --secondary-light: #f5b041;
    --secondary-gradient: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    
    /* Accent Colors */
    --accent-color: #27ae60;
    --accent-light: #2ecc71;
    
    /* Text Colors */
    --text-dark: #1a1a2e;
    --text-medium: #4a4a5a;
    --text-light: #6c7a89;
    --text-muted: #95a5a6;
    --text-white: #ffffff;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f7f9fc;
    --bg-gray: #eef2f7;
    --bg-dark: #1a1a2e;
    
    /* Border & Shadow */
    --border-color: #e1e8ed;
    --border-light: #f0f3f7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-hover: 0 15px 50px rgba(0,0,0,0.15);
    --shadow-colored: 0 10px 40px rgba(13, 79, 110, 0.2);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --max-width: 95%;
    --max-width-content: 1400px;
    --header-height: 80px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

@media (min-width: 1600px) {
    .container {
        max-width: 1520px;
    }
}

/* Section - Enhanced */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    background: var(--primary-gradient);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Buttons - Enhanced */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::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: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(13, 79, 110, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 79, 110, 0.4);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-3px);
}

.btn-white {
    background: var(--text-white);
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* Cards - Enhanced */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 28px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.card-text {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
}

/* Grid System */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Flex Utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background Utilities */
.bg-white { background-color: var(--bg-white); }
.bg-light { background-color: var(--bg-light); }
.bg-gray { background-color: var(--bg-gray); }
.bg-primary { background: var(--primary-gradient); }
.bg-dark { background-color: var(--bg-dark); }

/* Spacing */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }
.py-1 { padding-top: 10px; padding-bottom: 10px; }
.py-2 { padding-top: 20px; padding-bottom: 20px; }
.py-3 { padding-top: 30px; padding-bottom: 30px; }

/* Decorative Elements */
.section-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.decoration-circle {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--primary-gradient);
    opacity: 0.03;
}

.decoration-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(var(--primary-color) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.1;
}

/* Divider */
.divider {
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    margin: 20px auto;
}

/* Lazy Loading Placeholder */
.lazy-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-colored);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 79, 110, 0.4);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-6 { grid-template-columns: repeat(4, 1fr); }
    .container { padding: 0 25px; }
}

@media (max-width: 992px) {
    .section { padding: 80px 0; }
    .section-title { font-size: 2.5rem; }
    .section-subtitle { font-size: 1.1rem; margin-bottom: 50px; }
    .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .section { padding: 60px 0; }
    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 40px; }
    .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
    .container { padding: 0 20px; }
    .btn { padding: 12px 24px; }
}

@media (max-width: 480px) {
    .section { padding: 50px 0; }
    .section-title { font-size: 1.75rem; }
    .btn { padding: 10px 20px; font-size: 0.9rem; }
    .container { padding: 0 15px; }
}
