/* ============================= */
/* RESET GLOBAL */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #f5f8fc;
    color: #1f2937;
}

/* ============================= */
/* HEADER */
/* ============================= */
.header {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #fff;
}

.header a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    font-weight: 500;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
}

.logo img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    padding: 6px;
    object-fit: contain;
}

/* ============================= */
/* BOTÕES */
/* ============================= */
.btn-primary {
    background: #a6d9e6;
    color: #aa0909;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
}

/* ============================= */
/* HERO */
/* ============================= */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 60px 40px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    color: #fff;
    flex-wrap: wrap;
}

.hero-text {
    max-width: 520px;
}

.hero-text h1 {
    font-size: 40px;
    margin-bottom: 15px;
}

.hero-text p {
    line-height: 1.6;
    margin-bottom: 14px;
    opacity: 0.95;
}

.hero-text span {
    font-weight: 800;
}

.hero-input {
    margin-top: 20px;
    display: flex;
    width: 100%;
    max-width: 420px;
}

.hero-input input {
    padding: 12px;
    width: 100%;
    max-width: 320px;
    border-radius: 10px 0 0 10px;
    border: none;
}

.hero-input button {
    padding: 12px 20px;
    border: none;
    background: #1e40af;
    color: #fff;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
}

/* ============================= */
/* CARDS */
/* ============================= */
.cards {
    display: flex;
    gap: 20px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    flex: 1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 15px;
}

.card .buttons button {
    margin: 5px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: #e0e7ff;
    cursor: pointer;
}

/* ============================= */
/* SEÇÕES */
/* ============================= */
.section {
    padding: 60px 40px;
}

.section-light {
    background: #f9fbff;
}

.section-white {
    background: #ffffff;
}

.section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

/* ============================= */
/* FOOTER */
/* ============================= */
.footer {
    background: #f1f5f9;
    text-align: center;
    padding: 30px;
    font-size: 14px;
    color: #6b7280;
}

/* ============================= */
/* CALCULADORAS */
/* ============================= */
.calc-page {
    padding: 40px;
}

.calc-section {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.calc-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.calc-form input {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.calc-form button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* ============================= */
/* MODAL */
/* ============================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    position: relative;
}

/* ============================= */
/* RESPONSIVIDADE */
/* ============================= 
@media (max-width: 768px) {

    .header {
        padding: 16px;
        text-align: center;
    }

    .hero {
        flex-direction: column;
        padding: 40px 20px;
        gap: 24px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-input {
        flex-direction: column;
        max-width: 100%;
    }

    .hero-input input,
    .hero-input button {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
        margin-top: 10px;
    }

    .cards {
        flex-direction: column;
        padding: 20px;
    }

    .section {
        padding: 40px 20px;
    }

    button {
        min-height: 44px;
    }
}

/* ============================= */
/* METROLOGIA - AJUSTES FINOS */
/* ============================= */

/* Hero da página de metrologia (menor que a home) */
.hero.metrologia {
    padding: 40px 40px;
    min-height: auto;
}

.hero.metrologia h1 {
    font-size: 32px;
}

.hero.metrologia p {
    max-width: 600px;
}

/* Conteúdo principal */
.calc-page {
    max-width: 900px;
    margin: 0 auto;
}

/* Botões de grandeza */
.toggle-btn {
    transition: background 0.2s ease;
}

.toggle-btn:hover {
    background: #1e40af;
}

/* Conteúdo interno */
.toggle-content {
    padding-top: 10px;
}

/* ============================= */
/* MOBILE - METROLOGIA */
/* ============================= */
@media (max-width: 768px) {

    .hero.metrologia {
        padding: 30px 20px;
        text-align: center;
    }

    .hero.metrologia h1 {
        font-size: 24px;
    }

    .calc-page {
        padding: 20px;
    }

    .calc-section {
        padding: 24px 20px;
    }

    .toggle-btn {
        font-size: 15px;
        padding: 12px 14px;
    }
}
