:root {
  --primary: #e82130;
  --white: #ffffff;
  --black: #000000;
  --light-gray: #e7e8e9;
  --dark-gray: #989faf;
  --secondary: #d7d7d6;
  --light: #f5f5f5;
  --dark: #1d1f23;
  --accent1: #a5c342;
  --accent2: #81c2cc;
  --accent3: #43277c;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--black);
  background-color: var(--white);
}

.text-accent3 {
  color: var(--accent3);
}

.navbar {
  background-color: var(--black) !important;
  padding: 1.5rem 0;
  font-family: "Montserrat", sans-serif;
}

.navbar .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  position: relative;
  padding-bottom: 2px;
}

.navbar .nav-link:not(.dropdown-item):after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--white);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.navbar .nav-link:not(.dropdown-item):hover:after,
.navbar .nav-link:not(.dropdown-item).active:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  opacity: 1;
}


/* Dropdown toggle specific styles */
.navbar .dropdown-toggle {
  border: none !important; /* Remove any Bootstrap border */
}

/* Dropdown menu styles */
.navbar .dropdown-menu {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar .dropdown-item {
  color: var(--black);
  font-weight: 500;
  padding: 0.5rem 1rem;
  position: relative;
}

.navbar .dropdown-item:hover {
  background-color: var(--light);
  color: var(--black);
}

.navbar .dropdown-item.active {
  background-color: var(--primary);
  color: var(--white);
  border: none;
}

.navbar .dropdown-item.active:after {
  display: none; /* Remove underline from dropdown items */
}

.navbar .dropdown-item:after {
  display: none; /* Remove underline from all dropdown items */
}

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

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--black);
  border-color: var(--black);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

.card {
  border-color: var(--secondary);
}

.card-title {
  color: var(--primary);
}

.table {
  border-color: var(--secondary);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--light);
}

.hero-section {
  background-color: #fff;
  padding: 4rem 0 2rem 0;
  position: relative;
  overflow: hidden;
}

/* Remove diagonal background */
.hero-section::after {
  display: none;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-image-container {
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
}

.hero-image-home {
  background-image: url("/img/electricista-legrand.webp");
}

/* Hero Carousel Styles */
.hero-carousel-img {
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* Carousel Controls */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: #e82130 !important;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background-position: center;
  background-size: 50%;
  opacity: 1 !important;
}

.carousel-indicators [data-bs-target] {
  background-color: #e82130;
  opacity: 1 !important;
}

.carousel-control-prev,
.carousel-control-next {
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .hero-carousel-img {
    height: auto !important;
  }
}

.hero-image-electrician {
  background-image: url("https://legrand-ca-comercial.s3.us-east-1.amazonaws.com/electricistas-concurso/soy-electricista-banner.webp");
  background-position: center;
  height: auto;
  min-height: 400px;
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 0;
}

.hero-image-contact {
  background-image: url("https://legrand-ca-comercial.s3.us-east-1.amazonaws.com/electricistas-concurso/soy-electricista-banner.webp");
  background-position: center;
  height: auto;
  min-height: 400px;
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 0;
}

.hero-image-user {
  background-image: url("https://legrand-ca-comercial.s3.us-east-1.amazonaws.com/electricistas-concurso/soy-electricista-banner.webp");
  background-position: center;
  height: auto;
  min-height: 400px;
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 0;
}

.hero-section .hero-title {
  color: #e82130 !important;
  font-size: calc(2rem + 1.5vw);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-family: "Montserrat", sans-serif;
}

.hero-section p {
  font-size: 1.25rem;
  color: var(--dark-gray);
  margin-bottom: 2rem;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
}

.hero-section .btn {
  padding: 0.8rem 1.5rem;
  font-weight: 500;
  border-radius: 0;
}

.navbar-brand img {
  max-width: none;
  height: 96px !important;
  width: auto;
}

footer {
}

/* Global Headings */
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

section > h2 {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

/* How it works section */
.how-it-works-section {
  background-color: var(--light-gray);
  border-radius: 0;
  margin: -3rem -15px 0;
  padding: 3rem 15px;
}

.how-it-works-section .card {
  background-color: white;
}

/* How It Works Section */
.card {
  border: none;
  transition: transform 0.3s ease;
  border-radius: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-5px);
}

.card-title {
  color: var(--primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Leaderboard Section */
#leaderboard {
  background-color: var(--light);
  padding: 3rem;
  border-radius: 0;
}

#leaderboard h2 {
  margin-bottom: 2rem;
}

.leaderboard-table {
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.leaderboard-table thead {
  background-color: var(--black);
  color: white;
}

.leaderboard-table th {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  padding: 1rem;
}

.leaderboard-table td {
  padding: 1rem;
  vertical-align: middle;
}

.rank-number {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

.country-flag {
  margin-left: 0.5rem;
  font-size: 1.2rem;
}

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
  border: 2px solid var(--primary);
}

.name-cell {
  display: flex;
  align-items: center;
  min-width: 250px;
}

.electrician-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0;
}

.electrician-link:hover {
  background-color: var(--light-gray);
  color: var(--primary);
}

.electrician-link img {
  margin-right: 1rem;
}

.electrician-link span {
  font-weight: 500;
}

/* Registration form styles */
.registration-section {
  background-color: var(--light-gray);
  padding: 5rem 0;
  margin: 0;
  width: 100%;
}

.registration-section .card {
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  border-radius: 0;
}

.registration-section .card-body {
  padding: 2.5rem;
}

.registration-section .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.registration-section .form-control {
  padding: 0.8rem;
  border-radius: 0;
  border: 2px solid var(--light-gray);
  transition: all 0.3s ease;
}

.registration-section .form-control:focus {
  border-color: var(--accent3);
  box-shadow: 0 0 0 0.2rem rgba(67, 39, 124, 0.1);
}

.registration-section .form-control:hover {
  border-color: var(--accent3);
}

.registration-section .form-select {
  padding: 0.8rem;
  border-radius: 0;
  border: 2px solid var(--light-gray);
  cursor: pointer;
}

.registration-section .btn-primary {
  padding: 1rem 2.5rem;
  font-weight: 600;
  border-radius: 0;
  background: var(--primary);
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.registration-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

/* Password toggle button */
.password-toggle {
  border-color: var(--light-gray);
  background: white;
  color: var(--dark-gray);
  transition: all 0.3s ease;
  border-radius: 0;
}

.password-toggle:hover {
  background: var(--light-gray);
  color: var(--accent3);
  border-color: var(--accent3);
}

.password-toggle:focus {
  box-shadow: none;
  border-color: var(--accent3);
}

.password-toggle .bi-eye-slash {
  display: none;
}

.password-toggle.showing .bi-eye {
  display: none;
}

.password-toggle.showing .bi-eye-slash {
  display: inline;
}

/* Profile page styles */
.profile-section {
  padding: 4rem 0;
  background-color: var(--light);
}

.profile-section .card {
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.votes-counter {
  background-color: var(--light);
  padding: 1rem;
  border-radius: 0;
}

.votes-counter h4 {
  font-size: 2rem;
  color: var(--primary);
}

.profile-section .btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.profile-section .btn-primary:hover {
  background-color: var(--black);
  border-color: var(--black);
}

.profile-section h5.text-muted {
  color: var(--dark-gray) !important;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.text-justify {
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.profile-section p {
  color: var(--dark);
  font-size: 1.1rem;
}

.projects-section img {
  border-radius: 0;
  margin-bottom: 1rem;
}

/* Estilos para botones de compartir */
.share-section {
  background-color: #f8f9fa;
  border-radius: 0;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.share-section h5.text-muted {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  color: #6c757d !important;
}

.share-section .share-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.share-section .share-btn:last-child {
  margin-right: 0;
}

.share-section .share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-section .btn-success {
  background-color: #25d366;
  border-color: #25d366;
}

.share-section .btn-info {
  background-color: #1da1f2;
  border-color: #1da1f2;
  color: white;
}

.share-section .btn-info:hover {
  background-color: #1a91da;
  border-color: #1a91da;
  color: white;
}

/* Rewards Section */
.rewards-section {
  background-color: var(--light);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

/* Remove diagonal background */
.rewards-section::after {
  display: none;
}

.rewards-section .container {
  position: relative;
  z-index: 2;
}

.rewards-section h2 {
  color: var(--primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.reward-step {
  background: white;
  padding: 1.5rem;
  border-radius: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.reward-step h3 {
  color: var(--primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

.reward-step p {
  color: var(--dark);
  font-size: 1.1rem;
  line-height: 1.6;
}

.reward-image {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.reward-image img {
  width: 100%;
  height: auto;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Accent Buttons */
.btn-accent1 {
  background-color: var(--primary);
  color: white;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.2s ease-in-out;
}

.btn-accent1:hover {
  background-color: var(--black);
  color: white;
}

/* Footer Styles */
.footer {
  background-color: var(--black) !important;
  font-family: "Montserrat", sans-serif;
  padding: 4rem 0;
}

.footer-nav ul {
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  opacity: 0.9;
}

.footer-nav a:hover {
  color: var(--primary);
  opacity: 1;
}

.social-links {
  margin: 0;
}

.social-links a {
  color: var(--white);
  transition: all 0.3s ease;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

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

.footer p {
  color: var(--white);
  font-size: 0.9rem;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .footer-nav ul {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav li {
    margin-bottom: 1rem;
  }

  /* Hide diagonal background in mobile */
  .hero-section::after {
    display: none;
  }

  .hero-image-home {
    height: 250px !important;
  }

  /* Registration pages hero */
  .hero-image-electrician {
    height: 200px !important;
    margin-top: 0 !important;
  }

  .hero-section {
    padding: 1rem 0;
  }

  .hero-section .py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .hero-section .hero-description {
    margin-bottom: 1rem !important;
  }

  #leaderboard {
    padding: 2rem 1rem;
  }
}

@media (min-width: 992px) {
  .hero-section {
    min-height: calc(100vh - 400px);
    padding: 4rem 0 2rem 0;
  }

  .leaderboard-table {
    margin: 0 2rem;
  }
}

/* Global button styles */
.btn {
  border-radius: 0 !important;
}

.btn-primary,
.btn-secondary,
.btn-accent1,
.btn-outline-primary,
.btn-outline-secondary {
  border-radius: 0;
}

/* Keep only social media buttons round */
.social-links a,
.share-section .share-btn,
.leaderboard-avatar {
  border-radius: 50%;
}

/* Login section styles */
.login-section {
  background-color: var(--light-gray);
  padding: 5rem 0;
}

.login-section .card {
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.login-section .btn-primary {
  padding: 1rem 2.5rem;
  font-weight: 600;
  background: var(--primary);
  border: none;
  font-family: "Montserrat", sans-serif;
}

.login-section .btn-outline-primary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}
