/* =========================================================
   SIAPE – Estilos Institucionales
   Paleta: Gobierno de la Provincia de Buenos Aires / Re.I.N.A.
   ========================================================= */

/* ---- Variables de color institucional ---- */
:root {
    --celeste:        #00aec3;
    --celeste-light:  #74c9e3;
    --celeste-soft:   #a3d8e7;
    --celeste-pale:   #cae7ea;
    --celeste-hover:  #0098ab;
    --gris:           #838383;
    --gris-light:     #f4f6f8;
    --gris-border:    #dee2e6;
    --negro:          #1a1a2e;
    --blanco:         #ffffff;
    --rojo-inst:      #BE1717;
    --violeta-inst:   #592673;
    --azul-inst:      #1f3464;
    --verde-inst:     #22a954;
    --shadow-sm:      0 2px 8px rgba(0, 174, 195, 0.12);
    --shadow-md:      0 4px 20px rgba(0, 174, 195, 0.18);
    --shadow-hover:   0 8px 32px rgba(0, 174, 195, 0.28);
    --radius:         12px;
    --radius-sm:      8px;
    --transition:     all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f7f9;
    color: var(--negro);
    font-size: 15px;
    line-height: 1.6;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--blanco);
    border-bottom: 3px solid var(--celeste);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--azul-inst);
    padding: 10px 0;
}

.header-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.header-logo-right {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.header-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-gov {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 600;
    font-size: 10px;
    color: var(--celeste-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-name {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--blanco);
    letter-spacing: 0.02em;
}

.header-organism {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: right;
}

.organism-name {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: var(--blanco);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.organism-sub {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: var(--celeste-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-bottom {
    background: var(--blanco);
    border-bottom: 1px solid var(--celeste-pale);
}

.siape-badge {
    background: var(--celeste);
    color: var(--blanco);
    font-family: 'Encode Sans', sans-serif;
    font-weight: 800;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.header-title {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--azul-inst);
}

.header-subtitle {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--gris);
    letter-spacing: 0.04em;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb-bar {
    background: var(--celeste-pale);
    border-bottom: 1px solid var(--celeste-soft);
}

.breadcrumb {
    font-size: 13px;
    --bs-breadcrumb-divider-color: var(--celeste);
    --bs-breadcrumb-item-active-color: var(--celeste-hover);
}

.breadcrumb-item { color: var(--azul-inst); }
.breadcrumb-item a { color: var(--celeste-hover); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* =============================================
   MAIN
   ============================================= */
.main-content { min-height: calc(100vh - 280px); }

/* ---- Intro Banner ---- */
.intro-banner {
    background: linear-gradient(135deg, var(--azul-inst) 0%, var(--celeste-hover) 100%);
    border-radius: var(--radius);
    padding: 36px 40px;
    color: var(--blanco);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.intro-banner::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.intro-title {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--blanco);
    margin-bottom: 10px;
}

.intro-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: rgba(255,255,255,0.92);
    margin-bottom: 16px;
}

.intro-text strong { font-weight: 700; color: var(--celeste-pale); }

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--celeste-pale);
    font-weight: 600;
}

.intro-icon-wrap {
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.intro-icon {
    font-size: 52px;
    color: rgba(255,255,255,0.9);
}

/* ---- Alert Institucional ---- */
.alert-inst {
    background: linear-gradient(135deg, #e8f7fa 0%, var(--celeste-pale) 100%);
    border: 1px solid var(--celeste-soft);
    border-left: 5px solid var(--celeste);
    color: var(--azul-inst);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.alert-inst strong { color: var(--celeste-hover); }

/* ---- Section Titles ---- */
.section-title {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--azul-inst);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--celeste);
    display: inline-block;
}

/* =============================================
   DOWNLOAD CARDS
   ============================================= */
.download-card {
    background: var(--blanco);
    border-radius: var(--radius);
    border: 1px solid var(--gris-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--celeste-soft);
}

.download-card-header {
    background: linear-gradient(135deg, var(--azul-inst) 0%, #2a4580 100%);
    padding: 20px 20px 16px;
}

.download-number {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}

.download-icon-wrap {
    font-size: 40px;
    color: var(--celeste-light);
    margin-top: 10px;
    line-height: 1;
}

.download-card-body {
    padding: 20px;
    flex: 1;
}

.download-title {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--azul-inst);
    margin-bottom: 8px;
    line-height: 1.3;
}

.download-desc {
    font-size: 13px;
    color: var(--gris);
    line-height: 1.5;
    margin-bottom: 12px;
}

.download-meta {
    font-size: 12px;
    color: var(--celeste-hover);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.download-card-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--gris-border);
    background: var(--gris-light);
}

/* ---- Botones de Descarga ---- */
.btn-download {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    filter: brightness(1.08);
}

.btn-download:active { transform: translateY(0); }

/* Colores específicos por botón */
.btn-siape          { background: var(--celeste);    color: var(--blanco); }
.btn-siape:hover    { background: var(--celeste-hover); color: var(--blanco); }

.btn-siape-portable { background: #0e7c8a; color: var(--blanco); }
.btn-siape-portable:hover { background: #0a6270; color: var(--blanco); }

.btn-java           { background: var(--azul-inst);  color: var(--blanco); }
.btn-java:hover     { background: #162849; color: var(--blanco); }

.btn-showmypc       { background: var(--violeta-inst); color: var(--blanco); }
.btn-showmypc:hover { background: #451d5c; color: var(--blanco); }

.btn-pdf            { background: var(--rojo-inst);  color: var(--blanco); }
.btn-pdf:hover      { background: #9e1212; color: var(--blanco); }

/* ---- Badges ---- */
.badge {
    font-family: 'Encode Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-primary-inst  { background: var(--celeste);      color: var(--blanco); }
.badge-teal          { background: #0e7c8a;              color: var(--blanco); }
.badge-warning-inst  { background: #f59e0b;              color: var(--blanco); }
.badge-violet        { background: var(--violeta-inst);  color: var(--blanco); }
.badge-green         { background: var(--verde-inst);    color: var(--blanco); }

/* =============================================
   STEPS / REQUIREMENTS
   ============================================= */
.requirements-section {
    background: var(--blanco);
    border-radius: var(--radius);
    border: 1px solid var(--gris-border);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.step-card {
    background: linear-gradient(135deg, var(--celeste-pale) 0%, #e8f7fa 100%);
    border: 1px solid var(--celeste-soft);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.step-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--celeste);
}

.step-num {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    background: var(--celeste);
    color: var(--blanco);
    border-radius: 50%;
    font-family: 'Encode Sans', sans-serif;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 36px;
    color: var(--azul-inst);
    margin-bottom: 12px;
    display: block;
}

.step-title {
    font-family: 'Encode Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--azul-inst);
    margin-bottom: 8px;
}

.step-text {
    font-size: 12px;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--azul-inst);
    color: var(--blanco);
    margin-top: 60px;
}

.footer-text {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.footer-link {
    color: var(--celeste-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--blanco);
    text-decoration: underline;
}

.footer-divider {
    border-color: rgba(255,255,255,0.12);
    margin: 12px 0;
}

.footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-family: 'Roboto', sans-serif;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .header-top .d-flex { gap: 12px; }
    .header-name { font-size: 15px; }
    .intro-banner { padding: 24px 20px; }
    .intro-title { font-size: 20px; }
    .requirements-section { padding: 20px 16px; }
    .download-card-header { padding: 16px 16px 12px; }
    .download-card-body { padding: 16px; }
    .download-card-footer { padding: 12px 16px 16px; }
    .btn-download { font-size: 12px; padding: 10px 12px; }
}

@media (max-width: 576px) {
    .organism-name, .organism-sub { font-size: 10px; }
    .header-logo-right { display: none; }
}

/* ---- Animación de carga ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.download-card {
    animation: fadeInUp 0.4s ease both;
}

.download-card:nth-child(1) { animation-delay: 0.05s; }
.download-card:nth-child(2) { animation-delay: 0.10s; }
.download-card:nth-child(3) { animation-delay: 0.15s; }
.download-card:nth-child(4) { animation-delay: 0.20s; }
.download-card:nth-child(5) { animation-delay: 0.25s; }
.download-card:nth-child(6) { animation-delay: 0.30s; }
