/**
 * Formex Components
 * Buttons, Cards, Badges, Stats
 */

/* ===========================
   BUTTONS
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background-color: rgb(0, 1, 5);
  color: rgb(255, 255, 255);
  border-color: rgb(0, 1, 5);
}

.btn-primary:hover {
  background-color: rgb(0, 1, 5);
  color: rgb(255, 255, 255);
  border-color: rgb(0, 1, 5);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Primary Inverse Button */
.btn-primary-inverse {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
  border-color: rgb(255, 255, 255);
}

.btn-primary-inverse:hover {
  background-color: rgb(250, 250, 250);
  color: rgb(0, 1, 5);
  border-color: rgb(250, 250, 250);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.btn-primary-inverse:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Secondary Button */
.btn-secondary {
  background-color: transparent;
  color: rgb(0, 1, 5);
  border-color: rgb(0, 1, 5);
}

.btn-secondary:hover {
  background-color: rgb(0, 1, 5);
  color: rgb(255, 255, 255);
  transform: translateY(-2px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Secondary Inverse Button */
.btn-secondary-inverse {
  background-color: transparent;
  color: rgb(255, 255, 255);
  border-color: rgb(255, 255, 255);
}

.btn-secondary-inverse:hover {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.btn-secondary-inverse:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: rgb(0, 1, 5);
  border-color: transparent;
  padding: 0.75rem 1rem;
}

.btn-ghost:hover {
  background-color: rgb(245, 245, 245);
  color: rgb(0, 0, 0);
}

.btn-ghost:active {
  transform: translateY(0);
}

/* Button Sizes */
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===========================
   CARDS
   =========================== */

.card {
  display: flex;
  flex-direction: column;
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(217, 217, 217);
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.3s;
  height: 100%;
}

.card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

.card__image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: rgb(245, 245, 245);
  aspect-ratio: 4 / 3;
}

.card__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card__image-wrapper img {
  transform: scale(1.05);
}

/* Card Favicon */
.card__favicon {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 50px !important;
  height: 50px !important;
  z-index: 10;
  opacity: 0.95;
  transition: all 0.2s;
  filter: invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.card:hover .card__favicon {
  opacity: 1;
  transform: scale(1.1);
}

@media (max-width: 767px) {
  .card__favicon {
    width: 35px !important;
    height: 35px !important;
    bottom: 1rem;
    right: 1rem;
  }
}

.card__content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__header {
  margin-bottom: 1rem;
}

.card__subtitle {
  font-size: 0.875rem;
  color: rgb(147, 153, 150);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: rgb(0, 1, 5);
}

.card__description {
  font-size: 1rem;
  line-height: 1.625;
  color: rgb(90, 93, 91);
  margin-bottom: 1rem;
  flex: 1;
}

.card__footer {
  margin-top: auto;
  padding-top: 1rem;
}

/* Card Features List */
.card__features {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.card__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.625;
}

.card__feature:last-child {
  margin-bottom: 0;
}

.card__feature svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: rgb(0, 1, 5);
  margin-top: 2px;
}

/* ===========================
   CARD VARIANTS
   =========================== */

.card--featured {
  border-color: rgb(0, 1, 5);
  border-width: 2px;
}

.card--horizontal {
  flex-direction: row;
}

@media (max-width: 767px) {
  .card--horizontal {
    flex-direction: column;
  }
}

.card--horizontal .card__image-wrapper {
  flex: 0 0 40%;
}

.card--no-border {
  border: none;
}

.card--no-shadow {
  box-shadow: none;
}

.card--hover-lift:hover {
  border-color: rgb(26, 38, 53);
}

/* ===========================
   PRODUCT CARD SPECIFIC
   =========================== */

.card--product .card__image-wrapper {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

#products-section .card--product .btn {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
  border-color: rgb(0, 1, 5);
}

#products-section .card--product .btn:hover {
  background-color: rgb(0, 1, 5);
  color: rgb(255, 255, 255);
}

/* Blog Card Specific */
.card--blog .card__image-wrapper {
  aspect-ratio: 3 / 2;
}

/* ===========================
   STAT CARDS
   =========================== */

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-card__number {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: rgb(0, 1, 5);
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .stat-card__number {
    font-size: 3.75rem;
  }
}

.stat-card__label {
  font-size: 1rem;
  color: rgb(90, 93, 91);
  line-height: 1.625;
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: rgb(0, 1, 5);
}

/* Dark version for stat cards */
.section--grey-dark .stat-card__number {
  color: rgb(255, 255, 255);
}

.section--grey-dark .stat-card__label {
  color: rgb(255, 255, 255);
  opacity: 0.9;
}

.section--grey-dark .stat-card__icon {
  color: rgb(255, 255, 255);
}

/* ===========================
   CARD FEATURES LIST
   =========================== */

.card__features {
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
}

.card__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card__feature:last-child {
  margin-bottom: 0;
}

.card__feature-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: rgb(16, 185, 129);
  margin-top: 2px;
}

.card__feature span {
  flex: 1;
  font-size: 1rem;
  line-height: 1.625;
  color: rgb(0, 1, 5);
}

/* ===========================
   PRODUCT CARD SPECIFIC
   =========================== */

.card--product {
  overflow: visible;
  position: relative;
}

.card--product .card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  opacity: 1 !important;
}

.card--product .card__title {
  font-size: 1.875rem;
  font-weight: 700;
  color: rgb(0, 1, 5);
  margin-bottom: 1.5rem;
}

.card--product .card__description {
  color: rgb(90, 93, 91);
  margin-bottom: 2rem;
}

.card--product .card__features {
  margin-bottom: 2rem;
}

.card--product .btn {
  width: fit-content;
}

/* ===========================
   BLOG CARD SPECIFIC
   =========================== */

.card--blog .card__title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card--blog .card__title a {
  color: rgb(0, 1, 5);
  text-decoration: none;
  transition: color 0.2s;
}

.card--blog .card__title a:hover {
  color: rgb(0, 1, 5);
}

.card--blog .card__description {
  font-size: 1rem;
  color: rgb(90, 93, 91);
  line-height: 1.625;
  margin-bottom: 0;
}

.card--blog .badge {
  width: fit-content;
}

/* ===========================
   BADGES
   =========================== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0;
  white-space: nowrap;
}

.badge--primary {
  background-color: rgba(0, 1, 5, 0.1);
  color: rgb(0, 1, 5);
}

.badge--secondary {
  background-color: rgba(255, 255, 255, 0.9);
  color: rgb(0, 1, 5);
}

.badge--grey {
  background-color: rgb(245, 245, 245);
  color: rgb(90, 93, 91);
}

/* ===========================
   CTA BLOCK
   =========================== */

.cta-block {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.cta-block__title {
  margin-bottom: 1.5rem;
}

.cta-block__description {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.cta-block__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Dark version - applies when section has .section--grey-dark class */
.section--grey-dark .cta-block__title {
  color: rgb(255, 255, 255);
}

.section--grey-dark .cta-block__description {
  color: rgb(255, 255, 255);
  opacity: 0.9;
}

.section--grey-dark .btn-primary {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
  border-color: rgb(255, 255, 255);
}

.section--grey-dark .btn-primary:hover {
  background-color: rgb(250, 250, 250);
  color: rgb(0, 1, 5);
}

.section--grey-dark .btn-secondary {
  background-color: transparent;
  color: rgb(255, 255, 255);
  border-color: rgb(255, 255, 255);
}

.section--grey-dark .btn-secondary:hover {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
}

/* ===========================
   METHODOLOGY CARD
   =========================== */

.methodology-card {
  text-align: center;
  padding: 2rem;
  border: 1px solid rgb(217, 217, 217);
  transition: border-color 0.2s ease-in-out;
}

.methodology-card:hover {
  border-color: rgb(26, 38, 53);
}

.methodology-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: rgb(0, 1, 5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.methodology-card__icon svg {
  width: 100%;
  height: 100%;
}

.methodology-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgb(0, 1, 5);
  margin-bottom: 1rem;
}

.methodology-card__description {
  font-size: 1rem;
  line-height: 1.625;
  color: rgb(90, 93, 91);
  margin-bottom: 0;
}

/* ===========================
   FORM INPUTS
   =========================== */

.form-input {
  padding: 0.75rem 1rem;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  border: 2px solid rgb(217, 217, 217);
  border-radius: 0;
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: rgb(0, 1, 5);
}

.form-input::placeholder {
  color: rgb(147, 153, 150);
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  border-radius: 0;
}
