/* --- VARIABLES --- */
:root {
  /* The Chassis (The physical box) */
  --chassis-color: #e8e8e8;
  --chassis-shadow: #b0b0b0;
  
  /* The "Screen" (Recessed LCD) */
  --screen-bg: #1a1b1c;
  --screen-text: #e0e0e0; /* Off-white phosphor */
  --screen-bezel: #333;
  
  /* The Buttons (Hard Plastic) */
  --btn-face: #fdfdfd;
  --btn-side: #999;
  --btn-text: #333;
  --accent-color: #ff4400; /* Rams Orange */
}

/* --- GLOBAL LAYOUT --- */
body {
  /* Dark table surface to make the device pop */
  background-color: #2e2e2e;
  background-image: radial-gradient(#383838 1px, transparent 1px);
  background-size: 20px 20px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 800px;
}

/* --- THE DEVICE CHASSIS --- */
.control-panel {
  background-color: var(--chassis-color);
  /* Subtle texture for matte plastic */
  background-image: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0.05) 100%);
  
  border-radius: 4px; /* Tighter, more machined corners */
  padding: 40px;
  
  /* The "Physical" height of the device */
  box-shadow: 
    inset 1px 1px 0 rgba(255,255,255,0.8), /* Top highlight */
    inset -1px -1px 0 rgba(0,0,0,0.2),     /* Bottom bevel */
    0 15px 30px rgba(0,0,0,0.5),           /* Drop shadow */
    0 0 0 1px #000;                        /* Hard outline */
    
  position: relative;
}

/* Screws in the corners (Pure decoration) */
.control-panel::before, .control-panel::after {
  content: '+';
  position: absolute;
  color: #999;
  font-family: monospace;
  font-size: 20px;
  top: 10px;
  opacity: 0.5;
}
.control-panel::before { left: 15px; }
.control-panel::after { right: 15px; }

/* --- BOTTOM SCREWS --- */
.screws-bottom {
  position: absolute;
  bottom: 10px; /* Aligns to bottom */
  left: 0;
  right: 0;
  height: 20px;
  pointer-events: none; /* Allows clicking through them */
}

.screws-bottom::before, .screws-bottom::after {
  content: '+';
  position: absolute;
  color: #999;
  font-family: monospace;
  font-size: 20px;
  opacity: 0.5;
  line-height: 1;
}

.screws-bottom::before { left: 15px; }
.screws-bottom::after { right: 15px; }

/* --- HEADER / BRANDING --- */
header {
  margin-bottom: 30px;
  border-bottom: 2px solid #ccc;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

h1 {
  font-size: 20px;
  margin: 0;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.model-number {
  font-family: monospace;
  color: #666;
  font-size: 12px;
  border: 1px solid #999;
  padding: 2px 6px;
  border-radius: 2px;
}

/* --- MECHANICAL BUTTONS --- */
.nav {
  display: flex;
  gap: 20px; /* Increased gap to prevent shadow overlap */
  flex-wrap: wrap;
  margin-bottom: 40px;
  background: #dcdcdc; 
  padding: 20px; /* More breathing room for the container */
  border-radius: 4px;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
  align-items: center; /* Keeps them aligned if text sizes differ */
}

.nav-btn {
  /* Layout basics */
  position: relative;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--btn-text);
  
  /* Size & Shape */
  padding: 10px 20px;
  background: var(--btn-face);
  border: 1px solid #bbb;
  border-radius: 3px;
  
  /* The "Unpressed" Shadow (4px deep) */
  box-shadow: 
    0 4px 0 var(--btn-side), 
    0 5px 5px rgba(0,0,0,0.2);
  
  /* Smooth animation */
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  
  /* Ensure it sits above the background */
  z-index: 1; 
}

/* HOVER STATE: Half-pressed (Moves down 2px) */
.nav-btn:hover {
  background-color: #fff;
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 var(--btn-side), 
    0 3px 3px rgba(0,0,0,0.2);
}

/* ACTIVE STATE: Fully pressed (Moves down 4px) */
.nav-btn:active, .nav-btn.active {
  background-color: #f0f0f0;
  transform: translateY(4px);
  box-shadow: 
    0 0 0 var(--btn-side), 
    inset 0 2px 5px rgba(0,0,0,0.1); 
}

/* The Active Indicator (Orange Dot) */
.nav-btn.active {
  color: var(--accent-color);
  border-color: #ccc;
  /* Keep it pressed down if it's the active page */
  transform: translateY(4px);
  box-shadow: 
    0 0 0 var(--btn-side), 
    inset 0 2px 5px rgba(0,0,0,0.1);
}

/* Optional: small dot for the active page */
.nav-btn.active::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 6px;
  box-shadow: 0 0 5px var(--accent-color);
}

.nav-btn {
  position: relative;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--btn-text);
  padding: 10px 20px;
  background: var(--btn-face);
  border: 1px solid #bbb;
  border-radius: 3px;
  
  /* THE 3D EFFECT */
  /* This creates the "side" of the button */
  box-shadow: 
    0 4px 0 var(--btn-side), 
    0 5px 5px rgba(0,0,0,0.2);
  
  transition: all 0.1s ease;
  top: 0;
}

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

/* PRESSING THE BUTTON */
.nav-btn:active, .nav-btn.active {
  top: 4px; /* Moves down */
  box-shadow: 
    0 0 0 var(--btn-side), /* Side disappears */
    inset 0 2px 5px rgba(0,0,0,0.1); /* Inner shadow appears */
  background-color: #f0f0f0;
}

/* The Orange Indicator for the Active Page */
.nav-btn.active {
  color: var(--accent-color);
  border-color: #ccc;
}
.nav-btn.active::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 6px;
  box-shadow: 0 0 5px var(--accent-color);
}

/* --- THE SCREEN (CRT / LCD) --- */
.screen-wrapper {
  background-color: var(--screen-bezel);
  padding: 20px;
  border-radius: 4px 4px 20px 4px; /* Asymmetric curve style */
  box-shadow: 
    inset 0 0 0 1px rgba(255,255,255,0.1),
    0 5px 15px rgba(0,0,0,0.3);
}

.screen-readout {
  background-color: var(--screen-bg);
  color: var(--screen-text);
  font-family: "Courier New", Courier, monospace; /* Digital font */
  padding: 2rem;
  min-height: 200px;
  border-radius: 2px;
  
  /* Inner depth of the screen */
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  border: 1px solid #000;
  position: relative;
  overflow: hidden;
}

/* --- THE SCREEN (CRT / LCD) --- */

/* Add a text shadow to simulate phosphor bloom */
.screen-readout {
  background-color: var(--screen-bg);
  color: var(--screen-text);
  font-family: "Courier New", Courier, monospace;
  padding: 2rem;
  min-height: 200px;
  border-radius: 2px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  border: 1px solid #000;
  position: relative;
  overflow: hidden;
  
  /* NEW: Slight Phosphor Bloom (Glow) */
  text-shadow: 0 0 2px rgba(200, 255, 200, 0.4); 
}

/* THE TRINITRON APERTURE GRILLE OVERLAY */
.screen-readout::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  z-index: 2;
  pointer-events: none;

  background: 
    /* Layer 1: The Vertical RGB Stripes */
    /* FIX 1: Equalized opacity (0.15) for all colors so no single color dominates */
    linear-gradient(
      90deg, 
      rgba(255, 0, 0, 0.15) 0%,   
      rgba(255, 0, 0, 0.15) 33.3%, 
      rgba(0, 255, 0, 0.15) 33.3%, 
      rgba(0, 255, 0, 0.15) 66.6%, 
      rgba(0, 0, 255, 0.15) 66.6%, 
      rgba(0, 0, 255, 0.15) 100%
    ),
    /* Layer 2: Subtle Horizontal Scanline */
    linear-gradient(
      to bottom, 
      rgba(255,255,255,0) 50%, 
      rgba(0,0,0,0.2) 50%
    );

  /* FIX 2: The "Safety Floor" Logic
     max(3px, 0.6%) means:
     - On Phone: Use 3px (prevents stripes from getting too tiny/blurry).
     - On Desktop: Use 0.6% (allows stripes to grow so they don't look purple).
  */
  background-size: max(3px, 0.6%) 100%, 100% 3px;
}

/* --- GALLERY MODULE (Add to bottom of style.css) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Responsive grid */
  gap: 25px;
  padding: 10px;
}

.gallery-item {
  display: block;
  text-decoration: none;
  color: var(--screen-text); /* Matches the CRT text color */
  transition: transform 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-5px); /* Lift effect */
  color: var(--accent-color); /* Text turns Orange on hover */
}

.gallery-thumb-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1; /* Forces perfect squares */
  background-color: #000;
  border: 1px solid #444;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
  
  /* CRT "File" Look */
  box-shadow: 0 0 10px rgba(0,0,0,0.5); 
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) contrast(110%); /* Retro/Industrial vibe */
  transition: all 0.3s ease;
}

/* Hover: Bring color back */
.gallery-item:hover .gallery-thumb {
  filter: grayscale(0%) contrast(100%);
  transform: scale(1.05);
}

.gallery-caption {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

/* --- TOOLS MODULE (Add to bottom of style.css) --- */
.tool-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-item {
  display: block;
  text-decoration: none;
  color: var(--screen-text);
  padding: 15px;
  border: 1px solid #333;
  margin-bottom: 10px;
  background-color: rgba(0,0,0,0.3);
  font-family: "Courier New", Courier, monospace;
  transition: all 0.2s ease;
  position: relative;
}

/* Hover: Highlight the "row" */
.tool-item:hover {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
  text-shadow: none; /* Remove phosphor blur for clarity */
}

/* The "Command Prompt" arrow before links */
.tool-item::before {
  content: '> ';
  color: #666;
}

.tool-item:hover::before {
  color: #fff;
}

.tool-desc {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tool-item:hover .tool-desc {
  color: rgba(255,255,255,0.8);
}

/* --- BLOG MODULE (Add to bottom of style.css) --- */
.blog-controls {
  margin-bottom: 20px;
  border-bottom: 1px dashed #333;
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.retro-select {
  background-color: #000;
  color: var(--accent-color);
  border: 1px solid #555;
  padding: 5px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-entry {
  display: flex;
  justify-content: space-between; /* Pushes date to the far right */
  align-items: baseline;
  padding: 12px 5px;
  border-bottom: 1px solid #222; /* Subtle divider */
  transition: background 0.2s;
}

.blog-entry:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.blog-link {
  color: var(--screen-text);
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  flex-grow: 1;
}

.blog-link:hover {
  color: var(--accent-color);
  text-decoration: none;
  text-shadow: 0 0 8px var(--accent-color); /* Phosphor glow on hover */
}

/* The "Command Prompt" arrow before blog titles */
.blog-link::before {
  content: '> ';
  color: #555;
  margin-right: 5px;
}

.blog-date {
  font-size: 11px;
  color: #666;
  font-family: monospace;
  margin-left: 20px;
  white-space: nowrap; /* Prevents date from breaking lines */
}

/* --- CONTACT MODULE (Add to bottom of style.css) --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-label {
  font-family: monospace;
  font-size: 11px;
  color: #888;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input, 
.form-textarea {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid #444;
  color: var(--accent-color);
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  padding: 12px;
  outline: none;
  border-radius: 2px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s;
}

.form-input:focus, 
.form-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(255, 68, 0, 0.3);
  background-color: rgba(0, 0, 0, 0.6);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  align-self: flex-start;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 25px;
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 10px;
  box-shadow: 0 4px 0 #b33000; /* 3D effect matching nav buttons */
  transition: all 0.1s;
}

.form-submit:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #b33000;
}

/* --- TRANSMIT BUTTON MODULE --- */

/* Container to center the button below the screen */
.action-area {
  margin-top: 20px;
  text-align: center; /* Aligns button to the right, or use center */
  padding-right: 10px;
}

/* The Transmit Button (Inherits basic movement from nav-btn structure) */
.btn-transmit {
  /* Layout & Text */
  display: inline-block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff; /* White text */
  cursor: pointer;
  
  /* Shape */
  padding: 12px 40px;
  border-radius: 4px;
  border: 1px solid #c93600; /* Darker orange border */
  
  /* COLOR: The Rams Orange */
  background-color: var(--accent-color);
  
  /* THE 3D SHADOW (Darker Orange) */
  box-shadow: 
    0 4px 0 #b33000, 
    0 5px 5px rgba(0,0,0,0.2);
  
  /* Smooth animation */
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  
  /* Ensure it sits nicely */
  position: relative;
  z-index: 1;
}

/* HOVER: Half-press */
.btn-transmit:hover {
  background-color: #ff551a; /* Slightly lighter orange */
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #b33000, 
    0 3px 3px rgba(0,0,0,0.2);
}

/* ACTIVE/CLICK: Full-press */
.btn-transmit:active {
  background-color: #e63d00;
  transform: translateY(4px);
  box-shadow: 
    0 0 0 #b33000, 
    inset 0 2px 5px rgba(0,0,0,0.2);
}

/* --- LIGHTBOX MODULE (Add to bottom of style.css) --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000; /* Above everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Darker dim */
  backdrop-filter: blur(2px); /* Blur the background slightly */
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border: 2px solid #333;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
  background: #000;
  padding: 5px; /* Inner bezel */
}

.lightbox-content {
  display: block;
  max-width: 100%;
  max-height: 80vh; /* Leave room for caption */
  object-fit: contain;
}

.lightbox-caption {
  color: var(--accent-color);
  font-family: "Courier New", Courier, monospace;
  text-align: center;
  padding-top: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -10px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--accent-color);
}

/* --- INTERACTIVE TOOLS MODULE (Add to bottom of style.css) --- */

/* Split layout for Map tools */
.tool-interface {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 900px) {
  .tool-interface {
    flex-direction: row;
    align-items: flex-start;
  }
}

.tool-controls {
  flex: 1;
  min-width: 300px;
}

/* The Map Screen */
.map-screen-wrapper {
  flex: 1.5;
  min-width: 300px;
  height: 500px;
  background-color: #000;
  border: 4px solid #333; /* Thick bezel */
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px #000;
}

#map {
  width: 100%;
  height: 100%;
  /* Optional: Filter to make standard Google Maps look a bit more "Monitor-like" */
  filter: contrast(1.1) sepia(0.1); 
}

/* Tool Buttons Row */
.tool-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Specific styling for the Results Lists */
.results-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  font-family: "Courier New", Courier, monospace;
}

.results-list li {
  background: rgba(0,0,0,0.2);
  border-left: 3px solid var(--accent-color);
  padding: 10px;
  margin-bottom: 8px;
  color: var(--screen-text);
  font-size: 13px;
}

/* Directions / Routing Steps */
.routing-steps ol {
  padding-left: 20px;
  color: #aaa;
  font-family: monospace;
}
.routing-steps li {
  margin-bottom: 5px;
}

/* Disclaimer Box */
.system-warning {
  border: 1px solid #b33000;
  background-color: rgba(179, 48, 0, 0.1);
  color: #ffaa80;
  padding: 10px;
  font-size: 11px;
  font-family: monospace;
  margin-bottom: 20px;
  text-align: center;
}

footer {
  margin-top: 20px;
  color: #666;
  font-size: 11px;
  text-shadow: 0 1px 0 #000;
}

