/* King Automation - Industrial/Tech Design */
:root {
  --primary: #00a86b;
  --primary-dark: #008f5b;
  --secondary: #1a2a3a;
  --accent: #ffc107;
  --gray-dark: #2d3748;
  --gray-mid: #718096;
  --gray-light: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.6; color: var(--gray-dark); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Header - Dark Sidebar Style */
.header { position: fixed; top: 0; left: 0; right: 0; background: var(--secondary); padding: 0 40px; height: 80px; display: flex; align-items: center; justify-content: space-between; z-index: 1000; box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.logo { display: flex; align-items: center; gap: 12px; color: var(--white); font-size: 18px; font-weight: 700; }
.logo-icon { width: 44px; height: 44px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 26px; height: 26px; color: var(--white); }
.logo span { color: var(--primary); }

.nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: rgba(255,255,255,0.85); font-size: 15px; font-weight: 500; position: relative; padding: 8px 0; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta { background: var(--primary); color: var(--white) !important; padding: 12px 24px; border-radius: 6px; font-weight: 600; }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,168,107,0.4); }

.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { width: 26px; height: 3px; background: var(--white); border-radius: 3px; transition: 0.3s; }

/* Hero - Split Layout with Diagonal */
.hero { min-height: 100vh; display: flex; position: relative; overflow: hidden; padding-top: 80px; }
.hero-bg { position: absolute; inset: 0; background: var(--secondary); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%); }
.hero-image { position: absolute; top: 80px; right: 0; width: 55%; height: calc(100% - 80px); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; mask-image: linear-gradient(to right, transparent, black 30%); -webkit-mask-image: linear-gradient(to right, transparent, black 30%); }

.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 80px 0 120px 0; width: 55%; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,168,107,0.15); color: var(--primary); padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 24px; width: fit-content; border: 1px solid rgba(0,168,107,0.3); }
.hero-badge svg { width: 16px; height: 16px; }
.hero-title { font-size: 52px; font-weight: 800; color: var(--white); line-height: 1.15; margin-bottom: 24px; letter-spacing: -1px; }
.hero-title span { color: var(--primary); }
.hero-desc { font-size: 18px; color: rgba(255,255,255,0.8); margin-bottom: 40px; max-width: 520px; line-height: 1.7; }
.hero-stats { display: flex; gap: 48px; margin-bottom: 40px; }
.stat-item { text-align: left; }
.stat-number { font-size: 42px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.hero-btns { display: flex; gap: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s; border: none; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,168,107,0.4); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: var(--white); color: var(--secondary); }
.btn-dark { background: var(--secondary); color: var(--white); }
.btn-dark:hover { background: #0f1a24; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { width: 100%; }

/* Section Styles */
.section { padding: 100px 0; }
.section-gray { background: #f7f8fa; }
.section-dark { background: var(--secondary); color: var(--white); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-label { display: inline-block; background: rgba(0,168,107,0.1); color: var(--primary); padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.section-title { font-size: 42px; font-weight: 800; color: var(--secondary); margin-bottom: 16px; letter-spacing: -0.5px; }
.section-desc { font-size: 18px; color: var(--gray-mid); max-width: 600px; margin: 0 auto; }
.section-dark .section-title { color: var(--white); }
.section-dark .section-desc { color: rgba(255,255,255,0.7); }

/* Services Grid - Card Style with Hover Effects */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.service-card { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: all 0.4s; position: relative; }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.service-card-img { height: 220px; overflow: hidden; position: relative; }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.service-card:hover .service-card-img img { transform: scale(1.1); }
.service-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,42,58,0.8), transparent); }
.service-card-icon { position: absolute; bottom: 16px; left: 20px; width: 52px; height: 52px; background: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.service-card-icon svg { width: 28px; height: 28px; color: var(--white); }
.service-card-body { padding: 28px; }
.service-card-body h3 { font-size: 22px; color: var(--secondary); margin-bottom: 12px; font-weight: 700; }
.service-card-body p { color: var(--gray-mid); font-size: 15px; line-height: 1.7; }
.service-card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; font-size: 14px; }
.service-card-link svg { width: 18px; height: 18px; transition: transform 0.3s; }
.service-card:hover .service-card-link svg { transform: translateX(4px); }

/* Features - Grid with Icons */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.feature-item { text-align: center; padding: 40px 24px; background: var(--white); border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.3s; }
.feature-item:hover { transform: translateY(-5px); }
.feature-icon-wrap { width: 72px; height: 72px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 8px 25px rgba(0,168,107,0.25); }
.feature-icon-wrap svg { width: 36px; height: 36px; color: var(--white); }
.feature-item h3 { font-size: 18px; color: var(--secondary); margin-bottom: 10px; font-weight: 700; }
.feature-item p { font-size: 14px; color: var(--gray-mid); }

/* Lead Form Section */
.lead-section { padding: 100px 0; background: linear-gradient(135deg, var(--secondary) 0%, #0f1a24 100%); position: relative; overflow: hidden; }
.lead-section::before { content: ''; position: absolute; top: 0; right: 0; width: 400px; height: 400px; background: radial-gradient(circle, rgba(0,168,107,0.1) 0%, transparent 70%); border-radius: 50%; }
.lead-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: center; }
.lead-info { position: relative; z-index: 1; }
.lead-info h2 { font-size: 38px; color: var(--white); margin-bottom: 20px; font-weight: 800; }
.lead-info p { color: rgba(255,255,255,0.8); font-size: 17px; margin-bottom: 32px; line-height: 1.8; }
.lead-contacts { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 28px; }
.lead-contact { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: rgba(255,255,255,0.9); font-size: 15px; }
.lead-contact:last-child { margin-bottom: 0; }
.lead-contact svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.lead-contact a { color: rgba(255,255,255,0.9); }
.lead-contact a:hover { color: var(--primary); }

.lead-form { background: var(--white); border-radius: 16px; padding: 44px; box-shadow: var(--shadow-lg); }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--gray-dark); font-size: 14px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 14px 18px; border: 2px solid var(--gray-light); border-radius: 8px; font-size: 15px; transition: all 0.3s; background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,168,107,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-check { display: flex; gap: 12px; align-items: flex-start; }
.form-check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.form-check label { font-size: 13px; color: var(--gray-mid); line-height: 1.6; }

/* Services Detail Page */
.page-header { padding: 160px 0 80px; background: var(--secondary); position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(0,168,107,0.15) 0%, transparent 70%); border-radius: 50%; }
.page-header h1 { font-size: 48px; color: var(--white); margin-bottom: 16px; position: relative; z-index: 1; }
.page-header p { font-size: 18px; color: rgba(255,255,255,0.8); position: relative; z-index: 1; }

.service-detail { padding: 80px 0; }
.service-detail.alt { background: #f7f8fa; }
.service-detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.service-detail.reverse .service-detail-wrap { direction: rtl; }
.service-detail.reverse .service-detail-wrap > * { direction: ltr; }
.service-detail-img { position: relative; }
.service-detail-img img { border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; height: 380px; object-fit: cover; }
.service-detail-badge { position: absolute; bottom: -20px; right: -20px; background: var(--accent); color: var(--secondary); padding: 14px 24px; border-radius: 10px; font-weight: 700; font-size: 14px; box-shadow: 0 8px 25px rgba(255,193,7,0.3); }
.service-detail-content h2 { font-size: 32px; color: var(--secondary); margin-bottom: 18px; font-weight: 800; }
.service-detail-content > p { color: var(--gray-mid); font-size: 16px; line-height: 1.8; margin-bottom: 24px; }
.service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.service-list li { display: flex; align-items: center; gap: 10px; color: var(--gray-dark); font-size: 15px; }
.service-list li::before { content: ''; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.gallery-item { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.gallery-item img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,42,58,0.9), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay h4 { color: var(--white); font-size: 18px; margin-bottom: 6px; }
.gallery-item-overlay p { color: rgba(255,255,255,0.8); font-size: 14px; }

/* Contact Page */
.contact-section { padding: 160px 0 100px; background: #f7f8fa; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; }
.contact-info h2 { font-size: 32px; color: var(--secondary); margin-bottom: 16px; font-weight: 800; }
.contact-info > p { color: var(--gray-mid); margin-bottom: 32px; font-size: 16px; }
.contact-details { margin-bottom: 32px; }
.contact-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.contact-item-icon { width: 48px; height: 48px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item-icon svg { width: 24px; height: 24px; color: var(--white); }
.contact-item-text h4 { font-size: 16px; color: var(--secondary); margin-bottom: 4px; font-weight: 700; }
.contact-item-text p, .contact-item-text a { font-size: 15px; color: var(--gray-mid); }

.hours-box { background: var(--white); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.hours-box h4 { font-size: 18px; color: var(--secondary); margin-bottom: 16px; font-weight: 700; }
.hours-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-light); font-size: 15px; }
.hours-list li:last-child { border-bottom: none; }
.hours-list span:first-child { color: var(--gray-mid); }
.hours-list span:last-child { font-weight: 600; color: var(--secondary); }

.contact-form-wrap { background: var(--white); border-radius: 16px; padding: 44px; box-shadow: var(--shadow-lg); }

.map-section { padding: 0 0 100px; background: #f7f8fa; }
.map-wrap { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 400px; border: none; }

/* Legal Pages */
.legal-page { padding: 160px 0 100px; }
.legal-content { max-width: 860px; margin: 0 auto; }
.legal-content h1 { font-size: 38px; color: var(--secondary); margin-bottom: 32px; font-weight: 800; }
.legal-content h2 { font-size: 24px; color: var(--secondary); margin: 36px 0 16px; font-weight: 700; }
.legal-content p { color: var(--gray-mid); margin-bottom: 16px; line-height: 1.9; font-size: 16px; }
.legal-content ul { margin: 16px 0 24px 20px; }
.legal-content ul li { color: var(--gray-mid); margin-bottom: 10px; position: relative; padding-left: 20px; }
.legal-content ul li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; }

/* Sitemap */
.sitemap-section { padding: 160px 0 100px; }
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.sitemap-card { background: var(--white); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }
.sitemap-card h3 { font-size: 20px; color: var(--secondary); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 3px solid var(--primary); font-weight: 700; }
.sitemap-card ul li { margin-bottom: 12px; }
.sitemap-card ul li a { color: var(--gray-mid); font-size: 15px; transition: all 0.3s; }
.sitemap-card ul li a:hover { color: var(--primary); padding-left: 6px; }

/* Footer */
.footer { background: var(--secondary); color: var(--white); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-brand { margin-bottom: 20px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 15px; line-height: 1.8; max-width: 320px; }
.footer-col h4 { font-size: 17px; margin-bottom: 24px; color: var(--white); font-weight: 700; }
.footer-links li { margin-bottom: 14px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 15px; transition: all 0.3s; }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; }
.footer-disclaimer { background: rgba(255,255,255,0.05); padding: 18px 24px; border-radius: 10px; margin-bottom: 20px; }
.footer-disclaimer p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.7; }
.footer-copyright { font-size: 14px; color: rgba(255,255,255,0.6); }

/* Cookie Banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--secondary); color: var(--white); padding: 28px 24px; z-index: 9999; box-shadow: 0 -4px 30px rgba(0,0,0,0.2); display: none; transform: translateY(100%); transition: transform 0.4s; }
.cookie-banner.active { display: block; transform: translateY(0); }
.cookie-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cookie-text h3 { font-size: 18px; margin-bottom: 8px; }
.cookie-text p { font-size: 14px; color: rgba(255,255,255,0.8); }
.cookie-buttons { display: flex; gap: 12px; flex-shrink: 0; }

.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal.active { display: flex; }
.cookie-modal-content { background: var(--white); border-radius: 16px; padding: 36px; max-width: 480px; width: 100%; }
.cookie-modal-content h3 { font-size: 24px; color: var(--secondary); margin-bottom: 12px; }
.cookie-modal-content > p { color: var(--gray-mid); margin-bottom: 24px; }
.cookie-option { padding: 14px 0; border-bottom: 1px solid var(--gray-light); }
.cookie-option:last-of-type { border-bottom: none; }
.cookie-option label { font-weight: 600; color: var(--gray-dark); display: flex; justify-content: space-between; align-items: center; }
.cookie-option p { color: var(--gray-mid); font-size: 13px; margin-top: 6px; }
.cookie-modal-btns { display: flex; gap: 12px; margin-top: 24px; }

/* Skip Link */
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--primary); color: var(--white); padding: 12px 24px; z-index: 99999; border-radius: 6px; transition: top 0.3s; }
.skip-link:focus { top: 16px; }

/* Responsive */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .service-detail-wrap { grid-template-columns: 1fr; gap: 40px; }
  .service-detail.reverse .service-detail-wrap { direction: ltr; }
}

@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .nav-links { display: none; position: absolute; top: 80px; left: 0; right: 0; background: var(--secondary); flex-direction: column; padding: 24px; gap: 0; }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-cta { margin-top: 16px; display: block; text-align: center; }
  .mobile-toggle { display: flex; }
  
  .hero { flex-direction: column; }
  .hero-bg { clip-path: none; }
  .hero-content { width: 100%; padding: 60px 0; }
  .hero-title { font-size: 36px; }
  .hero-image { position: relative; width: 100%; height: 300px; top: 0; }
  .hero-image img { opacity: 0.5; mask-image: linear-gradient(to bottom, transparent, black); -webkit-mask-image: linear-gradient(to bottom, transparent, black); }
  .hero-stats { gap: 32px; }
  .stat-number { font-size: 32px; }
  
  .lead-wrap, .contact-grid { grid-template-columns: 1fr; }
  .services-grid, .features-grid, .gallery-grid { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; }
  .service-list { grid-template-columns: 1fr; }
  .cookie-content { flex-direction: column; align-items: flex-start; }
  .cookie-buttons { width: 100%; }
  .cookie-buttons .btn { flex: 1; }
  
  .section { padding: 70px 0; }
  .section-title { font-size: 32px; }
  .page-header h1 { font-size: 36px; }
}
