/* ============================================================
   CGS UI v1 — Hoja de Estilos Corporativa
   Desarrollado para Carlos Garibay · CGS · Control, Gestión y Sistemas
   ============================================================ */

/* ------------------------------------------------------------
   1. VARIABLES
------------------------------------------------------------ */
:root {
  /* Paleta corporativa */
  --cgs-blue: #334a6f;
  --cgs-red: #ea534e;
  --cgs-white: #ffffff;
  --cgs-light-gray: #f2f2f4;
  --cgs-mid-gray: #bfc1c5;
  --cgs-dark-gray: #2d2f33;

  /* Tipografía responsiva */
  --fz-title-lg: clamp(2rem, 4vw, 3rem);
  --fz-title-md: clamp(1.5rem, 3vw, 2.2rem);
  --fz-subtitle: clamp(1.2rem, 2vw, 1.6rem);
  --fz-paragraph: clamp(1rem, 1.5vw, 1.1rem);
  --fz-small: clamp(0.88rem, 1.3vw, 0.95rem);

  /* Espaciados y bordes */
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.15);

  --btn-primary: #334a6f;
  --btn-primary-hover: #2a3b57;
  --btn-accent: #ea534e;
  --btn-accent-hover: #d04540;
  --btn-text-light: #ffffff;

  --btn-radius: 12px;
  --btn-font: 'Inter', sans-serif;
  --btn-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* ------------------------------------------------------------
   2. RESET & BASE
------------------------------------------------------------ */
.bodyy {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  font-size: var(--fz-paragraph);
  line-height: 1.6;
  color: var(--cgs-dark-gray);
  background: var(--cgs-light-gray);
}

h1, h2, h3, h4 {
  margin: 0 0 0.4em 0;
  color: var(--cgs-blue);
  font-weight: 700;
}

h1 { font-size: var(--fz-title-lg); }
h2 { font-size: var(--fz-title-md); }
h3 { font-size: var(--fz-subtitle); }
p  { margin-bottom: 1em; }
small { font-size: var(--fz-small); }

/* Links */
a {
  color: var(--cgs-red);
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  text-decoration: underline;
}


/* ------------------------------------------------------------
   3. LISTAS <ul> y <ol>
------------------------------------------------------------ */
ul, ol {
  margin: 0 0 1.4em 1.4em;
  padding: 0;
  font-size: var(--fz-subtitle);
}

ul {
  list-style: none;
}

ul li {
  position: relative;
  margin-bottom: 0.6em;
  padding-left: 1.2em;
}

ul li::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  background: var(--cgs-red);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.35em;
  box-shadow: 0 0 3px rgba(234, 83, 78, 0.5);
}

ol li {
  margin-bottom: 0.6em;
  padding-left: 0.3em;
}

ol li::marker {
  font-weight: 700;
  color: var(--cgs-blue);
}


/* ------------------------------------------------------------
   4. BOTONES
------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.6em 1.2em;
  font-size: var(--fz-paragraph);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.btn-primary {
  background: var(--cgs-blue);
  color: var(--cgs-white);
}
.btn-primary:hover {
  background: #2b3c59;
}

.btn-secondary {
  background: var(--cgs-red);
  color: var(--cgs-white);
}
.btn-secondary:hover {
  background: #d44b46;
}

.btn-outline {
  background: transparent;
  color: var(--cgs-blue);
  border: 2px solid var(--cgs-blue);
}
.btn-outline:hover {
  background: var(--cgs-blue);
  color: var(--cgs-white);
}


/* ------------------------------------------------------------
   5. TARJETAS (CARDS)
------------------------------------------------------------ */
.card {
  background: var(--cgs-white);
  padding: 1.4em;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5em;
}

.card h3 {
  color: var(--cgs-blue);
  margin-bottom: 0.4em;
}


/* ------------------------------------------------------------
   6. INPUTS / FORMULARIOS
------------------------------------------------------------ */
input, textarea, select {
  width: 100%;
  padding: 0.6em;
  font-size: var(--fz-paragraph);
  border-radius: var(--radius);
  border: 2px solid var(--cgs-mid-gray);
  background: var(--cgs-white);
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--cgs-blue);
  outline: none;
}

label {
  font-weight: 600;
  margin-bottom: 0.3em;
  display: block;
}


/* ------------------------------------------------------------
   7. TABLAS
------------------------------------------------------------ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: var(--fz-paragraph);
}

th, td {
  padding: 0.8em;
  text-align: left;
}

th {
  background: var(--cgs-blue);
  color: var(--cgs-white);
}

tr:nth-child(even) {
  background: var(--cgs-light-gray);
}


/* ------------------------------------------------------------
   8. ALERTAS
------------------------------------------------------------ */
.alert {
  padding: 1em;
  border-radius: var(--radius);
  margin-bottom: 1em;
  font-weight: 600;
}

.alert-info {
  background: #d8e4f5;
  color: var(--cgs-blue);
}

.alert-success {
  background: #dff3d9;
  color: #2f6d2f;
}

.alert-error {
  background: #f9d7d5;
  color: var(--cgs-red);
}


/* ------------------------------------------------------------
   9. LAYOUT (contenedor base)
------------------------------------------------------------ */
.container {
  width: min(1100px, 90%);
  margin: auto;
  padding: 2em 0;
}


/* ------------------------------------------------------------
   10. MODO OSCURO (opcional)
------------------------------------------------------------ */
.dark-mode {
  --cgs-white: #1e1f22;
  --cgs-light-gray: #26272b;
  --cgs-dark-gray: #e3e3e5;
  background: var(--cgs-light-gray);
  color: var(--cgs-dark-gray);
}

.dark-mode .card {
  background: #2e3033;
}

.dark-mode table tr:nth-child(even) {
  background: #2e3033;
}


.cgs-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 2em;
  background: var(--cgs-blue);
  color: white;
  box-shadow: var(--shadow);
}

.cgs-navbar .nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.cgs-navbar .nav-links {
  display: flex;
  gap: 1.5em;
  list-style: none;
}

.cgs-navbar .nav-links a {
  color: white;
  font-weight: 600;
  transition: 0.2s;
}

.cgs-navbar .nav-links a:hover {
  color: var(--cgs-red);
}

.cgs-footer {
  padding: 2em;
  text-align: center;
  background: var(--cgs-blue);
  color: var(--cgs-white);
  margin-top: 2em;
  font-size: var(--fz-paragraph);
}

.cgs-footer2 {  
  text-align: center;
  background: var(--cgs-blue);
  color: var(--cgs-white);  
  font-size: var(--fz-paragraph);
}

.cgs-breadcrumb {
  margin-bottom: 1em;
  font-size: var(--fz-small);
  color: var(--cgs-dark-gray);
}

.cgs-breadcrumb a {
  color: var(--cgs-blue);
  text-decoration: none;
}

.cgs-breadcrumb a:hover {
  color: var(--cgs-red);
}

.cgs-tabs {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
}

.cgs-tabs .tab {
  padding: 0.6em 1.2em;
  border: none;
  background: var(--cgs-light-gray);
  color: var(--cgs-blue);
  cursor: pointer;
  border-radius: var(--radius);
  font-weight: 600;
}

.cgs-tabs .tab.active {
  background: var(--cgs-blue);
  color: white;
}

.cgs-tab-content {
  display: none;
}

.cgs-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

.cgs-accordion .acc-btn {
  width: 100%;
  padding: 1em;
  background: var(--cgs-blue);
  color: white;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius);
  margin-bottom: 0.3em;
  font-weight: 600;
}

.cgs-accordion .acc-content {
  display: none;
  background: var(--cgs-white);
  padding: 1em;
  border-radius: var(--radius);
  margin-bottom: 1em;
  box-shadow: var(--shadow);
}

.cgs-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
}

.cgs-modal .modal-content {
  background: var(--cgs-white);
  padding: 2em;
  border-radius: var(--radius);
  width: min(500px, 90%);
  box-shadow: var(--shadow);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.6em;
  right: 0.8em;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--cgs-red);
}

.cgs-grid {
  display: grid;
  gap: 1.5em;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rojo {color:var(--cgs-red);}

#cta01{
  color:var(--cgs-blue);
  font-size:var(--fz-subtitle);
  text-align:right;
  font-style:italic;
}

#cta02{
  color:var(--cgs-blue);
  font-size:var(--fz-subtitle);  
  font-style:italic;
}

#cta03{
  color:var(--cgs-blue);
}

/* Estilo base general */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--btn-font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--btn-radius);
  cursor: pointer;
  border: none;
  transition: 0.25s ease;
  text-decoration: none;
  user-select: none;
  margin-top:5px;
}

/* Botón primario */
.btn-primary {
  background: var(--btn-primary);
  color: var(--btn-text-light);
  box-shadow: var(--btn-shadow);
}

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

/* Botón acento (acciones importantes) */
.btn-accent {
  background: var(--btn-accent);
  color: var(--btn-text-light);
  box-shadow: var(--btn-shadow);
}

.btn-accent:hover {
  background: var(--btn-accent-hover);
  transform: translateY(-2px);
}

/* ◻ Botón outline */
.btn-outline {
  background: transparent;
  color: var(--btn-primary);
  border: 2px solid var(--btn-primary);
}

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

/* Botón minimal/ghost */
.btn-ghost {
  background: transparent;
  color: var(--btn-primary);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--btn-primary-hover);
  background: rgba(0,0,0,0.05);
}

.normalAzul{
  color:var(--cgs-blue);
  font-size:var(--fz-subtitle);
}