/* ===================================
   Hou Xing Inc. - Engineering Solutions
   Professional Corporate Design
   =================================== */

/* === CSS Custom Properties === */
:root {
    /* Color Palette - Balanced Professional Scheme */
    --color-primary: #1A3A5C;
    --color-secondary: #2E5C8A;
    --color-tertiary: #5B8BC1;
    --color-accent: #3B7FC4;
    --color-dark: #1F2937;
    --color-light: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-tertiary) 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* === Reset & Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: #FFFFFF;
    color: var(--color-gray-600);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-gray-500);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

/* === Header & Navigation === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--color-gray-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background: var(--color-gray-100);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--color-secondary);
    transition: transform var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

/* === Section Base Styles === */
section {
    min-height: 100vh;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.06;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* === Hero Section === */
#home {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--color-gray-50) 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/naval_destroyer_ship_1764061723890.png');
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.hero-title {
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.service-tag {
    background: rgba(46, 92, 138, 0.08);
    border: 1px solid rgba(46, 92, 138, 0.2);
    padding: var(--spacing-sm);
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-secondary);
    transition: all var(--transition-normal);
    cursor: pointer;
    display: block;
}

.service-tag:hover {
    background: rgba(46, 92, 138, 0.12);
    border-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-accent);
    color: var(--color-light);
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-tertiary);
}

/* === About Section === */
#about {
    background: var(--color-gray-50);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-highlight {
    background: rgba(46, 92, 138, 0.08);
    border-left: 4px solid var(--color-secondary);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin: var(--spacing-md) 0;
}

.about-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* === Services Section === */
#services {
    background: #FFFFFF;
}

.section-title {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: #FFFFFF;
    border: 1px solid var(--color-gray-200);
    border-radius: 16px;
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-tertiary);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-gray-600);
}

/* === Case Studies Gallery === */
.case-studies {
    margin-top: var(--spacing-lg);
}

.case-studies h3 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.case-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.case-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.case-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* === Lightbox Modal === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #FFFFFF;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-tertiary);
}

.lightbox-caption {
    color: #FFFFFF;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 8px;
    margin-top: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* === Contact Section === */
#contact {
    background: var(--color-gray-50);
}

.contact-info-centered {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info-centered h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.contact-info-centered p {
    font-size: 1.05rem;
    margin-bottom: var(--spacing-lg);
}

.contact-info-centered .info-item {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md);
    padding: var(--spacing-md);
    background: #FFFFFF;
    border: 1px solid var(--color-gray-200);
    border-radius: 8px;
    transition: all var(--transition-fast);
    text-align: left;
    min-width: 300px;
}

.contact-info-centered .info-item:hover {
    border-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    color: var(--color-secondary);
    font-size: 1.5rem;
    min-width: 30px;
}

.info-content h4 {
    color: var(--color-dark);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-content p {
    color: var(--color-gray-600);
    margin: 0;
}

/* === Footer === */
.footer {
    background: var(--color-dark);
    border-top: 1px solid var(--color-gray-300);
    padding: var(--spacing-md);
    text-align: center;
}

.footer p {
    color: var(--color-gray-400);
    font-size: 0.9rem;
    margin: 0;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive Design === */
@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .services-container {
        grid-template-columns: 1fr;
    }

    .case-gallery {
        grid-template-columns: 1fr;
    }

    .contact-info-centered .info-item {
        display: flex;
        min-width: auto;
        margin: 0 0 var(--spacing-md) 0;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        padding: var(--spacing-md);
        transition: left var(--transition-normal);
        border-bottom: 1px solid var(--color-gray-200);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-tag {
        font-size: 0.85rem;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}