@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Michroma&display=swap');

/* Font face removed */

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444; 
    --nav-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

.brand-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-logo {
    height: 54px;
    width: 54px;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4));
    transition: transform 0.3s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.05);
}

.brand span.brand-name {
    font-family: 'Michroma', sans-serif;
    font-weight: 700; /* Increased weight to Bold */
    font-size: 1.6rem;
    line-height: 1.1;
    letter-spacing: 1.2px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.brand span.brand-slogan {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
    margin-top: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-right: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.15);
    padding-right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 50px;
}

.lang-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.flag-svg {
    width: 26px;
    height: 18px;
    display: block;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.lang-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.lang-btn.active {
    opacity: 1;
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.cta-login {
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff !important;
    transition: all 0.3s !important;
    text-decoration: none;
    font-weight: 500;
}

.cta-login:hover {
    background: #fff !important;
    color: var(--bg-dark) !important;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
    background:
        linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)),
        url('Images/main-hero.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: 'POWERED BY HUALCO SCM AI';
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Michroma', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 5px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #2dd4bf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Modules Section */
.section {
    padding: 6rem 4rem;
    position: relative;
    min-height: 100vh; /* Better spacing */
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.grid-2 { /* For VMS + Others balanced layout if needed, but grid-fit is better */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
}

/* Module Cards Update */
.module-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.module-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.card:hover .module-image img {
    transform: scale(1.1);
}

/* Module Branding Overlay */
.module-image::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: url('Images/hualco-logo.png') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.6));
    opacity: 0.7;
    z-index: 5;
    transition: opacity 0.3s, transform 0.3s;
}

.card:hover .module-image::after {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
}

.module-image::before {
    content: 'HUALCO CERTIFIED UI';
    position: absolute;
    bottom: 15px;
    left: 20px;
    font-family: 'Michroma', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    z-index: 5;
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.module-image .scan-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0.5;
    z-index: 4;
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Cleanup old Art classes */
.module-art { display: none; }

.card-content {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex: 1;
}

.arrow {
    align-self: flex-start;
    color: var(--accent-blue);
    font-weight: 600;
}

/* Feature Page Images */
.feature-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.feature-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-image-container::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    background: url('Images/hualco-logo.png') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
    opacity: 0.6;
    z-index: 5;
}

.feature-image-container::before {
    content: 'HUALCO SCM AI';
    position: absolute;
    bottom: 10px;
    left: 15px;
    font-family: 'Michroma', sans-serif;
    font-size: 6px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    z-index: 5;
}

.feature-image-container .scan-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0.3;
    z-index: 4;
    animation: scan 4s linear infinite;
}
.art-vms::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 20px;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: blink-record 2s infinite;
}


@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes flow { 0% { transform: scaleX(0); opacity: 0; } 50% { opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes blink-record { 0% { opacity: 1; } 50% { opacity: 0.2; } 100% { opacity: 1; } }

/* Pricing */
.pricing-card {
    background: #1e293b;
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.feature {
    background: linear-gradient(180deg, #1e293b 0%, #172554 100%);
    border: 1px solid var(--accent-blue);
    transform: scale(1.05);
    z-index: 10;
}

.price {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 1.5rem 0;
}

.price span {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.features-list {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
    flex: 1;
}

.features-list li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.check {
    color: var(--accent-green);
}

.btn-price {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.feature .btn-price {
    background: var(--accent-blue);
}

.btn-price:hover {
    background: #fff;
    color: #000;
}

/* Feature Detail Page specific */
.detail-hero {
    padding: 8rem 4rem 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, var(--page-color, #333) 0%, var(--bg-dark) 50%);
}

.detail-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #fff;
    text-decoration: underline;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    backdrop-filter: blur(20px);
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details .detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-details .detail-item a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input, 
.form-group textarea {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: rgba(15, 23, 42, 1);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

/* Video Modal Styles - Fixed & Translucent */
.modal-overlay {
    display: none;
    position: fixed; /* Force fixed positioning */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* 50% opacity */
    z-index: 9999; /* Very high z-index */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px); /* Nice blur effect */
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 80%; /* Not full width */
    max-width: 900px;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.5); /* Glowing shadow */
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10000;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-red);
    transform: rotate(90deg);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    .close-modal {
        top: -35px;
        right: 5px;
    }
}

.contact-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.contact-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.contact-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }
    
    .contact-info h2 {
        font-size: 2.5rem;
    }
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-brand h4 { font-size: 1.5rem; margin-bottom: 1rem; }
.footer-brand p { color: var(--text-secondary); max-width: 300px; }

.footer-links h5 { color: #fff; margin-bottom: 1.5rem; font-size: 1.1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: 0.2s; }
.footer-links a:hover { color: var(--accent-blue); }

@media (max-width: 768px) {
    nav { padding: 0 1rem; }
    .brand-logo { height: 40px; width: 40px; }
    .brand span.brand-name { font-size: 1.2rem; }
    .lang-switcher { margin-right: 0; padding-right: 0; border-right: none; }
    .nav-links { display: none; }
    .hero { padding: 0 1.5rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .section { padding: 4rem 1.5rem; min-height: auto; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 1.5rem; }
    .card-content { padding: 1.5rem; }
    .contact-container { padding: 2rem 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    footer { padding: 3rem 1.5rem; }
}

/* Module Tags */
.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.tag-blue   { background: rgba(59,130,246,0.15);   color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.tag-amber  { background: rgba(245,158,11,0.15);   color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.tag-green  { background: rgba(16,185,129,0.15);   color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.tag-red    { background: rgba(239,68,68,0.15);    color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.tag-purple { background: rgba(139,92,246,0.15);   color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.tag-teal   { background: rgba(20,184,166,0.15);   color: #2dd4bf; border: 1px solid rgba(20,184,166,0.3); }

/* Visit Counter */
.visit-counter {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 1000;
    backdrop-filter: blur(2px);
    transition: opacity 0.5s;
    font-family: 'Outfit', sans-serif;
    border: 1px solid rgba(255,255,255,0.05);
}

.visit-counter:hover {
    pointer-events: auto;
    opacity: 1;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.8);
    cursor: default;
}
