/* ==================== GOOGLE FONTS ==================== */
@import url('[https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@600;700&display=swap](https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@600;700&display=swap)');

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --primary-color: #00CC61;
    --secondary-color: #004050;
    --background-color: #F9F9F9;
    --surface-color: #FFFFFF;
    --text-color: #333333;
    --title-color: var(--secondary-color);
    --white-color: #FFFFFF;
    
    /* Typography */
    --body-font: 'Open Sans', sans-serif;
    --title-font: 'Poppins', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Spacing */
    --header-height: 4.5rem;
    --section-padding: 4rem 0 2rem;

    /* Z-index */
    --z-fixed: 100;
    --z-tooltip: 10;
}

/* Dark theme variables */
body.dark-theme {
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --text-color: #E0E0E0;
    --title-color: #FFFFFF;
    --secondary-color: #002a35;
}

/* Responsive typography */
@media screen and (max-width: 992px) {
    :root {
        --h1-font-size: 2rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.1rem;
        --normal-font-size: 0.938rem;
    }
}

/* ==================== BASE STYLES ==================== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.4s, color 0.4s;
}

h1, h2, h3 {
    font-family: var(--title-font);
    color: var(--title-color);
    font-weight: 700;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.section__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: 2rem;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: #00a34e;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
/* ==================== HEADER & NAV ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--surface-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.4s;
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-family: var(--title-font);
    font-weight: 700;
    color: var(--primary-color);
}

.nav__logo i {
    margin-left: 0.25rem;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .nav__toggle {
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--title-color);
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        background-color: var(--surface-color);
        padding: 6rem 2rem 3rem;
        transition: right 0.4s;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-weight: 600;
    transition: color 0.3s;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--title-color);
}

/* Show menu */
.show-menu {
    right: 0;
}

/* ==================== HERO SECTION v1==================== */
.hero__container {
    padding-top: 5rem;
    padding-bottom: 0rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    text-align: center;
}

.hero__data {
    max-width: 992px;
    margin-left: auto;
    margin-right: auto;
}

.hero__title {
    font-size: var(--h1-font-size);
    margin-bottom: 0.5rem;
}

.hero__subtitle {
    font-size: var(--h3-font-size);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero__description {
    margin-bottom: 0.5rem;
}

/* ==================== COTIZACIÓN SECTION ==================== */
.cotizacion__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cotizacion__card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cotizacion__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.cotizacion__card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cotizacion__icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.cotizacion__title {
    font-size: var(--h3-font-size);
}

.cotizacion__price {
    font-size: 2.5rem;
    font-family: var(--title-font);
    color: var(--title-color);
    margin-bottom: 0.5rem;
}

.cotizacion__description {
    font-size: var(--small-font-size);
    color: var(--text-color);
    opacity: 0.8;
}
.ultima__actualizacion {
    font-size: var(--small-font-size);
    color: var(--text-color);
    opacity: 0.6;
    margin-top: 1rem;
    text-align: center;
}

/* ==================== GRÁFICO SECTION ==================== */

.button--outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.button--outline:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.button--outline.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.grafico__container {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height:400px;
    min-height: 50%;
}

/* ==================== NOTICIAS SECTION ==================== */
.noticias__container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.noticia__card {
    background-color: var(--surface-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}
.noticia__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.noticia__data {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.noticia__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}
.noticia__description {
    margin-bottom: 1rem;
    flex-grow: 1;
}
.noticia__button {
    color: var(--primary-color);
    font-weight: 600;
    align-self: flex-start;
}
.noticia__button i {
    margin-left: 0.25rem;
    transition: transform 0.3s;
}
.noticia__button:hover i {
    transform: translateX(5px);
}

/* ==================== LÍMITES SECTION ==================== */
.table-container {
    overflow-x: auto;
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.limites__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensures table content isn't too cramped */
}
.limites__table th, .limites__table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #eee);
}
.limites__table thead {
    background-color: var(--secondary-color);
    color: var(--white-color);
}
.limites__table th {
    font-family: var(--title-font);
    font-weight: 600;
}
.limites__table tbody tr:hover {
    background-color: rgba(0,0,0,0.05);
}
body.dark-theme .limites__table tbody tr:hover {
    background-color: rgba(255,255,255,0.05);
}
.table__link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}


/* ==================== TUTORIALES SECTION ==================== */
.tutoriales__container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.tutorial__item {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, color 0.3s;
    color: var(--title-color);
}
.tutorial__item:hover {
    transform: translateY(-5px);
    color: var(--primary-color);
}
.tutorial__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}
.tutorial__title {
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
    font-weight: 600;
}

/* ==================== CONTACTO SECTION ==================== */
.contacto__container {
    align-items: flex-start;
}
.contacto__subtitle {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}
.contacto__description {
    margin-bottom: 2rem;
}
.contacto__info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.contacto__info-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
}
.contacto__form {
    width: 100%;
}
.contacto__form-group {
    margin-bottom: 1.5rem;
}
.contacto__form-input {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--text-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}
.contacto__form-input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}
textarea.contacto__form-input {
    height: 150px;
    resize: vertical;
}
.contact__message {
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
}
/* ==================== LEGAL PAGE STYLES ==================== */
.legal-page {
    padding-top: calc(var(--header-height) + 4rem);
}
.legal-page__container {
    max-width: 800px;
}
.legal-page__title {
    font-size: var(--h1-font-size);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}
.legal-page__content h2 {
    font-size: var(--h2-font-size);
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.legal-page__content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}
.legal-page__content ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1rem;
}
.legal-page__content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}


/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 3rem 0;
}
.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}
.footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.footer__socials {
    display: flex;
    gap: 1.5rem;
}
.footer__social-link {
    font-size: 1.25rem;
    transition: color 0.3s;
}
.footer__social-link:hover {
    color: var(--primary-color);
}
.footer__links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer__link {
    font-size: var(--small-font-size);
    transition: color 0.3s;
}
.footer__link:hover {
    color: var(--primary-color);
}

/* ==================== SCROLL UP ==================== */
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -30%;
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 0.5rem;
    z-index: var(--z-tooltip);
    transition: bottom 0.4s, transform 0.3s;
}
.scrollup:hover {
    transform: translateY(-4px);
}
.show-scroll {
    bottom: 3rem;
}

/* ==================== MEDIA QUERIES ==================== */
/* For medium devices */
@media screen and (min-width: 768px) {
    .nav__menu {
        display: block;
    }
    .nav__list {
        flex-direction: row;
        gap: 2.5rem;
    }
    .nav__toggle, .nav__close {
        display: none;
    }
    .contacto__container {
        grid-template-columns: 1fr 1fr;
    }
    .footer__container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .container {
        padding: 0 1rem;
    }
    .limites__container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}