:root{
  --orange:#f57c00;
  --blue:#0b3d91;
  --gray:#4b5563;
  --white:#ffffff;
  --bg:#f6f7fb;
  --card:#ffffff;
  --border:rgba(0,0,0,.08);
  --shadow:0 10px 30px rgba(0,0,0,.10);
  --radius:18px;
  --focus: 0 0 0 4px rgba(245,124,0,.25);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: #0f172a;
  line-height:1.5;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.container{
  width:min(1100px, calc(100% - 32px));
  margin: 20px auto 40px auto;
}

/* HEADER */
.site-header{
  position: sticky;
  top:0;
  z-index:50;
  background: var(--orange);
  border-bottom: 1px solid rgba(0,0,0,.12);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
}


.brand{
  display:flex;
  gap:12px;
  align-items:center;
}
.brand-logo{
  width:52px;
  height:52px;
  border-radius: 14px;
  object-fit:cover;
  border:1px solid var(--border);
  background: var(--white);
}
.brand-title{
  font-weight:800;
  letter-spacing:.2px;
  color: var(--blue);
}
.brand-subtitle{
  font-size:.92rem;
  color: var(--gray);
}

.admin-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: var(--white);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.admin-link:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(11,61,145,.25);
}
.admin-link:focus-visible{ outline:none; box-shadow: var(--focus); }
.admin-text{ font-weight:700; color: var(--gray); }

/* CAROUSEL */
.carousel{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  margin-top: 10px;
}
.carousel-track{
display:flex;
  transition: transform 1.2s ease-in-out;
  will-change: transform;
  height: 250px;
}



.carousel-btn:focus-visible{ outline:none; box-shadow: var(--focus); }



.carousel-dots{
  display:flex;
  justify-content:center;
  gap:10px;
  padding: 12px;
  background: rgba(11,61,145,.03);
  border-top: 1px solid var(--border);
}
.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.2);
  background: rgba(0,0,0,.1);
}
.dot.active{
  background: var(--orange);
  border-color: rgba(245,124,0,.5);
}

/* HOME BUTTONS */
.home-actions{
  display:flex;
  flex-direction: column; /* disposición vertical */
  gap: 16px;
  margin-top: 18px;
}
.card-button{
  display:flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  align-items:center;
}
.card-button:hover{
  transform: translateY(-2px);
  border-color: rgba(245,124,0,.35);
  box-shadow: 0 14px 36px rgba(0,0,0,.12);
}
.card-button:focus-visible{ outline:none; box-shadow: var(--focus); }
.card-icon{
  font-size: 34px;
  width: 56px;
  height: 56px;
  display:grid;
  place-items:center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245,124,0,.15), rgba(11,61,145,.10));
  border: 1px solid var(--border);
}
.card-text h2{
  margin:0;
  font-size: 1.15rem;
  color: var(--blue);
}
.card-text p{
  margin: 4px 0 0 0;
  color: var(--gray);
}

/* PAGES */
.page-title{
  margin: 6px 0 14px 0;
  font-size: 1.6rem;
  color: var(--blue);
}
.grid-buttons{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.pill{
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding: 14px 12px;
  border-radius: 999px;
  background: var(--white);
  border:1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  font-weight: 700;
  color: #0f172a;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pill:hover{
  transform: translateY(-2px);
  border-color: rgba(11,61,145,.28);
  box-shadow: 0 14px 32px rgba(0,0,0,.10);
}
.pill:focus-visible{ outline:none; box-shadow: var(--focus); }

/* FOOTER */
.site-footer{
  border-top: 1px solid rgba(0,0,0,.12);
  background: var(--orange);
  padding: 16px;
}

.footer-inner{
  width:min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-label{ color: var(--gray); font-weight:700; margin-right:8px; }
.social{
  width:25px;
  height:25px;
  border-radius: 6px;
  border:1px solid rgba(255,255,255,.35);
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.15);
}


.social:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.social:focus-visible{ outline:none; box-shadow: var(--focus); }

/* FORMS / ADMIN */
.form-card, .panel-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.field{
  display:grid;
  gap:6px;
  margin-bottom: 12px;
}
.field span{ color: var(--gray); font-weight:700; }
input{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.15);
  outline:none;
}
input:focus{ box-shadow: var(--focus); border-color: rgba(245,124,0,.6); }

.btn-primary, .btn-ghost, .btn-danger{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor:pointer;
  font-weight:800;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary{
  background: linear-gradient(135deg, var(--orange), #ff9a2e);
  color: #1b1b1b;
  box-shadow: 0 10px 24px rgba(245,124,0,.25);
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 14px 30px rgba(245,124,0,.30); }
.btn-primary:focus-visible{ outline:none; box-shadow: var(--focus); }

.btn-ghost{
  background: var(--white);
  border-color: var(--border);
  color: var(--blue);
}
.btn-ghost:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost:focus-visible{ outline:none; box-shadow: var(--focus); }

.btn-danger{
  background: #ffe7e7;
  color: #7a0b0b;
  border-color: rgba(122,11,11,.18);
}
.btn-danger:hover{ transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.btn-danger:focus-visible{ outline:none; box-shadow: 0 0 0 4px rgba(122,11,11,.15); }

.check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin: 10px 0;
  color: var(--gray);
  font-weight:700;
}
.check input{ width: 18px; height: 18px; margin-top: 2px; }

.alert{
  background: rgba(245,124,0,.12);
  border:1px solid rgba(245,124,0,.30);
  padding: 12px 14px;
  border-radius: 16px;
  margin: 12px 0;
  color: #5a3a00;
  font-weight:700;
}
.muted{ color: var(--gray); }

.admin-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.admin-list{ display:grid; gap:12px; }
.admin-item{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px;
  background: var(--white);
  border:1px solid var(--border);
  border-radius: 16px;
}
.admin-thumb{
  width: 120px;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
  border:1px solid var(--border);
}
.admin-meta{ flex:1; color: var(--gray); }

/* SPLASH */
.splash-body{
  background: radial-gradient(circle at 30% 20%, rgba(245,124,0,.18), transparent 40%),
              radial-gradient(circle at 70% 70%, rgba(11,61,145,.14), transparent 45%),
              var(--bg);
}
.splash-wrap{
  height:100vh;
  display:grid;
  place-items:center;
  gap:14px;
  padding: 20px;
}
.splash-logo{
  width: 280px;
  height: 280px;
  border-radius: 50%; /* círculo perfecto */
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display:grid;
  place-items:center;
  position: relative;
  overflow: hidden;
}

.splash-logo img{
  width: 200px;
  height: 200px;
  border-radius: 0;            /* sin esquinas recortadas */
  object-fit: contain;        /* escudo completo */
  background: transparent;
  border: 0;                  /* sin borde alrededor */
}

.sweep{
  position:absolute;
  inset:-20%;
  background: conic-gradient(from 0deg,
    rgba(245,124,0,.0) 0%,
    rgba(245,124,0,.55) 12%,
    rgba(245,124,0,.0) 24%,
    rgba(11,61,145,.0) 50%,
    rgba(11,61,145,.55) 62%,
    rgba(11,61,145,.0) 74%,
    rgba(245,124,0,.0) 100%);
  animation: sweep 2s linear forwards;
}
@keyframes sweep{
  from{ transform: rotate(0deg); opacity:1; }
  to{ transform: rotate(360deg); opacity: 0.2; }
}
.splash-text{
  margin:0;
  font-weight:900;
  letter-spacing:.3px;
  color: var(--blue);
  font-size: 1.2rem;
}

/* RESPONSIVE */
@media (max-width: 900px){
  
  
  

  

  .grid-buttons{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  
  
  

  .admin-text{ display:none; }
  .home-actions{
  display:flex;
  flex-direction: column; /* disposición vertical */
  gap: 16px;
  margin-top: 18px;
}
  

  .grid-buttons{ grid-template-columns: 1fr; }
}

/* Header/Footer orange theme adjustments */
.brand-title{ color: var(--white); }
.brand-subtitle{ color: rgba(255,255,255,.9); }
.admin-link{ background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); }
.admin-text{ color: var(--white); }
.admin-link:hover{ border-color: rgba(255,255,255,.55); }

.social img{
  width:25px;
  height:25px;
  object-fit: contain;
  display:block;
}


.footer-label{ display:none; }

/* Iconos con imagen en tarjetas home */
.card-icon-img{
  width: 56px;
  height: 56px;
  display:grid;
  place-items:center;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  flex: 0 0 auto;
}
.card-icon-img img{
  width: 40px;
  height: 40px;
  object-fit: contain;
  display:block;
}

.doc-section{
  margin-top: 18px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.section-title{
  margin: 0 0 12px 0;
  color: var(--blue);
  font-size: 1.15rem;
}


/* --- FIX footer social icons alignment --- */
.site-footer .footer-inner{ align-items:center; }
.site-footer .social{
  width:25px;
  height:25px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  padding:0;
  margin:0;
  overflow:hidden;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.15);
}
.site-footer .social img{
  width:25px;
  height:25px;
  display:block;
  margin:0;
  padding:0;
  object-fit:contain;
}

/* --- Carrusel responsive: móvil --- */
@media (max-width: 640px){
  .carousel-item{ height: 200px; }
  .carousel-btn{ height: 200px; }
  .carousel-item img{ height: 200px; }
}


/* --- FIX carrusel: mostrar SOLO 1 imagen por vez --- */
.carousel{ overflow:hidden; }
.carousel-track{
  display:flex;
  width: 100%;
  height: 250px; /* desktop */
}
.carousel-item{
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  height: 250px; /* desktop */
  display:flex;
  align-items:center;
  justify-content:center;
}
.carousel-btn{
  width: 100%;
  height: 250px; /* desktop */
  padding:0;
  border:0;
  background: transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.carousel-item img{
  height: 250px; /* desktop */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display:block;
  border:0;
  background: transparent;
}

/* Móvil: 200px */
@media (max-width: 640px){
  .carousel-track{ height: 200px; }
  .carousel-item{ height: 200px; }
  .carousel-btn{ height: 200px; }
  .carousel-item img{ height: 200px; }
}


/* naranja muy suave */
  border-color: #FFD8A8;
}

.doc-profesorado{
  background: #E7F5FF;        /* azul muy suave */
  border-color: #A5D8FF;
}

.doc-centro{
  background: #F1F3F5;        /* gris claro */
  border-color: #CED4DA;
}

.doc-guias{
  background: #F3F0FF;        /* violeta suave */
  border-color: #D0BFFF;
}


/* --- FIX colores documentos (override fuerte) --- */
.doc-section.doc-alumnado{
  background-color: #FFF4E6 !important;
  border-color: #FFD8A8 !important;
}

.doc-section.doc-profesorado{
  background-color: #E7F5FF !important;
  border-color: #A5D8FF !important;
}

.doc-section.doc-centro{
  background-color: #F1F3F5 !important;
  border-color: #CED4DA !important;
}

.doc-section.doc-guias{
  background-color: #F3F0FF !important;
  border-color: #D0BFFF !important;
}

/* SPLASH responsive logo */
@media (max-width: 420px){
  .splash-logo{ width: 240px; height: 240px; }
  .splash-logo img{ width: 175px; height: 175px; }
}
