/* ===================================
   CRhub - CSS Principal (Otimizado)
   =================================== */

/* Variáveis CSS */
:root {
  --primary-color: #339fd7;
  --secondary-color: #8577fb;
  --success-color: #28a745;
  --white-color: #ffffff;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --first-color: #00264d;
  --gradient-light: linear-gradient(135deg, #f8f9fa, #e9ecef);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --border-radius: 0.375rem;
  --border-radius-lg: 0.75rem;
}

/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--white-color);
}

html {
  scroll-behavior: smooth;
}

/* Utility Classes */
.bg-gradient-primary {
  background: var(--first-color) !important;
}

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

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

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-outline-success:hover,
.btn-outline-primary:hover,
.btn-outline-info:hover {
  transform: translateY(-2px);
}

/* Navbar */
.navbar {
  background: var(--first-color) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  padding: 0.5rem 0;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--white-color) !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 400;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem !important;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  margin: 0 0.2rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white-color) !important;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Login Button */
.login-btn {
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.login-btn:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--white-color) !important;
  color: var(--white-color) !important;
  transform: translateY(-1px);
}

/* Login Modal */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  font-size: 1.25rem;
}

.btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
}

.input-group-text {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  border: none;
}

.form-control {
  border-left: none;
  border-color: #dee2e6;
  padding: 0.75rem 1rem;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(51, 159, 215, 0.25);
}

.forgot-password {
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.forgot-password:hover {
  color: var(--secondary-color) !important;
  text-decoration: underline !important;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.modal-body .btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Section */
.hero-section {
  background: var(--gradient-light);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23339fd7" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  z-index: -1;
}

.hero-section h1 {
  color: var(--gray-800);
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero-section .lead {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/* CRM Animation Styles */
.crm-animation-container {
  position: relative;
  height: 500px;
  padding: 20px;
  width: 100%;
  max-width: 100%;
}

.crm-dashboard {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(51, 159, 215, 0.2);
}

.dashboard-header {
  margin-bottom: 20px;
}

.dash-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.dash-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pipeline-container {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px 0;
}

.pipeline-stage {
  flex: 1;
  text-align: center;
}

.stage-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.stage-cards {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 80px;
}

.pipeline-card {
  width: 100%;
  height: 20px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 4px;
  opacity: 0;
  animation: moveCard 0.6s ease-out forwards;
}

.pipeline-card.success {
  background: linear-gradient(135deg, var(--success-color), #20c997);
}

.stage-1 .pipeline-card:nth-child(1) {
  animation-delay: 1.2s;
}
.stage-1 .pipeline-card:nth-child(2) {
  animation-delay: 1.4s;
}
.stage-1 .pipeline-card:nth-child(3) {
  animation-delay: 1.6s;
}
.stage-2 .pipeline-card:nth-child(1) {
  animation-delay: 1.8s;
}
.stage-2 .pipeline-card:nth-child(2) {
  animation-delay: 2s;
}
.stage-3 .pipeline-card:nth-child(1) {
  animation-delay: 2.2s;
}

.chart-container {
  margin-top: 20px;
}

.chart-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 15px;
  text-align: center;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 80px;
  margin-bottom: 8px;
}

.bar {
  flex: 1;
  background: linear-gradient(
    to top,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 3px 3px 0 0;
  opacity: 0;
  animation: growBar 1s ease-out forwards;
}

.bar:nth-child(1) {
  animation-delay: 2.5s;
}
.bar:nth-child(2) {
  animation-delay: 2.7s;
}
.bar:nth-child(3) {
  animation-delay: 2.9s;
}
.bar:nth-child(4) {
  animation-delay: 3.1s;
}
.bar:nth-child(5) {
  animation-delay: 3.3s;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--gray-600);
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.floating-icon i {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.icon-1 {
  top: 10%;
  right: 10%;
}

.icon-2 {
  top: 60%;
  right: 5%;
}

.icon-3 {
  top: 30%;
  left: 5%;
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 1.5rem;
}

.card h5 {
  color: var(--gray-800);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.card p {
  color: var(--gray-600);
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Interface Slider Styles */
.interface-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.slider-container {
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.6s ease-in-out;
}

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

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

.slide-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.slide-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-lg);
}

.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(51, 159, 215, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* Pricing Cards */
.pricing-card {
  border-radius: var(--border-radius-lg);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
  border: 2px solid var(--primary-color);
  transform: scale(1.05);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-10px);
}

.popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 0 0 15px 15px;
  z-index: 2;
}

.pricing-header {
  padding: 1rem 0;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

.price-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-right: 0.2rem;
}

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

.period {
  font-size: 1rem;
  color: var(--gray-600);
  margin-left: 0.2rem;
}

.features-list li {
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.features-list i {
  flex-shrink: 0;
}

.feature-highlight {
  padding: 1rem;
  border-radius: var(--border-radius);
  background: rgba(51, 159, 215, 0.05);
  transition: all 0.3s ease;
}

.feature-highlight:hover {
  background: rgba(51, 159, 215, 0.1);
  transform: translateY(-2px);
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: white;
  padding: 15px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  background: #1da851;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 1rem 2rem rgba(37, 211, 102, 0.3);
}

.whatsapp-float i {
  font-size: 1.25rem;
}

.whatsapp-float span {
  font-size: 0.9rem;
}

/* Footer */
footer {
  background: var(--gray-900) !important;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes backgroundShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(51, 159, 215, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(51, 159, 215, 0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes growBar {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: var(--target-height);
    opacity: 1;
  }
}

@keyframes moveCard {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes floatingIcon {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

/* Responsive */
@media (max-width: 991px) {
  .navbar-nav {
    margin-top: 1rem;
  }

  .login-btn {
    display: none;
  }

  .social-links {
    display: none;
  }

  .crm-animation-container {
    height: 400px;
    margin-top: 2rem;
  }

  .interface-slider {
    margin-top: 2rem;
  }

  .slider-container {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    text-align: center;
    padding-top: 80px;
    min-height: auto;
    padding-bottom: 3rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .crm-animation-container {
    height: 350px;
    padding: 10px;
  }

  .crm-dashboard {
    padding: 15px;
  }

  .dash-title {
    font-size: 0.9rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stage-title {
    font-size: 0.7rem;
  }

  .pipeline-container {
    gap: 10px;
  }

  .chart-title {
    font-size: 0.8rem;
  }

  .chart-bars {
    height: 60px;
  }

  .floating-icon {
    width: 35px;
    height: 35px;
  }

  .floating-icon i {
    font-size: 0.9rem;
  }

  .slider-container {
    height: 250px;
  }

  .whatsapp-float span {
    display: none;
  }

  .whatsapp-float {
    padding: 15px;
    border-radius: 50%;
    bottom: 15px;
    right: 15px;
  }

  .card-body {
    padding: 1rem;
  }

  .pricing-card {
    margin-bottom: 1.5rem;
  }

  .h1,
  h1 {
    font-size: 1.5rem;
  }
  .h2,
  h2 {
    font-size: 1.3rem;
  }
  .h3,
  h3 {
    font-size: 1.1rem;
  }

  .display-5 {
    font-size: 1.4rem !important;
  }

  .navbar-brand img {
    height: 35px;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-section {
    padding-top: 70px;
  }

  .hero-section h1 {
    font-size: 1.3rem;
  }

  .hero-section .lead {
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .crm-animation-container {
    height: 300px;
  }

  .dash-stats {
    gap: 15px;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .pipeline-container {
    gap: 8px;
  }

  .stage-title {
    font-size: 0.65rem;
    margin-bottom: 8px;
  }

  .pipeline-card {
    height: 15px;
  }

  .chart-bars {
    height: 50px;
  }

  .chart-labels {
    font-size: 0.65rem;
  }

  .slider-container {
    height: 200px;
  }

  .display-5 {
    font-size: 1.2rem !important;
  }

  .lead {
    font-size: 0.9rem;
  }

  .navbar-brand img {
    height: 30px;
  }

  .pricing-card.popular {
    transform: scale(1);
  }

  .price {
    font-size: 2.5rem;
  }

  .plan-name {
    font-size: 1.3rem;
  }
}

/* Typography */
.h1,
h1 {
  font-size: 2rem;
  font-weight: 600;
}
.h2,
h2 {
  font-size: 1.6rem;
  font-weight: 600;
}
.h3,
h3 {
  font-size: 1.3rem;
  font-weight: 600;
}
.h4,
h4 {
  font-size: 1.1rem;
  font-weight: 600;
}
.h5,
h5 {
  font-size: 1rem;
  font-weight: 600;
}

.display-4 {
  font-size: 2rem !important;
}
.display-5 {
  font-size: 1.6rem !important;
}
.display-6 {
  font-size: 1.3rem !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #e9ecef;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}
