/* --- Variables Globales --- */
:root {
  --primary-color: #2A76D2;
  --secondary-color: #5cb85c;
  --logo-primary-orange: #f57c00;
  --logo-secondary-red: #d32f2f;
  --light-bg-color: #f4f7f6;
  --text-dark-color: #333740;
  --text-light-color: #6c757d;
  --border-color: #e0e0e0;
  --white-color: #fff;
  --font-family-base: 'Poppins', sans-serif;
  --box-shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.07);
  --box-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.1);
  --border-radius-base: 8px;
  --border-radius-pill: 50px;
  --primary-color-rgb: 42, 118, 210; /* RGB para el color primario */

  /* === VARIABLES PARA EL TAMAÑO DEL LOGO DEL PRELOADER === */
  --preloader-logo-max-width: 580px;   /* AJUSTA ESTE VALOR (ej: 150px, 250px) */
  --preloader-logo-relative-width: 65vw; /* AJUSTA ESTE VALOR (ej: 30vw, 45vw) o 'auto' */
  /* ======================================================= */
}

/* --- Reset y Base --- */
body {
  font-family: var(--font-family-base);
  color: var(--text-dark-color);
  background-color: var(--white-color);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-dark-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #1e5ba0;
}

.container-custom {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) { .container-custom { max-width: 540px; } }
@media (min-width: 768px) { .container-custom { max-width: 720px; } }
@media (min-width: 992px) { .container-custom { max-width: 960px; } }
@media (min-width: 1200px) { .container-custom { max-width: 1140px; } }
@media (min-width: 1400px) { .container-custom { max-width: 1320px; } }


/* --- Header --- */
.site-header {
  background-color: var(--white-color);
  padding: 0.75rem 0;
  box-shadow: var(--box-shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.site-header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-header .site-logo-link .site-logo {
  max-height: 38px;
  width: auto;
  vertical-align: middle;
}
.site-header .logo-text-header {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary-color);
  vertical-align: middle;
}
.site-header .main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
}
.site-header .main-nav a {
  color: var(--text-dark-color);
  font-weight: 500;
  padding: 0.5rem 0.2rem;
  position: relative;
  font-size: 0.95rem;
}
.site-header .main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.site-header .main-nav a:hover::after,
.site-header .main-nav a.active::after {
    width: 70%;
}
.site-header .auth-buttons .btn {
  margin-left: 0.75rem;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem;
}
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}
.navbar-toggler:focus {
    box-shadow: none;
}
.navbar-toggler i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Mobile Navigation Offcanvas */
.offcanvas-header .site-logo-offcanvas {
    max-height: 30px;
}
.offcanvas-header .logo-text-header-offcanvas {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.offcanvas-body .nav-link-offcanvas {
    font-weight: 500;
}
.offcanvas-body .nav-link-offcanvas:hover {
    color: var(--primary-color);
}


/* --- Botones Generales --- */
.btn {
  padding: 0.65rem 1.5rem;
  border-radius: var(--border-radius-pill);
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 0.95rem;
}
.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.05rem;
}
.btn-primary-custom {
  background-color: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
}
.btn-primary-custom:hover {
  background-color: #1e5ba0;
  border-color: #1e5ba0;
  color: var(--white-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-outline-primary-custom {
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-outline-primary-custom:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}
.btn-secondary-custom {
  background-color: var(--secondary-color);
  color: var(--white-color);
  border-color: var(--secondary-color);
}
.btn-secondary-custom:hover {
  background-color: #4a9d4a;
  border-color: #4a9d4a;
  color: var(--white-color);
}


/* --- Hero Section --- */
.hero-section {
  background: url('https://images.unsplash.com/photo-1522071820081-009f0129c7da?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8b2ZmaWNlJTIwdGVhbXxlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=1920&q=80') center center/cover no-repeat;
  position: relative;
  padding: 8rem 0 7rem;
  color: var(--white-color);
  min-height: 80vh;
  display: flex;
  align-items: center;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(var(--primary-color-rgb), 0.7); /* Usa variable RGB */
}
.hero-section .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--white-color);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.hero-section .subtitle {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: rgba(255,255,255,0.95);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-search-form {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  border-radius: var(--border-radius-base);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.hero-search-form .form-control,
.hero-search-form .form-select {
  min-height: 52px;
  border-radius: var(--border-radius-base);
  border: 1px solid rgba(255,255,255,0.3);
  padding-left: 1.2rem;
  background-color: rgba(255,255,255,0.95);
  color: var(--text-dark-color);
}
.hero-search-form .form-control::placeholder {
    color: var(--text-light-color);
}
.hero-search-form .form-control:focus,
.hero-search-form .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(92, 184, 92, 0.25);
    background-color: var(--white-color);
}
.hero-search-form .btn {
  min-height: 52px;
  width: 100%;
  border-radius: var(--border-radius-base);
}

/* Banner de Autorización */
.authorization-banner {
    background-color: var(--light-bg-color);
    border-bottom: 1px solid var(--border-color);
}
.authorization-banner p {
    color: var(--text-light-color);
    font-weight: 500;
    font-size: 0.85rem;
}
.authorization-banner .text-success {
    color: var(--secondary-color) !important;
}

/* --- Sección "Cómo Funciona" o Características --- */
.features-section {
  padding: 5rem 0;
  background-color: var(--white-color);
}
.features-section .section-title {
  text-align: center;
  margin-bottom: 3.5rem;
  font-size: 2.2rem;
}
.feature-item {
  text-align: center;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.feature-item .icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(var(--primary-color-rgb), 0.08);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.feature-item:hover .icon {
    background-color: var(--primary-color);
    color: var(--white-color);
}
.feature-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.feature-item p {
  color: var(--text-light-color);
  font-size: 0.95rem;
}

/* --- Sección Nosotros (About Us) --- */
.about-us-section {
  background-color: var(--white-color);
}
.about-us-section .section-title.text-start {
    text-align: left !important;
}
.about-us-section .section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
    margin-top: 0.5rem;
    margin-left: 0;
}
.about-us-section .lead {
    font-size: 1.1rem;
    font-weight: 300;
}
.about-us-section .accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base);
    margin-bottom: 1rem;
    box-shadow: none;
}
.about-us-section .accordion-item:last-child {
    margin-bottom: 0;
}
.about-us-section .accordion-button {
    font-weight: 600;
    color: var(--text-dark-color);
    background-color: var(--light-bg-color);
    border-radius: var(--border-radius-base) var(--border-radius-base) 0 0 !important;
}
.about-us-section .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.1);
    box-shadow: inset 0 -1px 0 var(--border-color);
}
.about-us-section .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25);
    border-color: var(--primary-color);
}
.about-us-section .accordion-button i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.about-us-section .accordion-body {
    font-size: 0.95rem;
    color: var(--text-light-color);
    background-color: var(--white-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}
.about-us-section .accordion-body ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
}
.about-us-section .accordion-body ul li {
    margin-bottom: 0.5rem;
}
.about-us-section .accordion-body ul li strong {
    color: var(--text-dark-color);
}
.about-us-section img.rounded {
    border-radius: var(--border-radius-base) !important;
}


/* --- Sección de Categorías --- */
.categories-section {
  padding: 5rem 0;
  background-color: var(--light-bg-color);
}
.categories-section .section-title {
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 2.2rem;
}
.categories-section .section-subtitle {
  text-align: center;
  color: var(--text-light-color);
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.category-card {
  background-color: var(--white-color);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius-base);
  text-align: center;
  box-shadow: var(--box-shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  border: 1px solid transparent;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--box-shadow-hover);
  border-color: var(--secondary-color);
}
.category-card .icon {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  background-color: rgba(92, 184, 92, 0.1);
  border-radius: var(--border-radius-base);
  padding: 0.9rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark-color);
}
.category-card .job-count {
  font-size: 0.85rem;
  color: var(--text-light-color);
}
.categories-section .text-center .btn {
    margin-top: 2.5rem;
}

/* --- Sección Call to Action (CTA) --- */
.cta-section {
    padding: 5rem 0;
    background-color: var(--primary-color);
    color: var(--white-color);
}
.cta-section h2 {
    color: var(--white-color);
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}
.cta-section p {
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .btn-light-custom {
    background-color: var(--white-color);
    color: var(--primary-color);
    border-color: var(--white-color);
}
.cta-section .btn-light-custom:hover {
    background-color: var(--light-bg-color);
    border-color: var(--light-bg-color);
    color: var(--primary-color);
}
.cta-section .btn-secondary-custom:hover {
    background-color: #45a045;
    border-color: #45a045;
}


/* --- Newsletter Section --- */
.newsletter-section {
  padding: 4rem 0;
  background-color: var(--white-color);
}
.newsletter-section .section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}
.newsletter-form .form-control {
  min-height: 52px;
  border-radius: var(--border-radius-pill) 0 0 var(--border-radius-pill);
  border: 1px solid var(--border-color);
  border-right: none;
}
.newsletter-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    z-index: 2;
}
.newsletter-form .btn {
  border-radius: 0 var(--border-radius-pill) var(--border-radius-pill) 0;
  min-height: 52px;
  z-index: 1;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--text-dark-color);
  color: rgba(255,255,255,0.75);
  padding: 4.5rem 0 0;
}
.site-footer h5 {
  color: var(--white-color);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.site-footer .footer-about .site-logo-footer {
    max-height: 35px;
    width: auto;
    vertical-align: middle;
}
.site-footer .footer-about .logo-text-footer {
    color: var(--white-color);
    font-size: 1.6rem;
    font-weight: 700;
    vertical-align: middle;
    display: inline-block;
}
.site-footer ul {
  list-style: none;
  padding: 0;
}
.site-footer ul li a {
  color: rgba(255,255,255,0.7);
  line-height: 2.2;
  font-size: 0.9rem;
}
.site-footer ul li a:hover {
  color: var(--white-color);
  text-decoration: none;
}
.site-footer .social-icons a {
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  margin-right: 1.2rem;
}
.site-footer .social-icons a:last-child {
    margin-right: 0;
}
.site-footer .social-icons a:hover {
  color: var(--secondary-color);
}
.footer-bottom {
  padding: 1.8rem 0;
  margin-top: 3.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

/* --- Preloader / Splash Screen --- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white-color);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s 0.2s ease-out, visibility 0.8s 0.2s ease-out;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  text-align: center;
}

#preloader-logo {
  max-width: var(--preloader-logo-max-width);   /* Usando variable CSS */
  width: var(--preloader-logo-relative-width); /* Usando variable CSS */
  height: auto;
  animation: pulseLogo 1.8s infinite ease-in-out, fadeInLogo 1s ease-out forwards;
}

.loading-text {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 500;
  animation: fadeInText 1.5s 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes pulseLogo {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes fadeInLogo {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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


/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
  .site-header .main-nav { display: none; }
  .site-header .auth-buttons { display: none; }
  .hero-section { padding: 6rem 0 5rem;}
  .hero-section h1 { font-size: 2.2rem; }
  .hero-section .subtitle { font-size: 1.05rem; }
  .hero-search-form .row > div { margin-bottom: 0.75rem; }
  .hero-search-form .row > div:last-child { margin-bottom: 0; }
  .hero-search-form .btn { width: 100%; }
  .features-section, .categories-section, .about-us-section, .cta-section, .newsletter-section { padding: 3.5rem 0; }
  .cta-section .btn-lg.me-0.me-md-2 { margin-right: 0 !important; }
  .cta-section .btn-lg { margin-bottom: 0.75rem;}
}

@media (max-width: 767.98px) {
  .site-header .header-content { padding: 0.75rem 1rem; }
  .hero-section { padding: 5rem 0 4rem; min-height: auto; }
  .hero-section h1 { font-size: 1.8rem; }
  .hero-section .subtitle { font-size: 1rem; margin-bottom: 2rem;}
  .hero-search-form { padding: 1rem;}
  .features-section .section-title,
  .categories-section .section-title,
  .about-us-section .section-title { font-size: 1.7rem; margin-bottom: 2.5rem;}
  .about-us-section .section-title.text-start { text-align: center !important;} /* Centrar título en móvil */
  .about-us-section .section-title.text-start::after { margin-left: auto; margin-right: auto;} /* Centrar subrayado */

  .categories-section .section-subtitle { margin-bottom: 2.5rem; }
  .cta-section h2 { font-size: 1.5rem; }
  .cta-section p { font-size: 1rem; }
  .newsletter-section .section-title { font-size: 1.6rem; }
  .site-footer { padding: 3rem 0 0; }
  .site-footer .row > div { text-align: center; margin-bottom: 2.5rem;}
  .site-footer .footer-about .site-logo-link { justify-content: center; }
  .site-footer .social-icons { justify-content: center; display: flex;}
  .footer-bottom { margin-top: 1rem; padding: 1.5rem 0;}
  #preloader-logo { max-width: 150px; width: 50vw;}
}

@media (max-width: 575.98px) {
    .hero-section h1 { font-size: 1.6rem; }
    .hero-section .subtitle { font-size: 0.9rem; }
    .cta-section .btn-lg { width: 100%; display: block; }
    .cta-section .btn-lg.me-0.me-md-2 { margin-right: 0 !important; }
    .about-us-section .accordion-button { font-size: 0.95rem;}
    .about-us-section .accordion-body { font-size: 0.9rem;}

}



.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9999;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  /* Ocupa 95% del ancho y alto de la ventana */
  width: 95vw;
  height: 95vh;
  /* Máxima restricción opcional */
  max-width: 900px;
  max-height: 800px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 8px; right: 12px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #333;
  cursor: pointer;
  line-height: 1;
}

.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}
