/* =====================================================
   WEST AFRICA LOGISTICS SOLUTIONS
   Layout Styles - Grid, Containers, Sections
   ===================================================== */

/* ==================== Container System ==================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
}

.container-sm {
    max-width: var(--container-4xl);
}

.container-md {
    max-width: var(--container-5xl);
}

.container-lg {
    max-width: var(--container-6xl);
}

.container-xl {
    max-width: var(--container-7xl);
}

.container-fluid {
    max-width: 100%;
}

/* ==================== Section Styles ==================== */

.section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.section-sm {
    padding-top: calc(var(--section-padding-y) * 0.5);
    padding-bottom: calc(var(--section-padding-y) * 0.5);
}

.section-lg {
    padding-top: calc(var(--section-padding-y) * 1.5);
    padding-bottom: calc(var(--section-padding-y) * 1.5);
}

/* Section Backgrounds */
.section-white {
    background-color: var(--white);
}

.section-gray {
    background-color: var(--gray-50);
}

.section-gradient {
    background: var(--gradient-primary);
    color: var(--white);
}

.section-gradient h1,
.section-gradient h2,
.section-gradient h3,
.section-gradient h4,
.section-gradient p {
    color: var(--white);
}

.section-dark {
    background-color: var(--gray-900);
    color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--white);
}

.section-dark p {
    color: var(--gray-300);
}

/* ==================== Grid System ==================== */

.grid {
    display: grid;
    gap: var(--space-6);
}

/* Auto-fit responsive grids */
.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* Fixed column grids */
.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Column spans */
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-full { grid-column: 1 / -1; }

/* Row spans */
.row-span-1 { grid-row: span 1; }
.row-span-2 { grid-row: span 2; }
.row-span-3 { grid-row: span 3; }

/* Gap variations */
.gap-0 { gap: 0; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* ==================== Two Column Layouts ==================== */

.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: start;
}

.two-col-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
}

.two-col-sidebar {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-8);
}

.two-col-sidebar-right {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-8);
}

.two-col-wide-left {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
}

.two-col-wide-right {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-8);
}

/* ==================== Header Layout ==================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, rgba(240, 245, 250, 0.95) 0%, rgba(235, 242, 248, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: var(--z-fixed);
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(13, 71, 161, 0.08);
    border-bottom: 1px solid rgba(13, 71, 161, 0.08);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
}

.site-header.scrolled {
    height: var(--header-height-scrolled);
    background: linear-gradient(135deg, rgba(245, 248, 252, 0.98) 0%, rgba(240, 245, 250, 0.98) 100%);
    box-shadow: 0 4px 30px rgba(13, 71, 161, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--section-padding-x);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}

.header-logo img,
.header-logo svg {
    height: 2.5rem;
    width: auto;
    transition: all 0.3s ease;
}

.header-logo:hover img,
.header-logo:hover svg {
    transform: scale(1.02);
}

.header-logo-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--primary-blue);
    line-height: 1.2;
}

.header-logo-text span {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
    color: var(--gray-600);
}

/* Main Navigation - Desktop */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    border-radius: var(--border-radius-full);
    transition: all 0.25s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-blue);
    background: rgba(13, 71, 161, 0.08);
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-blue), #1976d2);
    font-weight: var(--font-weight-semibold);
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.3);
}

.nav-link::after {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    padding: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-all);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== Hero Layout ==================== */

.hero {
    position: relative;
    min-height: var(--hero-min-height);
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + var(--space-8));
    padding-bottom: var(--space-12);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
    animation: hero-shimmer 10s ease-in-out infinite;
}

@keyframes hero-shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-gradient {
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--container-5xl);
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    max-width: 40rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* Hero Button Enhancements */
.hero-actions .btn {
    position: relative;
    overflow: hidden;
}

.hero-actions .btn-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 71, 161, 0.1), transparent);
    transition: left 0.5s ease;
}

.hero-actions .btn-white:hover::before {
    left: 100%;
}

.hero-image {
    position: absolute;
    right: 5%;
    top: 45%;
    transform: translateY(-50%);
    width: 40%;
    max-width: 550px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img,
.hero-image svg {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
}

/* Page Hero (smaller for inner pages) */
.page-hero {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + var(--space-8));
    padding-bottom: var(--space-8);
    background: var(--gradient-primary);
    overflow: hidden;
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

.page-hero-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--white);
    margin-bottom: var(--space-4);
}

.page-hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 40rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-4);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-colors);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== Footer Layout ==================== */

.site-footer {
    background-color: var(--gray-900);
    color: var(--white);
    padding-top: var(--space-16);
    padding-bottom: var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-8);
    padding-bottom: var(--space-12);
}

.footer-brand {
    max-width: 320px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer-brand-logo img,
.footer-brand-logo svg {
    height: 2.5rem;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.footer-brand-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--white);
}

.footer-brand p {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.footer-address {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-address p {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
    line-height: 1.5;
}

.footer-address p:last-child {
    margin-bottom: 0;
}

/* WhatsApp link styling */
.footer-whatsapp {
    color: #25D366 !important;
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.footer-whatsapp:hover {
    color: #128C7E !important;
}

.footer-column h4 {
    color: var(--white);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    margin-bottom: var(--space-4);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-link {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    transition: var(--transition-colors);
}

.footer-link:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    margin-top: var(--space-8);
    border-top: 1px solid var(--gray-800);
}

.footer-copyright {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background-color: var(--gray-800);
    color: var(--gray-400);
    transition: var(--transition-all);
}

.footer-social a:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* ==================== Main Content Area ==================== */

.main-content {
    min-height: calc(100vh - var(--header-height));
}

/* Content with sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-8);
    align-items: start;
}

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
}

/* Page sections */
.page-section {
    scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

/* ==================== Section Headers ==================== */

.section-header {
    text-align: center;
    max-width: var(--container-4xl);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-12);
}

.section-header-left {
    text-align: left;
    margin-left: 0;
}

.section-eyebrow {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    color: var(--primary-blue);
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.section-header-left .section-description {
    margin-left: 0;
}

/* ==================== Decorative Elements ==================== */

.decoration-line {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-full);
    margin-bottom: var(--space-6);
}

.decoration-line-center {
    margin-left: auto;
    margin-right: auto;
}

.decoration-dots {
    display: flex;
    gap: var(--space-2);
}

.decoration-dots span {
    width: 8px;
    height: 8px;
    border-radius: var(--border-radius-full);
    background-color: var(--primary-blue);
    opacity: 0.3;
}

.decoration-dots span:first-child {
    opacity: 1;
}

/* Background shapes */
.bg-shape {
    position: absolute;
    border-radius: var(--border-radius-full);
    opacity: 0.1;
    z-index: 0;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-blue);
    top: -100px;
    right: -100px;
}

.bg-shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-green);
    bottom: -50px;
    left: -50px;
}
