/* -----------------------------------------------------
   Global & Variables
----------------------------------------------------- */
:root {
    --dark-blue: #0D47A1;
    --medium-blue: #64B5F6;
    --light-blue: #E3F2FD;
    --white: #FFFFFF;
    --black: #212121;
    --grey-text: #424242;
    --light-grey: #f4f4f4;
    --navbar-height: 80px; /* Adjust as needed */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--grey-text);
    background-color: var(--white);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--dark-blue);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; text-align: center; }
h3 { font-size: 1.8rem; color: var(--dark-blue); font-weight: 500; }

p {
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

a {
    color: var(--medium-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-blue);
}

img {
    max-width: 100%;
    height: auto;
}

/* -----------------------------------------------------
   Navbar
----------------------------------------------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    background-color: transparent; /* Initial state */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--navbar-height);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo img {
    max-width: 130px;
    transition: filter 0.4s ease;
}

.navbar.scrolled .logo-image {
    filter: none;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: color 0.4s ease;
    flex-grow: 1; /* Pushes menu button to the right */
    padding-left: 1rem;
}

.navbar.top .company-name { color: var(--white); }
.navbar.scrolled .company-name { color: var(--dark-blue); }

.menu-button {
    background: none;
    border: 2px solid var(--white);
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-left: auto; /* Ensures it stays right */
}

.navbar.scrolled .menu-button {
    border-color: var(--dark-blue);
    color: var(--dark-blue);
}

.menu-button:hover {
    background-color: var(--medium-blue);
    color: var(--white);
    border-color: var(--medium-blue);
}

.menu-dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dark-blue);
    padding: 1rem;
    text-align: right;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.menu-dropdown.active { display: flex; }

.menu-dropdown a {
    color: var(--white);
    font-weight: 500;
    margin: 0.5rem 0;
    padding: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-dropdown a:hover {
    background-color: var(--medium-blue);
    color: var(--white);
}

/* -----------------------------------------------------
   Hero Section
----------------------------------------------------- */
.hero-section {
    min-height: 80vh; /* Changed from 100vh */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--dark-blue); /* Using Dark Blue */
    color: var(--white);
    padding: 6rem 2rem 4rem; /* Add padding top to account for navbar */
    background-image: linear-gradient(rgba(13, 71, 161, 0.85), rgba(13, 71, 161, 1)); /* Subtle gradient */
}

.hero-content h1 {
    font-size: 4rem; /* Adjusted size */
    color: var(--white);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--light-blue);
    font-weight: 400;
    max-width: 600px;
}

/* -----------------------------------------------------
   General Sections
----------------------------------------------------- */
.section {
    padding: 6rem 2rem; /* Increased padding */
    scroll-margin-top: var(--navbar-height); /* Offset for scrolling */
}

.section:nth-of-type(odd):not(.hero-section):not(.contact-section):not(.projects-section) {
    background-color: var(--light-grey); /* Subtle bg variation */
}

.section p, .section li {
    font-size: 1.1rem; /* Slightly larger base text */
    text-align: left; /* Default to left align */
}

.section h2 + p { /* Center align paragraph directly after H2 */
    text-align: center;
    margin-bottom: 3rem;
}

.intro-section p {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
}

/* -----------------------------------------------------
   Projects Section (Integrated from projects.html)
----------------------------------------------------- */
.projects-section {
    background-color: var(--dark-blue);
    color: var(--white);
}

.projects-section h2 {
    color: var(--white);
}

.projects-section p {
    color: var(--light-blue);
}

.projects-container {
    position: relative;
    padding: 20px;
    max-width: 900px; /* Increased max-width */
    margin: 40px auto 0;
}

.grid-wrapper {
    display: flex;
    justify-content: center;
}

.projects-grid {
    display: grid;
    grid-gap: 40px; /* Increased gap */
}

.project-cell {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: visible;
    min-width: 120px; /* Adjusted min-width */
}

/* --- MODIFIED .project RULE --- */
/* This is the old rule, which is now being replaced by the new system below */
/*
.project {
    position: absolute;
    width: 90%;
    aspect-ratio: 1;
    border: 4px solid var(--medium-blue);
    border-radius: 50%;
    background-color: var(--medium-blue);
    overflow: hidden;
    outline: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.project img {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 50%;
}
*/


#connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#connection-lines line {
    stroke: var(--medium-blue); /* Using Medium Blue */
    stroke-width: 2; /* Thinner lines */
    opacity: 0.6; /* Slight transparency */
}

@media (max-width: 767px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .projects-grid { grid-template-columns: repeat(4, 1fr); } /* Show 4 now */
}

/* -----------------------------------------------------
   Blog Section
----------------------------------------------------- */
.blog-section-wrapper {
    background-color: var(--light-grey);
}

.blog-title-link { text-decoration: none; }
.blog-title-link h2:hover { color: var(--medium-blue); }

.blog-section {
    padding: 0; /* Remove padding for inner section */
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.blog-post h3 {
    margin-bottom: 0.5rem;
}
.blog-post h3 a {
    color: var(--dark-blue);
}
.blog-post h3 a:hover {
    color: var(--medium-blue);
}

.blog-top-image {
    margin-bottom: 1rem;
}
.blog-top-image img {
    border-radius: 5px;
    width: 100%;
}

.post-meta {
    font-size: 0.9rem;
    color: #757575;
    margin-bottom: 1rem;
}

.read-more {
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

/* -----------------------------------------------------
   Contact Section
----------------------------------------------------- */
.contact-section {
    background-color: var(--white);
    text-align: center;
}

#contact-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Increased gap */
    text-align: left;
}

#contact-form label {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: -0.8rem; /* Pull label closer to input */
    display: block;
}

#contact-form input,
#contact-form textarea {
    padding: 1rem;
    border: 1px solid #ccc; /* Thinner border */
    border-radius: 5px; /* Less rounded */
    font-size: 1rem;
    outline: none;
    background-color: var(--white);
    color: var(--black);
    width: 100%;
    transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--medium-blue);
}

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.cta-button, button[type="submit"] {
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    outline: none;
    background-color: var(--medium-blue);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    display: inline-block; /* For potential 'a' tags */
}

.cta-button:button[type="submit"]:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

#email-link {
    font-weight: 600;
}

/* -----------------------------------------------------
   Footer
----------------------------------------------------- */
footer {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--light-blue);
    color: var(--grey-text);
    border-top: 1px solid #d1e9fc;
}

.social-links a {
    margin: 0 1rem;
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.social-links a:hover {
    color: var(--medium-blue);
}

/* -----------------------------------------------------
   Media Queries
----------------------------------------------------- */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .navbar {
        padding: 0.5rem 1rem;
        height: 70px; /* Smaller navbar on mobile */
    }
    .logo img { max-width: 100px; }
    .company-name { font-size: 1.25rem; }
    .menu-button { padding: 0.4rem 0.8rem; font-size: 0.9rem;}

    .hero-section { min-height: 60vh; padding: 5rem 1rem 3rem; }
    .section { padding: 4rem 1rem; }
    .projects-grid { grid-template-columns: repeat(2, 1fr); grid-gap: 20px; }
    .project-cell { min-width: 100px; }

    .menu-dropdown { width: 100%; right: 0; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .company-name { display: none; } /* Hide company name on very small screens */
    .projects-grid { grid-template-columns: repeat(2, 1fr); grid-gap: 15px; }
}

/* -------------------------------------------------------------------
   REMOVED/OLD STYLES (Kept for your reference)
------------------------------------------------------------------- */

/* This was the old overlay container. It is no longer needed. */
/*
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 71, 161, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project:hover .project-overlay,
.project:focus-within .project-overlay {
    opacity: 1;
    cursor: default;
}

.project-link {
    background-color: var(--white);
    color: var(--dark-blue);
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    min-width: 120px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.project-link:hover {
    background-color: var(--light-blue);
    color: var(--dark-blue);
    transform: scale(1.05);
}
*/
/* -------------------------------------------------------------------
   NEW STYLES for Interactive Expanding Projects (Combined Hover & Click)
------------------------------------------------------------------- */

/* The main project container. */
.project {
    position: absolute;
    display: flex;
    align-items: center;
    height: 100px;
    width: 100px; /* Initial state is a circle */
    background-color: var(--medium-blue);
    border-radius: 50px;
    padding: 5px;
    cursor: pointer;
    overflow: hidden;
    outline: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1;
    /* Animate width, transform, and shadow */
    transition: width 0.4s cubic-bezier(0.65, 0, 0.35, 1),
                transform 0.3s ease,
                box-shadow 0.3s ease;
}

/* On hover OR when expanded by click, apply the expanded styles.
   This single rule handles both interactions. The .is-expanded class
   acts as a "sticky" hover state. */
.project:hover,
.project.is-expanded {
    width: 340px; /* The final expanded width */
    z-index: 10;  /* Bring it to the very front */
    transform: scale(1.05); /* Apply the "pop" effect */
    box-shadow: 0 8px 25px rgba(0,0,0,0.3); /* Keep the nice shadow */
}

/* The white circular container for the project icon/image */
.project-icon-container {
    height: 90px;
    width: 90px;
    border-radius: 50%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-icon-container img {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    object-fit: cover;
}

/* The container for the title and links. */
.project-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 0 20px 0 15px;
    opacity: 0;
    white-space: nowrap; /* Prevents text from wrapping */
    transition: opacity 0.3s ease 0.1s;
}

/* Details become visible on hover OR when expanded by click. */
.project:hover .project-details,
.project.is-expanded .project-details {
    opacity: 1;
}

/* Styling for the new project title */
.project-title {
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    margin: 0;
}

/* Styling for the buttons */
.project-link {
    background-color: var(--white);
    color: var(--dark-blue);
    padding: 6px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.project-link:hover {
    background-color: var(--light-blue);
    color: var(--dark-blue);
    transform: scale(1.05);
}