/* ALINK Engineering Custom Styles */

:root {
    --primary-green: #28a745;
    --accent-green: #218838;
    --light-green: #d4edda;
    --white: #ffffff;
    --deep-white: #f8f9fa;
    --dark-grey: #333333;
    --light-grey: #f8f9fa;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-grey);
}

p {
    text-align: center;
}

.card-text {
    text-align: center;
}

.policy-content p {
    text-align: center;
}

.about-content p {
    text-align: center;
}

/* Keep titles center-aligned */
h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

.card-title {
    text-align: center;
}

.display-4, .display-5 {
    text-align: center;
}

/* Navbar Styles */
.navbar {
    background-color: var(--deep-white) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-grey) !important;
    background-color: var(--deep-white);
    padding: 5px 10px;
    border-radius: 5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
    color: var(--dark-grey) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-green) !important;
    background-color: rgba(40,167,69,0.1);
    border-radius: 5px;
}

.navbar-nav .nav-link.active {
    color: var(--primary-green) !important;
    background-color: rgba(40,167,69,0.1);
    border-radius: 5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-height: 400px;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,0.1);
}

/* Section Styles */
section {
    padding: 80px 0;
}

section.py-5 {
    padding: 60px 0;
}

/* Alternate section backgrounds */
section.bg-light {
    background-color: var(--light-green) !important;
}

section.bg-primary {
    background-color: var(--primary-green) !important;
    color: var(--white);
}

section.bg-primary h1,
section.bg-primary h2,
section.bg-primary h3,
section.bg-primary h4,
section.bg-primary h5,
section.bg-primary h6,
section.bg-primary p,
section.bg-primary .lead {
    color: var(--white);
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(40,167,69,0.2);
}

.service-card .card-img-top {
    height: 250px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(40,167,69,0.2);
}

.product-card .card-img-top {
    height: auto;
    max-height: 400px;
    width: 100%;
    object-fit: contain;
    background: #f8f9fa;
    padding: 20px;
}

.service-card .card-body {
    padding: 2rem;
}

.service-card i {
    transition: transform 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.2);
}

/* Project Tables */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: var(--light-green);
    transform: scale(1.01);
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem;
}

.table tbody img {
    transition: transform 0.3s ease;
}

.table tbody img:hover {
    transform: scale(1.1);
}

/* Project Cards for Mobile */
.project-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-green);
}

.project-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.15);
}

.project-card .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* Project Sections */
#completed-projects, #ongoing-projects {
    position: relative;
}

#completed-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-green) 100%);
}

#ongoing-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green) 0%, var(--primary-green) 100%);
}

/* Load More Button */
.btn-load-more {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.3);
}

/* Project Cards */
.project-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-green);
}

.project-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* About Section */
.about-content {
    text-align: justify;
}

.certificate-item img {
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.certificate-item:hover img {
    filter: grayscale(0%);
}

/* Certificate Image Styles */
.certificate-image-container {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.certificate-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.certificate-image-wrapper {
    border: 3px solid var(--light-green);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    text-align: center;
}

.certificate-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.certificate-image:hover {
    transform: scale(1.02);
}

.certificate-image-container h4 {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-info i {
    width: 40px;
    text-align: center;
}

.map-placeholder {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Policy Section */
.policy-content h6 {
    color: var(--primary-green);
    font-weight: 600;
}

.policy-content p {
    text-align: justify;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

footer p {
    text-align: left !important;
}

footer h5 {
    text-align: left !important;
}

footer .text-center p {
    text-align: center !important;
}

.social-links a {
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-green) !important;
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40,167,69,0.3);
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--primary-green) !important;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(31,122,77,0.25);
}

/* Back to top button */
.btn.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 1000;
    opacity: 0.8;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.btn.back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.4);
}

.btn.back-to-top i {
    margin: 0;
    line-height: 1;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Mobile Navigation Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--deep-white) !important;
        border-radius: 10px;
        padding: 20px;
        margin-top: 15px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        border: 1px solid #e9ecef;
    }
    
    .navbar-nav .nav-link {
        color: var(--dark-grey) !important;
        padding: 12px 20px !important;
        margin: 5px 0;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: rgba(40,167,69,0.05);
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(40,167,69,0.1) !important;
        color: var(--primary-green) !important;
        transform: translateX(5px);
        box-shadow: 0 4px 15px rgba(40,167,69,0.1);
    }
    
    .navbar-nav .nav-link.active {
        background: rgba(40,167,69,0.15) !important;
        color: var(--primary-green) !important;
        box-shadow: 0 4px 15px rgba(40,167,69,0.15);
    }
    
    .dropdown-menu {
        background: var(--deep-white) !important;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        backdrop-filter: blur(10px);
        margin-top: 10px;
        padding: 10px;
    }
    
    .dropdown-item {
        color: var(--dark-grey) !important;
        padding: 12px 20px;
        margin: 3px 0;
        border-radius: 6px;
        transition: all 0.3s ease;
        font-weight: 500;
    }
    
    .dropdown-item:hover {
        background: var(--primary-green) !important;
        color: var(--white) !important;
        transform: translateX(5px);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    /* Mobile Certificate Image Styles */
    .certificate-image {
        max-height: 400px !important;
    }
    
    .certificate-image-container {
        padding: 15px;
        margin-bottom: 2rem;
    }
    
    .certificate-image-container h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .hero-image img {
        max-height: 250px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}
