@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");

/* -------------- ROOT VARAIBLES --------------*/
:root {
  --color-primary: #132A44;
  --color-secondary: #22A38A;
  --color-tertiary: #F1B30D;
  --color-danger: #af0513;
  --color-danger: #af0513;
  --color-success: #139e3d;
  --color-warning: #eba235;
  --color-white: #fff;
  --color-black: black;
  --color-info-dark: #7d8da1;
  --color-info-light: #dce1eb;
  --color-dark: #363949;
  --color-light: rgba(132, 139, 200, 0.18);
  --color-primary-variant: #9b144f;
  --color-dark-variant: #677483;
  --color-background: rgb(235, 235, 235);
  --color-grey: #d6d6d6;

  --card-border-radius: 2rem;
  --border-radius-1: 0.4rem;
  --border-radius-2: 0.8rem;
  --border-radius-3: 1.2rem;

  --card-padding: 1.8rem;
  --padding-1: 1.2rem;

  --box-shadow: 0.5rem 1rem 1rem var(--color-light);
}

.dark-mode-variables{
    --color-background: #181a1e;
    --color-white: #202528;
    --color-dark: #edeffd;
    --color-dark-variant: #a3bdcc;
    --color-light: rgba(0, 0, 0, 0.4);
    --box-shadow: 0 2rem 3rem var(--color-light);
}

* {
  margin: 0;
  padding: 0;
  outline: 0;
  appearance: none;
  border: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
  }

body{
    width: 100%;
    height: 100vh;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    user-select: none;
    overflow-x: hidden;
    color: var(--color-dark);
    background-color: var(--color-background);
}

html {
  font-size: 14px;
}

a{
    color: var(--color-dark);
}

img{
    display: block;
    width: 100%;
    object-fit: cover;
}

h1{
    font-weight: 800;
    font-size: 1.8rem;
}

h2{
    font-weight: 600;
    font-size: 1.4rem;
}

h3{
    font-weight: 500;
    font-size: 0.87rem;
}

h4 {
  font-size: 0.8rem;  
}

h5 {
  font-size: 0.77rem;
}

small{
    font-size: 0.76rem;
}

p{
    color: var(--color-dark-variant);
}

b{
    color: var(--color-dark);
}

.text-muted{
    color: var(--color-info-dark);
}

.primary{
    color: var(--color-primary);
}

.secondary {
    color: var(--color-secondary)
}
.tertiary {
    color: var(--color-tertiary)
}

.danger{
    color: var(--color-danger);
}

.success{
    color: var(--color-success);
}

.warning{
    color: var(--color-warning);
}

.container{
  display: grid;
  max-width: 1300px;
  margin: 0 auto;
  gap: 2rem;
}

.container {
  display: grid;
  grid-template-columns: 1fr; /* sidebar colapsado */
  max-width: 1300px;
  width: 100%;
  margin: 0 auto; /* centra TODO */
  gap: 2rem;
  padding: 1rem;
  transition: 0.3s ease;
}

.container:has(aside:hover) {
  grid-template-columns: 1fr;
}

aside{
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 85px; /* colapsado */
  z-index: 1000;
}

aside:hover {
  width: 220px;
}

main {
    width: 100%;
    margin: 0 auto;
}

main {
  margin-left: 85px;
  width: calc(100% - 85px);
  transition: 0.3s ease;
}

aside .top{
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    top: 1.5rem;
    margin-bottom: 3.5rem;
    transition: transform 0.3s ease;
}

aside:hover .top{
    transform: translateX(-12px);
}

aside .logo {
    display: flex;
    gap: 0.8rem;
    margin: 0 auto;
  }
  
aside .logo img {
    width: 3.5rem;
    transition: transform 0.3s ease;
  }

aside:hover .logo img {
  transform: scale(1.15);
}

  aside {
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= SIDEBAR ================= */

aside .sidebar {
  width: 100%;
  height: 100%;
  background: var(--color-white);
  border-radius: 0 20px 20px 0;
  padding-bottom: 2rem;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

aside .sidebar:hover{
  box-shadow: var(--box-shadow);
}

aside .sidebar a:last-child{
    position: absolute;
    bottom: 2rem;
    width: 100%;
}

aside .sidebar a.active{
    width: 100%;
    height: 65px;
    color: var(--color-primary);
    background-color: var(--color-light);
    margin-left: 0;
}

aside .sidebar a.active{
    margin-bottom: -1rem;
}

aside .sidebar a.active::before{
    content: '';
    position: absolute;
    width: 6px;
    height: 35px;
    background-color: var(--color-primary);
}

aside .sidebar a.active span{
    color: var(--color-primary);
    padding-left: 30px;
}

aside .sidebar a:hover{
    color: var(--color-primary);
}

aside:hover {
  width: 220px;
}

aside .sidebar a h3 {
  opacity: 0;
  white-space: nowrap;
  transition: 0.2s;
}

aside:hover .sidebar a h3 {
  opacity: 1;
  margin-left: 15px;
}

aside:hover .sidebar a {
  justify-content: flex-start;
}

aside .sidebar a{
    display: flex;
    align-items: center;
    color: var(--color-info-dark);
    height: 2.85rem;
    position: relative;
    margin-left: 2rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

aside .sidebar a span{
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

aside .sidebar a span {
  font-size: 2rem;
  min-width: 30px;
  text-align: center;
}

aside .sidebar a h3 {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.25s ease;
}

aside:hover .sidebar a h3 {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}

aside .sidebar a span {
  transition: transform 0.25s ease;
}

aside:hover .sidebar a span {
  transform: scale(0.9);
}

aside .sidebar a {
  transition: all 0.25s ease;
}

/*======================= ORGANIZACION =======================*/

main .principal {
    display: block;
    grid-template-columns: repeat(2, 1fr);
    position: relative;
    margin-top: 7rem;
    margin-bottom: 2rem;
}

main .noticias {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
}

main .noticias > div {
    background: var(--color-white);
    border-radius: 1rem;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: all 300ms ease;
    height: 28rem;
}

main .noticias > div:hover {
    box-shadow: none;
}

main .noticias > div span {
    background: var(--color-primary);
    padding: 0.3rem;
    border-radius: 50%;
    color: var(--color-white);
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-left: 1rem;
}

main .noticias > div h1 {
    display: inline;
    margin-left: 0.8rem;
    font-weight: 500;
    font-size: 1.45rem;
    color: var(--color-primary);
}

main .slides {
    position: relative;
    width: 64rem;
    top: 1rem;
    margin: 0 auto;
}

.slide-content {
    max-width: 75%; 
    background-position: center;
    background-size: cover;
}

@media screen and (max-width: 1200px) {
    .slide-content {
        max-width: 89%;
        background-position: center;
        background-size: cover;
    }
}
/*======================= SLIDE - NOTICIA =======================*/
#slider {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    position: absolute;
 }
 #slider input[type=radio] {
    display: none;
 }
 #slider label {
    cursor: pointer;
    text-decoration: none;
 }
 #overflow {
    width: 100%;
    overflow: hidden;
    height: 20rem;
 }
 #slide1:checked ~ #slides .inner {
    margin-left: 0;
 }
 #slide2:checked ~ #slides .inner {
    margin-left: -100%;
 }
 #slide3:checked ~ #slides .inner {
    margin-left: -200%;
 }
 #slide4:checked ~ #slides .inner {
    margin-left: -300%;
 }
 #slides .inner {
    transition: margin-left 800ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
    width: 400%;
    line-height: 0;
 }
 #slides .slide {
    width: 25%;
    float: left;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
    margin-top: 1.5rem;
 }
 #controls {
    width: 90%;
    height: 5rem;
    z-index: 3;
    position: absolute;
    top: 15rem;
 }
 #controls label {
    transition: opacity 0.2s ease-out;
    display: none;
    width: 3.125rem;
    height: 3.125rem;
    opacity: .4;
 }
 #controls label:hover {
    opacity: 1;
 }
 #slide1:checked ~ #controls label:nth-child(2),
 #slide2:checked ~ #controls label:nth-child(3),
 #slide3:checked ~ #controls label:nth-child(4),
 #slide4:checked ~ #controls label:nth-child(1) {
    background-image: url('../img/arrow_forward.svg');
    background-repeat: no-repeat;
    float: right;
    margin: -3rem -7rem 0 0;
    display: block;
 }
 #slide1:checked ~ #controls label:nth-last-child(1),
 #slide2:checked ~ #controls label:nth-last-child(4),
 #slide3:checked ~ #controls label:nth-last-child(3),
 #slide4:checked ~ #controls label:nth-last-child(2) {
    background-image: url('../img/arrow_back.svg');
    background-repeat: no-repeat;
    float:left;
    margin: -3rem 0 0 0;
    margin-left: 1rem;
    display: block;
 }
 #bullets {
    text-align: center;
    position: relative;
    top: 4rem;
 }
 #bullets label {
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 100%;
    background: #ccc;
    margin: 0 0.625rem;
 }
 #slide1:checked ~ #bullets label:nth-child(1),
 #slide2:checked ~ #bullets label:nth-child(2),
 #slide3:checked ~ #bullets label:nth-child(3),
 #slide4:checked ~ #bullets label:nth-child(4) {
    background: var(--color-primary);
 }
 @media screen and (max-width: 1200px) {
    #slide1:checked ~ #controls label:nth-child(2),
    #slide2:checked ~ #controls label:nth-child(3),
    #slide3:checked ~ #controls label:nth-child(4),
    #slide4:checked ~ #controls label:nth-child(1),
    #slide1:checked ~ #controls label:nth-last-child(1),
    #slide2:checked ~ #controls label:nth-last-child(4),
    #slide3:checked ~ #controls label:nth-last-child(3),
    #slide4:checked ~ #controls label:nth-last-child(2) {
       margin: 0;
       margin-left: 1rem;
    }
    #slides {
       max-width: calc(75%);
       margin: 0 auto;
    }
    #controls {
        bottom: 20rem;
        width: 100%;
        height: 3rem;
        z-index: 3;
        position: absolute;
     }
 }

.subtitle {
    position: relative;
    margin-bottom: 1rem;
}

main .subtitle > a h1 {
    display: inline;
    margin-left: 0.4rem;
    font-weight: 500;
    font-size: 1.45rem;
    color: var(--color-primary);
    position: relative;
    bottom: 0.3rem;
}

/*======================= FELICITACIONES =======================*/
 main .secundario {
    display: block;
    grid-template-columns: repeat(2, 1fr);
    position: relative;
}

.product-first {
    position: relative;
    width: 95%;
    height: auto;
    min-height: 27rem;
    background-color: white;
    border-radius: 25px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.1s ease;
    border-top: 10px solid transparent;
    transform: scale(1);
    box-sizing: border-box;
    margin: 0 auto;
}

.product-first:hover {
    border-radius: 12px;
    border-top: 10px solid var(--color-primary);
    transform: scale(1.05);
    transition: all 0.15s ease;
    color: var(--color-primary);
}

.product-first img {
    position: relative;
    width: 5rem;
    height: 15rem;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.product-first h2 {
    font-weight: 400;
    font-size: 1.3rem;
}

.hoverable {
    overflow: hidden;
    transition: box-shadow .25s, -webkit-box-shadow .25s;
}

.product-second {
    position: relative;
    width: 95%;
    min-height: 27rem;
    height: auto;
    background-color: white;
    border-radius: 25px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.1s ease;
    border-top: 10px solid transparent;
    transform: scale(1);
    box-sizing: border-box;
    margin: 0 auto;
}

.product-second:hover {
    border-radius: 12px;
    border-top: 10px solid var(--color-primary);
    transform: scale(1.05);
    transition: all 0.15s ease;
    color: var(--color-primary);
}

.product-second img {
    position: relative;
    width: 13rem;
    height: 15rem;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.product-second h2 {
    font-weight: 400;
    font-size: 1.3rem;
}

.product-third {
    position: relative;
    width: 25rem;
    height: 30rem;
    background-color: white;
    border-radius: 25px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.1s ease;
    border-top: 10px solid transparent;
    transform: scale(1);
    box-sizing: border-box;
    margin: 0 auto;
}

.product-third:hover {
    border-radius: 12px;
    border-top: 10px solid var(--color-primary);
    transform: scale(1.05);
    transition: all 0.15s ease;
    color: var(--color-primary);
}

.product-third img {
    position: relative;
    width: 18rem;
    height: 12rem;
    /* left: 3rem; */
    margin: 3rem auto;
    /* margin-bottom: 3rem; */
}

.product-third h2 {
    font-weight: 400;
    font-size: 1.3rem;
}

.imgProduct {
    /* top: 2rem; */
    margin-bottom: 3rem;
}

.product-fourth {
    position: relative;
    width: 25rem;
    height: 30rem;
    background-color: white;
    border-radius: 25px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.1s ease;
    border-top: 10px solid transparent;
    transform: scale(1);
    box-sizing: border-box;
    margin: 0 auto;
}

.product-fourth:hover {
    border-radius: 12px;
    border-top: 10px solid var(--color-primary);
    transform: scale(1.05);
    transition: all 0.15s ease;
    color: var(--color-primary);
}

.product-fourth img {
    position: relative;
    width: 20rem;
    height: 15rem;
    /* left: 3rem; */
    margin: 0 auto;
    margin-bottom: 3rem;
}

.product-fourth h2 {
    font-weight: 400;
    font-size: 1.3rem;
}

.product-fifth {
    position: relative;
    width: 25rem;
    height: 30rem;
    background-color: white;
    border-radius: 25px;
    /* margin-left: 28rem; */
    /* margin-top: -30rem; */
    text-align: center;
    border-radius: 12px;
    transition: all 0.1s ease;
    border-top: 10px solid transparent;
    transform: scale(1);
    box-sizing: border-box;
    margin: 0 auto;
}

.product-fifth:hover {
    border-radius: 12px;
    border-top: 10px solid var(--color-primary);
    transform: scale(1.05);
    transition: all 0.15s ease;
    color: var(--color-primary);
}

.product-fifth img {
    position: relative;
    width: 10rem;
    height: 15rem;
    /* left: 7rem; */
    margin: 0 auto;
    margin-bottom: 3rem;
}

.product-fifth h2 {
    font-weight: 400;
    font-size: 1.3rem;
}

.product-sixth {
    position: relative;
    width: 25rem;
    height: 30rem;
    background-color: white;
    border-radius: 25px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.1s ease;
    border-top: 10px solid transparent;
    transform: scale(1);
    box-sizing: border-box;
    margin: 0 auto;
}

.product-sixth:hover {
    border-radius: 12px;
    border-top: 10px solid var(--color-primary);
    transform: scale(1.05);
    transition: all 0.15s ease;
    color: var(--color-primary);
}

.product-sixth img {
    position: relative;
    width: 14rem;
    height: 15rem;
    /* left: 6rem; */
    margin: 0 auto;
    margin-bottom: 3rem;
}

.product-sixth h2 {
    font-weight: 400;
    font-size: 1.3rem;
}

.nav-bar {
    display: none;
}

.row {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    max-width: 100%;
    margin: auto;
}

.product-first,
.product-second,
.product-third,
.product-fourth,
.product-fifth,
.product-sixth{
    width: 100%;
    height: auto;
    min-height: 27rem;
    box-shadow: var(--box-shadow);
}

@media (max-width: 768px){
    main{
        width: 95%;
        margin: 0 auto;
        overflow: hidden;
    }

    main .noticias {
        width: 100%;
    }

    aside .top {
        margin: 1.5rem 1.5rem;
        top: 0;
    }

    main .principal{
    display: block;
    grid-template-columns: repeat(2, 1fr);
    position: relative;
    margin-top: 5.5rem;
    margin-bottom: 2rem
    }

    .container{
        grid-template-columns: 1fr;
        overflow: hidden;
        width: 100%;
    }
    aside .sidebar{
        display: none;
    }

    aside{
        height: 0;
    }

    .nav-bar{
        display: block;
        position: fixed;
        bottom: 0;
        /* top: 1px; */
        left: 10px;
        width: 100%;
        flex: 1;
        z-index: 9999;
        /* margin: 0 auto; */
        left: 50%;
        transform: translateX(-50%);
    }
    .navigation {
        position: relative;
        width: 90%;
        min-width: 300px;
        height: 60px;
        background: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(0,0,0,0.4);
        margin: 0 auto;
    }
    
    .navigation ul {
        display: flex;
        width: 300px;
        text-transform: capitalize;
    }
    
    .navigation ul li {
        position: relative;
        list-style: none;
        width: 60px;
        height: 60px;
        z-index: 2;
    }
    
    .navigation ul li a {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .navigation ul li a .icon {
        position: relative;
        display: block;
        line-height: 65px;
        font-size: 1.5em;
        transition: 0.5s;
        color: #222327;
    }
    
    .navigation ul li.active a .icon {
        transform: translateY(-30px);
        color: var(--color-primary);
    }
    
    .navigation ul li a .text {
        position: absolute;
        color: #fff;
        font-weight: 400;
        font-size: 0.75em;
        letter-spacing: 0.05em;
        transition: 0.5s;
        opacity: 0;
        transform: translateY(15px);
        background: var(--color-primary);
        padding: 2px 7px;
        border-radius: 12px;
    }
    
    .navigation ul li.active a .text {
        transform: translateY(-4px);
        opacity: 1;
    }
    
    .indicator {
        position: absolute;
        top: -27px;
        width: 58px;
        height: 58px;
        background: #fff;
        border-radius: 50%;
        z-index: 1;
        transition: 0.5s;
        box-shadow: 0 -10px 10px rgba(0,0,0,0.1);
    }
    
    .indicator::before {
        content: "";
        position: absolute;
        background: transparent;
        border-radius: 50%;
        box-shadow: 15px 18px #fff
    }
    
    .indicator::after {
        content: "";
        position: absolute;
        top: 5px;
        height: 30px;
        background: transparent;
        border-radius: 50%;
    }
    
    .navigation ul li:nth-child(1).active ~ .indicator {
        transform: translateX(calc(70px * 0));
    }
    
    .navigation ul li:nth-child(2).active ~ .indicator {
        transform: translateX(calc(60px * 1));
    }
    
    .navigation ul li:nth-child(3).active ~ .indicator {
        transform: translateX(calc(60px * 2));
    }
    
    .navigation ul li:nth-child(4).active ~ .indicator {
        transform: translateX(calc(60px * 3));
    }
    .navigation ul li:nth-child(5).active ~ .indicator {
        transform: translateX(calc(60px * 4));
    }

    .product-first,
    .product-second,
    .product-third,
    .product-fourth,
    .product-fifth,
    .product-sixth{
        width: 95%;
        height: auto;
        min-height: 27rem;
    }

    .row{
        display: grid;
        gap: 20px;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        width: 100%;
    }

    main .secundario {
        bottom: 0;
        right: 0;
    }

    .subtitle {
        margin-bottom: 1rem;
    }
}