/* Custom Properties*/
:root {
    /* Colors */
    --primary-color: #800020;
    --secondary-color: #800020;
    --secondary-color-child:#ffffff;
    --accent-color: #FFD700;
    --dark-color: #000000;
    --light-color: #ffffff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #6c757d;
    --text-light: rgba(255, 255, 255, 0.9);
    
    /* Typography */
    --font-main: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Lora', Georgia, serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    
    /* Font Sizes*/
    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --fs-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --fs-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --fs-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 3rem);
    --fs-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 4rem);
    
    /* Spacing - Consistent Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --container-padding: clamp(1rem, 5vw, 2rem);
    --navbar-height: 70px;
    --navbar-height-mobile: 60px;
    
    /* Transitions & Animations */
    --transition-fast: 0.15s ease;
    --transition-default: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 15px 35px rgba(0, 0, 0, 0.15);
    --shadow-colored: 0 8px 25px rgba(0, 34, 68, 0.2);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #003366 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #aa0030 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #ffed4a 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.5) 80%);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: var(--font-main);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--primary-color);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}



.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: var(--space-2xl);
    color: var(--primary-color);
    text-align: center;
    font-weight: 700;
    font-size: var(--fs-3xl);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    margin: var(--space-md) auto 0;
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transition: transform var(--transition-bounce);
}

.section-title.visible::after {
    transform: scaleX(1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all var(--transition-default);
    position: relative;
    overflow: hidden;
    z-index: 1;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    z-index: -1;
    transition: width var(--transition-slow);
}

.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-color);
    box-shadow: var(--shadow-colored);
}

.btn-primary::before {
    background: var(--gradient-secondary);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:hover:not(:disabled)::before {
    width: 100%;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--light-color);
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

.btn-secondary::before {
    background: var(--gradient-primary);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(128, 0, 32, 0.4);
}

.btn-secondary:hover:not(:disabled)::before {
    width: 100%;
}

.btn-outline-light {
    background: transparent;
    color: var(--light-color);
    border: 2px solid var(--light-color);
}

.btn-outline-light::before {
    background: var(--light-color);
}

.btn-outline-light:hover:not(:disabled) {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline-light:hover:not(:disabled)::before {
    width: 100%;
}

.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-sm);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--fs-lg);
}
/* Page Header */
.page-header {
  background: var(--gradient-primary), url('../images/Enginer6.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  margin-top: 20px;
  padding: 150px 0 80px;
  color: white;
  position: relative;
  overflow: hidden;
  background-attachment: fixed;
  width: 100vw;
  left: 50%;
  margin-top: 20px;
  right: 50%;
  height: 500px;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
  min-width: 100vw;
  max-width: 100vw;
}

/*
.page-header:before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: url('../images/bg2.jpg');
  background-repeat: no-repeat;
  opacity: 0.1;
  animation: backgroundMove 30s linear infinite;
}
*/
@keyframes backgroundMove {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  animation: slideInDown 1s both;
}

.page-header .lead {
  font-size: 1.2rem;
  margin-top: 15px;
  animation: fadeIn 1.5s both;
  animation-delay: 0.3s;
}

/* Contact Section */
.contact-section {
  position: relative;
  
}

.contact-section::before {
  content: '';
  position: absolute;
  height: 100px;
  width: 100%;
  top: -50px;
  left: 0;
  background-color: #f8f9fa;
  transform: skewY(-2deg);
  z-index: 1;
}

.contact-section .container {
  position: relative;
  z-index: 2;
}

/* Card Animations */
.card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-default);
  box-shadow: var(--box-shadow-default);
}

.card:hover {
  transform: translateY(-5px);

}

.card h3 {
  color: var(--primary-color);
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  position: relative;
  font-family: var(--font-heading);
}

.card h3:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 2px;
  background-color: var(--secondary-color);
  left: 0;
  bottom: -2px;
  animation: growWidth 1.5s ease;
}

@keyframes growWidth {
  from {
    width: 0;
  }

  to {
    width: 60px;
  }
}

/* Form Animations */
.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid #eee;
  padding: 12px 15px;
  transition: var(--transition-default);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.form-label {
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.3s;
}

.form-control:focus+.form-label,
.form-select:focus+.form-label {
  color: var(--primary-color);
}

.is-invalid {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-3px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(3px, 0, 0);
  }
}

.btn-primary {
  background-color: var(--primary-color);
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition-default);
  position: relative;
  overflow: hidden;
}

.btn-primary:after {
  content: '';
  position: absolute;
  width: 0;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
}

.btn-primary:hover:after {
  width: 120%;
}

.btn-primary:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 7px 15px rgba(0, 34, 68, 0.3);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(0, 34, 68, 0.2);
}

/* Contact Information */
.contact-info {
  padding: 30px;
  height: 100%;
  border-radius: 12px;
  background: white;
  transition: all 0.5s;
}

.contact-info:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.contact-info h3,
.contact-info h4 {
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  font-family: var(--font-heading);
}

.contact-info h3:after,
.contact-info h4:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.4s ease;
}

.contact-info:hover h3:after,
.contact-info:hover h4:after {
  width: 100%;
}

.contact-info i {
  color: var(--secondary-color);
  transform: scale(1);
  transition: transform 0.3s ease;
}

.contact-info p:hover i {
  transform: scale(1.2);
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  position: relative;
  transition: all 0.3s;
}

.contact-info a:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.contact-info a:hover {
  color: var(--secondary-color);
}

.contact-info a:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Map Container Animation */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-default);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.map-container:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.map-container:hover:before {
  opacity: 1;
}

.map-container iframe {
  transition: all 0.3s ease;
  display: block;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.9; }
}

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadePulse {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.modern-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0;
}

.dot1 { animation: fadePulse 1.5s infinite ease-in-out 0s; }
.dot2 { animation: fadePulse 1.5s infinite ease-in-out 0.3s; }
.dot3 { animation: fadePulse 1.5s infinite ease-in-out 0.6s; }

/* Footer */
footer {
    background: var(--gradient-primary);
    color: var(--light-color);
    padding: var(--space-4xl) 0 var(--space-2xl);
    position: relative;
    overflow: hidden;
}

footer::before {
   content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: url('../images/bg2.jpg');
  background-attachment: fixed;
  background-repeat: no-repeat;
  opacity: 0.1;
  animation: backgroundMove 30s linear infinite;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-default);
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: aliceblue;
    transition: width var(--transition-default);
}

footer a:hover {
    color: var(--accent-color);
}

footer a:hover::after {
    width: 100%;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    margin-right: var(--space-md);
    transition: all var(--transition-bounce);
    color: var(--accent-color);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-color);
    border-radius: var(--radius-full);
    transform: scale(0);
    transition: transform var(--transition-bounce);
    z-index: -1;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
}

.social-icons a:hover::before {
    transform: scale(1);
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-default);
    z-index: var(--z-fixed);
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    background-color: var(--secondary-color);
    box-shadow: var(--shadow-lg);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn.show:hover {
    animation: pulse 1.5s infinite;
}

/* Contact Form Error Messages & Spinner */
.error-message {
    color: var(--error-color);
    font-size: 0.97em;
    margin-top: 2px;
    min-height: 18px;
    transition: color 0.2s;
}

.is-invalid {
    border-color: var(--error-color) !important;
    background-color: #fff6f6;
}

.is-valid {
    border-color: var(--success-color) !important;
    background-color: #f6fff6;
}

.spinner {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    border: 2px solid #fff;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.d-none { display: none !important; }

/* Alert Styles */
#alertContainer .alert {
    margin-bottom: 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(128,0,32,0.07);
    border: none;
    padding: 1rem 1.5rem;
}
#alertContainer .alert-success {
    background: #eafaf1;
    color: var(--success-color);
}
#alertContainer .alert-danger {
    background: #fff0f0;
    color: var(--error-color);
}
#alertContainer .btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--error-color);
    opacity: 0.7;
    float: right;
    margin-left: 1rem;
}


#contactForm .btn,
#contactForm .btn-primary,
#submitBtn {
    padding: 0.6rem 1.5rem;
    font-size: var(--fs-base);
    border-radius: var(--radius-full);
    width: auto;
    min-width: 120px;
    max-width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

@media (max-width: 576px) {
    #contactForm .btn,
    #contactForm .btn-primary,
    #submitBtn {
        width: 100%;
        min-width: unset;
        font-size: var(--fs-sm);
        padding: 0.75rem 1rem;
    }
}

/* Responsive tweaks for form */
@media (max-width: 576px) {
    .card-body {
        padding: var(--space-md);
    }
    .btn {
        font-size: var(--fs-sm);
        padding: var(--space-md) var(--space-lg);
    }
    .form-label {
        font-size: var(--fs-sm);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --navbar-height: var(--navbar-height-mobile);
        --container-padding: var(--space-md);
    }
    
    .hero-text {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .hero-text h1 {
        font-size: var(--fs-3xl);
    }
    
    .hero-text p {
        font-size: var(--fs-lg);
    }
    
    .btn {
        padding: var(--space-md) var(--space-lg);
    }

    .count-box {
        padding: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-text {
        padding: var(--space-lg) var(--space-md);
    }
    
    .card-body {
        padding: var(--space-lg);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .count-box {
        padding: var(--space-md);
    }
}
