/* 
 * Eurisko Application Stylesheet
 * Optimized structure with consistent organization and removed redundancies
 */

/* ===== Base Variables & Settings ===== */
:root {
  /* Color palette */
  --primary-color: orange;
  --primary-dark: darkorange;
  --secondary-color: #536574;
  --error-color: #e50000;
  --success-color: #26b050;
  --background-color: #eeeeee;
  --text-color: #425466;
  --link-hover-color: orange;
  --button-text-color: #fff;
  
  /* UI Elements */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --focus-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.1);
  
  /* Typography */
  --font-family-main: "Segoe UI", Verdana, Helvetica, Sans-Serif;
  --font-size-base: 100%;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.65rem;
  
  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;
}

/* ===== Base Elements ===== */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-main);
  color: var(--text-color);
}

body {
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--text-color);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  text-align: left;
  font-weight: bold;
}

h1 { font-size: var(--font-size-xl); }
h2 { font-size: var(--font-size-lg); }
h3 { font-size: var(--font-size-md); }
h4 { font-size: var(--font-size-sm); }

p, li {
  font-size: var(--font-size-md);
}

.left-align {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-align-right {
  text-align: right !important;
}

/* ===== Links & Buttons ===== */
a, .btn-link {
  text-decoration: none;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: none;
  font-weight: bold;
}

.btn-primary {
  color: var(--button-text-color);
  background-color: var(--primary-color);
  border-color: var(--primary-dark);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: var(--focus-shadow);
}

/* Button Styles */

.apply-button {
    background-color: #ff7a00;
    border-color: #ff7a00;
    color: #ffffff;
    border-radius: 8px;
}

    .apply-button:hover,
    .apply-button:focus {
        background-color: #e56f00;
        border-color: #e56f00;
        color: #ffffff;
    }

    .apply-button:active,
    .apply-button.active {
        background-color: #cc6400;
        border-color: #cc6400;
        color: #ffffff;
    }

.apply-button:disabled,
.apply-button.disabled {
    background-color: #ffb266;
    border-color: #ffb266;
    color: #ffffff;
}

.button-styles {
  display: inline-block;
  font-size: 0.6rem;
  text-align: center;
  text-decoration: none;
  border-radius: 0;
}

.custom-button {
  display: inline-block;
  background-color: white;
  border-color: var(--primary-dark);
  font-size: 0.875rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  color: var(--secondary-color);
  text-align: center;
  text-decoration: none;
  border-radius: 0;
  transition: background-color 0.3s, color 0.3s;
}

.custom-button:hover {
  color: #1f2d3d;
  background-color: var(--primary-color);
}

.custom-button:focus {
  color: var(--secondary-color);
  background-color: white;
  box-shadow: none;
}

.custom-button:active {
  background-color: var(--primary-dark);
  transition: background-color 0.1s ease;
}

.custom-button:disabled {
  background-color: initial;
  color: dimgrey;
}

.return-button {
  display: inline-block;
  background-color: white;
  border-color: darkslategrey;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  color: var(--secondary-color);
  text-align: center;
  text-decoration: none;
  border-radius: 0;
}

.return-button:hover {
  color: white;
  background-color: darkslategrey;
}

.return-button:active,
.return-button:focus {
  color: var(--secondary-color);
  background-color: white;
  box-shadow: none;
}

.email-button {
  display: inline-block;
  background-color: green;
  border-color: darkgreen;
  font-size: 0.6rem;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 0;
}

.email-button:hover {
  background-color: darkgreen;
}

.email-button:active,
.email-button:focus {
  box-shadow: none;
}

.button-container {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Override Bootstrap 5 button variables for Apply button */
.btn.apply-button {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #ff7a00;
  --bs-btn-border-color: #ff7a00;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #e56f00;
  --bs-btn-hover-border-color: #e56f00;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #cc6400;
  --bs-btn-active-border-color: #cc6400;
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: #ffb266;
  --bs-btn-disabled-border-color: #ffb266;
}

/* ===== Layout ===== */
.container {
  position: relative;
  width: 100%;
}

.hidden {
  display: none;
}

.content {
  padding-top: 1.1rem;
}

.texto {
  margin: 20px;
  text-align: left;
}

.fondo {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  text-align: justify;
}

.title {
  position: relative;
  left: 10%;
  text-align: justify;
  color: black;
  width: 80%;
}

.address {
  display: flex;
  width: min(100%, 400px);
  text-align: center;
}

.contact {
  opacity: 0.7;
  cursor: pointer;
}

.contact:hover {
  opacity: 1;
}

.page footer {
  background-color: white;
  font-size: 0.7rem;
  font-weight: lighter;
}

/* ===== Navigation ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.nav-item {
  font-size: 1.0rem;
  padding-bottom: 0.5rem;
  align-items: center;
  color: var(--secondary-color) !important;
}

.nav-item .nav-link,
.nav-item .nav-menu {
  color: var(--secondary-color) !important;
  height: 2rem;
  align-items: center;
  line-height: 2rem;
  border: none;
  display: flex;
  padding-left: 1rem;
  text-decoration: none;
}

.nav-item .nav-link {
  gap: 0.5rem;
}

.nav-item .nav-menu {
  width: 200px;
}

.nav-item a.active {
  background-color: rgba(255, 255, 255, 0.37);
  color: black;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-color) !important;
}

/* ===== Cards ===== */
.e-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Let content take remaining space */
.e-card .e-card-content {
  flex: 1 1 auto;
}

/* Footer/actions at the bottom */
.e-card .e-card-actions,
.e-card .e-card-footer {
  margin-top: auto;
}

.e-card .e-card-header .e-card-header-caption .e-card-sub-title {
  padding-top: 0;
  font-size: 0.7rem;
}

.e-card .e-card-header .e-card-header-caption .e-card-header-title {
  font-weight: bold;
  font-size: 0.8rem;
}

.e-card .e-card-content {
  padding-top: 10px;
  font-size: 1rem;
  text-align: left;
}

.auto-height-card {
  display: flow;
  height: auto;
}

.auto-height-card .e-card-content {
  padding-top: 10px;
  font-size: 0.7rem;
  text-align: justify;
}

/* Keep tool-card actions clear of the card edges without sizing every control. */
.auto-height-card .custom-button,
.auto-height-card .return-button {
  margin: 0.625rem;
  max-width: calc(100% - 1.25rem);
}


/* ===== Form Elements & Validation ===== */
.valid.modified:not([type=checkbox]) {
  outline: 1px solid var(--success-color);
}

.invalid {
  outline: 1px solid var(--error-color);
}

.validation-message {
  color: var(--error-color);
  font-size: 0.8rem;
  min-height: 1.2rem;
  margin-top: 3px;
}

.text-danger {
  margin-top: 2px;
  font-size: 0.6rem;
}

.form-field {
  margin-bottom: 1.5rem;
  font-size: 0.7rem;
  text-align: right;
}

/* Form floating elements */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.input {
  width: 125px;
  font-size: 0.6rem;
}

.input-label {
  font-size: 0.6rem;
}

.form-control-static {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  font-family: monospace;
}

.calculation-selector {
  width: 100%;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* ===== Switch Controls ===== */
.e-switch-wrapper {
  margin-top: 10px;
}

.e-switch-wrapper .e-switch-on {
  background-color: var(--primary-color);
}

.e-switch-wrapper .e-switch-off {
  background-color: gray;
}

.e-switch-wrapper:hover .e-switch-handle.e-switch-active {
  background-color: var(--primary-color);
}

.e-switch-wrapper:hover .e-switch-handle.e-switch-inactive {
  background-color: gray;
}

.e-switch-wrapper:hover .e-switch-inner.e-switch-active .e-switch-on {
  background-color: white;
}

/* Red switch variant */
.red-switch .e-switch-wrapper .e-switch-inner {
  background-color: red;
}

.red-switch .e-switch-wrapper .e-switch-handle {
  background-color: white;
}

/* Green switch variant */
.green-switch .e-switch-wrapper .e-switch-inner {
  background-color: green;
}

.green-switch .e-switch-wrapper .e-switch-handle {
  background-color: white;
}

/* ===== Error Handling ===== */
.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA9NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA9NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0Lj01NjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA9MjY3Ljg3OSA2OS41ODc3IDI2Ny44NzcgNjkuMzE3OSAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ7IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

.error-message {
  color: #dc3545;
  padding: 0.5rem;
  margin-top: 1rem;
  border-radius: 4px;
  background-color: #fff2f2;
  font-size: 0.7rem;
}

/* ===== Services Section ===== */
.services-wrap {
  margin: 0 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: space-between;
}

.service-item,
.service-gap {
  display: flex;
  flex-direction: row-reverse;
  width: calc(100%/2 - (((2 - 1) * 1rem) / 2));
}

.service-item {
  border-top: 0.5rem solid currentColor;
  border-radius: 2px;
  margin-bottom: 1rem;
  position: relative;
  color: transparent;
}

.service-item:before {
  content: '';
  display: inline-block;
  padding-top: 56.25%;
}

.service-item p {
  padding: 1rem;
  display: inline-block;
  font-size: 1rem;
  color: #333;
  line-height: 1.4;
  font-weight: 300;
}

/* ===== Filter Controls ===== */
.filter-controls {
  text-align: center;
  padding-top: 24px;
}

.filter-controls ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.filter-controls ul li {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.filter-controls ul li:after {
  content: "|";
  font-size: 0.9rem;
  color: #B7B7B7;
  margin-inline: 1rem;
}

.filter-controls ul li:last-child:after {
  display: none;
}

/* ===== Project Gallery ===== */
.gallery-wrap {
  overflow: hidden;
}

.grid-project {
  display: block;
  width: 25%;
  padding: 0 5px;
  float: left;
}

.gallery-img {
  margin-bottom: 10px;
  position: relative;
  display: block;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.gallery-img:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  left: 0;
  bottom: 0;
  background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.85));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-text {
  position: absolute;
  font-size: 1.5rem;
  width: 100%;
  left: 0;
  bottom: 1.5rem;
  padding: 0 30px;
  z-index: 3;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
}

.gallery-text span {
  position: relative;
  font-size: 1rem;
  font-weight: lighter;
  color: #fff;
  bottom: 0;
  opacity: 1;
  transition: 0.3s;
}

.gallery-text h3 {
  position: relative;
  color: #fff;
  bottom: 0;
  opacity: 1;
  transition: 0.3s ease 0.2s;
}

.gallery-img:hover:after,
.gallery-img:focus-within:after,
.gallery-img:hover .gallery-text,
.gallery-img:focus-within .gallery-text {
  opacity: 1;
}

.gallery-img:hover .gallery-text,
.gallery-img:focus-within .gallery-text {
  transform: translateY(0);
}

/* ===== Login Section ===== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background-color: #f5f5f5;
}

.login-box {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  color: #333;
  margin-bottom: 1rem;
}

.remember-me {
  margin: 1rem 0;
  text-align: right;
  font-size: 0.7rem;
}

.login-button {
  margin-top: 1.5rem;
}

/* ===== Toasts ===== */
.e-toast-success {
  border-left: 5px solid #4CAF50;
}

.e-toast-danger {
  border-left: 5px solid #f44336;
}

/* ===== Progress Bars & Indicators ===== */
.gradient-bar {
  height: 20px;
  background: linear-gradient(to right, blue, cyan, green, yellow, red);
  margin: 5px 0;
  border-radius: 3px;
  border: 1px solid #dee2e6;
}

.progress-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.custom-progress-bar .e-progressbar {
  background-color: #f3f3f3;
}

.custom-progress-bar .e-progressbar .e-progress {
  background-color: #4caf50;
}

.custom-progress-bar .e-progressbar .e-progress-value {
  color: #fff;
}

/* ===== Dimension Items (Used in XYZ2FDS) ===== */
.dimension-item {
  background-color: #f8f9fa;
  border-radius: var(--border-radius-sm);
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: var(--card-shadow);
}

.dimension-label {
  font-weight: bold;
  margin-right: 8px;
}

.dimension-value {
  font-family: monospace;
}

/* ===== Det Input Styles ===== */
.det-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.det-input {
  margin-bottom: 15px;
  min-width: 300px;
  flex: 1 1 calc(50% - 20px);
  padding: 0 0 20px 0;
}

.det-input:last-child {
  padding: 0;
}

.det-input-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.det-output {
  flex: 1 1 calc(100% - 10px);
  padding: 0 0 20px 0;
  width: 100%;
  margin: 20px 0;
}

/* ===== Charts & Visualizations ===== */
.chart-container {
  margin-bottom: 30px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
}

/* Slider elements */
.slider-container {
  margin: 1.5rem 0;
  padding: 0.5rem 0;
}

.slider-labels {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

.color-scale {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  overflow: hidden;
}

.color-gradient {
  height: 100%;
  background: linear-gradient(90deg, #2196F3 0%, #FFC107 50%, #FF5722 100%);
}

/* Slider styling */
.e-scale .e-tick {
  height: 10px;
}

.e-slider-tooltip.e-tooltip-wrap.e-popup {
  background-color: #333;
  border-color: #333;
  color: white;
  font-weight: 500;
}

.e-slider .e-handle {
  background-color: #ffffff;
  border: 2px solid #1976d2;
}

/* Legend elements */
.legend-reset-button {
  height: 32px;
  padding: 4px 8px;
  margin-top: 1px;
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
}

.legend-reset-button:hover {
  background-color: #e9ecef;
}

.legend-overlay {
  background: rgba(255,255,255,0.9) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 1px solid #dee2e6;
  padding: 8px 12px !important;
}

.legend-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.legend-button:hover {
  background-color: #0056b3;
}

/* ===== Grid & Table Styles ===== */
.grid-container {
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.e-grid .e-rowcell {
  vertical-align: middle;
}

.e-grid .e-headercell {
  background-color: #f8f9fa;
  font-weight: bold;
}

.e-grid .e-alt_row {
  background-color: #fafafa;
}

.vertical-align-middle {
  vertical-align: middle !important;
}

.risk-high {
  background-color: rgba(220, 53, 69, 0.1);
}

.risk-medium {
  background-color: rgba(255, 193, 7, 0.1);
}

.risk-low {
  background-color: rgba(40, 167, 69, 0.1);
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.value-with-unit {
  white-space: nowrap;
}

/* ===== Modal & Dialog Elements ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-dialog {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
}

.custom-dialog-header {
  font-size: 1rem;
  font-weight: bold;
  color: #343a40;
}

.custom-dialog-content {
  font-size: 1rem;
  color: #495057;
}

.custom-dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.e-tooltip-wrap {
  max-width: 300px;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* ===== Media Queries ===== */
/* Tiny devices (up to 295px) */
@media only screen and (max-width: 295px) {
  .not-tiny-screens {
    display: none !important;
  }
  
  .small-screens,
  .medium-screens,
  .small-and-medium-screens {
    display: block;
  }
  
  .big-screens {
    display: none;
  }
  
  .align-right {
    display: flex;
    justify-content: flex-end;
  }
  
  .grid-project {
    width: 100%;
  }
  
  .det-input-wrapper {
    flex-direction: column;
  }
  
  .det-input {
    width: 100%;
  }
}

/* Small devices (296px - 400px) */
@media only screen and (min-width: 296px) and (max-width: 400px) {
  .align-right {
    display: none;
  }
  
  .small-screens {
    display: block;
  }
  
  .small-and-medium-screens {
    display: block;
  }
  
  .not-tiny-screens {
    display: inline-block;
  }
  
  .medium-screens,
  .big-screens {
    display: none;
  }
  
  .grid-project {
    width: 100%;
  }
  
  .det-input-wrapper {
    flex-direction: column;
  }
  
  .det-input {
    width: 100%;
  }
}

/* Medium devices (401px - 660px) */
@media only screen and (min-width: 401px) and (max-width: 695px) {
  .small-screens,
  .medium-screens,
  .small-and-medium-screens {
    display: block;
  }
  
  .not-tiny-screens {
    display: inline-block;
  }
  
  .big-screens {
    display: none;
  }
  
  .grid-project {
    width: 50%;
  }
  
  .service-item,
  .service-gap {
    width: calc(100%/3 - (((3 - 1) * 1rem) / 3));
  }
}

/* Large devices (661px - 980px) */
@media only screen and (min-width: 696px) and (max-width: 980px) {
  .small-screens,
  .medium-screens,
  .small-and-medium-screens {
    display: none;
  }
  
  .big-screens {
    display: block;
  }
  
  .grid-project {
    width: 33%;
  }
  
  .service-item,
  .service-gap {
    width: calc(100%/4 - (((4 - 1) * 1rem) / 4));
  }
  
}

/* Extra-large devices (981px - 1680px) */
@media only screen and (min-width:981px) and (max-width: 1680px) {
  
  .small-screens,
  .medium-screens,
  .small-and-medium-screens {
    display: none;
  }
  
  .big-screens {
    display: block;
  }
  
  .service-item,
  .service-gap {
    width: calc(100%/5 - (((5 - 1) * 1rem) / 5));
  }
}

/* XX-large devices (1681px and up) */
@media only screen and (min-width: 1681px) {

  .small-screens,
  .medium-screens,
  .small-and-medium-screens {
    display: none;
  }

  .big-screens {
    display: block;
  }

  .service-item,
  .service-gap {
    width: calc(100%/6 - (((6 - 1) * 1rem) / 6));
  }
}

.une23585-shell {
  max-width: 1100px;
}

.une23585-header {
  margin-bottom: 1.5rem;
}

.une23585-kicker {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1c7c9c;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.une23585-title {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #1f2d3d;
}

.une23585-subtitle {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #58707d;
}

.une23585-card {
  border-radius: 18px;
  background: #ffffff;
}

.une23585-section + .une23585-section {
  padding-top: 1.5rem;
  border-top: 1px solid #edf1f5;
}

.une23585-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2d3d;
  margin-bottom: 1rem;
}

.une23585-page .form-label {
  font-weight: 600;
  color: #425466;
  margin-bottom: 0.45rem;
}

.une23585-page .form-select,
.une23585-page .e-input-group,
.une23585-page .e-control-wrapper {
  border-radius: 12px;
}

.une23585-select {
  min-height: 40px;
}

.une23585-switch-card {
  min-height: 100%;
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #f8fbfd;
  border: 1px solid #e4edf3;
  border-radius: 12px;
}

.une23585-actions {
  padding-top: 0.5rem;
}

.une23585-results {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.une23585-result-card {
  padding: 1rem 1.1rem;
  border: 1px solid #e6edf2;
  border-radius: 14px;
  background: #ffffff;
}

.une23585-result-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2d3d;
}

@media only screen and (max-width: 767px) {
  .une23585-title {
    font-size: 1.15rem;
  }

  .une23585-card .card-body {
    padding: 1.25rem !important;
  }

  .une23585-switch-card {
    min-height: auto;
  }
}

/* ===== Corporate navigation and accessible layouts ===== */
.page {
  min-height: 100vh;
  min-height: 100dvh;
}

.page > main {
  flex: 1;
  min-width: 0;
}

.corporate-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 1rem;
  margin-top: 2rem;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-200%);
  z-index: 10000;
  background: white;
  padding: 0.75rem;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.gallery-img:focus-visible {
  outline: 3px solid #8a4800;
  outline-offset: 3px;
}

.corporate-brand {
  color: var(--secondary-color);
  font-size: 1.15rem;
  margin-inline: 0.5rem 1rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
}

.corporate-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
}

.corporate-links .nav-item {
  display: inline-flex;
  align-items: center;
  padding: 0;
  line-height: 1.5;
}

.corporate-actions {
  flex-shrink: 0;
  gap: 0.25rem;
  padding: 0;
}

.corporate-actions .e-btn,
.corporate-action,
.corporate-menu-toggle {
  min-width: 44px;
  min-height: 44px;
}

.corporate-action,
.corporate-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-shrink: 0;
  padding: 0.25rem;
  border: 0;
  background: transparent;
  color: var(--secondary-color);
  font: inherit;
  cursor: pointer;
}

.corporate-action svg,
.corporate-menu-toggle svg {
  flex-shrink: 0;
}

.corporate-links,
.corporate-drawer {
  font-size: 1rem;
}

.corporate-drawer .nav-menu {
  width: 100%;
  min-height: 44px;
  height: auto;
}

.filter-controls button {
  min-height: 44px;
  border: 0;
  padding: 0.5rem 0;
  color: var(--secondary-color);
  background-color: transparent;
  background-image: linear-gradient(#FFC100, #FFC100);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0 0.75em;
  font: inherit;
  transition: background-size 0.3s, color 0.3s;
}

.filter-controls button:hover,
.filter-controls button:focus-visible {
  color: #1f2d3d;
  background-size: 100% 0.75em;
}

.filter-controls button.mixitup-control-active {
  color: var(--secondary-color);
  background-size: 0 0.75em;
  font-weight: 700;
}

.gallery-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.une23585-page .form-label {
  text-align: left;
}

.services-wrap .service-item,
.services-wrap .service-gap {
  width: calc(25% - 0.75rem);
  min-width: 0;
}

/* Original desktop type scale, scoped to navigation to preserve readable content. */
.corporate-link-icon { display: none; }
.corporate-links .nav-item, .corporate-drawer > .nav-item { font-size: inherit; }
.corporate-links .nav-item { white-space: nowrap; min-height: 44px; }
@media (min-width: 981px) {
  .corporate-brand, .corporate-links, .corporate-drawer { font-size: 1.25rem; }
}
@media (min-width: 1681px) {
  .corporate-brand, .corporate-links, .corporate-drawer { font-size: 1.5rem; }
}
@media (max-width: 1279px) {
  .corporate-link-label { display: none; }
  .corporate-link-icon { display: block; }
  .corporate-links { gap: 0.25rem; }
  .corporate-links .nav-item { min-width: 44px; justify-content: center; }
}
@media (max-width: 699px) {
  .corporate-links { display: none; }
}

@media (min-width: 1280px) {
  .corporate-menu-toggle,
  .corporate-drawer {
    display: none;
  }
}

/* Text cards grow with their content and stretch equally within each row. */
.services-wrap { align-items: stretch; }
.services-wrap .service-item { flex-direction: column; }
.services-wrap .service-item::before { content: none; }
.services-wrap .service-item .e-card { height: auto; flex: 1; }
.services-wrap .e-card-content { padding: 0.5rem 1rem; }
.services-wrap .service-item p { padding: 0; margin-bottom: 0.75rem; }
.services-wrap .e-card-header-title { white-space: normal; }

@media (max-width: 1199px) {
  .services-wrap .service-item,
  .services-wrap .service-gap { width: calc(33.333333% - 0.666667rem); }
}

@media (max-width: 899px) {
  .services-wrap .service-item,
  .services-wrap .service-gap {
    width: calc(50% - 0.5rem);
  }
}

@media (max-width: 575px) {
  .services-wrap .service-item,
  .services-wrap .service-gap,
  .grid-project {
    width: 100%;
  }

  .gallery-text {
    padding-inline: 1rem;
  }

  .corporate-brand {
    margin-inline: 0.25rem;
  }

  .navMenu .e-appbar {
    padding-inline: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Project gallery: consistent landscape tiles, with the original tight spacing. */
.gallery-wrap .grid-project { width: 25%; }
@media (max-width: 1199px) {
  .gallery-wrap .grid-project { width: 33.333333%; }
}
@media (max-width: 899px) {
  .gallery-wrap .grid-project { width: 50%; }
}
@media (max-width: 575px) {
  .gallery-wrap .grid-project { width: 100%; }
}

/* Corporate text actions: compact on desktop, comfortable on touch screens. */
.custom-button, .return-button,
.e-btn.custom-button, .e-btn.return-button,
.e-card .e-btn.custom-button, .e-card .e-btn.return-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  box-sizing: border-box;
  height: auto;
  min-height: 36px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
  vertical-align: middle;
  max-width: 100%;
}
.auto-height-card .custom-button,
.auto-height-card .return-button {
  max-width: calc(100% - 1.25rem);
}
@media (any-pointer: coarse), (max-width: 575px) {
  .custom-button, .return-button,
  .e-btn.custom-button, .e-btn.return-button,
.e-card .e-btn.custom-button, .e-card .e-btn.return-button { min-height: 44px; }
}

/* All service summaries use the same action size, in either language. */
.services-wrap .e-btn.service-more-button {
  width: 7rem;
  flex: none;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
}

.service-dialog .e-footer-content .e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: auto;
  min-height: 36px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: normal;
}
@media (any-pointer: coarse), (max-width: 575px) {
  .service-dialog .e-footer-content .e-btn { min-height: 44px; }
}
