:root {
    --brand-blue: #004a99;
    --brand-gold: #ff9900;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --transition: all 0.3s ease;
}


* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-main); 
    line-height: 1.6; 
    background: var(--white); 
    scroll-behavior: smooth; 
}

h1, h2, h3, .nav-logo { 
    font-family: 'Oswald', sans-serif; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

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

ul { 
    list-style: none; 
}

/* --- NAVIGATION --- */
nav {
    background: var(--white);
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.nav-logo img { 
    height: 75px; 
    vertical-align: middle; 
}

.nav-links { 
    display: flex; 
    align-items: center; 
}

.nav-links li { 
    margin-left: 2.5rem; 
}

.nav-links a { 
    font-weight: 600; 
    color: var(--text-main); 
    font-size: 0.9rem; 
}

.nav-links a:hover { 
    color: var(--brand-blue); 
}

.btn-nav {
    background: var(--brand-blue);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
}

/* --- HERO SECTION --- */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('img/project-MCF_ShahAlam-switchgearreplacement.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 70px;
}

.hero-content h1 { 
    font-size: 3.5rem; 
    margin-bottom: 1rem; 
    line-height: 1.1; 
}

.hero-content p { 
    font-size: 1.2rem; 
    max-width: 700px; 
    margin: 0 auto 2rem; 
    opacity: 0.9; 
}

.cta-group { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
}

.btn { 
    padding: 15px 35px; 
    border-radius: 4px; 
    font-weight: 700; 
    cursor: pointer; 
    display: inline-block; 
}

.btn-primary { 
    background: var(--brand-gold); 
    color: var(--white); 
    border: none; 
}

.btn-outline { 
    border: 2px solid var(--white); 
    color: var(--white); 
}

.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
}

/* --- STATS SECTION --- */
.stats-bar {
    background: var(--brand-blue);
    color: var(--white);
    padding: 1rem 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat-item h2 { 
    font-size: 2.5rem; 
    color: var(--brand-gold); 
}

section { 
    padding: 6rem 8%; 
}

.section-header { 
    text-align: center; 
    margin-bottom: 4rem; 
}

.section-header h2 { 
    font-size: 2.5rem; 
    color: var(--brand-blue); 
    position: relative; 
    padding-bottom: 15px; 
}

.section-header h2::after { 
    content: ''; 
    width: 60px; 
    height: 4px; 
    background: var(--brand-gold); 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
}

/* --- ABOUT & CONTACT WRAP --- */
.contact-wrap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	background: var(--bg-light);
	padding: 60px;
	border-radius: 12px;
}

.about-header-box {
	display: flex;
	align-items: center;
	gap: 25px;
	margin-bottom: 2rem;
}

.about-header-box .section-header {
	margin-bottom: 0;
	text-align: left;
}

.about-header-box h2 {
	padding-bottom: 10px;
	margin-bottom: 0;
	text-align: left;
}

.about-header-box h2::after {
	left: 0;
	transform: none;
}

.about-logo-icon {
	height: 200px; /* Increased from 60px */
	width: auto;
	object-fit: contain;
}

/* --- CERTIFIED SECTION --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cert-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.cert-card img { 
    width: 50%; 
    height: auto; 
    object-fit: cover; 
    transition: 0.5s; 
}

.cert-card h3 { 
    margin-bottom: 1rem; 
    font-size: 20px; 
    text-align: center; 
}

.cert-card iframe { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    transition: 0.5s; 
}

.cert-card:hover iframe { 
    width: 100%; 
    height: 410px; 
}

/* --- PRODUCTS & SERVICES & PORTFOLIO COMMON --- */
.products-grid, .services-grid, .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    grid-auto-rows: minmax(300px, auto);
}

.product-item, .service-item, .portfolio-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.product-item img, .service-item img, .portfolio-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.5s; 
}

.product-overlay, .service-overlay, .portfolio-overlay {
    position: absolute; 
    bottom: -100%; 
    left: 0; 
    width: 100%; 
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white; 
    transition: 0.4s;
}

.product-item:hover .product-overlay, 
.service-item:hover .service-overlay, 
.portfolio-item:hover .portfolio-overlay { 
    bottom: 0; 
}

.product-item:hover img, 
.service-item:hover img, 
.portfolio-item:hover img { 
    transform: scale(1.1); 
}

/* --- LOGO SLIDER (REFACTORED FOR INFINITE LOOP) --- */
.logo-slider {
    width: 100%;
    overflow: hidden;
    background: white;
    padding: 60px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    position: relative;
}

/* Gradient Fade Effects on Sides */
.logo-slider::before,
.logo-slider::after {
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.logo-slider::before {
    left: 0;
    top: 0;
    background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
}

.logo-slider::after {
    right: 0;
    top: 0;
    background: linear-gradient(to left, white 0%, rgba(255, 255, 255, 0) 100%);
}

.logo-track {
    display: flex;
    width: max-content; /* Critical: allows track to be as wide as content */
    animation: scrollInfinite 30s linear infinite;
}

.slide {
    flex-shrink: 0;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

.slide img {
    width: 100%;
    max-width: 160px;
    height: auto;
    opacity: 0.6;
    /*filter: grayscale(100%);  */
    transition: var(--transition);
}

.slide:hover img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Right to Left Animation */
@keyframes scrollInfinite {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Scrolls exactly half the total width of the track */
        transform: translateX(-50%);
    }
}

/* Pause on hover for better user experience */
.logo-track:hover {
    animation-play-state: paused;
}

/* --- ABOUT & CONTACT WRAP --- */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--bg-light);
    padding: 60px;
    border-radius: 12px;
}

.contact-form input, .contact-form textarea {
    width: 100%; 
    padding: 15px; 
    margin-bottom: 20px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-family: inherit;
}

.contact-info-box { 
    display: flex; 
    align-items: center; 
    margin-bottom: 30px; 
}

.contact-info-box i { 
    width: 50px; 
    height: 50px; 
    background: var(--white); 
    color: var(--brand-blue); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    margin-right: 20px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

/* --- FOOTER --- */
footer { 
    background: #0f172a; 
    color: #94a3b8; 
    padding: 4rem 5% 2rem; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 40px; 
    margin-bottom: 3rem;
	height: 250px;
}

.footer-brand h3 { 
    color: white; 
    margin-bottom: 1rem; 
}

.social-links a { 
    color: #94a3b8; 
    font-size: 1.5rem; 
    margin-right: 15px; 
}

.social-links a:hover { 
    color: var(--brand-gold); 
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .contact-wrap { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .products-grid, .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
}
