/* RESET GLOBAL & VARIABLES */
:root {
    --primary: #00b894;
    --primary-dark: #00886d;
    --accent: #fdcb6e;
    --bg: #f4f7f6;
    --card: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #dfe6e9;
    --font: 'Poppins', sans-serif;
}

[data-theme="dark"] {
    --bg: #1e1e1e;
    --card: #2d2d2d;
    --text: #dfe6e9;
    --text-light: #b2bec3;
    --border: #444;
}

/* Fix Responsive Vital */
* {
    box-sizing: border-box; 
}

body { 
    font-family: var(--font); 
    background: var(--bg); 
    color: var(--text); 
    margin: 0; 
    padding-bottom: 60px; 
    overflow-x: hidden; 
    width: 100vw;
}

/* HEADER */
header { background: var(--card); padding: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 1.3rem; margin: 0; color: var(--primary); font-weight: 600; }
.subheader { display: flex; justify-content: space-between; padding-top: 10px; font-size: 0.8rem; color: var(--text-light); }

/* LAYOUT & CARDS */
main {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.card { 
    background: var(--card); 
    border-radius: 16px; 
    padding: 15px; 
    margin-bottom: 20px; 
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
    border: 1px solid var(--border); 
}

.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.step-number { background: var(--primary); color: white; width: 25px; height: 25px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; flex-shrink: 0;}

/* MAP & INPUTS */
#map { height: 250px; width: 100%; border-radius: 12px; margin: 10px 0; z-index: 0; }

.input-grid { display: flex; flex-direction: column; gap: 10px; }
.main-input { width: 100%; }

.small-inputs { 
    display: flex; 
    gap: 8px; 
    width: 100%; 
}

.small-inputs input { 
    flex: 1; /* Se estiran equitativamente */
    min-width: 0; 
}

.btn-add { 
    flex: 0 0 50px; /* Tamaño fijo */
    background: var(--accent); 
    border: none; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    color: #2d3436;
}

input, select, button { padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: var(--font); }
.btn-cta { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; width: 100%; font-size: 1.1rem; font-weight: 600; border: none; margin-top: 15px; cursor: pointer; box-shadow: 0 4px 15px rgba(0,184,148,0.3); }

/* TABLES */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
td { padding: 8px; border-bottom: 1px solid var(--border); }

/* RESULTADOS & IMPACTO */
.impact-card { background: linear-gradient(135deg, #55efc4, #00b894); color: #0f3d31; text-align: center; border: none; }
.impact-metrics { display: flex; justify-content: space-around; margin-top: 20px; }
.metric .icon { font-size: 2.5rem; animation: bounce 2s infinite; }
.metric .val { font-size: 1.4rem; font-weight: 800; }

.tech-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
.result-item { background: rgba(0,0,0,0.03); padding: 15px; border-radius: 10px; text-align: center; }
.result-item h4 { margin: 0 0 5px 0; color: var(--primary); font-size: 0.9rem;}
.result-item strong { font-size: 1.1rem; }

/* --- MONETIZACIÓN / AMAZON --- */
.amazon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.shop-card {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.shop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #f39c12;
}

.shop-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: #f39c12;
}

.shop-icon { font-size: 2rem; margin-right: 15px; }
.shop-info h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.shop-info p { margin: 4px 0; font-size: 0.85rem; color: var(--text-light); }
.shop-cta { font-size: 0.8rem; color: #e67e22; font-weight: bold; text-transform: uppercase; }

.amazon-disclaimer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 15px;
    opacity: 0.8;
}

/* ADS & PREMIUM */
.ad-banner {
    width: 100%; max-width: 800px; margin: 10px auto; min-height: 100px;
    background: rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center;
    border-radius: 8px; text-align: center;
}

.premium-banner { margin-top: 20px; border: 2px dashed var(--accent); padding: 15px; border-radius: 12px; text-align: center; background: rgba(253, 203, 110, 0.1); }
.btn-secondary { background: var(--text); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin-top: 10px; }

/* Utilities & Animations */
.hidden { display: none; }
.pulsate { animation: pulse 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
.fade-in { animation: fadeIn 0.5s ease-out; }
.fade-in-up { animation: fadeInUp 0.6s ease-out forwards; opacity: 0; transform: translateY(20px); }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.page-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    min-height: 60vh; /* Para que no se vea vacía */
}

.page-title {
    color: var(--primary);
    border-bottom: 2px solid var(--bg);
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-align: center;
}

/* --- FORMULARIO DE CONTACTO --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* --- SPONSOR BANNER FIX --- */
.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Asegura que el banner se vea completo */
    display: block;
}

/* --- FOOTER GLOBAL --- */
footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    margin-top: auto; /* Push footer down */
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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