/*
  MR.ROBOT Modern Redesign
  Stunning, attractive and modern split-screen layout.
*/

/* --- Variables & Theme --- */
:root {
  --primary-color: #ff3b3b;
  /* Vibrant Red */
  --primary-glow: rgba(255, 59, 59, 0.5);
  --text-color: #e0e0e0;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --input-bg: rgb(36 34 34 / 50%);
  ;
  --font-main: 'Open Sans', sans-serif;
  --font-display: 'Rajdhani', sans-serif;
  /* Futuristic/Tech look */
  --transition-speed: 0.3s;
}

body.light-theme {
  --primary-color: #d32f2f;
  --primary-glow: rgba(211, 47, 47, 0.3);
  --text-color: #1a1a1a;
  --bg-overlay: rgba(240, 240, 240, 0.9);
  --glass-bg: rgba(0, 0, 0, 0.05);
  --glass-border: rgba(0, 0, 0, 0.1);
  --input-bg: rgba(255, 255, 255, 0.6);
}

/* --- Resets & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: url('images/black_painted_planks_diff_512.jpg') repeat;
  background-attachment: fixed;
  /* Creates a nice parallax-like feel */
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: color var(--transition-speed);
}

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

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #fff;
}

/* --- Layout --- */
.split-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Overlay to darken/tint background image */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: -1;
  pointer-events: none;
  transition: background var(--transition-speed);
}

.content-pane,
.form-pane {
  padding: 2rem;
  width: 100%;
}

/* --- Large Screen Split Layout --- */
@media (min-width: 1024px) {
  .split-layout {
    flex-direction: row;
    height: 100vh;
    /* Full viewport height */
    overflow: hidden;
    /* Prevent body scroll */
  }

  .content-pane {
    flex: 1;
    /* Takes remaining space */
    overflow-y: auto;
    /* Internally scrollable */
    padding: 4rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .form-pane {
    flex: 0 0 450px;
    /* Fixed width for form */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    /* Slight darken on right side */
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    border-left: 1px solid var(--glass-border);
    overflow-y: auto;
    position: relative;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  }
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 15px;
}

.toggle-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--primary-color);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 15px rgba(255, 59, 59, 0.3);
  margin-left: 10px;
}

.toggle-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 0 25px var(--primary-glow), 0 0 10px #fff;
  border-color: #fff;
}

/* --- Language Dropdown --- */
.language-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 10px;
  /* Maintain spacing */
}

/* Ensure the button inside doesn't double margin if it handles it */
.language-dropdown .toggle-btn {
  margin-left: 0;
}

.language-options {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 15px;
  pointer-events: none;
  /* Initially non-interactive */
}

.lang-option {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-color);
  color: #fff;
  width: 40px;
  height: 40px;
  padding: 0;
  /* Reset padding from btn/general */
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);

  /* Hidden state for animation */
  opacity: 0;
  transform: translateY(-20px);
}

.lang-option:hover {
  background: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Reveal options on hover or active class */
.language-dropdown:hover .language-options,
.language-dropdown.active .language-options {
  pointer-events: auto;
}

.language-dropdown:hover .lang-option,
.language-dropdown.active .lang-option {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for slide-down effect */
.lang-option:nth-child(1) {
  transition-delay: 0.1s;
}

.lang-option:nth-child(2) {
  transition-delay: 0.2s;
}

.lang-option:nth-child(3) {
  transition-delay: 0.3s;
}

/* --- Typography --- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3 {
  color: #000;
}

h1 {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  background: linear-gradient(to right, #fff, var(--text-color));
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-theme h1 {
  background: linear-gradient(to right, #000, #333);
  -webkit-background-clip: text;
  background-clip: text;
  text-fill-color: transparent;
  /* Standard property is -webkit-text-fill-color */
  -webkit-text-fill-color: transparent;
}


h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 5px;
}

/* --- Hero Section --- */
.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Centered in content pane */
  text-align: center;
  /*  margin-bottom: 4rem;/***/
}

#heroTitle {
  color: var(--primary-color);
  /* Override basic h1 gradient for the main title to be red/brand color */
  background: none;
  -webkit-text-fill-color: initial;
  text-shadow: 0 0 20px var(--primary-glow);
}

#heroSubtitle {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.hero-robot {
  width: 300px;
  max-width: 80%;
  margin-top: 1rem;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 35px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: 0.4s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn:hover::after {
  left: 100%;
}

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

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature:hover i {
  transform: scale(1.2) rotate(5deg);
}

.feature h3 {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  padding-top: 4rem;
  border-top: 1px solid var(--glass-border);
}

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

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#phoneNumber {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-robot {
  width: 100px;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

/* --- Form Styles --- */
.form-wrapper {
  background: var(--glass-bg);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  width: 100%;
}

@media (min-width: 1024px) {

  /* On large screens, the form wrapper can be transparent since the pane itself has the bg */
  .form-wrapper {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

/* Floating Labels */
.floating-label input,
.floating-label textarea {
  width: 100%;
  padding: 12px 15px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  font-family: var(--font-main);
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label input:not(:placeholder-shown),
.floating-label textarea:not(:placeholder-shown) {
  border-color: var(--primary-color);
  background: rgb(43 13 13 / 50%);
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.1);
}

body.light-theme .floating-label input:focus {
  background: #fff;
}


.floating-label label {
  position: absolute;
  inset-inline-start: 15px;
  top: 14px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transition: 0.3s ease all;
  background: transparent;
  padding: 0 5px;
}

body.light-theme .floating-label label {
  color: rgba(0, 0, 0, 0.5);
}

.floating-label input:focus~label,
.floating-label input:not(:placeholder-shown)~label,
.floating-label textarea:focus~label,
.floating-label textarea:not(:placeholder-shown)~label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--primary-color);
  background: var(--background-color);
  /* Mask the line */
  /* Since we have an image background, we can't easily mask line with simple color. 
     Instead, let's just move it up and give it a small pill background or text shadow */
  background: #222;
  border-radius: 4px;
}

body.light-theme .floating-label input:focus~label,
body.light-theme .floating-label input:not(:placeholder-shown)~label {
  background: #fff;
}

.static-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.select-wrapper select {
  width: 100%;
  padding: 12px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.select-wrapper select option {
  background: #222;
  color: #fff;
}

body.light-theme .select-wrapper select option {
  background: #fff;
  color: #000;
}


/* --- Animations --- */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.float-anim {
  animation: float 4s ease-in-out infinite;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

.fade-in-up:nth-child(1) {
  animation-delay: 0.1s;
}

.fade-in-up:nth-child(2) {
  animation-delay: 0.2s;
}

.fade-in-up:nth-child(3) {
  animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
  animation-delay: 0.4s;
}

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

/* Success/Error messages */
.form-response.success {
  color: #4ade80;
  text-align: center;
  margin-top: 1rem;
  padding: 10px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: 6px;
}

.form-response.error {
  color: #f87171;
  text-align: center;
  margin-top: 1rem;
  padding: 10px;
  background: rgba(248, 113, 113, 0.1);
  border-radius: 6px;
}

/* --- Page Loader --- */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader-wrapper.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Scanner Line Effect */
.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-color);
  animation: scan 3s ease-in-out infinite;
  opacity: 0.5;
}

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

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

.loader-content {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Rotating Circles */
.loader-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loader-circle.outer {
  width: 120px;
  height: 120px;
  border-top-color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
  animation: spin 2s linear infinite;
}

.loader-circle.inner {
  width: 80px;
  height: 80px;
  border-left-color: #fff;
  border-right-color: #fff;
  animation: spin-reverse 1.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

/* Text */
.loader-text {
  margin-top: 140px;
  /* Push below the circles */
  font-family: var(--font-display);
  color: var(--primary-color);
  font-size: 1.5rem;
  letter-spacing: 4px;
  font-weight: 700;
  animation: pulse-text 1.5s ease-in-out infinite alternate;
}

.loader-subtext {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 5px;
  letter-spacing: 2px;
}

@keyframes pulse-text {
  from {
    text-shadow: 0 0 5px var(--primary-glow);
    opacity: 0.8;
  }

  to {
    text-shadow: 0 0 20px var(--primary-color), 0 0 10px #fff;
    opacity: 1;
  }
}