/* Modern Organization Theme - Main Styles */

/* CSS Custom Properties */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--secondary-color);
}

/* Utility Classes */
.primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.secondary {
    color: var(--secondary-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-soft {
    background-color: rgba(15, 118, 110, 0.12);
    color: #ecfeff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.btn-soft:hover {
    background-color: rgba(15, 118, 110, 0.28);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Navigation */
.nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-right: 2rem;
}

.nav-link {
    padding: 0.5rem 0;
    font-weight: 500;
    position: relative;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.error {
    border-color: var(--error-color);
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.error-text {
    color: var(--error-color);
}

/* Grid System */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-1 { flex: 0 0 8.33333%; max-width: 8.33333%; }
.col-2 { flex: 0 0 16.66667%; max-width: 16.66667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.33333%; max-width: 33.33333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.66667%; max-width: 66.66667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.bounce {
    animation: bounce 1s infinite;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 640px) {
    .nav {
        flex-direction: column;
    }
    
    .nav-item {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-to-main:focus {
    top: 6px;
}
/* ========================================
   HERO SECTION - Transport Themed
   ======================================== */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(147, 51, 234, 0.2) 0%, transparent 50%);
    opacity: 0.4;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1.2fr 1fr;
        padding: 6rem 2rem;
    }
}

.hero-text {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero-text {
        text-align: left;
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #dbeafe;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

.hero-title-accent {
    display: block;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: #dbeafe;
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 600px;
}

@media (min-width: 1024px) {
    .hero-description {
        font-size: 1.25rem;
        max-width: none;
    }
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .hero-actions {
        justify-content: flex-start;
    }
}

.btn-primary {
    display: inline-block;
    background: white;
    color: #1e40af;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
    background: #f0f9ff;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-visual {
    display: none;
}

@media (min-width: 1024px) {
    .hero-visual {
        display: block;
    }
}

.stats-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
}

.stat-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: #dbeafe;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Photo focal-point helpers — keep faces in frame when object-cover crops a photo */
.img-focus-faces {
    object-position: 50% 26%;
}

.img-focus-faces-high {
    object-position: 50% 20%;
}

/* ---------------------------------------------------------------
   Icon tiles — one restrained treatment in the brand palette.
   Replaces the per-card coloured tiles (red/green/purple/amber...)
   that made every section read as a different design system.
   Icon colour and size are driven here so page markup stays simple.
   --------------------------------------------------------------- */
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f766e;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-tile-sm {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
}

.icon-tile svg {
    width: 1.375rem;
    height: 1.375rem;
    color: inherit !important;
    stroke-width: 1.75;
}

.icon-tile-sm svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Quiet hover: tighten the border and deepen the ink, no colour flip. */
.group:hover .icon-tile,
.card-hover:hover .icon-tile {
    background-color: #ffffff;
    border-color: #5eead4;
    color: #134e4a;
}

/* For tiles sitting on a dark or coloured panel. */
.icon-tile-invert {
    background-color: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.20);
    color: #ffffff;
}

.group:hover .icon-tile-invert,
.card-hover:hover .icon-tile-invert {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    color: #ffffff;
}

/* ---------------------------------------------------------------
   Icon tile colour variants.
   Colour varies across a small, brand-derived palette; the shape,
   size, radius and stroke stay identical so the set still reads as
   one system. Tint background + inked icon of the same hue — never
   a saturated block, never white-on-hover (which made icons vanish).
   Defined after the generic hover rule so variants win on hover.
   --------------------------------------------------------------- */
.icon-tile--navy    { background-color: #eff3f9; border-color: #dae3f0; color: #1a365d; }
.icon-tile--teal    { background-color: #f0fdfa; border-color: #ccfbf1; color: #0f766e; }
.icon-tile--amber   { background-color: #fffbeb; border-color: #fde68a; color: #b45309; }
.icon-tile--rose    { background-color: #fff1f2; border-color: #fecdd3; color: #be123c; }
.icon-tile--emerald { background-color: #ecfdf5; border-color: #bbf7d0; color: #047857; }

.group:hover .icon-tile--navy,
.card-hover:hover .icon-tile--navy    { background-color: #e2e9f4; border-color: #c3d2e8; color: #0c2340; }
.group:hover .icon-tile--teal,
.card-hover:hover .icon-tile--teal    { background-color: #ccfbf1; border-color: #5eead4; color: #134e4a; }
.group:hover .icon-tile--amber,
.card-hover:hover .icon-tile--amber   { background-color: #fef3c7; border-color: #fcd34d; color: #92400e; }
.group:hover .icon-tile--rose,
.card-hover:hover .icon-tile--rose    { background-color: #ffe4e6; border-color: #fda4af; color: #9f1239; }
.group:hover .icon-tile--emerald,
.card-hover:hover .icon-tile--emerald { background-color: #d1fae5; border-color: #6ee7b7; color: #065f46; }

/* ---------------------------------------------------------------
   Paragraph margin vs flex alignment.
   `p { margin-bottom: 1rem }` above re-introduces prose rhythm after
   Tailwind's preflight zeroes it. But in a horizontally centred flex
   row the browser centres the paragraph's MARGIN box, so that 1rem
   bottom margin lifts the visible text ~8px above true centre and the
   row looks misaligned against sibling badges, icons and links.
   Scoped to centred flex rows only, so vertical rhythm in flex-col
   and normal prose blocks is untouched.
   --------------------------------------------------------------- */
.flex.items-center > p,
.inline-flex.items-center > p {
    margin-bottom: 0;
}
/* Event interaction layer: restrained depth, with a static mobile fallback. */
.reveal-on-scroll.reveal-ready {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.55s ease var(--reveal-delay, 0ms),
                translate 0.55s ease var(--reveal-delay, 0ms);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    translate: 0 0;
}

.event-depth-card {
    --card-rotate-x: 0deg;
    --card-rotate-y: 0deg;
    --card-glow-x: 50%;
    --card-glow-y: 20%;
    position: relative;
    isolation: isolate;
    transform: perspective(1100px) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y));
    transform-style: preserve-3d;
    transition: transform 180ms ease, box-shadow 220ms ease, border-color 220ms ease;
    will-change: transform;
}

.event-depth-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--card-glow-x) var(--card-glow-y), rgba(255, 255, 255, 0.22), transparent 38%);
    transition: opacity 180ms ease;
}

.event-depth-card:hover {
    border-color: #99f6e4;
    box-shadow: 0 20px 45px -28px rgba(15, 118, 110, 0.55);
}


.card-hover.event-depth-card:hover {
    transform: perspective(1100px) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y)) translateY(-4px);
}
.event-depth-card:hover::after {
    opacity: 1;
}

.event-depth-card > * {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
    .reveal-on-scroll.reveal-ready,
    .reveal-on-scroll.is-visible,
    .event-depth-card,
    .event-depth-card:hover {
        opacity: 1;
        translate: none;
        transform: none;
        transition: none;
    }

    .card-hover.event-depth-card:hover {
        transform: none;
    }

    .event-depth-card::after {
        display: none;
    }
}
