/* ============================================================
   LAYOUT.CSS
   Contenedores, grid, estructura global y navegacion
   Requiere: base.css
   ============================================================ */

/* ---- 1. Layout general ---- */
.layout {
  min-height: calc(100vh - 160px);
  background-color: var(--color-white);
}

@media (min-width: 768px) {
  .layout {
    min-height: calc(100vh - 80px);
  }
}

.layout__main--home,
.layout__main--home section {
  min-height: 0;
}

/* ---- 2. Contenedores ---- */
.container,
.u-container {
  display: block;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-4);
  padding-left: var(--space-4);
}

.container::after,
.u-container::after,
.u-clearfix::after,
.u-row::after {
  content: '';
  display: table;
  clear: both;
}

@media only screen and (min-width: 768px) {
  .container,
  .u-container {
    width: 750px;
    padding-right: 0;
    padding-left: 0;
  }
}

@media only screen and (min-width: 992px) {
  .container,
  .u-container {
    width: 970px;
  }
}

@media only screen and (min-width: 1200px) {
  .container,
  .u-container {
    width: 1200px;
  }
}

@media only screen and (min-width: 1600px) {
  .container,
  .u-container {
    width: 1320px;
  }
}

@media (max-width: 1200px) {
  .container,
  .u-container {
    padding: 20px 25px 0;
  }
}

/* ---- 3. Grid legacy reutilizable ---- */
.grid,
.u-grid {
  width: 100%;
  min-width: 0;
  margin-right: 0;
  margin-left: 0;
  padding-right: 5px;
  padding-left: 5px;
}

.grid::after,
.u-grid::after,
[class*='u-xs-col-'],
[class*='u-sm-col-'],
[class*='u-md-col-'],
[class*='u-lg-col-'] {
  box-sizing: border-box;
}

[class*='u-xs-col-'],
[class*='u-sm-col-'],
[class*='u-md-col-'],
[class*='u-lg-col-'] {
  float: none;
  width: 100%;
  margin: 10px 0;
  padding-left: 0;
}

[class*='u-xs-col-'] {
  float: left;
  margin: 0 0 10px;
  padding-right: 5px;
  padding-left: 5px;
}

.u-xs-col-1-1,
.u-xs-col-7-7,
.u-xs-col-12-12 {
  width: 100%;
}

.u-xs-col-1-12 { width: 8.3333333333%; }
.u-xs-col-2-12 { width: 16.6666666667%; }
.u-xs-col-3-12 { width: 25%; }
.u-xs-col-4-12 { width: 33.3333333333%; }
.u-xs-col-5-12 { width: 41.6666666667%; }
.u-xs-col-6-12 { width: 50%; }
.u-xs-col-7-12 { width: 58.3333333333%; }
.u-xs-col-8-12 { width: 66.6666666667%; }
.u-xs-col-9-12 { width: 75%; }
.u-xs-col-10-12 { width: 83.3333333333%; }
.u-xs-col-11-12 { width: 91.6666666667%; }

.u-xs-col-1-7 { width: 14.2857142857%; }
.u-xs-col-2-7 { width: 28.5714285714%; }
.u-xs-col-3-7 { width: 42.8571428571%; }
.u-xs-col-4-7 { width: 57.1428571429%; }
.u-xs-col-5-7 { width: 71.4285714286%; }
.u-xs-col-6-7 { width: 85.7142857143%; }

@media handheld, only screen and (min-width: 768px) {
  .grid,
  .u-grid {
    max-width: 1140px;
    margin: 0 auto;
  }

  [class*='u-sm-col-'] {
    float: left;
    min-height: 1px;
    margin-top: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .u-sm-col-1-1,
  .u-sm-col-7-7,
  .u-sm-col-5-5,
  .u-sm-col-12-12 { width: 100%; }
  .u-sm-col-1-12 { width: 8.3333333333%; }
  .u-sm-col-2-12 { width: 16.6666666667%; }
  .u-sm-col-3-12 { width: 25%; }
  .u-sm-col-4-12 { width: 33.3333333333%; }
  .u-sm-col-5-12 { width: 41.6666666667%; }
  .u-sm-col-6-12 { width: 50%; }
  .u-sm-col-7-12 { width: 58.3333333333%; }
  .u-sm-col-8-12 { width: 66.6666666667%; }
  .u-sm-col-9-12 { width: 75%; }
  .u-sm-col-10-12 { width: 83.3333333333%; }
  .u-sm-col-11-12 { width: 91.6666666667%; }
  .u-sm-col-1-7 { width: 14.2857142857%; }
  .u-sm-col-2-7 { width: 28.5714285714%; }
  .u-sm-col-3-7 { width: 42.8571428571%; }
  .u-sm-col-4-7 { width: 57.1428571429%; }
  .u-sm-col-5-7 { width: 71.4285714286%; }
  .u-sm-col-6-7 { width: 85.7142857143%; }
  .u-sm-col-1-5 { width: 20%; }
  .u-sm-col-2-5 { width: 40%; }
  .u-sm-col-3-5 { width: 60%; }
  .u-sm-col-4-5 { width: 80%; }
}

@media handheld, only screen and (min-width: 992px) {
  [class*='u-md-col-'] {
    float: left;
    min-height: 1px;
    margin-top: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .u-md-col-1-1,
  .u-md-col-7-7,
  .u-md-col-5-5,
  .u-md-col-12-12 { width: 100%; }
  .u-md-col-1-12 { width: 8.3333333333%; }
  .u-md-col-2-12 { width: 16.6666666667%; }
  .u-md-col-3-12 { width: 25%; }
  .u-md-col-4-12 { width: 33.3333333333%; }
  .u-md-col-5-12 { width: 41.6666666667%; }
  .u-md-col-6-12 { width: 50%; }
  .u-md-col-7-12 { width: 58.3333333333%; }
  .u-md-col-8-12 { width: 66.6666666667%; }
  .u-md-col-9-12 { width: 75%; }
  .u-md-col-10-12 { width: 83.3333333333%; }
  .u-md-col-11-12 { width: 91.6666666667%; }
  .u-md-col-1-7 { width: 14.2857142857%; }
  .u-md-col-2-7 { width: 28.5714285714%; }
  .u-md-col-3-7 { width: 42.8571428571%; }
  .u-md-col-4-7 { width: 57.1428571429%; }
  .u-md-col-5-7 { width: 71.4285714286%; }
  .u-md-col-6-7 { width: 85.7142857143%; }
  .u-md-col-1-5 { width: 20%; }
  .u-md-col-2-5 { width: 40%; }
  .u-md-col-3-5 { width: 60%; }
  .u-md-col-4-5 { width: 80%; }
}

@media handheld, only screen and (min-width: 1200px) {
  [class*='u-lg-col-'] {
    float: left;
    min-height: 1px;
    margin-top: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .u-lg-col-1-1,
  .u-lg-col-7-7,
  .u-lg-col-5-5,
  .u-lg-col-12-12 { width: 100%; }
  .u-lg-col-1-12 { width: 8.3333333333%; }
  .u-lg-col-2-12 { width: 16.6666666667%; }
  .u-lg-col-3-12 { width: 25%; }
  .u-lg-col-4-12 { width: 33.3333333333%; }
  .u-lg-col-5-12 { width: 41.6666666667%; }
  .u-lg-col-6-12 { width: 50%; }
  .u-lg-col-7-12 { width: 58.3333333333%; }
  .u-lg-col-8-12 { width: 66.6666666667%; }
  .u-lg-col-9-12 { width: 75%; }
  .u-lg-col-10-12 { width: 83.3333333333%; }
  .u-lg-col-11-12 { width: 91.6666666667%; }
  .u-lg-col-1-7 { width: 14.2857142857%; }
  .u-lg-col-2-7 { width: 28.5714285714%; }
  .u-lg-col-3-7 { width: 42.8571428571%; }
  .u-lg-col-4-7 { width: 57.1428571429%; }
  .u-lg-col-5-7 { width: 71.4285714286%; }
  .u-lg-col-6-7 { width: 85.7142857143%; }
  .u-lg-col-1-5 { width: 20%; }
  .u-lg-col-2-5 { width: 40%; }
  .u-lg-col-3-5 { width: 60%; }
  .u-lg-col-4-5 { width: 80%; }
}

/* ---- 4. Header secundario legacy ---- */
.c-header {
  position: relative;
  width: 100%;
  height: 90px;
  padding-top: 70px;
  background-color: var(--color-white);
}

.c-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-header);
  display: block;
  width: 100%;
  height: 80px;
  background-color: var(--color-white);
}

@media (min-width: 992px) {
  .c-header {
    padding-top: 0;
  }

  .c-header::before {
    display: none;
  }
}

.c-header__menu-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  z-index: var(--z-header);
  cursor: pointer;
  transform: translateY(-50%);
}

@media (min-width: 992px) {
  .c-header__menu-icon {
    display: none;
  }
}

.c-header__menu {
  position: absolute;
  top: 70px;
  z-index: 3;
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  padding: 10px 20px;
  background-color: var(--color-primary);
  transform: translateY(-100%);
}

.m-open .c-header__menu {
  transform: translateY(0);
}

@media (max-width: 992px) {
  .m-open .c-header__menu {
    border-top: 4px solid var(--color-primary);
    box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, 0.2);
  }
}

@media (min-width: 992px) {
  .c-header__menu {
    position: static;
    padding: 0 10px;
    background-color: transparent;
    transform: none;
  }
}

.c-header__logo,
.c-header__logo-user {
  position: absolute;
  top: 50%;
  z-index: var(--z-header);
  transform: translateY(-50%) translateX(-50%);
}

.c-header__logo {
  left: 50%;
}

.c-header__logo-user {
  left: 125px;
}

.c-header__logo__img {
  width: 200px;
}

@media (min-width: 992px) {
  .c-header__logo {
    left: 10px;
    transform: translateY(-50%);
  }
}

@media (min-width: 1200px) {
  .c-header__logo {
    left: calc(50% - 570px);
  }
}

@media (min-width: 1600px) {
  .c-header__logo {
    left: calc(50% - 670px);
  }
}

.c-header__lang {
  position: absolute;
  top: 50%;
  right: 94px;
  z-index: 5;
  cursor: pointer;
  border-radius: 15px;
  background-color: hsla(0, 0%, 94.9%, 0.5);
  transform: translateY(-50%);
}

.c-header__lang .c-lang-picker__select select {
  padding-right: 15px;
  color: var(--color-black);
  text-align-last: center;
  text-transform: uppercase;
  direction: rtl;
  background-color: transparent;
}

.c-header__lang .c-lang-picker__select::after {
  top: 12px;
  right: 5px;
  width: 0;
  height: 0;
  border-top: 7px solid var(--color-black);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transform: none;
}

.c-header__logout {
  position: absolute;
  top: 32px;
  right: 40px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ---- 5. Navbar principal ---- */
.navbar {
  position: relative;
  z-index: var(--z-navbar);
  width: 100%;
  background-color: var(--color-black);
}

@media (min-width: 992px) {
  .navbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: 108px;
    padding: 0 100px;
  }
}

.navbar__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
}

@media (min-width: 992px) {
  .navbar__topbar {
    height: auto;
    padding: 0;
    flex-shrink: 0;
  }
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar__logo-img {
  display: block;
  width: 193px;
  max-width: 100%;
  height: 33px;
}

@media (max-width: 991px) {
  .navbar__logo-img {
    width: 164px;
    height: 28px;
  }
}

.navbar__logo-text {
  color: var(--color-white);
  font-family: var(--font-semibold);
  font-size: var(--fs-base);
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.navbar__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
}

@media (min-width: 992px) {
  .navbar__hamburger {
    display: none;
  }
}

.navbar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 992px) {
  .navbar__list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}

@media (max-width: 991px) {
  .navbar__list {
    display: none;
    flex-direction: column;
    padding: 16px 24px 24px;
  }

  .navbar__list.is-mobile-open {
    display: flex;
  }
}

.navbar__item {
  position: static;
}

.navbar__item--logout {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid hsla(0, 0%, 100%, 0.15);
}

@media (min-width: 992px) {
  .navbar__item--mobile-only {
    display: none;
  }
}

.navbar__item-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: var(--color-white);
  font-family: var(--font-semibold);
  font-size: var(--fs-base);
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast);
}

@media (max-width: 991px) {
  .navbar__item-btn {
    width: 100%;
    padding: 14px 0;
  }
}

.navbar__item-btn:hover,
.navbar__item.is-active > .navbar__item-btn,
.navbar__item.is-open > .navbar__item-btn,
.navbar__item-btn.m-current,
.navbar__panel-link.m-current {
  color: var(--color-primary);
}

.navbar__item-btn:focus,
.navbar__item-btn:focus-visible,
.navbar__panel-link:focus,
.navbar__panel-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  background: rgba(255, 0, 0, 0.08);
}

.navbar__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
}

.navbar__item-icon img,
img.navbar__item-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.navbar__item-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.navbar__item-chevron.is-rotated {
  transform: rotate(180deg);
}

.navbar__panel {
  display: none;
}

.navbar__item--dropdown.is-open > .navbar__panel {
  display: flex;
}

@media (min-width: 992px) {
  .navbar__panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    width: 100%;
    padding: 48px 64px;
    background-color: var(--color-black);
    align-items: flex-start;
    gap: 48px;
  }
}

@media (max-width: 991px) {
  .navbar__panel {
    flex-direction: column;
    padding: 0 0 8px 24px;
  }
}

.navbar__panel-title,
.navbar__panel-divider {
  display: none;
}

@media (min-width: 992px) {
  .navbar__panel-title {
    display: block;
    min-width: 300px;
    max-width: 459px;
    margin: 0;
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 9.6rem;
    line-height: 0.85;
    letter-spacing: -0.32rem;
  }

  .navbar__panel-divider {
    display: block;
    width: 1px;
    align-self: stretch;
    background-color: hsla(0, 0%, 100%, 0.3);
  }
}

.navbar__panel-links {
  display: flex;
  flex-direction: column;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 991px) {
  .navbar__panel-links {
    gap: 0;
  }
}

.navbar__panel-link {
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-white);
  font-size: var(--fs-base);
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

@media (max-width: 991px) {
  .navbar__panel-link {
    padding: 12px 0;
  }
}

.navbar__panel-link:hover {
  color: var(--color-primary);
}

.navbar__backdrop {
  display: none;
}

@media (min-width: 992px) {
  .navbar__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    display: block;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
  }

  .navbar__item--dropdown.is-open ~ .navbar__backdrop {
    pointer-events: auto;
  }
}

/* ---- 6. Footer ---- */
.footer,
.site-footer {
  background-color: var(--color-black);
}

.footer__wrapper {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  max-width: 1920px;
  margin: 0 auto;
  overflow: hidden;
}

.footer__sponsors {
  padding: 30px 10px;
}

.footer__sponsor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  text-align: center;
}

.footer__sponsor-logo {
  max-width: 150px;
  max-height: 75px;
  padding: 10px 20px;
  vertical-align: middle;
}

.footer__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 30px 0;
  background: linear-gradient(180deg, var(--color-black) 10%, var(--color-primary) 90%),url('https://abonados.sevillafc.es/static/assets/genericos/images/footer/background.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-blend-mode: multiply;
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 30px 0;
}

.footer__social-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.footer__social-icon {
  width: 40px;
  height: 40px;
}

.footer__social-icon a img {
  width: 30px;
  height: 30px;
}

@media (max-width: 768px) {
  .footer__social-wrapper {
    gap: 10px;
  }

  .footer__social-icon a img {
    width: 25px;
    height: 25px;
  }
}

.footer__menu {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 70px;
  margin-top: 40px;
  padding: 0 20px;
}

@media (max-width: 992px) {
  .footer__menu {
    flex-direction: column;
    align-items: center;
  }
}

.footer__menu-group {
  display: flex;
  gap: 70px;
}

.footer__menu-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer__menu-title {
  color: var(--color-white);
  font-size: 1.9rem;
  text-transform: uppercase;
}

.footer__menu-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer__menu-buttons {
  display: flex;
  gap: 20px;
}

.footer__menu-buttons img {
  width: 140px;
}

.footer__menu-link {
  color: var(--color-white);
  font-size: var(--fs-md);
}

.footer__legal {
  order: 3;
  display: block;
  width: 100%;
  padding: 30px 15px 15px;
  background-color: var(--color-white);
}

@media (min-width: 992px) {
  .footer__legal {
    order: unset;
  }
}

.footer__legal-wrapper {
  display: flex;
  flex-direction: column;
  color: var(--color-black);
  text-align: center;
}

@media (min-width: 992px) {
  .footer__legal-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
}

@media (max-width: 992px) {
  .footer__legal-list {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .footer__legal-list {
    justify-content: center;
  }
}

.footer__legal-item {
  margin-right: 5px;
  padding-right: 8px;
  border-right: 1px solid var(--color-black);
  line-height: 1.2;
}

.footer__legal-item:last-child {
  border-right: 0;
}

.footer__legal-item a {
  color: var(--color-black);
  font-size: var(--fs-md);
  font-weight: 600;
}

.footer__legal-item a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .footer__legal-item a {
    font-size: var(--fs-base);
  }
}

.footer__legal-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin: 0.5rem 0;
  font-size: var(--fs-base);
}

@media (max-width: 768px) {
  .footer__legal-copy {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
}
