/* ============================================================
   GLOBAL RESET & CONTAINER
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

/* Container class - controls max width of all content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ============================================================
   BUSINESS / CORPORATE TEMPLATE VARIABLES
   ============================================================ */

:root {
    /* Brand Colors - Corporate Blue */
    --primary-blue: #0052cc;
    --secondary-blue: #172b4d;
    --accent-color: #ff8c00;

    /* Backgrounds */
    --bg-color: #f5f7fb;
    --card-bg-light: #ffffff;
    --card-bg-alt-light: #f0f2f7;

    /* Text */
    --text-color: #1a1f36;
    --text-muted: #5e6c84;

    /* Borders & Shadows */
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============================================================
   LAYOUT & STICKY FOOTER
   ============================================================ */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: opacity 0.15s ease-in-out;
}

/* Main content spacing & flex expansion */
.main-content {
    flex: 1 0 auto;
    padding: 40px 0;
    min-height: 40vh;
}

/* Handle empty main content states gracefully */
.main-content:empty {
    padding: 20px 0;
    min-height: 20vh;
}

.footer {
    margin-top: auto;
}

/* ============================================================
   HERO SECTIONS
   ============================================================ */

/* Hero section - full width with background image support */
.hero-section,
.hero {
    width: 100%;
    padding: 80px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Hero title styles */
.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Hero subtitle styles */
.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.hero-tagline {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Ensure hero content respects container depth */
.hero-section .container,
.hero .container {
    position: relative;
    z-index: 2;
}

/* ============================================================
   PROFESSIONAL NAVIGATION HEADER
   ============================================================ */

header {
    background: #1a1a2e;
    color: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.brand .logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    align-items: center;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a:not(.btn):not(.btn-primary) {
    font-weight: 500;
}

/* Dropdown Menu Mechanics */
.dropdown {
    position: relative;
}

/* Transparent pseudo-bridge prevents dropdown hover gap flicker */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #1a1a2e;
    min-width: 200px;
    padding: 0.5rem 0;
    border-radius: var(--border-radius-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(6px);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #ffffff;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================================
   TYPOGRAPHY & COMPONENTS
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Cards */
.service-card {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-lg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

/* Buttons (Replaced !important with specificity hooks) */
button.btn, 
a.btn, 
button.btn-primary, 
a.btn-primary {
    border-radius: 6px;
    font-weight: 600;
    text-transform: none;
    padding: 12px 28px;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Footer */
footer {
    background-color: var(--secondary-blue);
    color: #a5b3c9;
}

/* Stats section */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-tagline {
        font-size: 2rem;
    }

    .main-content {
        padding: 40px 0;
    }

    .brand .logo {
        height: 40px;
        max-width: 150px;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
        gap: 0.5rem;
    }

    nav ul.show {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
        transform: none;
        padding-left: 1rem;
        background: transparent;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* ============================================================
   AUTO-HEIGHT & FLEX LAYOUT PATCH
   ============================================================ */

/* 1. Ensure body uses natural flex distribution */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 2. Remove fixed height locks on main wrapper and sub-elements */
main,
.main-content,
.page-body,
[class$="-page"] .main-content {
    flex: 1 0 auto !important;
    min-height: auto !important;
    height: auto !important;
}

/* 3. Keep sticky footer at bottom for short content pages */
footer,
.footer {
    margin-top: auto !important;
}
