/*
---
File: style.css
Project: Emit Elektromekanik Redesign
Author: Gemini
---
*/

/* 1. Global Styles & Variables
-------------------------------------------------- */
:root {
    --primary-color: #0d2c54; /* Deep Blue from Logo */
    --secondary-color: #6c757d; /* Grey from Logo */
    --accent-color: #0099cc; /* Blue from old site for highlights */
    --light-grey: #f8f9fa;
    --dark-grey: #343a40;
    --white-color: #ffffff;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 5px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--secondary-color);
    background-color: var(--white-color);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-grey);
}

.text-center {
    text-align: center;
}

.section-title {
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-intro {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
}

/* 2. Buttons & Forms
-------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-primary);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* 3. Header & Navigation
-------------------------------------------------- */
.main-header {
    background-color: var(--white-color);
    box-shadow: var(--box-shadow);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 10px 0;
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 4. Hero Section
-------------------------------------------------- */
.hero {
    position: relative;
    height: 80vh;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    color: var(--white-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 44, 84, 0.7); /* Dark blue overlay */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--white-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* 5. Grid & Cards
-------------------------------------------------- */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-title {
    margin-bottom: 10px;
}

.card-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* 6. Page Specific Sections
-------------------------------------------------- */

/* Featured Project */
.featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.featured-project-img img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* CTA Section */
.cta-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    color: var(--white-color);
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    color: var(--white-color);
    font-size: 2.8rem;
}
.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-page-img img {
     border-radius: var(--border-radius);
}

/* Projects Page */
.filter-buttons {
    margin-bottom: 40px;
    text-align: center;
}
.filter-buttons button {
    margin: 5px;
    background: none;
    border: 1px solid var(--secondary-color);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.filter-buttons button.active,
.filter-buttons button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-item {
    display: block; /* Make the whole card clickable */
    color: inherit;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.project-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.project-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(13, 44, 84, 0.95), transparent);
    color: var(--white-color);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.project-item:hover .project-item-overlay {
    transform: translateY(0);
}
.project-item:hover img {
    transform: scale(1.1);
}
.project-item-title {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--white-color);
    margin: 0;
}
.project-item-category {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Project Detail Page */
.project-detail-header {
    text-align: center;
    padding: 60px 0;
    background-color: var(--light-grey);
}
.project-detail-header .section-title::after{
    display: none; /* remove separator line */
}
.project-detail-title {
    color: var(--primary-color);
}
.project-detail-img {
    margin-bottom: 40px;
}
.project-detail-img img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.project-detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}
.project-meta {
    background-color: var(--light-grey);
    padding: 20px;
    border-radius: var(--border-radius);
}
.project-meta-item {
    margin-bottom: 15px;
}
.project-meta-item strong {
    display: block;
    color: var(--primary-color);
    font-family: var(--font-primary);
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--white-color);
    padding: 40px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}
.contact-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
}
.contact-form textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* 7. Footer
-------------------------------------------------- */
.main-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 20px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--white-color);
    font-family: var(--font-primary);
    margin-bottom: 20px;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col a {
    color: rgba(255, 255, 255, 0.8);
}
.footer-col a:hover {
    color: var(--white-color);
    text-decoration: underline;
}
.footer-bottom {
    border-top: 1px solid var(--secondary-color);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* 8. Responsive Design
-------------------------------------------------- */
@media (max-width: 992px) {
    .grid-3-col, .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-project, .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.2rem; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px; /* height of header */
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: var(--box-shadow);
        padding: 20px;
        text-align: center;
    }

    .main-nav.active .nav-links {
        display: flex;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .grid-3-col, .footer-grid, .project-detail-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .section-padding { padding: 60px 0; }
    .hero { height: 70vh; }
    .hero-title { font-size: 2.2rem; }

    .featured-project-content {
        margin-top: 30px;
    }
}

/* Back to Projects Link Style */
.back-link {
    display: inline-block;
    margin-top: 30px; /* This adds the space from the text above */
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}