/* =========== Variables =========== */
:root{
  --bg: #ffffff;            /* blanco */
  --sidebar: #000000;       /* negro */
  --accent: #87CEEB;        /* azul cielo (skyblue) */
  --text: #0f1724;
  --muted: #4b5563;
  --sidebar-w: 260px;
  --gap: 18px;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0,0,0,0.06);
  --input-border: #e5e7eb;
  --input-focus: #3b82f6;
  --success: #10b981;
  --error: #ef4444;
}

/* =========== Reset / Base =========== */
* { box-sizing: border-box; }
html,body { height: 100%; }
body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing:antiali}
/* =========== Layout =========== */
.app {
  display: flex;
  min-height: 100vh;
  gap: var(--gap);
}

/* ---------- Sidebar ---------- */
.sidebar{
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: white;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  position: relative;
  z-index: 40;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
}

.brand .logo{
  width:56px;
  height:56px;
  border-radius:8px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background: white;
  color: var(--text);
}

.brand-text h1{
  font-size:16px;
  margin:0;
  color: var(--accent);
}
.subtitle{ font-size:12px; opacity:.9; color: #fff; }

/* nav */
nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px;
}
.nav-link{
  display:block;
  padding:10px 12px;
  border-radius:8px;
  color: white;
  text-decoration:none;
  font-weight:600;
  transition: all 0.2s ease;
}
.nav-link:hover{ background: rgba(135,206,235,0.12); }
.nav-link.active{ background: var(--accent); color: black; }

/* footer + spacer */
.spacer{ flex:1; }
.sidebar .footer{ font-size:13px; color: rgba(255,255,255,0.75); }

/* ---------- Main ---------- */
.main{
  flex:1;
  padding: 28px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* Topbar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.mobile-toggle{
  display:none;
  background:none;
  border:0;
  color:var(--text);
  font-weight:700;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.mobile-toggle:hover {
  background-color: rgba(0,0,0,0.05);
}
.topbar-right{ display:flex; gap:12px; align-items:center; }
.page-title{ font-weight:700; }
.btn{
  display:inline-block;
  padding:8px 12px;
  border-radius:10px;
  background: var(--accent);
  color: black;
  text-decoration:none;
  font-weight:600;
  transition: all 0.2s ease;
}
.btn:hover {
  background: #5fbedb;
  transform: translateY(-1px);
}

/* =========== Page grid =========== */
.content-grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.content-grid.single-col {
  grid-template-columns: 1fr;
}

/* left column */
.left-col{ display:flex; flex-direction:column; gap:12px; }
.right-col{ display:flex; flex-direction:column; gap:12px; }

/* Folleto card */
.folleto-card{
  background:white;
  border-radius:12px;
  padding:12px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:stretch;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.folleto-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}




.image-square img.xx {
  width: 100%;
  height: 100%;
  object-fit: contain; /* asegura que no se recorte */
  padding: 10px;      /* espacio para que no quede pegada al borde */

}

.image-square img{ width:100%; height:100%; object-fit:cover; display:block; }
.hint{ font-size:13px; color: var(--muted); text-align:center; }

/* Article */
article{
  background:white;
  border-radius:12px;
  padding:18px;
  box-shadow: var(--shadow);
}
article h2{ margin-top:0; color: var(--accent); }
article p{ color: var(--muted); line-height:1.6; }
article ul { padding-left: 20px; }
article li { margin-bottom: 8px; color: var(--muted); }

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.value-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #f3f4f6;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.value-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: all 0.3s ease;
}

.value-icon.integrity { background: linear-gradient(135deg, #ddd6fe, #c7d2fe); color: #6366f1; }
.value-icon.innovation { background: linear-gradient(135deg, #fef3c7, #fed7aa); color: #f59e0b; }
.value-icon.quality { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #10b981; }
.value-icon.collaboration { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #ec4899; }
.value-icon.commitment { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #ef4444; }
.value-icon.excellence { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #ea580c; }

.value-card:hover .value-icon {
  transform: scale(1.1);
}

.value-card h3 {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.value-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.commitment-list {
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
}

.commitment-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
}

.commitment-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: bold;
}

/* =========== Forms =========== */
.login-container, .contact-form-container {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: black;
}

.form-header h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

.form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  background: white;
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.error-message {
  color: var(--error);
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
}

.checkbox-label input {
  width: auto;
  margin-right: 8px;
}

.forgot-password,
.register-link {
  color: var(--input-focus);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.forgot-password:hover,
.register-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.login-btn,
.contact-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent);
  color: black;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn:hover,
.contact-btn:hover {
  background: #5fbedb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(135, 206, 235, 0.3);
}

.login-btn:active,
.contact-btn:active {
  transform: translateY(0);
}

.form-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.form-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Contact Info */
.contact-info-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.contact-info-card h3 {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f3f4f6;
}

.contact-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.contact-icon {
  background: var(--accent);
  color: black;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.contact-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Success Message */
.success-message {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.success-message.show {
  display: block;
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* small helper blocks */
.spacer-block{ height:12px; }

/* Mini gallery */
.small-gallery .gallery-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.responsive-img-wrapper{ width:100%; aspect-ratio:1/1; border-radius:8px; overflow:hidden; }
.responsive-img-wrapper img{ width:100%; height:100%; object-fit:cover; display:block; }

/* =========== Responsive rules =========== */
@media (max-width: 920px){
  :root { --sidebar-w: 220px; }
  .content-grid{ grid-template-columns: 1fr; }
  .sidebar{
    position: fixed;
    left: -320px;
    top: 0;
    height: 100vh;
    transition: left .25s ease;
  }
  .sidebar.open{ left: 0; }
  .mobile-toggle{ display:inline-block; }
  .app.dimmed::after{
    content:'';
    position:fixed;
    inset:0;
    background: rgba(0,0,0,0.3);
    z-index: 30;
  }
  .main{ padding: 16px; }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 480px){
  .brand-text h1{ font-size:14px; }
  .folleto-card{ padding:8px; }
  article{ padding:14px; }
  .nav-link{ padding:10px; font-size:14px; }
  .login-container, .contact-form-container {
    padding: 20px;
  }
  .values-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .value-card {
    padding: 20px;
  }
  .value-icon {
    width: 60px;
    height: 60px;
  }
}

/* =========== Accessibility helpers =========== */
a:focus{ outline: 3px solid rgba(135,206,235,0.3); outline-offset: 2px; border-radius:6px; }
button:focus{ outline: 3px solid rgba(135,206,235,0.3); outline-offset: 2px; border-radius:6px; }
input:focus, select:focus, textarea:focus { outline: none; }

/* Smooth animations */
* {
  transition-property: transform, box-shadow, background-color, border-color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}