/* =============================================
   Union de Empresas Paraguayas — main.css
   ============================================= */

/* ── Variables CSS ── */
:root {
  --primary: #254a86;
  --primary-light: #3568b8;
  --primary-dark: #1a3560;
  --accent: #c7492b;
  --accent-light: #e05a3c;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --white: #ffffff;
  --body-bg: #f4f6f9;
  --card-shadow: 0 2px 12px rgba(37,74,134,0.08);
  --card-hover-shadow: 0 8px 30px rgba(37,74,134,0.15);
  --transition: all 0.3s ease;
  --radius: 12px;
  --radius-sm: 8px;
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--gray-800);
  background: var(--body-bg);
  line-height: 1.6;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--primary-dark);
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ── Navbar ── */
.navbar-uep {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
  padding: 0.6rem 0;
}
.navbar-uep .navbar-brand {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white) !important;
  letter-spacing: 0.02em;
}
.navbar-uep .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-uep .nav-link:hover,
.navbar-uep .nav-link.active { background: rgba(255,255,255,0.15); color: var(--white) !important; }
.navbar-uep .btn-registro {
  background: var(--accent);
  color: var(--white) !important;
  font-weight: 700;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
}
.navbar-uep .btn-registro:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ── Hero ── */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #1a2a4a 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-section > .container {
  position: relative;
  z-index: 2;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(199,73,43,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero-section h1 {
  font-size: 2.8rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero-section p { font-size: 1.15rem; opacity: 0.9; }

/* ── Search Box ── */
.search-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}
.search-box .form-control {
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}
.search-box .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,74,134,0.15);
}
.search-box .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  padding: 0.75rem 2rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.search-box .btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }

/* ── Cards ── */
.card-empresa {
  background: var(--white);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
}
.card-empresa:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-4px);
}
.card-empresa .card-img-top {
  height: 180px;
  object-fit: cover;
}
.card-empresa .empresa-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-top: -35px;
  position: relative;
  z-index: 2;
  background: var(--white);
}
.card-empresa .card-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
}
.card-empresa .badge-plan {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
}
.badge-verificado { background: var(--primary); color: var(--white); }
.badge-destacado { background: var(--warning); color: var(--gray-800); }

/* ── Categoría cards ── */
.card-categoria {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}
.card-categoria:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
}
.card-categoria i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  display: block;
}
.card-categoria h6 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-800);
  margin: 0;
}

/* ── Empresa Profile Page ── */
.perfil-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 2rem 0 1.5rem;
  position: relative;
}
.perfil-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.perfil-nombre {
  color: #ffffff !important;
  font-size: 1.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.3rem;
}
.perfil-nombre .badge {
  font-size: 0.6rem;
  vertical-align: middle;
}
.perfil-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.perfil-contact-item i {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.85rem;
}
.perfil-contact-item a { word-break: break-all; }

/* Action buttons row */
.perfil-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.perfil-action-buttons .btn {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

/* Social icons row */
.perfil-social {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.perfil-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
}
.perfil-social a:hover {
  background: rgba(255,255,255,0.3);
  color: var(--white);
  transform: translateY(-2px);
}

/* Desktop overrides */
@media (min-width: 992px) {
  .perfil-header { padding: 3rem 0 2rem; }
  .perfil-logo { width: 120px; height: 120px; }
  .perfil-nombre { font-size: 2rem; margin-top: 0; }
  .perfil-action-buttons { justify-content: flex-start; }
  .perfil-action-buttons .btn { flex: 0 1 auto; }
  .perfil-social { justify-content: flex-start; }
}

/* ── Buttons ── */
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }
.btn-accent { background: var(--accent); border: none; color: var(--white); font-weight: 600; }
.btn-accent:hover { background: var(--accent-light); color: var(--white); }
.btn-whatsapp { background: #25d366; color: var(--white); font-weight: 700; }
.btn-whatsapp:hover { background: #20bd5a; color: var(--white); }

/* ── Section ── */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.5rem;
}

/* ── Footer ── */
.footer-uep {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0f1f3a 100%);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
}
.footer-uep h5 { color: var(--white); font-size: 1.1rem; margin-bottom: 1rem; }
.footer-uep a { color: rgba(255,255,255,0.7); }
.footer-uep a:hover { color: var(--white); }
.footer-uep .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

/* ── CTA Registro ── */
.cta-registro {
  background: linear-gradient(135deg, var(--accent) 0%, #a83a21 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}
.cta-registro h3 { color: var(--white); font-size: 1.8rem; }
.cta-registro .btn {
  background: var(--white);
  color: var(--accent);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}
.cta-registro .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* ── Panel / Gestion Sidebar ── */
.panel-sidebar {
  background: linear-gradient(180deg, var(--primary-dark) 0%, #0f1f3a 100%);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  padding-top: 0;
  transition: var(--transition);
  overflow-y: auto;
}
.panel-sidebar .sidebar-brand {
  padding: 1.2rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.panel-sidebar .sidebar-brand a {
  color: var(--white);
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
}
.panel-sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.panel-sidebar .nav-link:hover,
.panel-sidebar .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  border-left-color: var(--accent);
}
.panel-sidebar .nav-link i { width: 20px; text-align: center; }
.panel-sidebar .badge { font-size: 0.7rem; }

.panel-content {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--body-bg);
}
.panel-topbar {
  background: var(--white);
  padding: 0.8rem 1.5rem;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
}
.panel-topbar .notification-icon {
  position: relative;
  font-size: 1.1rem;
  color: var(--gray-600);
  margin: 0 0.5rem;
  cursor: pointer;
}
.panel-topbar .notification-icon .badge-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 50%;
  font-weight: 700;
}
.panel-body { padding: 1.5rem; }

/* ── Dashboard Widgets ── */
.dash-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.dash-widget:hover { transform: translateY(-2px); box-shadow: var(--card-hover-shadow); }
.dash-widget .widget-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--white);
}
.dash-widget .widget-number { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); }
.dash-widget .widget-label { font-size: 0.85rem; color: var(--gray-600); }

/* ── Star Rating ── */
.star-rating { display: inline-flex; gap: 2px; }
.star-rating .fa-star, .star-rating .fa-star-half-alt { font-size: 0.9rem; }

/* ── Plan Lock ── */
.plan-lock {
  position: relative;
  opacity: 0.5;
  pointer-events: none;
}
.plan-lock::after {
  content: '\f023';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: var(--gray-600);
}

/* ── Precios ── */
.plan-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 2px solid transparent;
  height: 100%;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.featured {
  border-color: var(--accent);
  transform: scale(1.03);
  box-shadow: var(--card-hover-shadow);
}
.plan-card .plan-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
}
.plan-card .plan-period { font-size: 0.85rem; color: var(--gray-600); }
.plan-card .plan-features { list-style: none; padding: 0; text-align: left; }
.plan-card .plan-features li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.9rem;
}
.plan-card .plan-features li i { color: var(--success); width: 20px; margin-right: 0.3rem; }
.plan-card .plan-features li.disabled { color: var(--gray-600); text-decoration: line-through; }
.plan-card .plan-features li.disabled i { color: var(--gray-300); }

/* ── Misc ── */
.honeypot { display: none !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary-light { background: rgba(37,74,134,0.08); }
.border-primary { border-color: var(--primary) !important; }

/* ── Responsive ── */
@media (max-width: 992px) {
  .panel-sidebar { transform: translateX(-100%); }
  .panel-sidebar.show { transform: translateX(0); }
  .panel-content { margin-left: 0; }
  .hero-section h1 { font-size: 2rem; }
  .hero-section { padding: 3rem 0 2.5rem; }
}
@media (max-width: 576px) {
  .hero-section h1 { font-size: 1.6rem; }
  .search-box { padding: 1rem; }
  .search-box .form-control,
  .search-box .form-select,
  .search-box .btn { font-size: 16px !important; } /* Prevent iOS zoom on focus */
  .section-title { font-size: 1.4rem; }
  .perfil-logo { width: 80px; height: 80px; }
  .perfil-nombre { font-size: 1.2rem; }
  .perfil-action-buttons .btn { font-size: 0.8rem; padding: 0.5rem 0.8rem; }
}
