/* 
 * Iron Path Logistics - Main Stylesheet 
 * Premium Banking/Logistics Aesthetic
 */

:root {
    /* Color Palette */
    --color-primary: #0a2463;
    /* Deep Royal Blue */
    --color-primary-dark: #061a4a;
    /* Darker Blue for hover */
    --color-secondary: #3e92cc;
    /* Bright Cyan */
    --color-accent: #ffffff;
    /* White */
    --color-text-main: #1e1e24;
    /* Dark Grey */
    --color-text-light: #6c757d;
    /* Muted Grey */
    --color-bg-light: #f8f9fa;
    /* Light Grey Background */
    --color-bg-white: #ffffff;
    /* White Background */

    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Glassmorphism Refined */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(62, 146, 204, 0.3);
}

.glass-dark {
    background: rgba(10, 36, 99, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-primary);
}

h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
}

h2 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
}

h3 {
    font-size: clamp(1.4rem, 4vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-control-cool {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-main);
    background-color: #fafafa;
    border: 1px solid #dddddd;
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.form-control-cool:focus {
    outline: none;
    border-color: var(--color-secondary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(62, 146, 204, 0.1);
}

select.form-control-cool {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233e92cc'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-accent);
}

.btn-outline {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.btn-primary-outline {
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    background: transparent !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-primary-outline:hover {
    color: #ffffff !important;
    background-color: var(--color-primary) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(10, 36, 99, 0.25);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--color-accent);
}

/* Header Placeholder */
header {
    background: var(--color-bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

header.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-primary);
}

/* Footer Placeholder */
footer {
    background: var(--color-primary);
    color: var(--color-accent);
    padding: var(--spacing-lg) 0;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        /* Changed from center to allow scrolling if menu is long */
        padding-top: 4rem;
        transition: var(--transition-normal);
        border-top: 1px solid #eee;
        padding: 2rem;
        overflow-y: auto;
        /* Allow scrolling on small screens */
    }

    .nav-wrapper.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.25rem;
        font-weight: 600;
        display: block;
        padding: 0.5rem;
    }

    .nav-btn {
        display: none !important;
    }

    h1 {
        font-size: 2.2rem;
        /* Smaller for mobile */
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .section-padding {
        padding: var(--spacing-lg) 0;
        /* Reduced from lg to sm/md in overrides if needed, but keeping consistent for now, maybe override locally */
    }

    /* Override inline padding for page headers on mobile */
    .page-header {
        padding: 4rem 0 !important;
    }

    .hero {
        height: auto !important;
        min-height: 500px;
        padding: 6rem 0;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    h1 {
        font-size: 2.22rem;
        /* Slightly more precise for mobile */
    }

    .container {
        width: 92%;
        padding: 0 1rem;
    }
}

/* Custom Responsive Spacing */
.mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 769px) {
    .mobile-stack {
        flex-direction: row;
    }
}

/* Utility Class for Responsive Grids to replace inline styles */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (min-width: 769px) {
    .featured-card {
        transform: scale(1.05);
    }
}

.mobile-hidden {
    display: none;
}

@media (min-width: 769px) {
    .mobile-hidden {
        display: inline;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 350px) {
    .grid-responsive {
        grid-template-columns: 1fr;
        /* Single column for very narrow devices */
    }
}



/* Premium Living Button Animations */
@keyframes subtle-vibrate {

    0%,
    100% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(-2px);
    }

    20% {
        transform: translateX(2px);
    }

    30% {
        transform: translateX(-2px);
    }

    40% {
        transform: translateX(2px);
    }

    50% {
        transform: translateX(0);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Sticky Mobile Button Styles */
.sticky-apply-btn {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
}

.sticky-apply-btn .living-btn {
    width: 100%;
    border-radius: 0;
    padding: 18px 15px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0856b8 100%);
    background-size: 200% 200%;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: subtle-vibrate 2s ease-in-out infinite;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sticky-apply-btn .living-btn .btn-text {
    transition: opacity 0.3s ease;
}

.sticky-apply-btn .living-btn .btn-icon {
    transition: transform 0.3s ease;
}

/* Hover State - Stop vibration, gradient shift, enhanced shadow */
.sticky-apply-btn .living-btn:hover {
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 -6px 30px rgba(13, 110, 253, 0.25), 0 -2px 10px rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

.sticky-apply-btn .living-btn:hover .btn-icon {
    transform: translateX(3px);
}

/* Active State - Compression effect */
.sticky-apply-btn .living-btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

/* Ripple Effect Container */
.sticky-apply-btn .living-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sticky-apply-btn .living-btn.ripple-active::before {
    animation: ripple 0.6s ease-out;
}

@media (max-width: 768px) {
    .sticky-apply-btn {
        display: block !important;
        /* Force display */
    }

    /* Hide sticky button on application page */
    .page-application .sticky-apply-btn {
        display: none !important;
    }

    /* Add padding to body or footer to prevent content from being hidden behind button */
    footer {
        padding-bottom: 80px;
    }

    /* Remove footer padding on application page since button is hidden */
    .page-application footer {
        padding-bottom: 0;
    }
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(13, 110, 253, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    /* Pill shape */
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(13, 110, 253, 0.05);
    border-color: var(--color-primary);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    min-width: 120px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 10px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-switcher:hover .lang-dropdown {
    display: block;
    animation: fadeInUp 0.2s ease forwards;
}

.lang-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-dropdown a:hover {
    background: #f8f9fa;
    color: var(--color-secondary);
}

.lang-dropdown a.active {
    background: rgba(62, 146, 204, 0.1);
    color: var(--color-secondary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .lang-switcher {
        margin: 10px 0 20px 0;
    }
}