@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f4f4f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 30px;
    overflow-x: hidden;
}

/* ==========================
   HEADER FIJO Y TRANSPARENTE
========================== */

.header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.662);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0 0 10px 30px;
    border-bottom: 1px solid rgba(224, 224, 224, 0.427);
    margin: 0;
    transition: all .3s ease;
}

/* ==========================
   LOGO
========================== */

.logo-container {
    padding-top: 10px;
    flex-shrink: 0;
}

.logo-container img {
    height: 90px;
    width: auto;
    display: block;
}

/* ==========================
   CONTENEDOR NAVEGACIÓN
========================== */

.nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}

/* ==========================
   MENÚ SUPERIOR
========================== */

.top-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.top-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.top-links li {
    display: flex;
    align-items: center;
}

.top-links li:not(:last-child)::after {
    content: "|";
    color: #000000;
    margin: 0 10px;
    font-size: 13px;
}

.top-links a {
    text-decoration: none;
    color: #009640;
    font-size: 16px;
    font-weight: 900;
    transition: .3s;
}

.top-links a:hover {
    text-decoration: underline;
}

/* ==========================
   BOTÓN SUPERIOR
========================== */

.top-buttons {
    display: flex;
    margin-left: 20px;
    margin-right: 30px;
}

.top-buttons .btn-green {
    padding: 8px 6px;
    font-size: 17px;
    border-radius: 3px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 17px;
    transition: .3s;
}

.btn:hover {
    opacity: .8;
}

.btn-green {
    background-color: #008738;
    padding-right: 60px;
}

/* ==========================
   MENÚ PRINCIPAL
========================== */

.navigation {
    padding-right: 70px;
}

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation > ul > li {
    float: left;
    position: relative;
}

.navigation ul li a {
    display: block;
    padding: 5px 16px;
    color: #333;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    transition: .3s;
}

.navigation ul li a:hover {
    color: #009640;
    background: transparent;
}

/* ==========================
   SUBMENÚS PC
========================== */

.navigation ul li ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 230px;
    background: rgba(255,255,255,.97);
    display: none;
    box-shadow: 0 5px 12px rgba(0,0,0,.12);
    z-index: 100;
}

.navigation ul li:hover > ul {
    display: block;
}

.navigation ul li ul li {
    width: 100%;
}

.navigation ul li ul li a {
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
}

.navigation ul li ul li a:hover {
    background: #f5f5f5;
    color: #009640;
}

/* ==========================
   BOTÓN MENÚ MÓVIL
   OCULTO EN PC
========================== */

.mobile-menu-button {
    display: none;
}

/* ==========================
   MENÚ MÓVIL
========================== */

@media screen and (max-width: 768px) {

    body {
        padding-top: 70px;
        overflow-x: hidden;
    }

    /* HEADER */
    .header-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 70px;
        height: 70px;
        padding: 5px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255,255,255,.97);
        z-index: 99999;
    }

    /* LOGO */
    .logo-container {
        padding-top: 0;
        flex-shrink: 0;
    }

    .logo-container img {
        height: 58px;
        width: auto;
        max-width: 75px;
        display: block;
    }

    /* BOTÓN */
    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        margin-left: auto;
        border: none;
        border-radius: 5px;
        background: #008738;
        color: white;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        line-height: 1;
        z-index: 100001;
    }

    .mobile-menu-button:hover {
        background: #006f2e;
    }

    /* ==========================
       MENÚ CERRADO
    ========================== */

    .nav-wrapper {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 15px;
        background: #fff;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: 0 5px 15px rgba(0,0,0,.15);
        z-index: 100000;
    }

    /* ==========================
       MENÚ ABIERTO
    ========================== */

    .nav-wrapper.menu-open {
        display: flex;
    }

    /* ==========================
       MENÚ SUPERIOR
    ========================== */

    .top-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    .top-links {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .top-links li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #ddd;
    }

    .top-links li:not(:last-child)::after {
        display: none;
    }

    .top-links a {
        display: block;
        width: 100%;
        padding: 13px 5px;
        color: #009640;
        font-size: 16px;
        font-weight: 700;
        text-decoration: none;
    }

    /* ==========================
       COMPRAS EN LÍNEA
    ========================== */

    .top-buttons {
        display: block;
        width: 100%;
        margin: 12px 0;
    }

    .top-buttons .btn-green {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border-radius: 5px;
    }

    /* ==========================
       MENÚ PRINCIPAL
    ========================== */

    .navigation {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .navigation > ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .navigation > ul > li {
        float: none;
        position: relative;
        width: 100%;
        border-top: 1px solid #ddd;
    }

    .navigation ul li a {
        display: block;
        width: 100%;
        padding: 13px 5px;
        font-size: 16px;
        color: #333;
        text-decoration: none;
    }

    .navigation ul li a:hover {
        color: #009640;
    }

    /* ==========================
       SUBMENÚS MÓVIL
    ========================== */

    .navigation ul li ul {
        position: static;
        display: block;
        width: 100%;
        background: #f5f5f5;
        box-shadow: none;
    }

    .navigation ul li ul li {
        width: 100%;
    }

    .navigation ul li ul li a {
        padding: 10px 20px;
        font-size: 14px;
        color: #555;
        border-top: 1px solid #e5e5e5;
    }

    .navigation ul li ul li a:hover {
        background: #eee;
        color: #009640;
    }
}

/* ==========================
   CELULARES PEQUEÑOS
========================== */

@media screen and (max-width: 480px) {

    body {
        padding-top: 65px;
    }

    .header-container {
        min-height: 65px;
        height: 65px;
        padding: 5px 12px;
    }

    .logo-container img {
        height: 52px;
        max-width: 68px;
    }

    .mobile-menu-button {
        width: 42px;
        height: 42px;
        font-size: 26px;
    }

    .nav-wrapper {
        top: 65px;
        height: calc(100vh - 65px);
        padding: 12px;
    }
}

/* ==========================
   SLIDER
========================== */

.slider {
    margin-top: 80px;
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
}

.slider img {
    position: absolute;
    width: 100%;
    height: 90%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.slider img.activa {
    opacity: 1;
}

/* BOTONES DEL SLIDER */

.slider .prev,
.slider .next {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #3c7a3c;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 100;
    transition: .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.slider .prev {
    left: 20px;
}

.slider .next {
    right: 20px;
}

.slider .prev:hover,
.slider .next:hover {
    background: rgba(116, 126, 5, 0.7);
}

/* ==========================
   TARJETAS
========================== */

.servicios {
    width: 90%;
    margin: 60px auto;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.tarjeta {
    width: 33%;
    text-decoration: none;
    color: white;
    overflow: hidden;
    cursor: pointer;
    transition: .3s;
}

.tarjeta img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.titulo {
    height: 100px;
    background: #00b857;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    font-size: 25px;
    border-radius: 0 0 60px 60px;
    transition: .3s;
}

.tarjeta:hover {
    transform: translateY(-10px);
}

.tarjeta:hover .titulo {
    background: #008f45;
}

/* ==========================
   FOOTER
========================== */

.footer {
    width: 100%;
    background: #1e1e1e;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 60px 80px 40px 80px;
    color: #b3b3b3;
    margin-top: auto;
    gap: 40px;
}

.footer h3,
.footer-info h3,
.footer-enlaces h3,
.footer-redes h3 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer p,
.footer-info p,
.footer-enlaces p,
.footer-redes p {
    font-size: 15px;
    line-height: 1.8;
    color: #b3b3b3;
    margin-bottom: 8px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.footer-info img {
    display: none;
}

.footer-enlaces {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.footer-redes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.iconos img {
    width: 25px;
    height: 25px;
    filter: brightness(0) invert(1);
    transition: .3s;
}

.iconos img:hover {
    transform: scale(1.2);
}

/* ==========================
   RESPONSIVE GENERAL
========================== */

@media(max-width:950px) {

    .slider {
        height: 250px;
    }

    .servicios {
        flex-direction: column;
        width: 90%;
    }

    .tarjeta {
        width: 100%;
    }

    .tarjeta img {
        height: 260px;
    }

    .titulo {
        font-size: 22px;
    }

    .footer {
        flex-direction: column;
        gap: 35px;
        text-align: left;
        padding: 40px 30px;
    }

    .footer-info,
    .footer-enlaces,
    .footer-redes {
        flex-direction: column;
        align-items: flex-start;
    }

    div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        gap: 20px;
        text-align: center;
        padding: 20px 30px !important;
    }
}

/* ==========================
   NOTICIAS
========================== */

.news-section {
    padding: 70px 0;
}

.news-box {
    width: 95%;
    max-width: 500%;
    margin: auto;
    padding: 60px 45px;
    background: #e6e8e6;
    border: 3px solid #46b14d;
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title h2 {
    color: #1e8d1e;
    font-size: 60px;
    font-weight: 600;
}

.divider i {
    color: #46b14d;
    font-size: 22px;
    font-style: normal;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.card-link {
    text-decoration: none;
    color: white;
}

.card {
    height: 180px;
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 3px solid #fcff32;
    background: #72ef2f;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .5s;
}

.card:hover img {
    transform: scale(1.12);
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .30);
    display: flex;
    align-items: flex-end;
    padding: 18px;
}

.overlay h3 {
    color: white;
    font-size: 18px;
    line-height: 1.3;
}

/* ==========================
   RESPONSIVE NOTICIAS
========================== */

@media(max-width:1000px) {

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:600px) {

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-box {
        padding: 30px 20px;
    }
}

.spacer {
    padding: 100px 20px;
    text-align: center;
    background-color: #ffffff;
}

.dividir {
    margin-bottom: 80px;
}
