/* style.css */
/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; background-color: #f9f9f9; display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Variables --- */
:root {
    --primary-color: #003366; /* Navy */
    --accent-color: #f4a261;  /* Orange */
    --light-grey: #f4f4f4;
    --dark-grey: #222;
    --white: #ffffff;
}

/* --- Navigation --- */
header { background: var(--white); box-shadow: 0 2px 5px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-transform: uppercase; letter-spacing: 1px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-weight: 500; color: var(--dark-grey); transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); font-weight: 700; }

/* --- Hero Section (Home Only) --- */
.hero { height: 80vh; background: linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6)), url('images/home-bg.jpeg'); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; max-width: 600px; margin: 0 auto 30px auto; }
.btn { display: inline-block; padding: 12px 30px; background: var(--accent-color); color: var(--white); border-radius: 5px; font-weight: 600; transition: background 0.3s; }
.btn:hover { background: #e76f51; }

/* --- General Layout --- */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h1,
.section-title h2 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 10px; }
.section-title .line { width: 60px; height: 4px; background: var(--accent-color); margin: 0 auto; }
.bg-light { background-color: var(--light-grey); }

/* --- About Styles --- */
.about-content { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.about-text { flex: 1; min-width: 300px; }
.about-image { flex: 1; min-width: 300px; height: 300px; background-color: #ddd; background-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); background-size: cover; background-position: center; border-radius: 8px; }

/* --- Services & Projects Grid --- */
.services-grid, .projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s; }
.service-card:hover { transform: translateY(-5px); }
.service-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; display: block; }
.project-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: transform 0.3s; }
.project-card:hover { transform: translateY(-5px); }
.project-img { height: 200px; background-color: #ccc; width: 100%; object-fit: cover; display: block; }
.project-info { padding: 20px; }

/* --- Contact Styles --- */
.contact-container { display: flex; flex-wrap: wrap; gap: 50px; }
.contact-info, .contact-form-wrapper { flex: 1; min-width: 300px; }
.contact-form-wrapper { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.info-item { margin-bottom: 20px; display: flex; align-items: center; }
.info-item span { font-weight: bold; margin-right: 10px; color: var(--accent-color); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
.form-group textarea { height: 120px; resize: vertical; }
button[type="submit"] { width: 100%; padding: 12px; background: var(--primary-color); color: var(--white); border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; transition: background 0.3s; }
button[type="submit"]:hover { background: #002244; }

/* --- Footer --- */
footer { background: var(--dark-grey); color: var(--white); text-align: center; padding: 20px 0; margin-top: auto; }

/* --- Mobile --- */
@media (max-width: 768px) {
    nav { flex-direction: column; height: auto; padding: 15px 0; }
    .nav-links { margin-top: 15px; gap: 15px; }
    .hero h1 { font-size: 2rem; }
}

/* --- FIXED PROJECT CARD SIZING --- */

/* 1. Make the link (anchor) fill the entire grid cell height */
.project-link {
    text-decoration: none;
    color: inherit;
    display: block; 
    height: 100%; /* CRITICAL: Forces the link to be as tall as the row */
}

/* 2. Make the card a Flexbox container so we can control spacing */
.project-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    
    /* These 3 lines enforce the equal height */
    height: 100%; 
    display: flex;
    flex-direction: column;
}

/* 3. Keep the image size fixed */
.project-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0; /* Prevents image from squishing if text is huge */
}

/* 4. Make the text area fill the remaining space */
.project-info {
    padding: 20px;
    flex-grow: 1; /* Pushes the content to fill the card height */
    display: flex;
    flex-direction: column;
}

/* 5. Force the "View Details" arrow to always stick to the bottom */
.project-info span {
    margin-top: auto; /* Pushes the arrow to the bottom of the card */
    display: block;
    color: var(--accent-color); 
    font-size: 0.9rem; 
    font-weight: bold; 
}
