// Iconos institucionales SVG personalizados (inline, sin imágenes externas).
// Estilo: filled flat dorado con detalles azul marino — coherente con la marca.
//
// Cada función devuelve un elemento SVG con tamaño configurable.
// El color principal es 'currentColor' para que herede del CSS.

const CmgsIcons = {
  // ====== PROGRAMAS ======

  /* Oso mascota — Preescolar (con gorra militar) */
  bear: (size = 44) => (
    <svg viewBox="0 0 64 64" width={size} height={size} aria-hidden="true">
      <defs>
        <linearGradient id="cmgs-bear-grad" x1="0" y1="0" x2="0" y2="1">
          <stop offset="0%" stopColor="#e8b94a"/><stop offset="100%" stopColor="#8a6914"/>
        </linearGradient>
      </defs>
      <circle cx="16" cy="16" r="8" fill="url(#cmgs-bear-grad)"/>
      <circle cx="48" cy="16" r="8" fill="url(#cmgs-bear-grad)"/>
      <circle cx="16" cy="16" r="3.5" fill="#0a1733"/>
      <circle cx="48" cy="16" r="3.5" fill="#0a1733"/>
      <ellipse cx="32" cy="34" rx="20" ry="18" fill="url(#cmgs-bear-grad)"/>
      <ellipse cx="32" cy="42" rx="11" ry="8" fill="#f3e2b1"/>
      <circle cx="25" cy="32" r="2.5" fill="#0a1733"/>
      <circle cx="39" cy="32" r="2.5" fill="#0a1733"/>
      <circle cx="25.5" cy="31" r="0.8" fill="#fff"/>
      <circle cx="39.5" cy="31" r="0.8" fill="#fff"/>
      <ellipse cx="32" cy="40" rx="2.6" ry="2" fill="#0a1733"/>
      <path d="M28 44 Q32 48 36 44" stroke="#0a1733" strokeWidth="1.6" fill="none" strokeLinecap="round"/>
      <path d="M14 18 L50 18 L48 12 L16 12 Z" fill="#0a1733"/>
      <rect x="14" y="17" width="36" height="3" fill="#d4a02a"/>
      <circle cx="32" cy="14" r="1.5" fill="#d4a02a"/>
    </svg>
  ),

  /* Libro + lápiz — Primaria */
  book: (size = 40) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M8 8h22a4 4 0 0 1 4 4v28H12a4 4 0 0 1-4-4V8Z" fill="currentColor" fillOpacity="0.12"/>
      <path d="M8 8h22a4 4 0 0 1 4 4v28H12a4 4 0 0 1-4-4V8Z"/>
      <path d="M14 16h14M14 22h14M14 28h10"/>
      <path d="M36 30 L42 24 L40 22 L34 28 L34 32 Z" fill="currentColor"/>
    </svg>
  ),

  /* Estrella militar + diploma — Bachillerato */
  diploma: (size = 40) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <rect x="6" y="10" width="28" height="22" rx="2" fill="currentColor" fillOpacity="0.12"/>
      <rect x="6" y="10" width="28" height="22" rx="2"/>
      <path d="M12 18h16M12 24h10"/>
      <circle cx="34" cy="34" r="8" fill="currentColor" fillOpacity="0.18"/>
      <circle cx="34" cy="34" r="8"/>
      <path d="M34 30 L35.4 33 L38.5 33.2 L36.2 35.2 L37 38.3 L34 36.7 L31 38.3 L31.8 35.2 L29.5 33.2 L32.6 33 Z" fill="currentColor" stroke="none"/>
    </svg>
  ),

  // ====== GRADOS (inscripciones paso 1) ======

  /* Sol con cara — Preescolar */
  sun: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="currentColor" aria-hidden="true">
      <g stroke="currentColor" strokeWidth="2" strokeLinecap="round">
        <line x1="24" y1="4" x2="24" y2="9"/>
        <line x1="24" y1="39" x2="24" y2="44"/>
        <line x1="4" y1="24" x2="9" y2="24"/>
        <line x1="39" y1="24" x2="44" y2="24"/>
        <line x1="10" y1="10" x2="14" y2="14"/>
        <line x1="34" y1="34" x2="38" y2="38"/>
        <line x1="38" y1="10" x2="34" y2="14"/>
        <line x1="14" y1="34" x2="10" y2="38"/>
      </g>
      <circle cx="24" cy="24" r="10" fill="currentColor"/>
      <circle cx="20" cy="22" r="1.4" fill="#0a1733"/>
      <circle cx="28" cy="22" r="1.4" fill="#0a1733"/>
      <path d="M20 26 Q24 30 28 26" stroke="#0a1733" strokeWidth="1.6" fill="none" strokeLinecap="round"/>
    </svg>
  ),

  /* Mochila — Primaria */
  backpack: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M16 12 Q16 6 24 6 Q32 6 32 12" />
      <rect x="10" y="12" width="28" height="30" rx="6" fill="currentColor" fillOpacity="0.14"/>
      <rect x="10" y="12" width="28" height="30" rx="6"/>
      <path d="M10 24 H38"/>
      <rect x="16" y="28" width="16" height="10" rx="2"/>
      <circle cx="24" cy="33" r="1.4" fill="currentColor" stroke="none"/>
    </svg>
  ),

  /* Átomo — Básica Secundaria */
  atom: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" aria-hidden="true">
      <circle cx="24" cy="24" r="3" fill="currentColor" stroke="none"/>
      <ellipse cx="24" cy="24" rx="18" ry="7"/>
      <ellipse cx="24" cy="24" rx="18" ry="7" transform="rotate(60 24 24)"/>
      <ellipse cx="24" cy="24" rx="18" ry="7" transform="rotate(120 24 24)"/>
    </svg>
  ),

  /* Certificado / sello — Educación Media */
  certificate: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <rect x="6" y="8" width="36" height="24" rx="2" fill="currentColor" fillOpacity="0.12"/>
      <rect x="6" y="8" width="36" height="24" rx="2"/>
      <path d="M12 16h24M12 20h16"/>
      <circle cx="34" cy="36" r="6" fill="currentColor" fillOpacity="0.22"/>
      <circle cx="34" cy="36" r="6"/>
      <path d="M28 36 L30 42 L34 40 L38 42 L40 36" stroke="currentColor" strokeWidth="2" fill="none"/>
    </svg>
  ),

  // ====== ENTREVISTAS (inscripciones paso 5) ======

  /* Birrete (clásico graduación) — Coord. Académico */
  academic: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M4 18 L24 10 L44 18 L24 26 Z" fill="currentColor" fillOpacity="0.18"/>
      <path d="M4 18 L24 10 L44 18 L24 26 Z"/>
      <path d="M12 22 V32 Q24 38 36 32 V22"/>
      <path d="M40 18 V28" />
      <circle cx="40" cy="30" r="2" fill="currentColor" stroke="none"/>
    </svg>
  ),

  /* Manos / personas (convivencia) */
  community: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <circle cx="16" cy="16" r="5" fill="currentColor" fillOpacity="0.18"/>
      <circle cx="16" cy="16" r="5"/>
      <circle cx="32" cy="16" r="5" fill="currentColor" fillOpacity="0.18"/>
      <circle cx="32" cy="16" r="5"/>
      <path d="M6 38 Q6 26 16 26 Q26 26 26 38"/>
      <path d="M22 38 Q22 26 32 26 Q42 26 42 38"/>
    </svg>
  ),

  /* Cerebro + chat (psicología) */
  psychology: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M28 8 Q40 8 40 20 Q40 30 32 32 V40 H20 Q14 40 14 34 V32 Q8 28 8 20 Q8 8 20 8 Q24 4 28 8 Z" fill="currentColor" fillOpacity="0.14"/>
      <path d="M28 8 Q40 8 40 20 Q40 30 32 32 V40 H20 Q14 40 14 34 V32 Q8 28 8 20 Q8 8 20 8 Q24 4 28 8 Z"/>
      <path d="M24 8 V32"/>
      <path d="M18 18 H24 M30 18 H24"/>
    </svg>
  ),

  /* Estrella militar / escudo (rector) */
  rector: (size = 36) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M24 4 L30 14 L42 16 L33 24 L36 38 L24 32 L12 38 L15 24 L6 16 L18 14 Z" fill="currentColor" fillOpacity="0.18"/>
      <path d="M24 4 L30 14 L42 16 L33 24 L36 38 L24 32 L12 38 L15 24 L6 16 L18 14 Z"/>
      <circle cx="24" cy="22" r="4" fill="currentColor" stroke="none"/>
    </svg>
  ),

  // ====== ADMISSION 4 PASOS (overview) ======

  /* Formulario / clipboard — Inscripción */
  clipboard: (size = 42) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <rect x="10" y="8" width="28" height="34" rx="3" fill="currentColor" fillOpacity="0.12"/>
      <rect x="10" y="8" width="28" height="34" rx="3"/>
      <rect x="18" y="4" width="12" height="8" rx="2" fill="currentColor"/>
      <path d="M16 22 L21 26 L32 16" stroke="currentColor" strokeWidth="2.4" fill="none"/>
      <path d="M16 32h16"/>
    </svg>
  ),

  /* Documentos / folder */
  folder: (size = 42) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M6 14 V38 Q6 42 10 42 H38 Q42 42 42 38 V18 Q42 14 38 14 H24 L20 10 H10 Q6 10 6 14 Z" fill="currentColor" fillOpacity="0.14"/>
      <path d="M6 14 V38 Q6 42 10 42 H38 Q42 42 42 38 V18 Q42 14 38 14 H24 L20 10 H10 Q6 10 6 14 Z"/>
      <path d="M14 24 H34 M14 30 H28"/>
    </svg>
  ),

  /* Estetoscopio — Exámenes médicos */
  stethoscope: (size = 42) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M10 6 V18 Q10 26 18 26 Q26 26 26 18 V6"/>
      <path d="M26 26 Q26 36 36 36"/>
      <circle cx="36" cy="38" r="4" fill="currentColor" fillOpacity="0.18"/>
      <circle cx="36" cy="38" r="4"/>
      <circle cx="10" cy="6" r="2" fill="currentColor" stroke="none"/>
      <circle cx="26" cy="6" r="2" fill="currentColor" stroke="none"/>
    </svg>
  ),

  /* Globo de diálogo — Entrevistas */
  dialog: (size = 42) => (
    <svg viewBox="0 0 48 48" width={size} height={size} fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M8 10 H40 Q44 10 44 14 V32 Q44 36 40 36 H24 L14 44 V36 H8 Q4 36 4 32 V14 Q4 10 8 10 Z" fill="currentColor" fillOpacity="0.14"/>
      <path d="M8 10 H40 Q44 10 44 14 V32 Q44 36 40 36 H24 L14 44 V36 H8 Q4 36 4 32 V14 Q4 10 8 10 Z"/>
      <circle cx="16" cy="22" r="1.6" fill="currentColor" stroke="none"/>
      <circle cx="24" cy="22" r="1.6" fill="currentColor" stroke="none"/>
      <circle cx="32" cy="22" r="1.6" fill="currentColor" stroke="none"/>
    </svg>
  ),
};

window.CmgsIcons = CmgsIcons;
