/* Main CSS - Core Styles and Layout */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #243973;
    --primary-dark: #1a2850;
    --primary-light: #3b82f6;
    --secondary-color: #fe050f;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --highlight-color: #fe050f;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-heading: 'Arial', 'Helvetica', sans-serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    
    /* Shadows */
    --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);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    
    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
}

/* Base Typography */
body {
    font-family: var(--font-family-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
    color: var(--gray-600);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--highlight-color);
}

/* Example: Buttons and controls */
.map-control-btn:hover,
.edit-location-btn:hover,
.update-location-btn:hover,
.cancel-location-btn:hover,
.feature-list-with-popup li:hover,
.footer-links a:hover {
    background: var(--highlight-color);
    color: #fff;
}

/* Example: Focus outline */
*:focus {
    outline: 2px solid var(--highlight-color);
    outline-offset: 2px;
}

/* Example: Text selection */
::selection {
    background-color: var(--highlight-color);
    color: var(--white);
}





/* Container */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container { padding: 0 var(--space-6); }
}

@media (min-width: 1024px) {
    .container { padding: 0 var(--space-8); }
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    max-width: var(--container-xl);
    margin: 0 auto;
}

.nav-logo .logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-8);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-700);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    background-color: var(--gray-50);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--space-2);
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--gray-700);
    margin: 3px 0;
    transition: var(--transition-fast);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: var(--space-8) 0;
        gap: var(--space-4);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Main Content Spacing */
main {
    margin-top: 70px;
}

/* Hero Section with Ship Background */
.hero {
    background: url('../images/ship.webp') center center/cover no-repeat;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45); /* dark overlay for text readability */
    z-index: 1;
}
.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}
.hero-content {
    padding: 3rem 2rem;
    max-width: 600px;
    color: #fff;
}
@media (max-width: 700px) {
    .hero-content {
        padding: 2rem 1rem;
    }
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--gray-600);
    margin-bottom: var(--space-8);
    line-height: 1.5;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
    color: var(--gray-700);
}

.feature-icon {
    color: var(--success-color);
    font-weight: bold;
}

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

.hero-image {
    text-align: center;
}

.laptop-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
    }

    .hero-features {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }
}

/* Sections */
section {
    padding: var(--space-20) 0;
}

.section-title {
    text-align: center;
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-16);
}

.section-subtitle {
    text-align: center;
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-12);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--space-20) 0 var(--space-16) 0;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    color: var(--white);
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-lg);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layouts */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: var(--white);
    padding: var(--space-16) 0 var(--space-8) 0;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gray-300);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.footer-info {
    color: var(--gray-400);
    font-size: var(--text-sm);
}

.footer-info p {
    margin-bottom: var(--space-2);
    color: var(--gray-400);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Certification & Training side by side */
.cert-training-container {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    flex-wrap: wrap;
}
.cert-col, .training-col {
    flex: 1 1 300px;
    min-width: 300px;
    max-width: 50%;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .cert-training-container {
        flex-direction: column;
    }
    .cert-col, .training-col {
        max-width: 100%;
    }
}

.training-content .keel-logo {
    display: block;
    max-width: 380px;   /* Increased size */
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    object-fit: contain;
}



.feature-popup-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}
.feature-popup-img img:not([src]), 
.feature-popup-img img[src=""], 
.feature-popup-img img[src^="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSIjZGRkIi8+PHBhdGggZD0iTTggM2E1IDUgMCAxIDAgMCAxMCA1IDUgMCAwIDAgMC0xMHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4="] {
    display: none !important;
}



/* ↓ place this at the bottom of main.css (after your other hero rules) */

/* 1. Make sure all the hero text is bright */
.hero-title,
.hero-subtitle,
.hero-features .feature-item {
  color: #fff !important;
}

/* 2. (Optional) tone-down the subtitle a bit so it’s secondary to the headline */
.hero-subtitle {
  color: rgba(255,255,255,0.85) !important;
}

/* 1) Remove these lines (or comment them out): */
.hero-title { color: var(--gray-900); }
.hero-subtitle { color: var(--gray-600); }
.feature-item    { color: var(--gray-700); }

/* 2) At the top of your hero rules ensure: */
.hero-content {
  color: #fff;              /* all children will inherit white */
}

/* 3) (Optional) If you want the green checkmarks to stay green: */
.hero-content .feature-icon {
  color: var(--success-color);
}

.hero::before {
  background: rgba(0,0,0,0.6); /* darker overlay for more pop */
}
