/*
Theme Name:   COOPUCE Child
Theme URI:    https://coopuce.fin.ec
Description:  Child theme del rediseño COOPUCE sobre Divi
Author:       COOPUCE
Template:     Divi
Version:      1.0.0
Text Domain:  coopuce-child
*/

/* ====================================================
   IMPORTAR ESTILOS DEL TEMA PADRE (DIVI)
   ==================================================== */
@import url("../Divi/style.css");

/* ====================================================
   FUENTES GOOGLE
   ==================================================== */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Inter:wght@400;500;600;700&display=swap");

/* ====================================================
   VARIABLES DE DISEÑO COOPUCE
   ==================================================== */
:root {
  --primary:     #1A4F8A;
  --primary-dk:  #133A6A;
  --accent:      #5B9B2A;
  --accent-dk:   #4A7E22;
  --topbar-bg:   #4D8E1F;
  --light-green: #74C13A;
  --dark:        #1C2B3A;
  --text:        #374151;
  --gray:        #6B7280;
  --light:       #F4F7FB;
  --border:      #E2E8F0;
  --white:       #FFFFFF;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.1);
  --transition:  all 0.25s ease;
}

/* ====================================================
   TIPOGRAFÍA BASE
   ==================================================== */
body,
.et_pb_text,
p, li, a,
input, select, textarea, button {
  font-family: 'Inter', sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.et_pb_module_header,
.et-pb-contact-form label {
  font-family: 'Nunito', sans-serif !important;
}

/* ====================================================
   OVERRIDE DIVI: COLORES GLOBALES
   ==================================================== */
.et_pb_button,
.et_pb_button_module_wrapper .et_pb_button {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  border-radius: var(--radius-sm) !important;
}
.et_pb_button:hover {
  background-color: var(--accent-dk) !important;
  border-color: var(--accent-dk) !important;
}

/* ====================================================
   COOPUCE: TOP BAR
   ==================================================== */
.coopuce-topbar {
  background: var(--topbar-bg);
  color: #fff;
  padding: 6px 0;
  font-size: 0.8rem;
  font-weight: 500;
}
.coopuce-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.coopuce-topbar a {
  color: #fff !important;
  text-decoration: none;
}
.coopuce-topbar svg {
  width: 14px; height: 14px;
  vertical-align: middle;
  margin-right: 4px;
}
.coopuce-topbar-phones { display: flex; align-items: center; gap: 0.5rem; }
.coopuce-topbar-btn {
  background: rgba(255,255,255,0.2) !important;
  padding: 4px 14px;
  border-radius: 4px;
  font-weight: 700 !important;
  transition: background 0.2s;
}
.coopuce-topbar-btn:hover { background: rgba(255,255,255,0.35) !important; }

/* ====================================================
   COOPUCE: BARRA DE REDES SOCIALES
   ==================================================== */
.coopuce-social-bar {
  background: var(--primary-dk);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 1.5rem;
  gap: 10px;
}
.coopuce-social-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  transition: var(--transition);
}
.coopuce-social-bar a svg {
  width: 15px; height: 15px;
}
.coopuce-social-bar a.s-fb { background: #1877F2; }
.coopuce-social-bar a.s-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.coopuce-social-bar a.s-wa { background: #25D366; }
.coopuce-social-bar a.s-li { background: #0A66C2; }
.coopuce-social-bar a:hover { transform: translateY(-2px); filter: brightness(1.15); }

/* ====================================================
   DIVI HEADER OVERRIDE: COLORES COOPUCE
   ==================================================== */


/* ====================================================
   COOPUCE: PAGE HERO (banner interior de páginas)
   ==================================================== */
.coopuce-page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  padding: 4rem 0 3rem;
  overflow: hidden;
}
.coopuce-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../../../Imagenes/Inicio/feliz-pareja-asiatica-joven-agente-bienes-raices_7861-1032.jpg') center/cover no-repeat;
  opacity: 0.18;
}
.coopuce-page-hero .container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.coopuce-breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.75rem;
}
.coopuce-breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }
.coopuce-breadcrumb a:hover { color: #fff; }
.coopuce-breadcrumb span { margin: 0 0.4rem; }
.coopuce-page-hero h1 {
  font-family: 'Nunito', sans-serif !important;
  font-size: clamp(1.8rem, 4vw, 2.6rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  margin: 0 0 0.5rem !important;
}
.coopuce-page-hero p {
  color: rgba(255,255,255,0.85) !important;
  font-size: 1rem !important;
  margin: 0 !important;
}

/* ====================================================
   COOPUCE: SECCIÓN GENÉRICA
   ==================================================== */
.coopuce-section {
  padding: 4rem 0;
}
.coopuce-section-title {
  font-family: 'Nunito', sans-serif !important;
  font-size: 1.75rem !important;
  font-weight: 900 !important;
  color: var(--dark) !important;
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}
.coopuce-section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 50px; height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.coopuce-section-subtitle {
  color: var(--gray) !important;
  font-size: 1rem !important;
  margin-bottom: 2.5rem !important;
}

/* ====================================================
   COOPUCE: TARJETAS DE PRODUCTO (Créditos / Ahorro)
   ==================================================== */
.coopuce-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: var(--transition);
  height: 100%;
}
.coopuce-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary);
}
.coopuce-card-icon {
  width: 52px; height: 52px;
  background: var(--light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.coopuce-card-icon svg { width: 26px; height: 26px; color: var(--primary); }
.coopuce-card h3 {
  font-family: 'Nunito', sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--dark) !important;
  margin-bottom: 0.5rem !important;
}
.coopuce-card p {
  color: var(--gray) !important;
  font-size: 0.875rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0.75rem !important;
}
.coopuce-card-tag {
  display: inline-block;
  background: var(--light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-bottom: 0.4rem;
}
.coopuce-card-rate {
  font-family: 'Nunito', sans-serif !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: var(--primary) !important;
  margin: 0.5rem 0 0 !important;
}
.coopuce-card-rate span { font-size: 0.85rem; font-weight: 600; color: var(--gray); }

/* ====================================================
   COOPUCE: SIMULADOR DE CRÉDITO
   ==================================================== */
.sim-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
}
.sim-section-title {
  font-family: 'Nunito', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
}
.sim-form-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.sim-form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.sim-form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.sim-group { display: flex; flex-direction: column; }
.sim-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.3rem;
}
.sim-input, .sim-select {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.sim-input:focus, .sim-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,79,138,0.1);
}
.sim-hint { font-size: 0.72rem; color: var(--gray); margin-top: 0.25rem; }
.sim-radio-row { display: flex; align-items: center; gap: 2rem; padding: 0.7rem 0; }
.sim-radio-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.3rem;
  display: block;
}
.sim-radio-opt {
  display: flex; align-items: center; gap: 0.5rem;
  cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--dark);
}
.sim-radio-opt input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.sim-error {
  color: #DC2626; font-size: 0.82rem; margin-top: 0.875rem;
  font-weight: 600; display: none;
  padding: 0.6rem 0.875rem;
  background: #FEF2F2;
  border-radius: var(--radius-sm);
  border-left: 3px solid #DC2626;
}
.sim-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
.sim-btn {
  background: var(--accent);
  color: #fff !important;
  border: none;
  padding: 0.875rem 2.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif !important;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none !important;
}
.sim-btn:hover { background: var(--accent-dk); transform: translateY(-1px); }
.sim-clear {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--gray);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.sim-clear:hover { border-color: var(--primary); color: var(--primary); }
.sim-disclaimer {
  background: #FFFBEB;
  border-left: 3px solid #F59E0B;
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.75rem;
  color: #92400E;
  margin-top: 1.5rem;
  line-height: 1.5;
}
/* Tarjetas resultado */
.sim-results { display: none; margin-top: 2rem; }
.result-cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 1rem; margin-bottom: 2rem; }
.result-card {
  background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 1.25rem 1rem;
  text-align: center; box-shadow: var(--shadow-sm);
}
.result-card-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gray); font-weight: 700; margin-bottom: 0.4rem; }
.result-card-value { font-size: 1.25rem; font-weight: 900; font-family: 'Nunito', sans-serif; color: var(--primary); }
.result-card.highlight { background: var(--primary); border-color: var(--primary); }
.result-card.highlight .result-card-label { color: rgba(255,255,255,0.75); }
.result-card.highlight .result-card-value { color: #fff; font-size: 1.55rem; }
/* Tabla amortización */
.amort-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.amort-header h3 { font-size: 1rem; color: var(--dark); font-family: 'Nunito', sans-serif; font-weight: 800; }
.print-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--light); border: 1.5px solid var(--border);
  color: var(--dark); padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.print-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.amort-wrapper { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.amort-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; background: var(--white); min-width: 820px; }
.amort-table thead tr { background: var(--primary); }
.amort-table thead th {
  padding: 0.875rem 0.75rem; text-align: right;
  color: #fff; font-weight: 700; font-family: 'Nunito', sans-serif;
  font-size: 0.72rem; border-right: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap; letter-spacing: 0.04em;
}
.amort-table thead th:first-child,
.amort-table thead th:nth-child(2),
.amort-table thead th:nth-child(3) { text-align: center; }
.amort-table thead th:last-child { border-right: none; }
.amort-table tbody tr { border-bottom: 1px solid var(--border); }
.amort-table tbody tr:nth-child(even) { background: #F8FAFD; }
.amort-table tbody tr:hover { background: #EEF3FA; }
.amort-table tbody td { padding: 0.55rem 0.75rem; text-align: right; color: var(--text); border-right: 1px solid var(--border); }
.amort-table tbody td:first-child { text-align: center; font-weight: 700; color: var(--primary); }
.amort-table tbody td:nth-child(2),
.amort-table tbody td:nth-child(3) { text-align: center; }
.amort-table tbody td:last-child { border-right: none; font-weight: 700; color: var(--primary); }
.amort-table tbody .col-cuota { background: rgba(91,155,42,0.07); font-weight: 700; color: var(--accent-dk) !important; }
.amort-table tfoot tr { background: var(--dark); }
.amort-table tfoot td {
  padding: 0.75rem; text-align: right;
  color: #fff; font-weight: 800; font-family: 'Nunito', sans-serif;
  font-size: 0.78rem; border-right: 1px solid rgba(255,255,255,0.2);
}
.amort-table tfoot td:last-child { border-right: none; color: #74C13A; }
.amort-table tfoot .col-cuota { color: #74C13A !important; }

/* ====================================================
   COOPUCE: FORMULARIO DE CONTACTO
   ==================================================== */
.coopuce-form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 2rem;
}
.coopuce-form-card h3 {
  font-family: 'Nunito', sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--dark) !important;
  margin-bottom: 1.5rem !important;
}
.coopuce-form-card input,
.coopuce-form-card select,
.coopuce-form-card textarea {
  width: 100%; padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: 'Inter', sans-serif;
  color: var(--dark); margin-bottom: 0.875rem;
  transition: border-color 0.2s; box-sizing: border-box;
}
.coopuce-form-card input:focus,
.coopuce-form-card select:focus,
.coopuce-form-card textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,79,138,0.1);
}
.coopuce-form-card textarea { min-height: 130px; resize: vertical; }
.coopuce-form-card button[type="submit"] {
  width: 100%; background: var(--primary);
  color: #fff; border: none; padding: 0.875rem;
  border-radius: var(--radius-sm); font-size: 0.95rem;
  font-weight: 800; font-family: 'Nunito', sans-serif;
  cursor: pointer; transition: var(--transition);
}
.coopuce-form-card button[type="submit"]:hover { background: var(--primary-dk); }

/* ====================================================
   COOPUCE: COSEDE SECTION
   ==================================================== */
.coopuce-cosede {
  background: var(--primary-dk);
  color: #fff;
  padding: 2.5rem 0;
}
.coopuce-cosede .et_pb_row { max-width: 1200px; }

/* ====================================================
   COOPUCE: FOOTER OVERRIDE
   ==================================================== */
#main-footer {
  background: var(--dark) !important;
  color: rgba(255,255,255,0.7) !important;
}
#main-footer .footer-widget h4,
#main-footer .widget-title {
  color: #fff !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
#main-footer .footer-widget li a,
#main-footer .widget ul li a {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.875rem !important;
  transition: color 0.2s;
}
#main-footer .footer-widget li a:hover,
#main-footer .widget ul li a:hover { color: var(--light-green) !important; }
#footer-bottom { background: rgba(0,0,0,0.3) !important; }
#footer-bottom p { color: rgba(255,255,255,0.6) !important; font-size: 0.8rem !important; }

/* ====================================================
   TRANSPARENCIA: PESTAÑAS DE AÑO
   ==================================================== */
.year-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.year-tab {
  padding: 0.5rem 1.25rem; border-radius: 30px;
  border: 2px solid var(--border); background: var(--white);
  color: var(--text); font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: var(--transition);
}
.year-tab:hover { border-color: var(--primary); color: var(--primary); }
.year-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.year-section { display: none; }
.year-section.active { display: block; }
.doc-list { display: flex; flex-direction: column; gap: 0.75rem; }
.doc-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem; transition: var(--transition);
  text-decoration: none !important; color: inherit !important;
}
.doc-card:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.doc-card-icon { color: var(--primary); flex-shrink: 0; }
.doc-card-info { flex: 1; }
.doc-card-info strong { color: var(--dark); display: block; font-size: 0.9rem; }
.doc-card-info span { color: var(--gray); font-size: 0.78rem; }
.btn-download {
  background: var(--accent); color: #fff !important;
  padding: 0.4rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 700; text-decoration: none !important;
  transition: background 0.2s; white-space: nowrap;
}
.btn-download:hover { background: var(--accent-dk) !important; }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 992px) {
  .result-cards { grid-template-columns: repeat(3, 1fr); }
  .sim-form-row.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sim-form-row.cols-3,
  .sim-form-row.cols-2 { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr 1fr; }
  .sim-card { padding: 1.25rem; }
}
@media (max-width: 480px) {
  .result-cards { grid-template-columns: 1fr; }
}
@media print {
  #main-header, .et_pb_section.coopuce-hero,
  .sim-card, .sim-disclaimer, .sim-actions,
  .print-btn, .coopuce-cosede, #main-footer { display: none !important; }
  .sim-results { display: block !important; }
  .amort-wrapper { overflow: visible; }
  .amort-table { min-width: auto; font-size: 9pt; }
}
