/* ==========================================================================
   1. Global Reset & Variables
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Includes padding within element widths */
}

:root {
    --brand-blue: #27A9E0;
    --brand-purple: #8628BE;
    --dark-slate: #1a1e24;
    --light-gray: #f4f6f9;
    --text-dark: #2d3436;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
}

/* ==========================================================================
   2. Header & Navigation (With Logo Asset Rules)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 6%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    height: 100px;             /* Constrains height to match navigation bar proportion */
    width: auto;              /* Retains correct visual aspect ratio */
    max-width: 300px;         /* Prevents super wide assets from crowding links */
    object-fit: contain;
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.02);    /* Subtle interactive responsiveness */
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--dark-slate);
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.btn-nav {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    color: var(--white) !important;
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
}

/* ==========================================================================
   2b. Navigation Dropdown Core Mechanics
   ========================================================================== */
.dropdown {
    position: relative; /* Acts as the absolute anchoring baseline for the child menu */
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.arrow {
    font-size: 0.6rem;
    color: var(--brand-purple);
    transition: transform 0.2s ease;
}

/* Hidden sub-list wrapper by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Positions it perfectly flush beneath the header item */
    left: 0;
    background-color: var(--white);
    min-width: 240px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0;          /* Removed the gap that was breaking the hover connection */
    border-top: 4px solid var(--brand-blue); /* Serves as both your accent line and the bridge */

}

/* Internal menu items formatting */
.dropdown-menu li {
    margin-left: 0 !important; /* Overrides the standard header margins */
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap; /* Forces link text to remain on a clean single line */
    transition: background 0.2s, color 0.2s;
}

/* Hover States */
.dropdown-menu a:hover {
    background-color: var(--light-gray);
    color: var(--brand-purple);
}

/* Interactive triggers using CSS positioning mechanics */
.dropdown:hover .dropdown-menu {
    display: block; /* Dynamically renders menu when cursor moves over container */
}

.dropdown:hover .arrow {
    transform: rotate(180deg); /* Flips icon smoothly on focus activation */
}

/* Mobile Submenu Handling Override */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static; /* Drops relative layering on thin layouts */
        box-shadow: none;
        border: none;
        background: var(--light-gray);
        min-width: 100%;
        text-align: center;
        padding: 0;
    }
}

/* ==========================================================================
   3. Corporate Overview Hero
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, rgba(39, 169, 224, 0.95), rgba(134, 40, 190, 0.95)),
                url('https://unsplash.com') no-repeat center center/cover;
    padding: 8rem 6%;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

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

/* ==========================================================================
   4. Portfolio / Enterprise Presentation
   ========================================================================== */
.portfolio-container {
    padding: 5rem 6%;
    background-color: var(--white);
    text-align: center;
}

.portfolio-container h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark-slate);
}

.portfolio-card {
    background-color: var(--light-gray);
    border-left: 5px solid var(--brand-purple);
    padding: 3rem;
    border-radius: 6px;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.portfolio-card h3 {
    font-size: 1.6rem;
    color: var(--dark-slate);
}

.tagline {
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.portfolio-card p {
    margin-bottom: 1.5rem;
    color: #555;
}

.btn-external {
    display: inline-block;
    color: var(--brand-purple);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.btn-external:hover {
    transform: translateX(4px);
    color: var(--brand-blue);
}

/* ==========================================================================
   5. Corporate Data Layout
   ========================================================================== */
.contact-section {
    padding: 5rem 6%;
    background-color: var(--light-gray);
}

.contact-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark-slate);
}

.contact-grid {
    display: flex;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info, .contact-purpose {
    flex: 1;
}

.contact-grid h3 {
    margin-bottom: 1.2rem;
    color: var(--brand-purple);
    font-size: 1.3rem;
}

.contact-info p {
    margin-bottom: 0.8rem;
}

/* ==========================================================================
   6. Global Footer Layout
   ========================================================================== */
.footer {
    background-color: var(--dark-slate);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: 0.85rem;
    border-top: 3px solid var(--brand-blue);
}

/* ==========================================================================
   7. Mobile Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1.2rem;
        padding: 1rem 5%;
    }
    
    .brand-logo {
        height: 45px;         /* Slightly smaller on mobile layouts */
    }

    .nav-links li {
        margin: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .contact-grid {
        flex-direction: column;
        gap: 2rem;
    }
}

