/* --- VARIABLES Y RESET --- */
:root {
    --primary: #4f46e5;
    --secondary: #1e1b4b;
    --accent: #10b981;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #334155;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body { 
    font-family: 'Segoe UI', sans-serif; 
    background-color: var(--bg); 
    color: var(--text);
    display: flex;
    flex-direction: column;
}

/* --- BANNER SUPERIOR --- */
.top-banner {
    background: var(--accent);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    position: relative;
    z-index: 20;
}

/* --- HEADER CON SOLUCIÓN AL CLIP-PATH --- */
header {
    position: relative;
    color: white;
    padding: 3rem 1rem 10rem; /* Espacio para que las cards floten */
    text-align: center;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    /* El recorte se aplica solo a este fondo */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    z-index: -1;
}

.header-top {
    max-width: 1100px;
    margin: 0 auto 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul { display: flex; list-style: none; gap: 20px; padding: 0; }
nav a { color: white; text-decoration: none; font-weight: 500; }

.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-buttons { display: flex; justify-content: center; gap: 15px; }

/* --- CONTENIDO Y GRID --- */
main { flex: 1 0 auto; }

.container {
    max-width: 1100px;
    margin: -100px auto 50px; /* Sube las tarjetas sobre la curva */
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    position: relative;
    z-index: 10; /* Asegura que esté por encima del recorte azul */
}

/* Tarjetas */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.badge {
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

blockquote {
    border-left: 4px solid var(--primary);
    background: #f1f5f9;
    padding: 15px;
    margin: 20px 0;
    font-style: italic;
}

/* Widgets del Sidebar */
.sidebar-widget {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sidebar-widget h3 { margin-top: 0; border-bottom: 2px solid var(--bg); padding-bottom: 10px; }
.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget a { color: var(--primary); text-decoration: none; }

.newsletter input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Botones */
.btn { padding: 12px 25px; border-radius: 30px; border: none; cursor: pointer; font-weight: 600; }
.btn.active { background: var(--accent); color: white; }
.btn-sm { background: var(--primary); color: white; border: none; padding: 10px; border-radius: 8px; width: 100%; cursor: pointer; }

/* --- FOOTER --- */
footer {
    background: var(--secondary);
    color: #cbd5e1;
    padding: 40px 20px;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: 1100px;
    margin: 0 auto 20px;
    gap: 30px;
}

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* --- MEDIA QUERIES --- */
@media (min-width: 900px) {
    .container {
        grid-template-columns: 2fr 1fr; /* Layout de dos columnas */
    }

    .features-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 30px;
    }
}