/* File: /includes/site.css */

/* --- General Reset & Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
    -webkit-font-smoothing: antialiased;

    /* TRANSITION SETUP */
    /* Start hidden to prevent flash of unstyled content */
    opacity: 0;
    /* Smooth fade for 300ms */
    transition: opacity 0.3s ease-in-out;
}

/* VISIBLE STATE */
/* Applied by JS when page is ready */
body.loaded {
    opacity: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* --- Header & Nav --- */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo img {
    height: 40px;
    width: auto;
    display: block;
}

ul.nav-menu {
    display: flex;
    align-items: center;
    height: 100%;
}

ul.nav-menu>li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

ul.nav-menu>li>a {
    padding: 0 15px;
    font-weight: bold;
    height: 100%;
    display: flex;
    align-items: center;
}

ul.nav-menu>li>a:hover {
    color: #007bff;
    background-color: #f9f9f9;
}

.nav-menu>li.nav-portal>a {
    height: auto;
    margin-left: 10px;
    padding: 10px 16px;
    border-radius: 4px;
    background: #102d5c;
    color: #fff;
    line-height: 1.1;
    white-space: nowrap;
}

.nav-menu>li.nav-portal>a:hover {
    background: #007bff;
    color: #fff;
}

/* Dropdowns */
ul.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ccc;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

ul.dropdown li a {
    display: block;
    padding: 12px 15px;
    color: #555;
    font-size: 0.9em;
}

ul.dropdown li a:hover {
    background-color: #f0f0f0;
    color: #007bff;
}

ul.nav-menu>li:hover>ul.dropdown {
    display: block;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

/* --- Main Content --- */
main {
    flex: 1;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

main h1 {
    margin-bottom: 10px;
}

main p {
    margin-bottom: 14px;
}

.service-highlights {
    margin-top: 16px;
    padding-left: 18px;
    list-style: disc;
}

.service-highlights li {
    margin-bottom: 8px;
}

/* --- LinkedIn Section --- */
.social-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e3e3e3;
}

.social-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.social-header h2 {
    font-size: 22px;
    line-height: 1.2;
}

.social-header p {
    margin: 6px 0 0 0;
    color: #444;
}

.social-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
    font-weight: bold;
}

.social-link:hover {
    border-color: #007bff;
    color: #007bff;
}

.linkedin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.linkedin-card {
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.linkedin-embed-wrap iframe {
    width: 100%;
    border: 0;
    display: block;
    min-height: 560px;
}

.embed-fallback {
    padding: 12px 14px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.embed-fallback a {
    color: #007bff;
    font-weight: bold;
}

.embed-fallback a:hover {
    text-decoration: underline;
}

.embed-note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

/* --- FOOTER STYLES --- */
footer {
    background-color: #EBEBEB;
    padding: 50px 50px 20px 50px;
    margin-top: auto;
    border-top: 1px solid #dcdcdc;
}

.footer-links-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto 40px auto;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 220px;
}

.footer-col h3 {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #007bff;
    letter-spacing: 0.5px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    font-size: 14px;
    color: #444;
}

.footer-col ul li a:hover {
    color: #007bff;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid #ccc;
    padding-top: 30px;
}

.footer-info-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo img {
    max-width: 200px;
    height: auto;
}

.footer-address,
.footer-contact,
.footer-areas {
    font-size: 14px;
    line-height: 1.5;
}

.footer-areas strong {
    color: #007bff;
}

.footer-contact a {
    color: #333;
}

.footer-contact a:hover {
    color: #007bff;
    text-decoration: underline;
    font-weight: bold;
}

.footer-copyright {
    text-align: right;
    font-weight: bold;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .linkedin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    nav {
        height: auto;
        padding: 15px;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    ul.nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 20px;
    }

    ul.nav-menu.active {
        display: flex;
    }

    ul.nav-menu>li {
        width: 100%;
        align-items: flex-start;
        /* Allow column layout for mobile items */
        flex-direction: column;
        height: auto;
    }

    ul.nav-menu>li>a {
        width: 100%;
        padding: 15px;
        justify-content: space-between;
    }

    .nav-menu>li.nav-portal>a {
        margin: 10px 15px 0;
        width: calc(100% - 30px);
        justify-content: center;
        text-align: center;
    }

    /* FIXED: Hide submenus by default on mobile */
    ul.dropdown {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        padding-left: 20px;
        border-left: 2px solid #eee;
        border-right: none;
        border-top: none;
        border-bottom: none;
    }

    /* FIXED: Show submenu only when JS adds 'active-dropdown' class */
    ul.nav-menu>li.active-dropdown>ul.dropdown {
        display: block;
    }

    /* Optional: Style the parent link when active */
    ul.nav-menu>li.active-dropdown>a {
        background-color: #f8f9fa;
        color: #007bff;
    }

    .footer-links-container {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-copyright {
        text-align: left;
    }

    .linkedin-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SHARED BUTTON STYLES --- */
.commercialBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.commercialBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.commercialBtnPrimary {
    background: #fff;
    color: #102d5c;
    border-color: #fff;
}

.commercialBtnPrimary:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #102d5c;
}

.commercialBtnDark {
    background: #102d5c;
    color: #fff;
    border-color: #102d5c;
}

.commercialBtnDark:hover {
    background: #0d2248;
    color: #fff;
}


/* --- ABOUT PAGES (COMPACT INDUSTRIAL THEME) --- */

.about-main {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    border-top: 1px solid #102d5c;
}

/* Hero: More compact height, managed typography */
.about-hero {
    min-height: 35vh;
    /* Reduced from 50vh */
    display: flex;
    align-items: flex-end;
    padding: 40px 40px;
    /* Reduced from 60px */
    border-bottom: 2px solid #102d5c;
    background: #fff;
}

.about-hero-text {
    width: 100%;
}

.about-hero-text h1 {
    /* Significantly reduced max size from 9rem to 5rem */
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.9;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    color: #102d5c;
    margin: 0 0 15px 0;
}

.about-hero-lede {
    font-size: 1.1rem;
    /* Standardized manageable size */
    line-height: 1.5;
    max-width: 700px;
    font-weight: 500;
    color: #333;
    margin: 0 0 25px 0;
    padding-left: 20px;
    border-left: 4px solid #007bff;
}

/* Grid Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    background: #102d5c;
    gap: 0;
}

.about-card {
    background: #fff;
    padding: 50px 40px;
    /* Reduced padding for tighter cells */
    border-right: 2px solid #102d5c;
    border-bottom: 2px solid #102d5c;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: background-color 0.2s ease;
}

.about-card:hover {
    background-color: #f0f8ff;
}

.about-card:nth-child(even) {
    border-right: none;
}

.about-card h2,
.about-card h3 {
    font-size: 1.75rem;
    /* Reduced from 2.5rem */
    text-transform: uppercase;
    color: #102d5c;
    margin: 0 0 20px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.about-card p {
    font-size: 1.1rem;
    /* Slightly smaller body text */
    line-height: 1.6;
    color: #333;
    max-width: 95%;
}

/* Technical List Style */
.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.about-list li {
    padding: 15px 0;
    /* Reduced padding */
    border-bottom: 1px solid rgba(16, 45, 92, 0.2);
    font-size: 1.15rem;
    /* Reduced from 1.4rem */
    font-weight: 700;
    color: #102d5c;
    display: flex;
    align-items: center;
}

.about-list li::before {
    content: '→';
    margin-right: 12px;
    color: #007bff;
    font-weight: 800;
}

.about-list li:last-child {
    border-bottom: none;
}

/* Award Image Frame */
.about-award-img {
    margin: 30px 0 10px 0;
    border: 2px solid #102d5c;
    padding: 10px;
    background: #fff;
    box-shadow: 8px 8px 0px rgba(16, 45, 92, 0.15);
    /* Smaller shadow */
    max-width: 400px;
    width: 100%;
    transform: rotate(-1deg);
    mix-blend-mode: multiply;
}

/* Footer CTA */
.about-cta {
    padding: 80px 40px;
    /* Reduced from 120px */
    background: #102d5c;
    color: #fff;
    text-align: center;
}

.about-cta h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    /* Tamed headline */
    text-transform: uppercase;
    line-height: 1;
    margin: 0 0 30px 0;
    font-weight: 800;
}

.about-cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Button overrides for About Page */
.about-btn {
    padding: 15px 30px;
    /* Smaller buttons */
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border: 2px solid #102d5c;
    background: transparent;
    color: #102d5c;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-block;
}

.about-btn-primary {
    background: #102d5c;
    color: #fff;
}

.about-btn-primary:hover {
    background: #007bff;
    border-color: #007bff;
}

.about-btn-ghost {
    border-color: #102d5c;
    color: #102d5c;
}

.about-btn-ghost:hover {
    background: #102d5c;
    color: #fff;
}

/* Dark CTA Button overrides */
.about-cta .about-btn {
    border-color: #fff;
    color: #fff;
}

.about-cta .about-btn:hover {
    background: #fff;
    color: #102d5c;
}

.about-cta .about-btn-primary {
    background: #fff;
    color: #102d5c;
}

.about-cta .about-btn-primary:hover {
    background: transparent;
    color: #fff;
}

/* Responsive for About */
@media (max-width: 900px) {
    .about-hero {
        padding: 40px 20px;
        min-height: auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        border-right: none;
        padding: 40px 20px;
    }

    .about-award-img {
        width: 100%;
        transform: none;
        box-shadow: 4px 4px 0px rgba(16, 45, 92, 0.15);
    }

    .about-hero-lede {
        padding-left: 0;
        border-left: none;
        border-top: 4px solid #007bff;
        padding-top: 15px;
    }
}

/* --- Mobile Specific Utilities --- */
/* Hide the explicit overview link on desktop to avoid redundancy */
.mobile-overview {
    display: none;
}

@media (max-width: 768px) {

    /* Show it only on mobile screens */
    .mobile-overview {
        display: block;
    }
}
