/* ===================================
   Comptrusence Custom Styles
   Bootstrap 5.3 Compatible
   =================================== */

/* ----- Color Variables ----- */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #93c5fd;
  --secondary-color: #0a2540;
  --bg-light: #e6f0ff;
  --bg-lighter: #f4f8ff;
  --bg-white: #ffffff;
  --border-color: #d0e2ff;
  --text-primary: #0a2540;
  --text-secondary: #1e40af;
  --text-muted: #64748b;
}

/* ----- Global Styles ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  line-height: 1.6;
}

/* ----- Navigation ----- */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
}

.navbar .btn-primary {
  padding: 0.5rem 1.5rem;
}

/* ----- Header Section ----- */
.header-section {
  background: var(--bg-white);
}

.logo-img {
  max-width: 180px;
  width: 90%;
  height: auto;
  background: var(--bg-white);
  padding: 10px;
  border-radius: 8px;
}

.tagline {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-top: 10px;
  font-weight: 600;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ----- Hero Section ----- */
.hero-section {
  background: var(--bg-lighter);
  text-align: center;
}

.hero-main-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-section h1 {
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-section .lead {
  color: var(--text-secondary);
}

.hero-buttons .btn {
  min-width: 180px;
}

/* ----- Feature Cards ----- */
.feature-card {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.2);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
}

.feature-card .card-title {
  color: var(--primary-color);
  font-weight: 600;
}

/* ----- Scanner Section ----- */
.scanner-section {
  background: #f0f6ff;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
}

.scanner-section h2 {
  color: var(--text-primary);
}

.scanner-section .lead {
  color: var(--text-secondary);
}

.scanner-box {
  max-width: 700px;
  margin: 0 auto;
}

#urlInput {
  border: 2px solid var(--primary-color);
  background: var(--bg-white);
}

#urlInput::placeholder {
  color: var(--primary-light);
}

#urlInput:focus {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

/* ----- Loading Spinner ----- */
.loading {
  display: none;
}

.spinner-border {
  border-width: 4px;
}

/* ----- Results Section ----- */
.results {
  display: none;
  margin-top: 40px;
  padding: 25px;
  background: var(--bg-white);
  border-left: 5px solid var(--primary-color);
  border-radius: 8px;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
}

/* ----- Risk Badges ----- */
.risk-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  margin: 10px 0;
  font-size: 0.95rem;
}

.risk-critical {
  background: #fee;
  color: #c00;
  border: 2px solid #c00;
}

.risk-high {
  background: #ffe6e6;
  color: #d63939;
  border: 2px solid #d63939;
}

.risk-medium {
  background: #fff4e6;
  color: #e67e22;
  border: 2px solid #e67e22;
}

.risk-low {
  background: #e6f4ff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* ----- Vulnerability List ----- */
.vulnerability-list {
  margin-top: 20px;
}

.vuln-item {
  background: #f8faff;
  padding: 15px;
  margin: 10px 0;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.vuln-item:hover {
  background: #f0f6ff;
}

.vuln-item h4 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.vuln-severity {
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-right: 10px;
}

/* ----- Compliance Cards ----- */
.compliance-card {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.compliance-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.2);
}

.compliance-icon {
  font-size: 3rem;
  color: var(--primary-color);
}

/* ----- Pricing Page Styles ----- */
.pricing-card {
  position: relative;
}

.featured-pricing {
  border: 3px solid var(--primary-color) !important;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.25) !important;
}

.featured-badge-pricing {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.price-display {
  margin: 20px 0;
}

.price-amount {
  font-size: 3.5rem;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1;
}

.price-period {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.pricing-card ul li {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.pricing-card .bi-check-circle-fill {
  font-size: 1.1rem;
}

/* ----- Accordion Styles ----- */
.accordion-item {
  border-radius: 8px !important;
  overflow: hidden;
}

.accordion-button {
  font-weight: 600;
  color: var(--text-primary);
  background-color: white;
  padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
  background-color: var(--bg-lighter);
  color: var(--primary-color);
  box-shadow: none;
}

.accordion-button:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
}

.accordion-button::after {
  background-size: 1.25rem;
}

.accordion-body {
  padding: 1.25rem 1.5rem;
  color: var(--text-secondary);
  background-color: white;
}

/* ----- Footer Section ----- */
.footer-section {
  background: var(--secondary-color);
  color: var(--border-color);
  margin-top: 50px;
}

.footer-link {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--bg-white);
  text-decoration: underline;
}

.footer-section h5,
.footer-section h6 {
  color: var(--bg-white);
}

.footer-section .border-top {
  border-color: var(--primary-dark) !important;
}

/* ----- Buttons ----- */
.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ----- Responsive Design ----- */
@media (max-width: 768px) {
  .hero-main-title {
    font-size: 2rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .section h2 {
    font-size: 1.5rem;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  .logo-img {
    max-width: 150px;
  }
  
  .hero-buttons .btn {
    min-width: 100%;
    margin-bottom: 10px;
  }
  
  .input-group-lg .btn {
    font-size: 0.9rem;
  }
  
  .feature-icon,
  .compliance-icon {
    font-size: 2.5rem;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .featured-badge-pricing {
    font-size: 0.75rem;
    padding: 6px 15px;
  }
}

@media (max-width: 576px) {
  .hero-main-title {
    font-size: 1.5rem;
  }
  
  .hero-section h1 {
    font-size: 1.5rem;
  }
  
  .section h2 {
    font-size: 1.25rem;
  }
  
  .navbar-brand img {
    height: 30px;
  }
  
  .input-group-lg .form-control,
  .input-group-lg .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .price-amount {
    font-size: 2rem;
  }
}

/* ----- Utility Classes ----- */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.text-primary-custom {
  color: var(--primary-color) !important;
}

.border-primary-custom {
  border-color: var(--primary-color) !important;
}

/* ----- Smooth Scrolling ----- */
html {
  scroll-behavior: smooth;
}

/* ----- Section Spacing ----- */
.section {
  position: relative;
}

/* ----- Animation Classes ----- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ----- Card Hover Effects ----- */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* ----- Print Styles ----- */
@media print {
  .navbar,
  .hero-buttons,
  .footer-section,
  .scanner-section {
    display: none;
  }
  
  body {
    background: white;
  }
}