/* 
 * United Engineering Works - Main Stylesheet
 * Author: Claude AI
 * Version: 1.0
 */

/* ===== VARIABLES ===== */
:root {
    --primary-color: #0056b3;
    --primary-dark: #004494;
    --primary-light: #e6f0fa;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-color: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --black: #000000;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --font-primary: 'Segoe UI', 'Roboto', sans-serif;
    --transition: all 0.3s ease;
    --border-radius: 4px;
    --section-padding: 5rem 0;
}

/* ===== RESET & GLOBAL STYLES ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

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

/* ===== BUTTONS & FORMS ===== */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-light {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-light:hover {
    background-color: var(--light-bg);
    color: var(--primary-dark);
}

.form-control {
    padding: 0.65rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.15);
}

/* ===== NAVBAR ===== */
.navbar {
    padding: 0.5rem 0;
    box-shadow: var(--box-shadow);
    background-color: var(--white) !important;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 60px;
    width: auto;
    max-width: 180px;
    margin-right: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand h1 {
    margin: 0 !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 600;
    padding: 0.75rem 0.9rem;
    position: relative;
    white-space: nowrap;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background-color: var(--primary-light);
    padding: 7rem 0;
    margin-bottom: 0;
    position: relative;
}

.hero-section h2 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-logo {
    height: 80px;
    width: auto;
    max-width: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 5px;
}

.hero-title-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.hero-image-placeholder {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* ===== PLACEHOLDERS ===== */
.placeholder-image {
    background-color: #eceff1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 100%;
    color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,86,179,0.05) 0%, rgba(255,255,255,0.1) 100%);
    z-index: 1;
}

.placeholder-image i {
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
    opacity: 0.8;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.placeholder-image:hover i {
    transform: scale(1.2);
    color: var(--primary-dark);
}

.placeholder-image p {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-image-placeholder .placeholder-image {
    height: 100%;
    border-radius: var(--border-radius);
    background-color: #f0f4f7;
}

.service-image.placeholder-image {
    height: 300px;
}


/* ===== CARDS & SECTIONS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
}

.card-body {
    padding: 1.75rem;
}

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

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

.card-title {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Page title sections */
.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.bg-light {
    background-color: #f5f7fa !important;
}

section.bg-light.py-5 {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.display-4 {
    font-size: 2.5rem;
    font-weight: 700 !important;
    color: var(--primary-dark);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
}

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

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .placeholder-image {
    height: 180px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.product-card .card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

/* ===== SERVICES ===== */
.service-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.service-list li {
    padding: 8px 0;
    position: relative;
    padding-left: 30px;
    margin-bottom: 0.5rem;
}

.service-list li:before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    background-color: var(--white);
    margin-bottom: 20px;
    transition: var(--transition);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

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

.fa-star.text-warning {
    color: #FFD700 !important;
}

/* ===== PROCESS TIMELINE ===== */
.process-timeline {
    position: relative;
    padding: 2rem 0;
}

.process-step {
    position: relative;
    padding: 1.5rem 0;
}

.process-icon {
    width: 64px;
    height: 64px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* align left */
    border: 2px solid var(--primary-color);
    z-index: 2;
    position: relative;
    color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.process-line {
    position: absolute;
    top: 64px;
    bottom: -20px;
    left: 32px; /* centered under 64px icon */
    width: 2px;
    background-color: var(--primary-color);
}

.process-step:last-child .process-line {
    display: none;
}

.process-step h3 {
    margin-top: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    font-size: 1.25rem;
}

.process-step p {
    text-align: center;
    max-width: 80%;
    margin: 0 auto;
}

.process-step:hover .process-icon {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
    transition: var(--transition);
}

.process-step:hover .process-icon i {
    color: var(--white);
}

/* ===== CONTACT ===== */
.contact-info {
    margin-bottom: 2rem;
}

.contact-info .d-flex {
    align-items: center;
}

.contact-info .fas {
    color: var(--primary-color);
}

.contact-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.contact-info p {
    margin-bottom: 0;
}

.social-media .social-icons a {
    color: var(--primary-color);
    margin-right: 1rem;
    transition: var(--transition);
}

.social-media .social-icons a:hover {
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* Sidebar styling */
.col-lg-4 .card {
    margin-bottom: 1.5rem;
}

.col-lg-4 .card-title {
    color: var(--primary-dark);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.list-group-item-action {
    transition: all 0.2s ease;
}

.list-group-item-action:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.badge.bg-primary.rounded-pill {
    font-size: 0.75rem;
}

.list-group-item-action .h6 {
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.list-group-item-action:hover .h6 {
    color: var(--primary-color);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding-top: 3rem;
}

footer h3 {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
}

footer a.text-white {
    transition: var(--transition);
    display: inline-block;
    margin-bottom: 8px;
    opacity: 0.8;
}

footer a.text-white:hover {
    opacity: 1;
    text-decoration: none;
    color: var(--white) !important;
}

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

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

footer hr {
    background-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1rem;
}

footer .col-md-12.text-center p {
    opacity: 0.7;
    font-size: 0.875rem;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher { display: none; }

.lang-dropdown .btn {
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
}

.lang-dropdown .dropdown-menu {
    min-width: 10rem;
}

.lang-dropdown .dropdown-item.active {
    background: var(--primary-light);
}

/* Keep language menu inside viewport on small screens */
@media (max-width: 576px) {
    .navbar .lang-dropdown[data-bs-display="static"] .dropdown-menu {
        right: 0 !important;
        left: auto !important;
        transform: translate3d(0, 0, 0) !important;
        max-width: calc(100vw - 1rem);
        width: max-content;
    }
}

/* Avoid wrapping issues */
.navbar-brand h1 { white-space: nowrap; }
.navbar .navbar-nav { flex-wrap: nowrap; }
.navbar .navbar-nav .nav-item { white-space: nowrap; }

/* Section headings & paragraphs more balanced */
.section-title { line-height: 1.2; }
p { word-break: normal; hyphens: auto; }

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    padding: 0;
    border-radius: 50%;
    z-index: 99;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CUSTOM ELEMENTS ===== */
/* Call to action sections */
section.bg-primary {
    background-color: var(--primary-color) !important;
    position: relative;
    overflow: hidden;
}

section.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

section.bg-primary .container {
    position: relative;
    z-index: 2;
}

section.bg-primary h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

section.bg-primary .lead {
    color: rgba(255, 255, 255, 0.9);
    max-width: 80%;
    margin: 0 auto 1.5rem;
}

/* Accordion styling */
.accordion-item {
    border: none;
    margin-bottom: 0.75rem;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    padding: 1.25rem;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius) !important;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.accordion-button::after {
    background-size: 1rem;
}

.accordion-body {
    padding: 1.25rem;
    background-color: var(--white);
}

/* List groups */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 0;
    transition: var(--transition);
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item-action:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 991.98px) {
    :root {
        --section-padding: 3rem 0;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
    
    .hero-section h2 {
        font-size: 2.25rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-image-placeholder {
        height: 300px;
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 2.5rem 0;
    }
    
    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .process-timeline {
        padding-left: 1rem;
    }
    
    .process-icon {
        width: 50px;
        height: 50px;
    }
    
    .process-line { top: 50px; left: 25px; }
    
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .btn + .btn {
        margin-left: 0 !important;
    }
    
    .navbar-brand img {
        height: 45px;
        margin-right: 0.5rem;
    }
    
    .navbar-brand h1 {
        font-size: 1.2rem !important;
    }
    
    .hero-logo {
        height: 60px;
        max-width: 80px;
        margin-bottom: 1rem;
    }
    
    .hero-title-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title-container h2 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 575.98px) {
    :root {
        --section-padding: 2rem 0;
    }
    
    .hero-section h2 {
        font-size: 1.75rem;
    }
    
    .hero-image-placeholder {
        height: 200px;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        line-height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .process-icon {
        width: 40px;
        height: 40px;
    }
    
    .process-line { top: 40px; left: 20px; }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .navbar-brand h1 {
        font-size: 1.25rem;
    }
    
    .hero-logo {
        height: 50px;
        max-width: 70px;
    }
    
    .hero-title-container h2 {
        font-size: 1.25rem !important;
    }
}
