/* =========================================================
   PrimeX Technologies — styles.css
   ========================================================= */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #050505;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Accessibility helper */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 3px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #111111;
}

::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc6a;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(5, 5, 5, 0.98);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: opacity 0.3s ease;
    display: block;
}

.logo-img:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00ff88;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    opacity: 0.7;
}

.btn-outline {
    background: transparent;
    border: 1px solid #00ff88;
    color: #00ff88;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: inline-block;
}

.btn-outline:hover {
    background: #00ff88;
    color: #000000;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
    background: none;
    border: none;
    padding: 4px 8px;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: #0a0a0a;
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
        transition: left 0.3s ease;
        z-index: 999;
        gap: 20px;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }
    .nav-links.active {
        left: 0;
    }
    .container {
        padding: 0 20px;
    }
    .logo-img {
        height: 50px;
    }
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    background: #050505;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(0,255,136,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #00ff88;
    margin-bottom: 20px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #aaaaaa;
    margin-bottom: 30px;
    line-height: 1.8;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #00ff88;
    color: #000000;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background: #00cc6a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,255,136,0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.btn-outline-hero:hover {
    border-color: #00ff88;
    color: #00ff88;
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stats .stat h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #00ff88;
}

.hero-stats .stat p {
    font-size: 0.8rem;
    color: #888888;
}

.canvas-container {
    width: 100%;
    height: 500px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}

#canvas3d {
    width: 100%;
    height: 100%;
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.7rem;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .canvas-container {
        height: 350px;
        margin-top: 30px;
    }
}

/* ===== SECTION STYLES ===== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    background: rgba(0,255,136,0.1);
    color: #00ff88;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.section-header p {
    color: #888888;
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
}

/* ===== SERVICES ===== */
.services {
    background: #050505;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0,255,136,0.3);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0,255,136,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 1.8rem;
    color: #00ff88;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.service-card p {
    color: #aaaaaa;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-link:hover {
    color: #00ff88;
}

/* ===== COMPANY INTRO ===== */
.company-intro {
    background: #0a0a0a;
    padding: 80px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.company-mission {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.company-mission h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.company-mission p {
    color: #aaaaaa;
    line-height: 1.8;
    margin-bottom: 30px;
}

.core-values {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.value-item {
    text-align: center;
}

.value-item i {
    font-size: 2rem;
    color: #00ff88;
    margin-bottom: 12px;
}

.value-item h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #ffffff;
}

.value-item p {
    color: #666;
    font-size: 0.75rem;
}

/* ===== PROJECTS ===== */
.projects-full {
    background: #050505;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.projects-search {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.projects-search input,
.projects-search select {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 16px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.85rem;
    font-family: inherit;
}

.projects-search input:focus,
.projects-search select:focus {
    outline: none;
    border-color: #00ff88;
}

.projects-search input::placeholder {
    color: #555;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888888;
    font-size: 0.8rem;
}

.per-page-selector select {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 10px;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.project-card {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: none;
}

.project-card.visible {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,255,136,0.3);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-image-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.15);
}

.project-number {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 0.7rem;
    color: #fff;
    background: rgba(0,0,0,0.7);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: monospace;
}

.project-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #00ff88;
    color: #000000;
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.project-content {
    padding: 24px;
}

.project-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00ff88;
    margin-bottom: 8px;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.project-card p {
    color: #aaaaaa;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.project-highlights {
    margin-bottom: 16px;
    list-style: none;
}

.project-highlights li {
    color: #888888;
    font-size: 0.75rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-highlights li i {
    font-size: 0.65rem;
    color: #00ff88;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-wrap: wrap;
    gap: 12px;
}

.project-tech {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    color: #cccccc;
    font-family: monospace;
}

.project-link {
    color: #00ff88;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.project-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.page-btn {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 16px;
    border-radius: 8px;
    color: #888888;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.page-btn:hover,
.page-btn.active {
    background: #00ff88;
    color: #000000;
    border-color: #00ff88;
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.projects-stats {
    text-align: center;
    margin-top: 30px;
    color: #666666;
    font-size: 0.8rem;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    background: #0a0a0a;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial {
    background: #050505;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: border-color 0.3s ease;
}

.testimonial:hover {
    border-color: rgba(0,255,136,0.2);
}

.testimonial i {
    font-size: 2rem;
    color: #00ff88;
    opacity: 0.5;
    margin-bottom: 16px;
}

.testimonial p {
    color: #aaaaaa;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.client-name {
    font-weight: 600;
    color: #ffffff;
}

.client-title {
    font-size: 0.75rem;
    color: #666;
}

/* ===== CONTACT ===== */
.contact {
    background: #050505;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.contact-info p {
    color: #aaaaaa;
    margin-bottom: 30px;
}

.contact-details {
    margin: 30px 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 25px;
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: #0a0a0a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #00ff88;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
}

.contact-item span {
    color: #888;
    font-size: 0.9rem;
}

.contact-item a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #00ff88;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #0a0a0a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #00ff88;
    color: #000000;
    transform: translateY(-3px);
}

.contact-form {
    background: #0a0a0a;
    padding: 35px;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #050505;
    color: #ffffff;
    transition: border-color 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #555;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00ff88;
}

.full-width {
    width: 100%;
    justify-content: center;
}

.form-status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-status.success {
    background: rgba(0,255,136,0.1);
    color: #00ff88;
    border: 1px solid #00ff88;
    display: block;
}

.form-status.error {
    background: rgba(255,0,0,0.1);
    color: #ff4444;
    border: 1px solid #ff4444;
    display: block;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-form {
        padding: 24px;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: #050505;
    color: #888;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-brand h3 span {
    color: #00ff88;
}

.footer-brand p {
    line-height: 1.7;
    font-size: 0.85rem;
}

.reg-number {
    font-size: 0.75rem;
    color: #00ff88;
    margin-top: 8px;
    font-family: monospace;
}

.footer-links h4 {
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #00ff88;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.75rem;
}

/* ===== ANIMATIONS ===== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .projects-search {
        width: 100%;
    }
    .projects-search input {
        flex: 1;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .btn-primary,
    .btn-outline-hero {
        text-align: center;
        justify-content: center;
    }
    .project-content {
        padding: 18px;
    }
}