/* ==========================================================
   RMTECH MAIN STYLESHEET - CYBER/HIGH-TECH THEME
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Rajdhani:wght@300;500;700&display=swap');

:root {
    --bg-dark: #050505;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    cursor: none; /* For custom cursor */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- BACKGROUND ANIMATION --- */
.bg-animation {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100vh;
    background: 
        linear-gradient(transparent 0%, rgba(0, 243, 255, 0.05) 50%, transparent 100%),
        linear-gradient(90deg, transparent 0%, rgba(188, 19, 254, 0.05) 50%, transparent 100%);
    background-size: 100% 4px, 4px 100%;
    z-index: -1; 
    pointer-events: none;
}

/* --- CUSTOM CURSOR --- */
.cursor-dot, .cursor-outline {
    position: fixed; 
    transform: translate(-50%, -50%); 
    border-radius: 50%; 
    z-index: 9999; 
    pointer-events: none;
}
.cursor-dot { width: 5px; height: 5px; background-color: var(--neon-blue); }
.cursor-outline { width: 30px; height: 30px; border: 1px solid var(--neon-blue); transition: 0.1s; }

/* --- HEADER & NAVIGATION --- */
header {
    position: fixed; 
    top: 0; width: 100%; padding: 15px 40px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; 
    background: rgba(5, 5, 5, 0.9); 
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: 'Orbitron', sans-serif; 
    font-size: 1.8rem; font-weight: 700;
    color: var(--text-main); 
    text-shadow: 0 0 10px var(--neon-blue); 
    display: flex; align-items: center; gap: 10px;
}
.logo img { height: 40px; }

.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a { font-size: 1.1rem; font-weight: 600; letter-spacing: 1px; }
.nav-links a:hover { color: var(--neon-blue); text-shadow: 0 0 8px var(--neon-blue); }

.btn-glow {
    padding: 8px 25px; 
    background: transparent; 
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue); 
    font-family: 'Orbitron', sans-serif; 
    letter-spacing: 2px;
    transition: 0.4s;
    cursor: pointer;
}
.btn-glow:hover { 
    background: var(--neon-blue); 
    color: #000; 
    box-shadow: 0 0 20px var(--neon-blue); 
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 5%;
    position: relative;
    gap: 50px;
}

.hero-content { flex: 1; z-index: 2; }
.hero-visual { flex: 1; position: relative; display: flex; justify-content: center; }

.hero-content h1 {
    font-family: 'Orbitron', sans-serif; font-size: 4rem; line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--neon-blue)); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-content p { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }

.hero-img-frame {
    width: 100%; max-width: 500px; height: 400px;
    border: 1px solid var(--neon-purple);
    padding: 10px;
    position: relative;
    z-index: 5;
    background: #000;
}
.hero-img-frame img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: 0.5s;
}
.hero-img-frame:hover img { filter: grayscale(0%); }

/* --- ABOUT SECTION --- */
.about-section {
    display: flex; align-items: center; gap: 50px; padding: 80px 5%;
}
.about-text { flex: 1; }
.about-img { 
    flex: 1; height: 350px; 
    background-image: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover; background-position: center;
    border-right: 5px solid var(--neon-blue);
    filter: sepia(1) hue-rotate(190deg) saturate(2);
}

/* --- GENERAL SECTIONS & SERVICES GRID --- */
.container { max-width: 1200px; margin: 0 auto; padding: 80px 20px; }
.section-head { margin-bottom: 50px; border-left: 4px solid var(--neon-purple); padding-left: 20px; }
.section-head h2 { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; }

/* General Services Auto-Fit Grid */
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
}

/* Standard Card */
.card {
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 10px; overflow: hidden; transition: 0.3s; position: relative;
}

.card-img-top {
    width: 100%; height: 180px; object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    filter: brightness(0.6) sepia(1) hue-rotate(180deg) saturate(2); 
    transition: 0.5s ease;
}

.card-body { padding: 25px; position: relative; }

.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--neon-blue); 
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1); 
}
.card:hover .card-img-top { filter: none; height: 200px; }
.card i { font-size: 2rem; color: var(--neon-purple); margin-bottom: 15px; display: block; }
.card h3 { font-size: 1.4rem; margin-bottom: 10px; color: #fff; }
.card p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* --- SOFTWARE PAGE & 2-COLUMN GRID --- */
.page-title-section {
    padding: 150px 20px 50px;
    text-align: center;
    position: relative;
    width: 100%;
}
.page-title-section h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem; color: var(--white);
    text-shadow: 0 0 15px var(--neon-blue);
    margin-bottom: 15px; line-height: 1.2;
}
.page-title-section p { color: var(--neon-purple); font-size: 1.2rem; letter-spacing: 2px; }

/* Strict 2-Column Software Grid */
.software-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* FORCES 2 COLUMNS EXACTLY */
    gap: 40px; 
    width: 100%;
}

.software-card {
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 15px; overflow: hidden; transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; height: 100%;
}

.software-card:hover {
    transform: translateY(-10px); border-color: var(--neon-blue);
    box-shadow: 0 15px 40px rgba(0, 243, 255, 0.2);
}

.software-img { position: relative; width: 100%; height: 220px; overflow: hidden; display: block; }
.software-img img {
    width: 100%; height: 100%; object-fit: cover;
    filter: brightness(0.6) sepia(1) hue-rotate(180deg) saturate(2);
    transition: 0.5s ease;
}
.software-card:hover .software-img img { filter: none; transform: scale(1.1); }

.software-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.4s ease; z-index: 10;
}
.software-card:hover .software-overlay { opacity: 1; }

.software-info { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.software-info h3 { color: var(--white); font-size: 1.5rem; margin-bottom: 10px; font-family: 'Orbitron', sans-serif; }
.software-info p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; line-height: 1.6; }

.features-list { margin-bottom: 20px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.features-list li { color: #e2e8f0; font-size: 0.95rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.features-list li i { color: var(--neon-blue); }


/* --- CONTACT FORM --- */
.contact-wrapper { display: flex; gap: 40px; flex-wrap: wrap; }
.contact-info { flex: 1; }
.contact-form { flex: 1.5; background: var(--glass); padding: 40px; border: 1px solid var(--glass-border); border-radius: 10px;}
input, textarea, select {
    width: 100%; background: rgba(0,0,0,0.5); border: 1px solid #333;
    padding: 15px; color: #fff; margin-bottom: 20px; outline: none; font-family: 'Rajdhani', sans-serif;
}

/* --- FOOTER --- */
footer { 
    border-top: 1px solid var(--glass-border); 
    padding: 30px; 
    text-align: center; 
    margin-top: 50px; 
    color: #666; 
} 

/* ==========================================================
   CYBER AI CHAT WIDGET (BULLETPROOF FIX)
   ========================================================== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Keeps box on the right side */
    pointer-events: none; /* Allows clicking behind it when closed */
}

.chat-toggle {
    width: 60px; height: 60px;
    background: #000;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--neon-blue); font-size: 24px;
    cursor: pointer; pointer-events: auto;
    box-shadow: 0 0 15px rgba(0,243,255,0.5);
    transition: 0.3s;
}
.chat-toggle:hover { transform: scale(1.1); background: var(--neon-blue); color: #000; }

.chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px; /* strict width */
    height: 450px;
    background: #050505;
    border: 1px solid var(--neon-blue);
    border-radius: 15px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.8);
    transition: 0.3s ease-in-out;
    pointer-events: auto;
}

.chat-box.hidden {
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.9); pointer-events: none;
}

.chat-header {
    padding: 15px; background: rgba(0, 243, 255, 0.15);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.chat-title { color: var(--neon-blue); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chat-close { cursor: pointer; color: #fff; font-size: 1.2rem; }

.chat-body {
    flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
}
.message { padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; max-width: 85%; line-height: 1.4; }
.bot-msg { align-self: flex-start; background: #1a1a1a; border-left: 3px solid var(--neon-blue); }
.user-msg { align-self: flex-end; background: var(--neon-blue); color: #000; }

.chat-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.chat-options button {
    background: transparent; border: 1px solid var(--neon-purple); color: var(--neon-purple);
    padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: 0.2s;
}
.chat-options button:hover { background: var(--neon-purple); color: #fff; }

.chat-footer {
    padding: 15px; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; gap: 10px; background: #000;
}
.chat-footer input {
    width: 100%; background: #111; border: 1px solid #333;
    padding: 10px; color: #fff; border-radius: 5px; margin-bottom: 0;
}
.chat-footer button {
    background: var(--neon-blue); border: none; color: #000; width: 40px;
    border-radius: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ==========================================================
   MOBILE RESPONSIVENESS (PHONES & TABLETS)
   ========================================================== */
.menu-btn { display: none; font-size: 1.5rem; color: #fff; cursor: pointer;}

@media (max-width: 768px) {
    /* Hide custom cursor on mobile to prevent bugs */
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }

    /* Nav Menu */
    .menu-btn { display: block; }
    .nav-links {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 80%;
        background: #000; flex-direction: column; padding: 100px 40px; transition: 0.4s; z-index: 999;
        border-left: 2px solid var(--neon-blue);
    }
    .nav-links.active { right: 0; }
    
    /* Layout Stacking */
    .hero { flex-direction: column-reverse; padding-top: 120px; text-align: center; }
    .hero-content h1 { font-size: 2.5rem; }
    .about-section { flex-direction: column; }
    .about-img { width: 100%; }

    /* Form & Grids */
    .page-title-section { padding-top: 120px; }
    .page-title-section h1 { font-size: 2.2rem; }
    
    /* Forces Software Grid to 1 Column on Mobile */
    .software-grid { grid-template-columns: 1fr; gap: 30px; }
    
    /* Chat Fix for mobile screens */
    .chat-box { width: 300px; max-width: 90vw; }
}