/* ICBS Custom Styles for Bootstrap 4 */

/* Skip Navigation Link */
.sr-only-focusable:focus {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* Brand Colors */
:root {
  --primary-color: #296FA3;
  --secondary-color: #15C7C7;
  --light-gray: #f8f9fa;
}

/* Custom Bootstrap color overrides */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #1e5a8a;
  border-color: #1e5a8a;
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #11a8a8;
  border-color: #11a8a8;
}

/* Custom utility classes */
.bg-light-gray {
  background-color: var(--light-gray);
}

/* Hero pattern background */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Navigation styles */
.navbar-custom {
  background-color: rgba(41, 111, 163, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-custom .navbar-nav .nav-link {
  color: white !important;
  transition: color 0.3s ease;
}

.navbar-custom .navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
}

/* Mobile navigation adjustments */
.navbar-custom .navbar-brand {
  order: 0; /* Logo stays on the left */
}

.navbar-custom .navbar-toggler {
  order: 1; /* Menu button stays on the right */
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-custom .navbar-toggler:focus {
  box-shadow: none;
}

.navbar-custom .navbar-toggler span {
  color: white;
}

/* Ensure proper mobile layout */
@media (max-width: 991.98px) {
  .navbar-custom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .navbar-custom .navbar-brand {
    margin-right: auto;
  }
  
  .navbar-custom .navbar-toggler {
    margin-left: auto;
  }
}

/* Dropdown menu styles */
.dropdown-menu-custom {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: none;
}

.dropdown-item-custom {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.dropdown-item-custom:hover {
  background-color: var(--primary-color);
  color: white;
}

.dropdown-item-custom:last-child {
  border-bottom: none;
}

/* Animation classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeInRight 0.8s ease-out forwards;
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  animation: scaleIn 1s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* Animation delays */
.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }

/* Floating animation for background elements */
.float {
  animation: float 6s ease-in-out infinite;
}

/* Service card styles */
.service-card {
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  padding: 0.5rem;
}

/* About section image overlay styles */
.about-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Button styles */
.btn-outline-white {
  border: 2px solid white;
  color: white;
  background-color: transparent;
  transition: all 0.3s ease;
}

.btn-outline-white:hover {
  background-color: white;
  color: var(--primary-color);
}

/* Brand logos grid */
.brand-logo {
  max-width: 100%;
  height: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.brand-logo:hover {
  filter: grayscale(0%);
}

/* Custom spacing utilities */
.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Hero section custom styles */
.hero-section {
  min-height: calc(80vh - 50px);
  padding-top: 80px;
  padding-bottom: 40px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-short {
    min-height: calc(80vh - 250px);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(41, 111, 163, 0.6);
}

/* Floating background elements */
.floating-element {
  position: absolute;
  border-radius: 50%;
}

.floating-element-1 {
  top: 80px;
  left: 40px;
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.1);
}

.floating-element-2 {
  bottom: 80px;
  right: 40px;
  width: 128px;
  height: 128px;
  background-color: rgba(21, 199, 199, 0.2);
}

/* Services section background split */
.services-bg-split {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.services-bg-left {
  width: 66.666667%;
  height: 100%;
  background-color: white;
  position: absolute;
  left: 0;
  top: 0;
}

.services-bg-right {
  width: 33.333333%;
  height: 100%;
  background-color: var(--secondary-color);
  position: absolute;
  right: 0;
  top: 0;
}

/* Footer styles */
.footer-border-right {
  border-right: 2px solid white;
  padding-right: 1.5rem;
}

/* Responsive utilities */
@media (max-width: 595px) {
  .xs-hidden {
    display: none !important;
  }
  
  .xs-block {
    display: block !important;
  }
}

@media (min-width: 596px) {
  .xs-hidden {
    display: block !important;
  }
  
  .xs-block {
    display: none !important;
  }
}

/* Push content below fixed navbar */
.mt-nav-offset{margin-top:90px;}@media (min-width:992px){.mt-nav-offset{margin-top:110px;}}

/* Keyframes for animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Filter utilities for SVG icons */
.filter-white {
  filter: brightness(0) invert(1);
}

.filter-primary {
  filter: brightness(0.3) saturate(2) hue-rotate(200deg);
}

/* Aspect ratio utilities */
.aspect-4-3 {
  aspect-ratio: 4/3;
}

/* Additional responsive text sizes */
@media (min-width: 576px) {
  .display-1-responsive {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .display-1-responsive {
    font-size: 4rem;
  }
}

@media (min-width: 992px) {
  .display-1-responsive {
    font-size: 5rem;
  }
}

/* ONE icon hover effect */
.one-icon {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.nav-link:hover .one-icon {
  filter: brightness(0) saturate(6) invert(0.8) sepia(1) saturate(20) hue-rotate(160deg) brightness(0.8);
}

.calibration-title {
    font-size: 2.5rem;
    line-height: 1.15;
}

@media (max-width: 992.98px) { /* tablets */
    .calibration-title {
        font-size: 2.1rem;
    }
}

@media (max-width: 767.98px) { /* small devices */
    .calibration-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 575.98px) { /* phones */
    .calibration-title {
        font-size: 1.65rem;
    }
}

@media (max-width: 399.98px) { /* very small phones */
    .calibration-title {
        font-size: 1.5rem;
    }
}

/* AI decorative stars (updated to use inline SVG images positioned above letters) */
.ai-decor { display: inline-flex; gap:.15em; position: relative; }
.ai-wrapper { position: relative; display: inline-block; }
.ai-letter { position: relative; z-index:2; display:inline-block; font-weight:800; letter-spacing:.04em; }
/* Fixed rendered size to 24px */
.ai-star-img { position:absolute;filter: brightness(0) invert(1); top:20px; transform:translateX(-50%); width:24px; height:24px; animation: aiTwinkle 2.8s ease-in-out infinite; pointer-events:none; }
.ai-star-i { animation-delay:2s; }
@keyframes aiTwinkle {
    0% {
        opacity: .12;
        transform: translateX(-50%) scale(.80) rotate(0deg);
    }

    18% {
        opacity: .40;
        transform: translateX(-50%) scale(.88) rotate(3deg);
    }

    40% {
        opacity: .80; /* peak (80%) */
        transform: translateX(-50%) scale(1.00) rotate(6deg);
    }

    55% {
        opacity: .55;
        transform: translateX(-50%) scale(.90) rotate(2deg);
    }

    72% {
        opacity: .70;
        transform: translateX(-50%) scale(.95) rotate(4deg);
    }

    100% {
        opacity: .12;
        transform: translateX(-50%) scale(.80) rotate(0deg);
    }
}

/* Footer single-line layout */
.footer-row {
    width: 100%;
}

.footer-company {
    flex: 0 0 auto;
    min-width: 180px;
}

.footer-links {
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    /* Allow wrap only when truly cramped */
    .footer-row {
        flex-wrap: wrap;
    }

    .footer-links {
        margin-top: 1.25rem;
        margin-left: auto;
    }
}

/* Form inputs with right-aligned icons */
.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-right: 2.25rem; /* space for the icon */
}

.input-with-icon .input-icon-right {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
  line-height: 1;
  z-index: 2;
}

/* For multi-line textarea, keep icon near the top */
.input-with-icon textarea.form-control + .input-icon-right {
  top: 0.85rem;
  transform: none;
}