/* Main Stylesheet for Business Website */

/* Bootstrap Primary Color Override */
:root {
  --bs-primary: #427C8C;
  --bs-primary-rgb: 66, 124, 140;
}

/* Bootstrap Button Overrides */
.btn-primary {
  --bs-btn-bg: #427C8C;
  --bs-btn-border-color: #427C8C;
  --bs-btn-hover-bg: #356369;
  --bs-btn-hover-border-color: #356369;
  --bs-btn-focus-shadow-rgb: 66, 124, 140;
  --bs-btn-active-bg: #2d4f54;
  --bs-btn-active-border-color: #2d4f54;
  --bs-btn-disabled-bg: #427C8C;
  --bs-btn-disabled-border-color: #427C8C;
}

.btn-outline-primary {
  --bs-btn-color: #427C8C;
  --bs-btn-border-color: #427C8C;
  --bs-btn-hover-bg: #427C8C;
  --bs-btn-hover-border-color: #427C8C;
  --bs-btn-focus-shadow-rgb: 66, 124, 140;
  --bs-btn-active-bg: #427C8C;
  --bs-btn-active-border-color: #427C8C;
  --bs-btn-disabled-color: #427C8C;
  --bs-btn-disabled-border-color: #427C8C;
}

/* Additional primary color applications */
.text-primary {
  color: #427C8C !important;
}

.bg-primary {
  background-color: #427C8C !important;
}

.border-primary {
  border-color: #427C8C !important;
}

/* Link colors */
a.text-primary:hover,
a.text-primary:focus {
  color: #356369 !important;
}

/* Form focus states */
.form-control:focus {
  border-color: #427C8C;
  box-shadow: 0 0 0 0.2rem rgba(66, 124, 140, 0.25);
}

.form-check-input:checked {
  background-color: #427C8C;
  border-color: #427C8C;
}

/* General link styling */
a {
  color: #427C8C;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #356369;
  text-decoration: underline;
}

/* Ensure mailto and external links use primary color */
a[href^="mailto:"],
a[href^="http://"],
a[href^="https://"] {
  color: #427C8C;
  text-decoration: underline;
}

a[href^="mailto:"]:hover,
a[href^="mailto:"]:focus,
a[href^="http://"]:hover,
a[href^="http://"]:focus,
a[href^="https://"]:hover,
a[href^="https://"]:focus {
  color: #356369;
  text-decoration: underline;
}

/* Navigation Ribbon - Transparent top bar */
.nav-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 15vh;
  max-height: 80px;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo img {
  height: 40px;
  max-height: 8vh;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.nav-menu {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.nav-menu a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: #427C8C;
  background: rgba(255, 255, 255, 0.1);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background-color: #427C8C;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-menu a:hover::after {
  width: 80%;
}

/* Add top padding to main content to account for fixed nav */
.main-content {
  margin-top: 15vh;
  min-height: calc(100vh - 15vh);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 2rem;
  background-image: url('../images/apigrate-background.png');
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Add overlay to ensure text readability over background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #f0f0f0;
}

.logo {
  max-width: 250px;
  height: auto;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.header .lead {
  color: #666;
  font-size: 1.2rem;
  margin: 0;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.nav a {
  color: #427C8C;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav a:hover {
  background: #427C8C;
  color: white;
  transform: translateY(-2px);
}

.api-info, .deployment-info, .features, .content {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  border-left: 4px solid #427C8C;
}

.api-info h2, .deployment-info h2, .features h2, .content h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.endpoint {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  background: #e9ecef;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  border: 1px solid #dee2e6;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #427C8C;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

button {
  background: linear-gradient(135deg, #427C8C, #356369);
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 122, 204, 0.3);
}

.success {
  background: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #c3e6cb;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  .container {
    padding: 2rem;
  }
  
  .nav {
    gap: 1rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
}

/* Services Carousel Styles */
.services-carousel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 800px;
  overflow: hidden;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.service-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s ease-in-out;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 12px;
}

.service-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.service-slide.prev {
  transform: translateX(-100%);
  opacity: 0;
}

.service-detail {
  padding: 3rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-detail h2 {
  color: #2c3e50;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 3px solid #427C8C;
  padding-bottom: 1rem;
}

.service-detail h2 i {
  color: #427C8C;
  margin-right: 0.5rem;
}

.service-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 2rem;
}

.service-features,
.service-benefits {
  margin-bottom: 2rem;
}

.service-features h3,
.service-benefits h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-features ul,
.service-benefits ul {
  list-style: none;
  padding: 0;
}

.service-features li,
.service-benefits li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #444;
  line-height: 1.5;
}

.service-features li:before,
.service-benefits li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.5rem;
  color: #427C8C;
  font-weight: bold;
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 10;
}

.carousel-indicators {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.indicator {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;
  max-width: 8px !important;
  max-height: 8px !important;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(66, 124, 140, 0.5) !important;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.indicator.active {
  background: #427C8C !important;
  transform: none !important;
}

.indicator:hover {
  transform: none !important;
  background: #427C8C !important;
}

/* Auto-rotation animation */
.carousel-container.auto-rotating .service-slide {
  transition: all 0.8s ease-in-out;
}

/* Responsive carousel styles */
@media (max-width: 768px) {
  .carousel-container {
    height: 700px;
  }
  
  .service-detail {
    padding: 2rem;
  }
  
  .service-detail h2 {
    font-size: 1.5rem;
  }
  
  .carousel-controls {
    bottom: 0.25rem;
    gap: 1rem;
  }
  
  .carousel-indicators {
    gap: 0.75rem;
  }
  
  .indicator {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    min-height: 6px !important;
    max-width: 6px !important;
    max-height: 6px !important;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 650px;
  }
  
  .service-detail {
    padding: 1.5rem;
  }
  
  .service-detail h2 {
    font-size: 1.3rem;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .service-detail h2 i {
    margin-bottom: 0.5rem;
    margin-right: 0;
  }
}

/* Splash Animation Styles */
.splash-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: background-color 2s ease-in-out;
}

.splash-container.fade-background {
  background: white;
}

/* Override body background for splash page */
body.splash-active {
  background: white !important;
  background-image: none !important;
}

body.splash-active::before {
  display: none !important;
}

.splash-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1;
}

.splash-logo img {
  width: 100vh;
  height: 100vh;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.splash-logo.fly-to-nav {
  width: 10vh;
  height: 10vh;
  transform: translate(-45vw, -60vh);
  opacity: 1;
}

.splash-logo.fly-to-nav img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Final fade out at destination */
.splash-logo.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* Hide main content during splash */
body.splash-active .main-content {
  visibility: hidden;
}

body.splash-active .nav-ribbon {
  visibility: hidden;
}

/* Responsive splash adjustments */
@media (max-width: 768px) {
  .splash-logo img {
    width: 100vw;
    height: 100vh;
  }
  
  .splash-logo.fly-to-nav {
    width: 150px;
    height: 45px;
    transform: translate(-40vw, -35vh);
  }
}

@media (max-width: 480px) {
  .splash-logo img {
    width: 100vw;
    height: 100vh;
  }
  
  .splash-logo.fly-to-nav {
    width: 120px;
    height: 36px;
    transform: translate(-35vw, -30vh);
  }
}
