/* ========================================
   ORIGENCE V6 - Modern Corporate Design
   Built from scratch with Tailwind + Custom CSS
   Version: 1.0.8 - Location Card/Image Only Reduction
   ======================================== */

/* ========================================
   ROOT & VARIABLES
   ======================================== */
:root {
    --header-height: 64px;
    --header-height-sm: 72px;
    --header-height-lg: 80px;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* (Reverted) Hero title custom class removed */

/* ========================================
   OVERLAY TOOLTIP (GLOBAL LAYER)
   ======================================== */
body.overlay-tooltip-open .badge:hover .tooltip,
body.overlay-tooltip-open .badge.active .tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
}

.tooltip-overlay {
    position: fixed;
    inset: 0;
    background: transparent; /* no page dim/blur */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
    z-index: 9999;
}

.tooltip-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.tooltip-float {
    position: fixed;
    max-width: min(280px, calc(100vw - 32px));
    background: #1F3A7E;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transition: opacity 180ms ease, transform 180ms ease;
}

.tooltip-overlay.show .tooltip-float {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Floating tooltip arrow with dynamic placement */
.tooltip-float .tooltip-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: inherit;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.tooltip-float[data-placement="top"] .tooltip-arrow {
    bottom: -6px;
    left: var(--arrow-left, 50%);
    transform: translateX(-50%) rotate(45deg);
}

.tooltip-float[data-placement="bottom"] .tooltip-arrow {
    top: -6px;
    left: var(--arrow-left, 50%);
    transform: translateX(-50%) rotate(45deg);
}

.tooltip-float[data-placement="left"] .tooltip-arrow {
    right: -6px;
    top: var(--arrow-top, 50%);
    transform: translateY(-50%) rotate(45deg);
}

.tooltip-float[data-placement="right"] .tooltip-arrow {
    left: -6px;
    top: var(--arrow-top, 50%);
    transform: translateY(-50%) rotate(45deg);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
/* Screen reader only - hides visually but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link - visible on keyboard focus */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-content:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: #507198;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    font-weight: 600;
    outline: 3px solid #5DACCC;
    outline-offset: 2px;
}

/* Focus visible styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid #507198;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible, 
a:focus-visible {
    outline: 3px solid #5DACCC;
    outline-offset: 3px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
#header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Logo styling */
#header a[href="#home"] img {
    object-fit: contain;
    max-height: 100%;
}

#header a[href="#home"] {
    text-decoration: none;
    transition: transform 0.3s ease;
}

/* Ensure header doesn't cause overflow */
#header nav {
    max-width: 100%;
}

/* Active navigation link styling */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #507198, #5DACCC);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.active,
.nav-link:hover {
    color: #507198;
}

.nav-link.active::after {
    width: 100%;
}

/* Mobile menu active state */
#mobile-menu a.active {
    background: linear-gradient(135deg, rgba(80, 113, 152, 0.1), rgba(93, 172, 204, 0.1));
    color: #507198;
    font-weight: 600;
}

/* Dropdown menu - works on hover (desktop) and click (touch) */
#about-dropdown {
    z-index: 50;
}

/* Show on hover for mouse devices */
@media (hover: hover) and (pointer: fine) {
    .group:hover #about-dropdown {
        display: block !important;
    }
}

/* Visible state when toggled by JS (touch devices) */
#about-dropdown:not(.hidden) {
    display: block !important;
}

/* Mobile header adjustments */
@media (max-width: 767px) {
    #header {
        height: auto;
        min-height: 64px;
    }
    
    #header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   SECTION CONTAINERS - FIT TO SCREEN
   ======================================== */
.section-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    position: relative;
}

/* Mobile: Allow natural flow */
@media (max-width: 767px) {
    .section-container {
        min-height: auto;
        padding: 4rem 0;
    }
}

/* Small Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .section-container {
        min-height: 100vh;
        padding: 5rem 0;
    }
}

/* Large Tablet: 1024px - 1279px (iPad Pro, Surface Pro) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .section-container {
        min-height: 100vh;
        padding: 5rem 0;
    }
}

/* Desktop: 1280px+ */
@media (min-width: 1280px) {
    .section-container {
        min-height: 100vh;
        padding: 6rem 0;
    }
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #507198;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #4B5563;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-description {
        font-size: 1.125rem;
    }
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #507198, #5DACCC, #65BB91);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(80, 113, 152, 0.2);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F3A7E;
    margin-bottom: 0.75rem;
}

.card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6B7280;
}

/* Mobile card adjustments */
@media (max-width: 767px) {
    .card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-description {
        font-size: 0.875rem;
    }
}

/* ========================================
   BADGES & BUTTONS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem; /* Increased for better touch target */
    min-height: 44px; /* WCAG minimum touch target size */
    background: white;
    border: 1.5px solid #E5E7EB;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
}

.badge:hover {
    background: linear-gradient(135deg, #507198, #5DACCC);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(80, 113, 152, 0.3);
}

/* Button styles with enhanced hover effects */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #507198, #5DACCC);
    color: white;
    font-weight: 600;
    font-size: 0.938rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(80, 113, 152, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 24px rgba(80, 113, 152, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 6px 12px rgba(80, 113, 152, 0.3);
}

/* Loading state for buttons */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Tooltip - Smart Positioning */
.tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #1F3A7E;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.813rem;
    line-height: 1.5;
    width: max-content;
    max-width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1000;
    white-space: normal;
    text-align: left;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1F3A7E;
}

/* Right-aligned tooltip (for badges on right side of screen) */
.badge:nth-last-child(-n+2):not(:only-child) .tooltip {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(8px);
    max-width: min(200px, calc(100vw - 3rem));
    white-space: normal;
    word-wrap: break-word;
}

.badge:nth-last-child(-n+2):not(:only-child) .tooltip::after {
    left: auto;
    right: 1rem;
    transform: translateX(0);
}

/* Desktop hover */
@media (hover: hover) and (pointer: fine) {
    .badge:hover .tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    
    /* Right-aligned tooltip on hover */
    .badge:nth-last-child(-n+2):not(:only-child):hover .tooltip {
        transform: translateX(0) translateY(0);
    }
    
    /* Dim badge text when tooltip is shown - prevent visual collision */
    .badge:hover > span {
        opacity: 0.3;
    }
}

/* Touch devices - show on tap/click */
.badge.active .tooltip,
.badge:active .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Right-aligned tooltip when active on touch */
.badge:nth-last-child(-n+2):not(:only-child).active .tooltip,
.badge:nth-last-child(-n+2):not(:only-child):active .tooltip {
    transform: translateX(0) translateY(0);
}

/* Dim badge text when tooltip is active on touch - prevent visual collision */
.badge.active > span,
.badge:active > span {
    opacity: 0.3;
}

/* Mobile/Tablet tooltip adjustments */
@media (max-width: 1023px) {
    .tooltip {
        max-width: 200px;
        font-size: 0.75rem;
        padding: 0.625rem 0.875rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Right-aligned tooltips on mobile/tablet - even narrower */
    .badge:nth-last-child(-n+2):not(:only-child) .tooltip {
        max-width: min(180px, calc(100vw - 3rem));
    }
    
    /* Add tap indicator on touch devices */
    .badge {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Add subtle pulse animation hint */
    @keyframes tapHint {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(80, 113, 152, 0.4);
        }
        50% {
            box-shadow: 0 0 0 4px rgba(80, 113, 152, 0);
        }
    }
    
    /* Active state for touch */
    .badge.active {
        background: linear-gradient(135deg, #507198, #5DACCC);
        color: white;
        border-color: transparent;
    }
}

/* Mobile badge adjustments */
@media (max-width: 767px) {
    .badge {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
    
    .tooltip {
        max-width: 180px;
        font-size: 0.75rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Right-aligned tooltips on mobile - extra narrow */
    .badge:nth-last-child(-n+2):not(:only-child) .tooltip {
        max-width: min(160px, calc(100vw - 2rem));
    }
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #507198, #5DACCC);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(80, 113, 152, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(80, 113, 152, 0.4);
    background: linear-gradient(135deg, #1F3A7E, #507198);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Mobile button adjustments */
@media (max-width: 767px) {
    .btn-primary {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   TEAM CARDS
   ======================================== */
.team-card {
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
    transform: translateY(-4px);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid #5DACCC;
    box-shadow: 0 8px 20px rgba(80, 113, 152, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover .team-avatar {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(80, 113, 152, 0.3);
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F3A7E;
    margin-bottom: 0.5rem;
}

.team-role {
    font-size: 1rem;
    font-weight: 600;
    color: #507198;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6B7280;
}

/* Team section specific adjustments */
#team {
    padding: 4rem 0;
}

/* Team Card Hover Effects */
.team-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(80, 113, 152, 0.05), rgba(93, 172, 204, 0.05));
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.team-card:hover::before {
    opacity: 1;
}

.team-card:hover .team-avatar {
    transform: scale(1.08);
    box-shadow: 0 12px 24px rgba(80, 113, 152, 0.3);
}

.team-avatar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    #team {
        padding: 4rem 0;
    }
    
    #team .grid {
        gap: 2rem;
    }
    
    #team .team-avatar {
        width: 110px;
        height: 110px;
    }
    
    #team .team-bio {
        font-size: 0.9rem;
    }
}

/* Tablet and Large Tablet adjustments - compact */
@media (min-width: 1024px) and (max-width: 1279px) {
    #team {
        padding: 3rem 0;
    }
    
    #team .container {
        max-width: 90%;
    }
    
    #team .text-center.mb-12 {
        margin-bottom: 2rem;
    }
    
    #team .mb-16 {
        margin-bottom: 3rem;
    }
    
    #team h3 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    #team .grid {
        gap: 1.5rem;
    }
    
    #team .team-card {
        padding: 1rem;
    }
    
    #team .team-avatar {
        width: 110px;
        height: 110px;
        margin-bottom: 1rem;
    }
    
    #team .team-name {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }
    
    #team .team-role {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    #team .team-bio {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Desktop adjustments - more spacious */
@media (min-width: 1280px) {
    #team {
        padding: 3rem 0;
    }
    
    #team .container {
        max-width: 90%;
    }
    
    #team .text-center.mb-12 {
        margin-bottom: 2rem;
    }
    
    #team .mb-16 {
        margin-bottom: 3rem;
    }
    
    #team h3 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    #team .grid {
        gap: 1.5rem;
    }
    
    #team .team-card {
        padding: 1rem;
    }
    
    #team .team-avatar {
        width: 110px;
        height: 110px;
        margin-bottom: 1rem;
    }
    
    #team .team-name {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }
    
    #team .team-role {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    #team .team-bio {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Brighten Simon's photo to match others */
img[alt="Simon Free"] {
    filter: brightness(1.25) contrast(1.05) saturate(1.1);
}

/* Brighten Denis's photo to match others */
img[alt="Denis Gihan"] {
    filter: brightness(1.15) contrast(1.02) saturate(1.05);
}


/* Mobile team card adjustments */
@media (max-width: 767px) {
    .team-avatar {
        width: 100px;
        height: 100px;
    }
    
    .team-name {
        font-size: 1.125rem;
    }
    
    .team-role {
        font-size: 0.95rem;
    }
    
    .team-bio {
        font-size: 0.875rem;
    }
    
    #team .grid {
        gap: 2rem;
    }
}

/* ========================================
   LOCATION CARD
   ======================================== */
.location-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Large Tablet and Desktop location section - fit to screen */
@media (min-width: 1024px) and (max-width: 1279px) {
    #location {
        min-height: 100vh;
        padding: 3rem 0 8rem 0;  /* Increased bottom padding to prevent CTA cutoff */
        display: flex;
        align-items: flex-start;  /* Remove vertical centering */
        scroll-margin-top: 4rem;  /* Account for fixed header when scrolling */
    }
    
    #location .container {
        width: 100%;
        max-width: 75%;
    }
    
    #location .grid {
        align-items: stretch;
        gap: 1.5rem;
    }
    
    /* Left column - flex layout to align button at bottom */
    #location .fade-in-left {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    #location .location-card {
        padding: 1rem;
        flex: 1;
    }
    
    #location .location-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    #location .location-card p {
        margin-bottom: 0.75rem;
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    #location .location-card .space-y-3 {
        margin-bottom: 0;
    }
    
    #location .location-card .space-y-3 > div {
        gap: 0.4rem;
        margin-bottom: 0.5rem;
    }
    
    #location .location-card .space-y-3 span {
        font-size: 0.75rem;
    }
    
    #location .location-card .space-y-3 .text-xl {
        font-size: 1rem !important;
    }
    
    /* Image container - match height */
    #location .fade-in-right {
        display: flex;
        flex-direction: column;
    }
    
    /* Constrain image height on desktop - 30% reduction */
    #location img {
        max-height: 280px;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Button container - aligns at bottom */
    #location .fade-in-left > div:last-child {
        margin-top: 1rem;
    }
    
    /* Button styling - compact */
    #location .btn-primary {
        padding: 0.5rem 1.25rem;
        font-size: 0.813rem;
    }
}

/* Desktop location - more space */
@media (min-width: 1280px) {
    #location {
        padding: 3rem 0 10rem 0;  /* Increased bottom padding significantly to prevent CTA cutoff */
        align-items: flex-start;  /* Remove vertical centering */
        scroll-margin-top: 4rem;  /* Account for fixed header when scrolling */
    }
    
    #location .container {
        max-width: 70%;
    }
    
    #location .grid {
        gap: 2rem;
        align-items: stretch;  /* Ensure both columns have same height */
    }
    
    /* Left column - flex layout to push button to bottom */
    #location .fade-in-left {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    /* Card takes available space */
    #location .location-card {
        flex: 1;
        padding: 0.96rem;  /* Reduced by 25% total from 1.25rem */
        padding-bottom: 0.76rem;  /* Reduced by 25% total */
    }
    
    /* Right column - fill full height */
    #location .fade-in-right {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* Image container fills available space */
    #location .fade-in-right > div {
        flex: 1;
        display: flex;
        align-items: stretch;
    }
    
    #location .fade-in-right img {
        height: 100%;
        max-height: 315px;  /* Original size - not reduced */
        object-fit: cover;
    }
    
    #location .location-card h3 {
        font-size: 1.4rem;
        margin-bottom: 0.57rem;  /* Reduced by 25% total */
    }
    
    #location .location-card p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.77rem;  /* Reduced by 25% total */
    }
    
    #location .location-card .space-y-3 span {
        font-size: 0.8rem;
    }
    
    #location .location-card .space-y-3 .text-xl {
        font-size: 1.1rem !important;
    }
    
    /* Button styling - compact */
    #location .btn-primary {
        padding: 0.6rem 1.4rem;
        font-size: 0.875rem;
    }
    
    /* Add space between card and button, maintain alignment */
    #location .fade-in-left > div:last-child {
        margin-top: 1.15rem;  /* Reduced by 25% total */
        margin-bottom: 0;
    }
}

/* Mobile location card */
@media (max-width: 767px) {
    .location-card {
        padding: 2rem;
    }
    
    #location .btn-primary {
        padding: 0.65rem 1.5rem;
        font-size: 0.875rem;
        width: auto;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scroll-triggered animations */
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
}

.fade-in-up.animated,
.fade-in-left.animated,
.fade-in-right.animated {
    animation-play-state: running;
}

/* ========================================
   HOME/HERO SECTION
   ======================================== */
    #home {
        padding-top: 5rem; /* 80px for mobile to account for fixed header and prevent title cutout */
    }

/* Small Tablet: Increase padding for header */
@media (min-width: 768px) and (max-width: 1023px) {
    #home {
        padding-top: 5rem; /* 80px */
    }
}

/* Large Tablet: 1024px - 1279px (iPad Pro, Surface Pro) - MORE PADDING */
@media (min-width: 1024px) and (max-width: 1279px) {
    #home {
        padding-top: 6rem; /* 96px - prevent title cutout */
    }
}

/* Desktop: 1280px+ */
@media (min-width: 1280px) {
    #home {
        padding-top: 5rem; /* 80px */
    }
}

/* ========================================
   CANVAS BACKGROUND
   ======================================== */
#hero-canvas {
    z-index: 0;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

/* Ultra Compact Mobile: < 375px */
@media (max-width: 374px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .section-container {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 0.875rem;
    }
}

/* Small Mobile: 375px - 639px */
@media (min-width: 375px) and (max-width: 639px) {
    .section-container {
        padding: 3.5rem 0;
    }
}

/* Large Mobile: 640px - 767px */
@media (min-width: 640px) and (max-width: 767px) {
    .section-container {
        padding: 4rem 0;
    }
}

/* Small Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 720px;
    }
    
    :root {
        --header-height: 72px;
    }
}

/* Large Tablet: 1024px - 1366px (iPad Pro, Surface Pro) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .container {
        max-width: 960px;
    }
    
    .section-container {
        padding: 5rem 0;
    }
}

/* Desktop: 1367px+ */
@media (min-width: 1367px) {
    .container {
        max-width: 1280px;
    }
}

/* ========================================
   PERFORMANCE & ACCESSIBILITY
   ======================================== */

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
        border-color: #000;
    }
    
    .badge {
        border-width: 2px;
    }
}

/* ========================================
   HERO SECTION - SIMPLE CLEAN STYLE
   ======================================== */
#home {
    background: #FAFBFC;
}

/* ========================================
   HERO SECTION - MOBILE/TABLET CENTERING
   ======================================== */
/* Center hero content on mobile and tablets */
@media (max-width: 1023px) {
    /* Center title */
    #home h1 {
        text-align: center !important;
    }
    
    /* Center description paragraph */
    #home p {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Center badges container */
    #home .flex.flex-col,
    #home .flex.flex-wrap {
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Center CTA button */
    #home .btn-primary {
        margin: 0 auto !important;
        display: flex;
    }
}

/* Mobile only: Fix hero image to prevent cutoff - generic solution for all mobile screens */
@media (max-width: 767px) {
    /* Make hero section fit viewport with flexbox distribution */
    #home {
        min-height: 100vh;
        overflow: visible !important;  /* Override Tailwind overflow-hidden to prevent title cutout */
        position: relative;
        padding-bottom: 2rem;  /* Prevent content cutoff at bottom */
    }
    
    /* Make content section flexible to distribute space */
    #home .space-y-6 {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Compact title */
    #home h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Compact description */
    #home p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Compact badges */
    #home .badge {
        padding: 0.5rem 1rem !important;
        font-size: 0.813rem !important;
    }
    
    /* Compact CTA */
    #home .btn-primary {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Make image adapt to remaining space without cutoff */
    #home .fade-in-right {
        margin-top: 1rem;
        flex: 0 0 auto;
    }
    
    #home .fade-in-right > div {
        max-height: 30vh;
        overflow: hidden;
    }
    
    #home .fade-in-right > div img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 55%;
    }
}

/* Desktop: Keep left-aligned */
@media (min-width: 1024px) {
    #home h1 {
        text-align: left;
    }
    
    #home p {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
    
    #home .flex.flex-wrap {
        justify-content: flex-start !important;
    }
    
    #home .btn-primary {
        margin: 0 !important;
    }
}

/* ========================================
   LARGE SCREEN FIXES (HERO + LOCATION)
   ======================================== */
/* Prevent hero image from oversizing on very wide screens */
@media (min-width: 1280px) {
    /* Cap the hero visual wrapper and image to a consistent height (slightly smaller on very wide screens) */
    #home .fade-in-right > div {
        max-height: clamp(420px, 48vh, 540px);
    }
    #home .fade-in-right > div img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 60% center; /* bias right for aircraft composition */
    }
}

/* Location: avoid 100vh clipping from global .section-container */
#location {
    min-height: auto;
}

/* Align location columns to the top so card/button and image stay aligned */
#location .grid {
    align-items: start;
}

/* ========================================
   NATIVE [title] TOOLTIP LAYERING FOR BADGES
   ======================================== */
/* Ensure tooltip is never clipped and creates a stacking context */
.badge {
    position: relative;
    overflow: visible;
    isolation: isolate; /* new stacking context */
}

/* Lift the hovered badge above siblings */
.badge:hover,
.badge:focus {
    z-index: 10;
}

/* Tooltip bubble using the [title] attribute */
.badge[title]::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #ffffff; /* fully opaque */
    color: #1F3A7E;
    border-radius: 12px;
    padding: 0.625rem 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: min(280px, 90vw);
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 180ms ease, transform 180ms ease;
}

.badge[title]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    width: 10px;
    height: 10px;
    background: #ffffff; /* fully opaque */
    transform: translateX(-50%) rotate(45deg) translateY(6px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    opacity: 0;
    z-index: 9999;
    transition: opacity 180ms ease, transform 180ms ease;
}

.badge[title]:hover::after,
.badge[title]:focus::after,
.badge[title]:hover::before,
.badge[title]:focus::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0) rotate(45deg);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    #header,
    footer,
    .btn-primary,
    .badge {
        display: none;
    }
    
    .section-container {
        min-height: auto;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
    
    #hero-canvas {
        display: none;
    }
}

/* ========================================
   USE CASES PAGE
   ======================================== */
.use-case-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.use-case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #507198, #5DACCC, #65BB91);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.use-case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(80, 113, 152, 0.2);
}

.use-case-card:hover::before {
    transform: scaleX(1);
}

.use-case-card.expanded {
    border-color: rgba(80, 113, 152, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.use-case-card.expanded::before {
    transform: scaleX(1);
}

.use-case-header {
    cursor: pointer;
    user-select: none;
}

.use-case-icon {
    width: 48px; /* align visual scale with index icon */
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; /* close to .card-icon 2.5rem visual area */
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #507198 0%, #5DACCC 100%);
    box-shadow: 0 4px 12px rgba(80, 113, 152, 0.2);
}

.use-case-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0;
}

.use-case-card.expanded .use-case-content {
    max-height: 5000px;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1.5rem;
}

.expand-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.use-case-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.stakeholder-item {
    background: #f9fafb;
    border-left: 3px solid #507198;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.stakeholder-item:hover {
    background: #f3f4f6;
    border-left-color: #5DACCC;
}

.stakeholder-label {
    font-weight: 600;
    color: #1F3A7E;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

/* Mobile adjustments for use cases */
@media (max-width: 767px) {
    .use-case-card {
        padding: 1.5rem;
    }
    
    .use-case-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .use-case-card h2 {
        font-size: 1.125rem;
    }
}

/* ========================================
   USE CASES SECTION TOP SPACING (reduce gap to header)
   ======================================== */
#use-cases.section-container {
    padding-top: 3rem; /* desktop default: half of 6rem */
}

@media (max-width: 767px) {
    #use-cases.section-container {
        padding-top: 2rem; /* half of 4rem on mobile */
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    #use-cases.section-container {
        padding-top: 2.5rem; /* half of 5rem on tablets */
    }
}

