:root {
  --primary: #db6b2c;
  --white: #ffffff;
  --secondary: #d7d7d6;
  --light: #f5f5f5;
  --dark: #1d1f23;
  --accent1: #a5c342;
  --accent2: #81c2cc;
  --accent3: #43277c;
}

body {
  font-family: Arial, sans-serif;
  color: var(--dark);
  background-color: var(--light);
}

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

.navbar {
  background-color: var(--primary) !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: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:hover:after,
.navbar .nav-link.active:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

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

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

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

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

.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 {
  position: relative;
  background-color: var(--white);
  overflow: hidden;
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: var(--accent1);
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}

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

.hero-image-container {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-image-home {
  background-image: url("https://plus.unsplash.com/premium_photo-1682086495049-43a423baec15?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  transform: perspective(1000px) rotateY(-5deg);
}

.hero-image-electrician {
  background-image: url("https://plus.unsplash.com/premium_photo-1661911309991-cc81afcce97d?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  background-position: center 30%;
  aspect-ratio: 16/9;
}

.hero-image-user {
  background-image: url("https://plus.unsplash.com/premium_photo-1680386480802-d6fb04d3adeb?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-family: "Montserrat", sans-serif;
  color: var(--accent3);
}

.hero-section p {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
}

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

.navbar-brand img {
  max-width: 150px;
  height: auto;
}

footer {
}

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

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

/* How it works section */
.how-it-works-section {
  background-color: #f9f9f9;
  border-radius: 12px;
  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: 12px;
  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 0;
  border-radius: 20px;
}

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

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

.leaderboard-table thead {
  background-color: var(--accent1);
  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(--accent1);
}

.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: 8px;
}

.electrician-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--accent3);
}

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

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

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

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

/* Estilos para la página de perfil */
.profile-section {
  padding: 4rem 0;
  background-color: var(--light);
}

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

.profile-section .card-body {
  padding: 2rem;
}

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

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

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

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

.profile-section h5.text-muted {
  color: var(--accent3) !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: 10px;
  margin-bottom: 1rem;
}

/* Estilos para botones de compartir */
.share-section {
  background-color: #f8f9fa;
  border-radius: 10px;
  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;
}

.rewards-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-color: #e5e5e5;
  clip-path: polygon(0 0, 85% 0, 95% 100%, 0 100%);
  z-index: 1;
}

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

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

.reward-step {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  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;
  padding: 1.5rem;
  background: var(--accent3);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(67, 39, 124, 0.2);
  transition: transform 0.3s ease;
  max-width: 450px;
  margin: 0 auto;
}

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

.reward-image img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  background: white;
  padding: 1rem;
}

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

.btn-accent1:hover {
  background-color: #2a9d8f;
  color: white;
}

/* Footer Styles */
.footer {
  background-color: var(--accent3) !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(--accent1);
  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(--accent1);
  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: auto !important;
    margin-top: 50px !important;
    width: 100% !important;
    aspect-ratio: 16/9 !important;
  }
}
