@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary: #1a1816;
    --secondary: #f7f3ee;
    --accent: #ff7e00;
    --bg: #fdfbf7;
    --card-bg: #ffffff;
    --text: #3d3935;
    --font-main: 'Nunito', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header & Nav */
.site-header {
    width: 100%;
    background: var(--card-bg);
    padding: 16px 24px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
}
.logo-container svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}
.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 8px;
}
.menu-btn svg {
    width: 28px;
    height: 28px;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.mobile-menu.active {
    right: 0;
}
.menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #a39e98;
    margin-bottom: 24px;
}
.menu-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.menu-links a {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 12px 0;
    border-bottom: 1px solid var(--secondary);
}
.menu-links a:hover {
    color: var(--accent);
}
.menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 24, 22, 0.4);
    z-index: 999;
    display: none;
    backdrop-filter: blur(4px);
}
.menu-overlay.active {
    display: block;
}

.container {
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
    padding: 24px 16px;
    flex: 1;
}

h1.seo-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin: 0 0 24px;
    letter-spacing: -0.5px;
}

.box {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(26, 24, 22, 0.04);
    margin-bottom: 16px;
    border: 1px solid rgba(0,0,0,0.02);
}

/* Inputs */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.input-group { width: 100%; }
label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
input, select, textarea {
    width: 100%; 
    padding: 16px; 
    border: 2px solid transparent;
    background-color: var(--secondary);
    border-radius: 16px; 
    font-size: 16px; 
    font-family: var(--font-main);
    font-weight: 600;
    box-sizing: border-box;
    color: var(--primary);
    transition: all 0.3s ease;
    appearance: none;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1816' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 12px center;
    background-size: 18px;
    background-repeat: no-repeat;
    padding-right: 40px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(255, 126, 0, 0.1);
}

/* Resultados */
.res-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 16px 0; 
    border-bottom: 1px solid #f0ebe1;
    font-size: 1.1rem;
    color: var(--primary);
}
.res-row:last-of-type { border-bottom: none; }
.res-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.res-label svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}
.fraction-val { 
    font-weight: 800; 
    color: var(--primary); 
    font-size: 1.6rem; 
    white-space: nowrap;
}
#pesoInfo {
    text-align: center;
    color: var(--accent);
    font-size: 0.95rem;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 700;
}

/* Botones */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    font-family: var(--font-main);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-sizing: border-box;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 24, 22, 0.2);
}
.btn-primary:hover { 
    background: #333; 
    transform: translateY(-2px);
}
.btn-secondary {
    background: linear-gradient(135deg, #ff9e43 0%, #fffaf5 100%);
    color: var(--primary);
    border: 1px solid #ffebd6;
    box-shadow: 0 4px 15px rgba(255, 158, 67, 0.15);
}
.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(255, 126, 0, 0.25);
    transform: translateY(-2px);
}
.btn-text {
    background: transparent;
    color: #888;
    font-size: 0.95rem;
    margin-top: 8px;
    box-shadow: none;
}
.btn-text:hover { color: var(--primary); }
.action-buttons {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.metrics { 
    text-align: center; 
    font-size: 0.9rem; 
    color: #888; 
    margin-top: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.external-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* FAB */
.fab-voice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    border: none;
    box-shadow: 0 8px 25px rgba(26, 24, 22, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
}
.fab-voice:active { transform: scale(0.92); }
.fab-voice svg { width: 28px; height: 28px; }

/* Footer */
footer { 
    padding: 30px 20px; 
    text-align: center; 
    font-size: 0.9rem; 
    color: #a39e98; 
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
}
.legal-links {
    margin-top: 12px;
    font-size: 0.8rem;
}
.legal-links a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}
.legal-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 16px 24px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}
.cookie-banner.show {
    transform: translateY(0);
}
.cookie-banner p { margin: 0; flex: 1; padding-right: 16px; }
.cookie-banner button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.blog-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s;
    border: 1px solid rgba(0,0,0,0.02);
    display: block;
}
.blog-card:hover {
    transform: translateY(-4px);
}
.blog-img {
    width: 100%;
    height: 180px;
    background: var(--secondary);
    object-fit: cover;
}
.blog-content {
    padding: 20px;
}
.blog-tag {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 8px 0;
}
.blog-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Text Content Pages */
.text-content {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(26, 24, 22, 0.04);
    line-height: 1.8;
}
.text-content h2 {
    color: var(--primary);
    margin-top: 32px;
}
.text-content p {
    color: #555;
}

/* Bottom Sheet Modals */
.bs-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 24, 22, 0.4); z-index: 2000;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.bs-overlay.active { opacity: 1; visibility: visible; }

.bottom-sheet {
    position: fixed; bottom: -100%; left: 0; width: 100%;
    background: var(--card-bg); border-radius: 24px 24px 0 0;
    z-index: 2001; transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    padding: 24px; box-sizing: border-box; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.bottom-sheet.active { bottom: 0; }

.bs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.bs-title { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin: 0; }
.bs-close { background: none; border: none; font-size: 28px; color: #a39e98; cursor: pointer; padding: 0; line-height: 1; }

.bs-option {
    padding: 16px; border-bottom: 1px solid var(--secondary);
    font-size: 1.05rem; font-weight: 700; color: var(--primary);
    cursor: pointer; transition: background 0.2s; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
}
.bs-option:hover { background: var(--secondary); }
.bs-option:last-child { border-bottom: none; }
.bs-option.selected { color: var(--accent); background: var(--secondary); }

.bs-group-label {
    font-size: 0.8rem; font-weight: 800; color: var(--accent);
    text-transform: uppercase; margin: 20px 0 8px 8px; letter-spacing: 0.5px;
}

/* Custom Select Trigger */
.select-trigger {
    width: 100%; padding: 16px; background-color: var(--secondary);
    border-radius: 16px; font-size: 16px; font-family: var(--font-main);
    font-weight: 600; color: var(--primary); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    border: 2px solid transparent; transition: all 0.3s ease; box-sizing: border-box;
}
.select-trigger:active { border-color: var(--accent); background-color: #fff; }
.select-trigger svg { width: 20px; height: 20px; color: var(--primary); }
