/* =====================================================
   DÓLAR TIJUANA - ESTILOS PRINCIPALES
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #172033;
    line-height: 1.6;
}

/* =====================================================
   VARIABLES
   ===================================================== */

:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-light: #ccfbf1;

    --dark: #172033;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --background: #f5f7fb;
    --white: #ffffff;

    --success: #16a34a;
    --danger: #dc2626;

    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

/* =====================================================
   CONTENEDOR
   ===================================================== */

.container {
    width: 90%;
    max-width: 1150px;
    margin: auto;
}

/* =====================================================
   HEADER
   ===================================================== */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;
    color: var(--dark);

    font-size: 21px;
}

.logo span {
    font-size: 28px;
}

.logo strong {
    font-weight: 800;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--gray);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;

    transition: 0.2s;
}

.nav a:hover {
    color: var(--primary);
}

/* =====================================================
   HERO
   ===================================================== */

.hero {
    background: linear-gradient(
        135deg,
        #0f766e,
        #134e4a
    );

    color: white;

    padding: 75px 0 90px;
}

.hero-location {
    display: inline-block;

    background: rgba(255, 255, 255, 0.12);

    padding: 7px 15px;

    border-radius: 50px;

    font-size: 14px;

    margin-bottom: 20px;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;

    margin-bottom: 20px;

    font-weight: 800;
}

.hero-description {
    max-width: 600px;

    font-size: 18px;

    color: rgba(255, 255, 255, 0.85);
}

/* =====================================================
   SECCIONES
   ===================================================== */

.exchange-section,
.history-section,
.info-section {
    padding: 70px 0;
}

.converter-section {
    padding: 70px 0;

    background: #eef7f6;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 30px;
}

.section-label {
    display: block;

    color: var(--primary);

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 7px;
}

.section-header h2,
.converter-header h2 {
    font-size: 30px;

    line-height: 1.2;
}

.update-time {
    color: var(--gray);

    font-size: 13px;

    text-align: right;
}

.update-time strong {
    display: block;

    color: var(--dark);

    margin-top: 3px;
}

/* =====================================================
   TARJETAS TIPO DE CAMBIO
   ===================================================== */

.exchange-cards {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 25px;
}

.exchange-card {
    background: var(--white);

    border: 1px solid var(--light-gray);

    border-radius: var(--radius);

    padding: 30px;

    display: flex;
    align-items: center;

    gap: 20px;

    box-shadow: var(--shadow);

    transition: transform 0.2s, box-shadow 0.2s;
}

.exchange-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.12);
}

.exchange-card.featured {
    border: 2px solid var(--primary);
}

.card-icon {
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-light);

    border-radius: 16px;

    font-size: 30px;
}

.card-info span {
    display: block;

    color: var(--gray);

    font-size: 15px;

    margin-bottom: 4px;
}

.card-info strong {
    display: block;

    font-size: 38px;

    line-height: 1.1;

    color: var(--dark);
}

.card-info small {
    color: var(--gray);

    font-size: 12px;
}

/* =====================================================
   CONVERSOR
   ===================================================== */

.converter {
    background: var(--white);

    border-radius: 24px;

    padding: 40px;

    box-shadow: var(--shadow);
}

.converter-header {
    margin-bottom: 35px;
}

.converter-header p {
    margin-top: 10px;

    color: var(--gray);
}

.converter-form {
    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: end;

    gap: 25px;
}

.input-group label {
    display: block;

    font-size: 14px;

    font-weight: 700;

    margin-bottom: 8px;
}

.money-input {
    height: 60px;

    display: flex;
    align-items: center;

    background: #f8fafc;

    border: 1px solid var(--light-gray);

    border-radius: 12px;

    padding: 0 16px;

    transition: border 0.2s;
}

.money-input:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(15, 118, 110, 0.1);
}

.money-input > span:first-child {
    color: var(--gray);

    font-size: 20px;

    margin-right: 8px;
}

.money-input input {
    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    font-size: 22px;

    font-weight: 700;

    color: var(--dark);
}

.money-input input::-webkit-inner-spin-button,
.money-input input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.currency {
    color: var(--gray);

    font-size: 13px;

    font-weight: 700;

    margin-left: 10px;
}

.arrow {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 22px;

    font-weight: bold;
}

.converter-result {
    margin-top: 30px;

    padding-top: 25px;

    border-top: 1px solid var(--light-gray);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.converter-result span {
    color: var(--gray);

    font-size: 14px;
}

.converter-result strong {
    font-size: 20px;

    color: var(--primary);
}

/* =====================================================
   HISTÓRICO
   ===================================================== */

#periodo {
    padding: 10px 14px;

    border: 1px solid var(--light-gray);

    border-radius: 10px;

    background: var(--white);

    color: var(--dark);

    outline: none;

    cursor: pointer;
}

.chart-container {
    background: var(--white);

    border: 1px solid var(--light-gray);

    border-radius: var(--radius);

    min-height: 350px;

    box-shadow: var(--shadow);

    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;

    color: var(--gray);
}

.chart-line {
    font-size: 70px;

    margin-bottom: 15px;
}

.chart-placeholder p {
    font-size: 17px;

    font-weight: 600;

    color: var(--dark);
}

.chart-placeholder small {
    display: block;

    margin-top: 8px;
}

/* =====================================================
   INFORMACIÓN
   ===================================================== */

.info-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}

.info-card {
    background: var(--white);

    padding: 30px;

    border-radius: var(--radius);

    border: 1px solid var(--light-gray);

    box-shadow: var(--shadow);
}

.info-icon {
    width: 55px;
    height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-light);

    border-radius: 14px;

    font-size: 25px;

    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 19px;

    margin-bottom: 10px;
}

.info-card p {
    color: var(--gray);

    font-size: 14px;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background: #111827;

    color: white;

    padding-top: 45px;
}

.footer-content {
    display: flex;

    justify-content: space-between;

    gap: 40px;

    padding-bottom: 35px;
}

.footer-content strong {
    font-size: 20px;
}

.footer-content p {
    color: #94a3b8;

    margin-top: 8px;

    font-size: 14px;
}

.footer-links {
    display: flex;

    gap: 25px;

    align-items: center;
}

.footer-links a {
    color: #cbd5e1;

    text-decoration: none;

    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    border-top: 1px solid #1f2937;

    text-align: center;

    padding: 20px;

    color: #64748b;

    font-size: 13px;
}

/* =====================================================
   RESPONSIVE - TABLET
   ===================================================== */

@media (max-width: 800px) {

    .nav {
        display: none;
    }

    .hero h1 {
        font-size: 38px;
    }

    .exchange-cards {
        grid-template-columns: 1fr;
    }

    .converter-form {
        grid-template-columns: 1fr;
    }

    .arrow {
        margin: auto;

        transform: rotate(90deg);
    }

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

    .section-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }

    .update-time {
        text-align: left;
    }

    #periodo {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

/* =====================================================
   RESPONSIVE - CELULAR
   ===================================================== */

@media (max-width: 500px) {

    .container {
        width: 92%;
    }

    .header-content {
        height: 65px;
    }

    .logo {
        font-size: 18px;
    }

    .logo span {
        font-size: 24px;
    }

    .hero {
        padding: 55px 0 65px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-description {
        font-size: 16px;
    }

    .exchange-section,
    .history-section,
    .info-section,
    .converter-section {
        padding: 50px 0;
    }

    .section-header h2,
    .converter-header h2 {
        font-size: 25px;
    }

    .exchange-card {
        padding: 22px;
    }

    .card-icon {
        width: 55px;
        height: 55px;

        font-size: 25px;
    }

    .card-info strong {
        font-size: 30px;
    }

    .converter {
        padding: 25px 20px;

        border-radius: 18px;
    }

    .converter-result {
        flex-direction: column;

        align-items: flex-start;

        gap: 8px;
    }

    .chart-container {
        min-height: 280px;
    }

    .footer {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}