/* 08-responsive */
@media (max-width: 1180px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
  }

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

  .hero-card-main {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .admin-wrap {
    grid-template-columns: 1fr;
  }

  .timing-form {
    position: static;
  }

  .create-race-wrap {
    grid-template-columns: 1fr;
  }

  .inline-grid-auth {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: flex-start;
  }

  .row-2,
  .hero-highlight-grid,
  .weather-metrics {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.84rem;
  }

  th,
  td {
    padding: 11px 10px;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 14px 10px 24px;
  }

  .header-inner {
    padding: 14px 12px;
    gap: 12px;
  }

  .header-left {
    gap: 12px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .header-title h1 {
    font-size: 1.3rem;
  }

  .header-title p {
    font-size: 0.86rem;
  }

  .brand-topline {
    font-size: 0.68rem;
  }

  .nav {
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    justify-content: flex-start;
  }

  .btn-nav {
    flex: 1 1 calc(50% - 8px);
  }

  .btn {
    padding: 9px 11px;
    font-size: 0.84rem;
  }

  .table-header {
    padding: 13px 14px;
  }

  .table-header h3 {
    font-size: 0.96rem;
  }

  table {
    font-size: 0.74rem;
  }

  th,
  td {
    padding: 9px 8px;
  }

  .timing-form {
    padding: 16px;
  }

  .form-group select,
  .form-group input {
    padding: 10px 11px;
    font-size: 0.92rem;
  }

  .flag {
    width: 16px;
    height: 11px;
  }

  .class-badge {
    padding: 3px 7px;
    font-size: 0.72rem;
  }

  .hero-card-main {
    padding: 24px 18px;
  }

  .hero-copy {
    margin-bottom: 18px;
  }

  .home-featured-race,
  .home-featured-empty {
    padding: 18px;
    border-radius: 18px;
  }

  .home-featured-title {
    font-size: 1.28rem;
  }

  .home-featured-meta,
  .home-featured-details {
    gap: 6px;
  }

  .home-featured-meta span,
  .home-featured-details span {
    min-height: 26px;
    padding: 5px 8px;
    font-size: 0.76rem;
  }

  .home-operational-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-results-shell {
    margin-top: 22px;
  }

  .home-operational-grid {
    grid-template-columns: 1fr;
  }

  .hero-card-main::after {
    width: 240px;
    height: 240px;
    right: -120px;
    bottom: -110px;
  }

  .hero-side-card {
    min-height: auto;
    padding: 18px 16px;
  }

  .home-dossier-card {
    padding: 16px;
    border-radius: 18px;
  }

  .home-dossier-lines span {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .hero-card h2 {
    font-size: 1.75rem;
  }

  .hero-card p {
    font-size: 0.94rem;
  }

  .race-list {
    padding: 12px;
  }

  .race-list-item-name {
    max-width: 100%;
  }

  .home-carousel-arrow {
    display: none;
  }

  .home-result-card {
    flex-basis: 285px;
    min-width: 285px;
    max-width: 285px;
  }

  .home-scroll-hint {
    font-size: 0.68rem;
  }
}

@media (max-width: 1180px) {
  .race-admin-grid {
    grid-template-columns: 1fr;
  }

  .race-preview-sticky {
    position: static;
  }

  .rally-tramo-row,
  .rally-pasada-row,
  .rally-itinerario-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .race-admin-layout {
    padding: 12px;
  }

  .race-form-grid,
  .rally-tramo-row,
  .rally-pasada-row,
  .rally-itinerario-row {
    grid-template-columns: 1fr;
  }

  .race-form-head,
  .race-section-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .race-type-switch {
    width: 100%;
  }

  .race-type-option {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  #race-admin-tab-editar .rally-tramo-row,
  #race-admin-tab-editar .rally-pasada-row,
  #race-admin-tab-editar .rally-itinerario-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .rally-carnet-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rally-timeline-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .rally-timeline-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .rally-carnet-builder {
    grid-template-columns: 1fr;
  }

  .rally-carnet-tools,
  .rally-builder-actions {
    justify-content: stretch;
  }

  .rally-carnet-tools .btn,
  .rally-builder-actions .btn {
    width: 100%;
  }

  .rally-timeline-list {
    padding-left: 22px;
  }

  .rally-timeline-list::before {
    left: 9px;
  }

  .rally-timeline-item::before {
    left: -19px;
  }

  .rally-timeline-title {
    white-space: normal;
  }
}

@media (max-width: 680px) {
  .crew-cell {
    min-width: 150px;
  }

  .rally-tramos-output {
    padding: 12px;
  }
}

@media (max-width: 680px) {
  .rally-itinerary-output {
    padding: 12px;
  }

  .rally-itinerary-item {
    grid-template-columns: 1fr;
  }

  .rally-itinerary-time {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .rally-step-actions {
    justify-content: stretch;
  }

  .rally-step-actions .btn,
  .rally-step-actions .btn-primary-inline {
    width: 100%;
  }

  .rally-tramo-row.rally-tramo-row-simple {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .rally-itinerary-time {
    max-width: none;
    min-width: 0;
    justify-items: start;
    text-align: left;
  }
}
