/* styles.css - Industrial Precision Enterprise Theme (clean, responsive) */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */
:root {
  --color-primary: #1e3a8a;
  --color-primary-dark: #1e40af;
  --color-accent: #dc2626;
  --color-secondary: #0f172a;
  --color-surface: #f8fafc;
  --color-card: #ffffff;
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-border: #e2e8f0;
  --color-shadow: rgba(0, 0, 0, 0.08);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --navbar-height: 80px;
  --navbar-height-mobile: 70px;

  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 4px 12px var(--color-shadow);
  --shadow-md: 0 8px 25px var(--color-shadow);
  --shadow-lg: 0 20px 40px var(--color-shadow);
}

/* Dark theme tokens (if you enable data-theme="dark" later) */
[data-theme="dark"] {
  --color-primary: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-accent: #ef4444;
  --color-secondary: #f9fafb;
  --color-surface: #111827;
  --color-card: #1f2937;
  --color-text-primary: #f9fafb;
  --color-text-secondary: #d1d5db;
  --color-border: #374151;
  --color-shadow: rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  background: var(--color-surface);
  color: var(--color-text-primary);
  line-height: 1.7;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: var(--font-weight-bold); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }

p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: none;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: var(--space-sm) 0;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: var(--navbar-height);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  height: var(--navbar-height-mobile);
  box-shadow: var(--shadow-md);
  padding: 0.25rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary) !important;
  padding: 0;
  line-height: 1.2;
}

.nav-link {
  color: var(--color-text-primary) !important;
  font-weight: var(--font-weight-medium);
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary) !important;
  background: rgba(30, 58, 138, 0.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO
   ========================================================================== */
#hero {
  min-height: calc(100vh - var(--navbar-height));
  padding-top: var(--navbar-height);
  padding-bottom: var(--navbar-height);
  display: flex;
  align-items: center;
  position: relative;
}

.carousel-item img {
  height: 100vh;
  width: 100vw;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.7) contrast(1.1);
}

.carousel-caption {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 600px;
  color: white;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--navbar-height);
}

.carousel-caption h1 {
  color: white !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  font-weight: var(--font-weight-bold);
}

.carousel-caption p {
  font-size: 1.2rem;
  font-weight: var(--font-weight-normal);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-top: var(--space-lg);
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-sm);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.service-card,
.project-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

/* Put this once, outside any @media */
.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 992px) {
  .card-img-top {
    height: 230px;
  }
}

/* In the mobile @media (max-width: 767.98px) block,
   make sure there is NO .card-img-top rule at all. */


.card-body {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  color: var(--color-text-primary);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.card-text {
  color: var(--color-text-secondary);
  flex-grow: 1;
  line-height: 1.6;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary {
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  color: white;
  padding: 0.875rem 2rem;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white !important;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
#contact {
  background: linear-gradient(135deg, var(--color-surface) 0%, #f1f5f9 100%);
  padding-top: var(--space-lg);
}

.form-control {
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 1rem 1.25rem;
  background: var(--color-card);
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  height: auto;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.form-label {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--color-secondary);
  color: var(--color-text-secondary);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-lg);
}

footer small {
  opacity: 0.8;
  font-size: 0.875rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Large Desktop */
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

/* Desktop */
@media (min-width: 1200px) {
  .container { max-width: 1200px; }
}

/* Tablet */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    margin-top: var(--space-sm);
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  :root {
    --navbar-height: var(--navbar-height-mobile);
  }
  
  #hero {
    min-height: calc(100vh - var(--navbar-height-mobile));
    padding-top: var(--navbar-height-mobile);
  }
  
  .carousel-item img {
    height: 60vh;
  }
  
  .carousel-caption {
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--navbar-height-mobile);
    max-width: 90%;
  }
  
  .carousel-caption h1 {
    font-size: 1.875rem !important;
  }

  .section-header {
    margin-bottom: var(--space-xl);
    padding-top: var(--space-md);
  }
}

/* Small Mobile */
@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.95rem;
  }
  
  .carousel-caption {
    padding: var(--space-md);
  }
  
  .card-body {
    padding: var(--space-md);
  }
  
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.5rem !important; }
}

/* ==========================================================================
   UTILITIES & MISC
   ========================================================================== */
.text-center { text-align: center; }
.mb-5 { margin-bottom: var(--space-2xl) !important; }
.py-5 { padding: var(--space-2xl) 0 !important; }
.g-4 > * { margin-bottom: var(--space-md); }
.g-4 > *:last-child { margin-bottom: 0; }

html { scroll-behavior: smooth; }

@media print {
  .navbar, .carousel-control { display: none !important; }
  body { background: white; color: black; }
}
