/* =========================================
   Variables y Configuración Base
   ========================================= */
:root {
    --primary-color: #4A90E2;
    --primary-hover: #357ABD;
    --bg-color: #f4f7f6;
    --text-main: #333333;
    --text-muted: #666666;
    --card-bg: #ffffff;
    --highlight-color: #8E44AD; /* Morado para la IA */
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header y Menú del Ecosistema
   ========================================= */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ecosystem-menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.ecosystem-menu a {
    color: #aeb6bf;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.ecosystem-menu a:hover,
.ecosystem-menu a.active {
    color: white;
}

/* =========================================
   Sección Hero (Título)
   ========================================= */
.hero {
    padding: 60px 20px 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* =========================================
   Grilla de Herramientas
   ========================================= */
main {
    flex: 1; /* Empuja el footer hacia abajo */
}

.tools-grid {
    display: grid;
    /* Crea columnas que se adaptan solas al ancho de la pantalla */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0 60px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.tool-card i {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tool-card h2 {
    font-size: 1.3rem;
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Destacar la herramienta de IA */
.tool-card.highlight {
    border: 2px solid var(--highlight-color);
    position: relative;
    overflow: hidden;
}

.tool-card.highlight i {
    color: var(--highlight-color);
}

.tool-card.highlight::before {
    content: '¡Nuevo!';
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--highlight-color);
    color: white;
    padding: 5px 30px;
    font-size: 0.8rem;
    font-weight: bold;
    transform: rotate(45deg);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: #2c3e50;
    color: #aeb6bf;
    padding: 20px 0;
    margin-top: auto;
}

/* =========================================
   Herramientas Individuales (Zona de Trabajo)
   ========================================= */
.tool-workspace {
    padding: 20px 0 60px;
    max-width: 800px;
    margin: 0 auto;
}

.upload-zone {
    border: 3px dashed #c0cdd6;
    border-radius: 15px;
    padding: 60px 20px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: #f8fbff;
}

.upload-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-btn:hover {
    background-color: var(--primary-hover);
}

.upload-btn i {
    margin-bottom: 10px;
}

.action-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #27ae60;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background-color: #219653;
}

/* Ocultar canvas por defecto hasta que tenga contenido */
canvas {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* =========================================
   Banner Publicitario
   ========================================= */
.ad-container {
    width: 100%;
    max-width: 728px; /* Ancho estándar máximo para banners */
    margin: 30px auto 0 auto; /* 30px de separación con el subtítulo */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ajuste para celulares */
@media (max-width: 600px) {
    .ad-container {
        margin-top: 20px;
        padding: 0 10px;
    }
}
